diff --git a/COPYING b/COPYING index 829ec64179..b790734971 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,5 @@ This is the license which applies to OpenTTD with the exception of some -3rd party modules. See readme.txt for details +3rd party modules. See README.md for details GNU GENERAL PUBLIC LICENSE diff --git a/Doxyfile b/Doxyfile index 58d7f0a89a..251b36be15 100644 --- a/Doxyfile +++ b/Doxyfile @@ -8,9 +8,14 @@ #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = OpenTTD +PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = OUTPUT_DIRECTORY = docs/source/ -CREATE_SUBDIRS = NO +CREATE_SUBDIRS = YES +ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES @@ -32,22 +37,42 @@ STRIP_FROM_PATH = ./ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 2 ALIASES = +TCL_SUBST = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 0 +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = YES +EXTRACT_PACKAGE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = YES HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO @@ -55,11 +80,17 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES @@ -67,22 +98,27 @@ GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- INPUT = ./src/ +INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.c \ *.cc \ *.cxx \ @@ -93,31 +129,38 @@ FILE_PATTERNS = *.c \ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */3rdparty */.svn */script/api +EXCLUDE_PATTERNS = */3rdparty \ + */script/api +EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO -IMAGE_PATH =./docs/ +IMAGE_PATH = ./docs/ INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = YES INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html @@ -125,19 +168,58 @@ HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = YES +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_MENUS = YES +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO +CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = YES +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES +ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/ +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = NO +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- -# configuration options related to the LaTeX output +# Configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex @@ -147,12 +229,18 @@ COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO #--------------------------------------------------------------------------- -# configuration options related to the RTF output +# Configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf @@ -160,27 +248,33 @@ COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO #--------------------------------------------------------------------------- -# configuration options related to the man page output +# Configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 +MAN_SUBDIR = MAN_LINKS = NO #--------------------------------------------------------------------------- -# configuration options related to the XML output +# Configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- -# configuration options related to the Perl module output +# Configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO @@ -195,42 +289,67 @@ EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = -PREDEFINED = ENABLE_NETWORK WITH_ZLIB WITH_LZO WITH_LZMA WITH_SDL WITH_PNG WITH_FONTCONFIG WITH_FREETYPE WITH_ICU_SORT WITH_ICU_LAYOUT UNICODE _UNICODE _GNU_SOURCE FINAL= +PREDEFINED = ENABLE_NETWORK \ + WITH_ZLIB \ + WITH_LZO \ + WITH_LZMA \ + WITH_SDL \ + WITH_PNG \ + WITH_FONTCONFIG \ + WITH_FREETYPE \ + WITH_ICU_SORT \ + WITH_ICU_LAYOUT \ + UNICODE \ + _UNICODE \ + _GNU_SOURCE \ + FINAL= EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration options related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = objs/openttd.tag ALLEXTERNALS = NO EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES +MSCGEN_PATH = +DIA_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO +CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO DOT_PATH = DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 1000 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/Makefile.bundle.in b/Makefile.bundle.in index aafd3ca261..eaf7134dde 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -1,4 +1,4 @@ -# $Id: Makefile.bundle.in 27558 2016-05-11 18:39:18Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -12,15 +12,15 @@ # The revision is needed for the bundle name and creating an OSX application bundle. # Detect the revision VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh") -REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') +VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') -# Make sure we have something in REV -ifeq ($(REV),) -REV := norev000 +# Make sure we have something in VERSION +ifeq ($(VERSION),) +VERSION := norev000 endif ifndef BUNDLE_NAME -BUNDLE_NAME = openttd-custom-$(REV)-$(OS) +BUNDLE_NAME = openttd-custom-$(VERSION)-$(OS) endif # An OSX application bundle needs the data files, lang files and openttd executable in a different location. @@ -54,7 +54,7 @@ ifdef OSXAPP $(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources" $(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo" $(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns" - $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(REV)" + $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(VERSION)" $(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(BASESET_DIR)" endif ifeq ($(OS),UNIX) @@ -69,7 +69,7 @@ endif $(Q)cp "$(BIN_DIR)/baseset/opntitle.dat" "$(BASESET_DIR)/" $(Q)cp "$(BIN_DIR)/baseset/"*.obm "$(BASESET_DIR)/" $(Q)cp "$(BIN_DIR)/lang/"*.lng "$(LANG_DIR)/" - $(Q)cp "$(ROOT_DIR)/readme.txt" "$(BUNDLE_DIR)/" + $(Q)cp "$(ROOT_DIR)/README.md" "$(BUNDLE_DIR)/" $(Q)cp "$(ROOT_DIR)/COPYING" "$(BUNDLE_DIR)/" $(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/" $(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/" @@ -88,7 +88,7 @@ ifdef MENU_DIR $(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install" endif ifeq ($(TTD), openttd.exe) - $(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt" + $(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt" ifeq ($(OS), DOS) $(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.txt" "$(BUNDLE_DIR)/docs/" ifndef STRIP @@ -151,15 +151,15 @@ bundle_lha: bundle bundle_dmg: bundle @echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg' - $(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(REV)" - $(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(REV)" - $(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(REV)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg" - $(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(REV)" + $(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(VERSION)" + $(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(VERSION)" + $(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(VERSION)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg" + $(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(VERSION)" bundle_exe: all @echo '[BUNDLE] Creating $(BUNDLE_NAME).exe' $(Q)mkdir -p "$(BUNDLES_DIR)" - $(Q)unix2dos "$(ROOT_DIR)/docs/"*.txt "$(ROOT_DIR)/readme.txt" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt" + $(Q)unix2dos "$(ROOT_DIR)/docs/"*.txt "$(ROOT_DIR)/README.md" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt" $(Q)cd $(ROOT_DIR)/os/windows/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi $(Q)mv $(ROOT_DIR)/os/windows/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe" @@ -188,7 +188,7 @@ endif $(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts" ifndef DO_NOT_INSTALL_DOCS $(Q)install -d "$(INSTALL_DOC_DIR)" - $(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/known-bugs.txt" "$(INSTALL_DOC_DIR)" + $(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/known-bugs.txt" "$(INSTALL_DOC_DIR)" endif ifndef DO_NOT_INSTALL_CHANGELOG $(Q)install -d "$(INSTALL_DOC_DIR)" diff --git a/Makefile.grf.in b/Makefile.grf.in index 2d2709f58c..8e8113a033 100644 --- a/Makefile.grf.in +++ b/Makefile.grf.in @@ -1,4 +1,4 @@ -# $Id: Makefile.grf.in 27730 2017-01-14 15:48:19Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -42,11 +42,22 @@ MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum") NFO_FILES := $(GRF_DIR)/*.nfo $(GRF_DIR)/rivers/*.nfo PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png +# List of target files. +OBT_FILES := $(BIN_DIR)/orig_dos.obg +OBT_FILES += $(BIN_DIR)/orig_dos_de.obg +OBT_FILES += $(BIN_DIR)/orig_win.obg +OBT_FILES += $(BIN_DIR)/orig_dos.obs +OBT_FILES += $(BIN_DIR)/orig_win.obs +OBT_FILES += $(BIN_DIR)/no_sound.obs +OBT_FILES += $(BIN_DIR)/orig_dos.obm +OBT_FILES += $(BIN_DIR)/orig_win.obm +OBT_FILES += $(BIN_DIR)/no_music.obm +OBT_FILES += $(BIN_DIR)/orig_tto.obm + # Build the GRF. +all: $(OBT_FILES) ifdef GRFCODEC -all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf $(BIN_DIR)/orig_dos.obg $(BIN_DIR)/orig_dos_de.obg $(BIN_DIR)/orig_win.obg $(BIN_DIR)/orig_dos.obs $(BIN_DIR)/orig_win.obs $(BIN_DIR)/no_sound.obs $(BIN_DIR)/orig_win.obm $(BIN_DIR)/no_music.obm -else -all: +all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf endif $(OBJS_DIR)/langfiles.tmp: $(LANG_DIR)/*.txt @@ -67,6 +78,10 @@ $(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/ $(E) '$(STAGE) Updating $(notdir $@)' $(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@ +# Guard against trying to run GRFCODEC/NFORENUM without either being set. +ifdef GRFCODEC +ifdef NFORENUM + # Compile extra grf $(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk $(E) '$(STAGE) Assembling openttd.nfo' @@ -89,9 +104,12 @@ $(BIN_DIR)/orig_extra.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk $(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/orig_extra.grf $(Q)cp $(OBJS_DIR)/orig_extra.grf $(BIN_DIR)/orig_extra.grf +endif +endif + # Clean up temporary files. clean: - $(Q)rm -f *.bak *.grf + $(Q)rm -f *.bak *.grf $(OBT_FILES) # Clean up temporary files mrproper: clean diff --git a/Makefile.in b/Makefile.in index e230baf5af..d33d8a0d2a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in 27730 2017-01-14 15:48:19Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/Makefile.lang.in b/Makefile.lang.in index a470abad00..2853ae3898 100644 --- a/Makefile.lang.in +++ b/Makefile.lang.in @@ -1,4 +1,4 @@ -# $Id: Makefile.lang.in 26497 2014-04-24 18:09:10Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -6,7 +6,6 @@ # See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . STRGEN = !!STRGEN!! -ENDIAN_CHECK = !!ENDIAN_CHECK!! SRC_DIR = !!SRC_DIR!! LANG_DIR = !!LANG_DIR!! BIN_DIR = !!BIN_DIR!! @@ -25,11 +24,6 @@ ifeq ($(LANG_SUPPRESS), yes) LANG_ERRORS = >/dev/null 2>&1 endif -# Make sure endian_host.h is reachable as if it was in the src/ dir -CFLAGS_BUILD += -I $(LANG_OBJS_DIR) - -ENDIAN_TARGETS := endian_host.h endian_target.h $(ENDIAN_CHECK) - # Check if we want to show what we are doing ifdef VERBOSE Q = @@ -43,19 +37,19 @@ RES := $(shell mkdir -p $(BIN_DIR)/lang ) all: table/strings.h $(LANGS) -strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h +strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< -strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h +strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< -string.o: $(SRC_DIR)/string.cpp endian_host.h $(SRC_DIR)/safeguards.h +string.o: $(SRC_DIR)/string.cpp $(SRC_DIR)/safeguards.h $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< -alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h $(SRC_DIR)/safeguards.h +alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp $(SRC_DIR)/safeguards.h $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< @@ -80,21 +74,11 @@ $(LANGS): %.lng: $(LANG_DIR)/%.txt $(STRGEN) lang/english.txt $(E) '$(STAGE) Compiling language $(*F)' $(Q)./$(STRGEN) $(STRGEN_FLAGS) -s $(LANG_DIR) -d $(LANG_OBJS_DIR) $< $(LANG_ERRORS) && cp $@ $(BIN_DIR)/lang || true # Do not fail all languages when one fails -# The targets to compile the endian-code - -endian_host.h: $(ENDIAN_CHECK) - $(E) '$(STAGE) Testing endianness for host' - $(Q)./$(ENDIAN_CHECK) > $@ - -$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp - $(E) '$(STAGE) Compiling and Linking $@' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@ - depend: clean: $(E) '$(STAGE) Cleaning up language files' - $(Q)rm -f strgen.o string.o alloc_func.o getoptdata.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.* $(ENDIAN_TARGETS) + $(Q)rm -f strgen_base.o strgen.o string.o alloc_func.o getoptdata.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.* mrproper: clean $(Q)rm -rf $(BIN_DIR)/lang diff --git a/Makefile.msvc b/Makefile.msvc index 7e76ea2587..0a02c8cf95 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -1,4 +1,4 @@ -# $Id: Makefile.msvc 22581 2011-06-13 10:35:19Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/Makefile.setting.in b/Makefile.setting.in index a48b9df446..1e2dc992f8 100644 --- a/Makefile.setting.in +++ b/Makefile.setting.in @@ -1,4 +1,4 @@ -# $Id: Makefile.setting.in 26497 2014-04-24 18:09:10Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -6,7 +6,6 @@ # See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . SETTINGSGEN = !!SETTINGSGEN!! -ENDIAN_CHECK = !!ENDIAN_CHECK!! SRC_DIR = !!SRC_DIR!! CXX_BUILD = !!CXX_BUILD!! CFLAGS_BUILD = !!CFLAGS_BUILD!! @@ -15,8 +14,6 @@ LDFLAGS_BUILD = !!LDFLAGS_BUILD!! STAGE = !!STAGE!! SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!! -ENDIAN_TARGETS := endian_host.h endian_target.h $(ENDIAN_CHECK) - # Check if we want to show what we are doing ifdef VERBOSE Q = @@ -32,7 +29,7 @@ settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $ $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< -alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h $(SRC_DIR)/safeguards.h +alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp $(SRC_DIR)/safeguards.h $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< @@ -40,7 +37,7 @@ getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h $(SRC_ $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< -string.o: $(SRC_DIR)/string.cpp endian_host.h $(SRC_DIR)/safeguards.h +string.o: $(SRC_DIR)/string.cpp $(SRC_DIR)/safeguards.h $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< @@ -57,21 +54,11 @@ table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR) @mkdir -p table $(Q)./$(SETTINGSGEN) -o table/settings.h -b $(SRC_DIR)/table/settings.h.preamble -a $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini -# The targets to compile the endian-code - -endian_host.h: $(ENDIAN_CHECK) - $(E) '$(STAGE) Testing endianness for host' - $(Q)./$(ENDIAN_CHECK) > $@ - -$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp - $(E) '$(STAGE) Compiling and Linking $@' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@ - depend: clean: $(E) '$(STAGE) Cleaning up settings files' - $(Q)rm -f settingsgen.o alloc_func.o getoptdata.o ini_load.o $(SETTINGSGEN) $(ENDIAN_TARGETS) table/settings.h + $(Q)rm -f settingsgen.o alloc_func.o getoptdata.o string.o ini_load.o $(SETTINGSGEN) table/settings.h mrproper: clean diff --git a/Makefile.src.in b/Makefile.src.in index 60612ca6a6..94534fd60f 100644 --- a/Makefile.src.in +++ b/Makefile.src.in @@ -1,4 +1,4 @@ -# $Id: Makefile.src.in 27558 2016-05-11 18:39:18Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -29,9 +29,7 @@ SCRIPT_SRC_DIR = !!SCRIPT_SRC_DIR!! MEDIA_DIR = !!MEDIA_DIR!! TTD = !!TTD!! STRGEN = !!STRGEN!! -ENDIAN_CHECK = !!ENDIAN_CHECK!! DEPEND = !!DEPEND!! -ENDIAN_FORCE = !!ENDIAN_FORCE!! OS = !!OS!! STAGE = !!STAGE!! MAKEDEPEND = !!MAKEDEPEND!! @@ -40,7 +38,6 @@ SORT = !!SORT!! AWK = !!AWK!! CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!! CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!! -CONFIG_CACHE_ENDIAN = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_ENDIAN!! CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!! CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!! @@ -52,19 +49,16 @@ OBJS := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC) SRCS := !!SRCS!! # All C-files depend on those 3 files -FILE_DEP := $(CONFIG_CACHE_COMPILER) endian_target.h +FILE_DEP := $(CONFIG_CACHE_COMPILER) # Create all dirs and subdirs RES := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS)))) -# Make sure endian_target.h is reasable as if it was in the src/ dir CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR) CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR) ifdef SCRIPT_SRC_DIR CFLAGS_MAKEDEP += -I $(SCRIPT_SRC_DIR) endif -ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK) - # Check if we want to show what we are doing ifdef VERBOSE Q = @@ -94,26 +88,26 @@ VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh") MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ') # Use autodetected revisions -REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') -REV_NR := $(shell echo "$(VERSIONS)" | cut -f 2 -d' ') +VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') +ISODATE := $(shell echo "$(VERSIONS)" | cut -f 2 -d' ') +GITHASH := $(shell echo "$(VERSIONS)" | cut -f 4 -d' ') -# Make sure we have something in REV and REV_NR -ifeq ($(REV),) -REV := norev000 +# Make sure we have something in VERSION and ISODATE +ifeq ($(VERSION),) +VERSION := norev000 endif -ifeq ($(REV_NR),) -REV_NR := 0 +ifeq ($(ISODATE),) +ISODATE := 00000000 endif # This helps to recompile if flags change RES := $(shell if [ "`cat $(CONFIG_CACHE_COMPILER) 2>/dev/null`" != "$(CFLAGS) $(CXXFLAGS)" ]; then echo "$(CFLAGS) $(CXXFLAGS)" > $(CONFIG_CACHE_COMPILER); fi ) RES := $(shell if [ "`cat $(CONFIG_CACHE_LINKER) 2>/dev/null`" != "$(LDFLAGS) $(LIBS)" ]; then echo "$(LDFLAGS) $(LIBS)" > $(CONFIG_CACHE_LINKER); fi ) -RES := $(shell if [ "`cat $(CONFIG_CACHE_ENDIAN) 2>/dev/null`" != "$(ENDIAN_FORCE)" ]; then echo "$(ENDIAN_FORCE)" > $(CONFIG_CACHE_ENDIAN); fi ) # If there is a change in the source-file-list, make sure we recheck the deps RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi ) # If there is a change in the revision, make sure we recompile rev.cpp -RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV) $(MODIFIED)" ]; then echo "$(REV) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi ) +RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(VERSION) $(MODIFIED)" ]; then echo "$(VERSION) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi ) ifndef MAKEDEPEND # The slow, but always correct, dep-check @@ -121,7 +115,7 @@ DEP_MASK := %.d DEPS := $(OBJS:%.o=%.d) # Only include the deps if we are compiling everything -ifeq ($(filter $(ENDIAN_TARGETS) %.o clean mrproper, $(MAKECMDGOALS)),) +ifeq ($(filter %.o clean mrproper, $(MAKECMDGOALS)),) -include $(DEPS) else # In case we want to compile a single target, include the .d file for it @@ -155,7 +149,7 @@ DEP_MASK := DEPS := Makefile.dep # Only include the deps if we are not cleaning -ifeq ($(filter $(ENDIAN_TARGETS) depend clean mrproper, $(MAKECMDGOALS)),) +ifeq ($(filter depend clean mrproper, $(MAKECMDGOALS)),) -include Makefile.dep endif @@ -166,6 +160,19 @@ $(SRC_OBJS_DIR)/$(DEPEND): $(SRC_DIR)/depend/depend.cpp $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) -o $@ $< endif +# Macro for invoking a command on groups of 100 words at a time +# (analogous to xargs(1)). The macro invokes itself recursively +# until the list of words is depleted. +# +# Usage: $(call xargs,COMMAND,LIST) +# +# COMMAND should be a shell command to which the words will be +# appended as arguments in groups of 100. +define xargs +$(1) $(wordlist 1,100,$(2)) +$(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) +endef + # Make sure that only 'make depend' ALWAYS triggers a recheck ifeq ($(filter depend, $(MAKECMDGOALS)),) Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) $(DEP) @@ -177,14 +184,7 @@ endif $(Q)touch Makefile.dep.tmp # Calculate the deps via makedepend - $(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -- $(CFLAGS_MAKEDEP) -- $(SRCS:%=$(SRC_DIR)/%) 2>/dev/null - -# Convert x:/... paths to /x/... for mingw -ifeq ($(OS), MINGW) - @cat Makefile.dep.tmp | sed 's@/\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw - @cp Makefile.dep.tmp.mingw Makefile.dep.tmp - @rm -f Makefile.dep.tmp.mingw -endif + $(call xargs,$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -a -- $(CFLAGS_MAKEDEP) -- 2>/dev/null,$(SRCS:%=$(SRC_DIR)/%)) # Remove all comments and includes that don't start with $(SRC_DIR) # Remove $(SRC_DIR) from object-file-name @@ -251,7 +251,7 @@ $(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP) $(OBJS_RC): %.o: $(SRC_DIR)/%.rc $(FILE_DEP) $(E) '$(STAGE) Compiling resource $(<:$(SRC_DIR)/%.rc=%.rc)' - $(Q)$(WINDRES) -o $@ -I `basename $<` $< + $(Q)$(WINDRES) -o $@ $< $(BIN_DIR)/$(TTD): $(TTD) $(Q)cp $(TTD) $(BIN_DIR)/$(TTD) @@ -264,14 +264,7 @@ endif $(TTD): $(OBJS) $(CONFIG_CACHE_LINKER) $(E) '$(STAGE) Linking $@' -ifeq ($(OS), PSP) - # Because of a bug in the PSP GCC tools, linking via CXX results - # in total chaos and more problems then you can handle. So we need - # CC to link OpenTTD for PSP - $(Q)+$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ -else $(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ -endif ifdef STRIP $(Q)$(STRIP) $@ endif @@ -280,23 +273,13 @@ ifeq ($(OS), DOS) $(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@ endif -# The targets to compile the endian-code - -endian_target.h: $(ENDIAN_CHECK) $(CONFIG_CACHE_ENDIAN) - $(E) '$(STAGE) Testing endianness for target' - $(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ - -$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp - $(E) '$(STAGE) Compiling and Linking $@' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@ - # Revision files $(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in -# $(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/rev.cpp + $(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g" > $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in - $(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/os/windows/ottdres.rc + $(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g" > $(SRC_DIR)/os/windows/ottdres.rc FORCE: @@ -304,7 +287,7 @@ depend: $(DEPS) clean: $(E) '$(STAGE) Cleaning up object files' - $(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(BIN_DIR)/baseset/openttd.32.bmp $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_ENDIAN) $(CONFIG_CACHE_SOURCE) $(ENDIAN_TARGETS) + $(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(BIN_DIR)/baseset/openttd.32.bmp $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_SOURCE) mrproper: clean $(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 9b57ee42c7..98c03c6731 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -1,4 +1,4 @@ -/* $Id: compat_0.7.nut 26407 2014-03-17 20:05:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -367,3 +367,10 @@ AIOrder.AIOF_UNLOAD_FLAGS <- AIOrder.OF_UNLOAD_FLAGS AIOrder.AIOF_LOAD_FLAGS <- AIOrder.OF_LOAD_FLAGS AIOrder.AIOF_DEPOT_FLAGS <- AIOrder.OF_DEPOT_FLAGS AIOrder.AIOF_INVALID <- AIOrder.OF_INVALID + +/* 1.9 adds a vehicle type parameter. */ +AIBridge._GetName <- AIBridge.GetName; +AIBridge.GetName <- function(bridge_id) +{ + return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); +} diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut index 5274854f07..627c949cc3 100644 --- a/bin/ai/compat_1.0.nut +++ b/bin/ai/compat_1.0.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.0.nut 26407 2014-03-17 20:05:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -119,3 +119,10 @@ AIOrder.AIOF_UNLOAD_FLAGS <- AIOrder.OF_UNLOAD_FLAGS AIOrder.AIOF_LOAD_FLAGS <- AIOrder.OF_LOAD_FLAGS AIOrder.AIOF_DEPOT_FLAGS <- AIOrder.OF_DEPOT_FLAGS AIOrder.AIOF_INVALID <- AIOrder.OF_INVALID + +/* 1.9 adds a vehicle type parameter. */ +AIBridge._GetName <- AIBridge.GetName; +AIBridge.GetName <- function(bridge_id) +{ + return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); +} diff --git a/bin/ai/compat_1.1.nut b/bin/ai/compat_1.1.nut index f10a968a42..a47f3d5b16 100644 --- a/bin/ai/compat_1.1.nut +++ b/bin/ai/compat_1.1.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.1.nut 26407 2014-03-17 20:05:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,3 +56,10 @@ AIOrder.AIOF_UNLOAD_FLAGS <- AIOrder.OF_UNLOAD_FLAGS AIOrder.AIOF_LOAD_FLAGS <- AIOrder.OF_LOAD_FLAGS AIOrder.AIOF_DEPOT_FLAGS <- AIOrder.OF_DEPOT_FLAGS AIOrder.AIOF_INVALID <- AIOrder.OF_INVALID + +/* 1.9 adds a vehicle type parameter. */ +AIBridge._GetName <- AIBridge.GetName; +AIBridge.GetName <- function(bridge_id) +{ + return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); +} diff --git a/bin/ai/compat_1.2.nut b/bin/ai/compat_1.2.nut index 059133be75..95ccabda24 100644 --- a/bin/ai/compat_1.2.nut +++ b/bin/ai/compat_1.2.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.2.nut 26407 2014-03-17 20:05:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -8,3 +8,10 @@ */ AILog.Info("1.2 API compatibility in effect."); + +/* 1.9 adds a vehicle type parameter. */ +AIBridge._GetName <- AIBridge.GetName; +AIBridge.GetName <- function(bridge_id) +{ + return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); +} diff --git a/bin/ai/compat_1.3.nut b/bin/ai/compat_1.3.nut index 8d24e62c1e..fc8e06bf5e 100644 --- a/bin/ai/compat_1.3.nut +++ b/bin/ai/compat_1.3.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.3.nut 26407 2014-03-17 20:05:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -8,3 +8,10 @@ */ AILog.Info("1.3 API compatibility in effect."); + +/* 1.9 adds a vehicle type parameter. */ +AIBridge._GetName <- AIBridge.GetName; +AIBridge.GetName <- function(bridge_id) +{ + return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); +} diff --git a/bin/ai/compat_1.4.nut b/bin/ai/compat_1.4.nut index 19e6796e64..169ead959d 100644 --- a/bin/ai/compat_1.4.nut +++ b/bin/ai/compat_1.4.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.4.nut 26410 2014-03-17 20:28:48Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -8,3 +8,10 @@ */ AILog.Info("1.4 API compatibility in effect."); + +/* 1.9 adds a vehicle type parameter. */ +AIBridge._GetName <- AIBridge.GetName; +AIBridge.GetName <- function(bridge_id) +{ + return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); +} diff --git a/bin/ai/regression/completeness.sh b/bin/ai/regression/completeness.sh index 18e4d1a92a..9f5e96eb0b 100755 --- a/bin/ai/regression/completeness.sh +++ b/bin/ai/regression/completeness.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: completeness.sh 26895 2014-09-21 16:41:03Z fonsinchen $ +# $Id$ if ! [ -f ai/regression/completeness.sh ]; then echo "Make sure you are in the root of OpenTTD before starting this script." diff --git a/bin/ai/regression/regression_info.nut b/bin/ai/regression/regression_info.nut index d964660f14..341d13a085 100644 --- a/bin/ai/regression/regression_info.nut +++ b/bin/ai/regression/regression_info.nut @@ -1,4 +1,4 @@ -/* $Id: regression_info.nut 27780 2017-03-11 20:50:26Z frosch $ */ +/* $Id$ */ class Regression extends AIInfo { function GetAuthor() { return "OpenTTD NoAI Developers Team"; } @@ -6,7 +6,7 @@ class Regression extends AIInfo { function GetShortName() { return "REGR"; } function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; } function GetVersion() { return 1; } - function GetAPIVersion() { return "1.8"; } + function GetAPIVersion() { return "1.9"; } function GetDate() { return "2007-03-18"; } function CreateInstance() { return "Regression"; } } diff --git a/bin/ai/regression/run.sh b/bin/ai/regression/run.sh index d3f416e682..c9197c4d56 100755 --- a/bin/ai/regression/run.sh +++ b/bin/ai/regression/run.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: run.sh 26898 2014-09-21 17:22:50Z rubidium $ +# $Id$ if ! [ -f ai/regression/run.sh ]; then echo "Make sure you are in the root of OpenTTD before starting this script." @@ -43,11 +43,11 @@ for tst in $tests; do if [ -n "$gdb" ]; then $gdb ./openttd -x -c ai/regression/regression.cfg $params -g $sav else - ./openttd -x -c ai/regression/regression.cfg $params -g $sav -d script=2 -d misc=9 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[script\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' | grep -v '^dbg: \[.*\]' > tmp.regression + ./openttd -x -c ai/regression/regression.cfg $params -g $sav -d script=2 -d misc=9 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[script\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' | grep -v '^dbg: \[.*\]' > $tst/tmp.regression fi if [ -z "$gdb" ]; then - res="`diff -ub $tst/result.txt tmp.regression`" + res="`diff -ub $tst/result.txt $tst/tmp.regression`" if [ -z "$res" ]; then echo "passed!" else @@ -58,14 +58,14 @@ for tst in $tests; do fi rm $tst/info.nut + + if [ "$1" != "-k" ]; then + rm -f $tst/tmp.regression + fi done if [ -f scripts/game_start.scr.regression ]; then mv scripts/game_start.scr.regression scripts/game_start.scr fi -if [ "$1" != "-k" ]; then - rm -f tmp.regression -fi - exit $ret diff --git a/bin/baseset/openttd.grf b/bin/baseset/openttd.grf index 5d124f3f8f..ea5f55ce1d 100644 Binary files a/bin/baseset/openttd.grf and b/bin/baseset/openttd.grf differ diff --git a/bin/baseset/opntitle.dat b/bin/baseset/opntitle.dat index 680dea774d..264aaff60b 100644 Binary files a/bin/baseset/opntitle.dat and b/bin/baseset/opntitle.dat differ diff --git a/bin/game/compat_1.2.nut b/bin/game/compat_1.2.nut index 73e3863aec..7822a44d01 100644 --- a/bin/game/compat_1.2.nut +++ b/bin/game/compat_1.2.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.2.nut 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,3 +23,10 @@ GSNews.Create <- function(type, text, company) { return GSNews._Create(type, text, company, GSNews.NR_NONE, 0); } + +/* 1.9 adds a vehicle type parameter. */ +GSBridge._GetName <- GSBridge.GetName; +GSBridge.GetName <- function(bridge_id) +{ + return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL); +} diff --git a/bin/game/compat_1.3.nut b/bin/game/compat_1.3.nut index 3222849502..0d7a2afb60 100644 --- a/bin/game/compat_1.3.nut +++ b/bin/game/compat_1.3.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.3.nut 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,3 +23,10 @@ GSNews.Create <- function(type, text, company) { return GSNews._Create(type, text, company, GSNews.NR_NONE, 0); } + +/* 1.9 adds a vehicle type parameter. */ +GSBridge._GetName <- GSBridge.GetName; +GSBridge.GetName <- function(bridge_id) +{ + return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL); +} diff --git a/bin/game/compat_1.4.nut b/bin/game/compat_1.4.nut index 12ec11e0ca..3ff887727e 100644 --- a/bin/game/compat_1.4.nut +++ b/bin/game/compat_1.4.nut @@ -1,4 +1,4 @@ -/* $Id: compat_1.4.nut 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,3 +15,10 @@ GSNews.Create <- function(type, text, company) { return GSNews._Create(type, text, company, GSNews.NR_NONE, 0); } + +/* 1.9 adds a vehicle type parameter. */ +GSBridge._GetName <- GSBridge.GetName; +GSBridge.GetName <- function(bridge_id) +{ + return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL); +} diff --git a/changelog.txt b/changelog.txt index 5e1540a1e0..32eb4ca6d5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,80 @@ +1.9.0-beta2 (2018-02-09) +------------------------------------------------------------------------ +- Fix: Non-Windows builds did not get correct git hash + +1.9.0-beta1 (2018-02-09) +------------------------------------------------------------------------ +Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbers have been replaced with Pull Requests and Issue numbers +- Feature: Group liveries, and livery window usability enhancements (#7108) +- Feature: Overhaul of music system, support MPSMIDI music files (TTD DOS/TTO) (#6839) +- Feature: [Win32] Rewritten DMusic and WinMM music drivers +- Feature: [Win32] New XAudio2 sound driver +- Feature: [Linux] New Fluidsynth music driver +- Feature: Framerate display window (#6822) +- Feature: [NewGRF] Ability for industries & houses to produce and/or accept up to 16 different cargoes +- Feature #6610: Allow towns to build houses on road turns (#6758) +- Feature: Replace independent map scrolling GUI settings with single option, and add choice to not lock cursor position when scrolling (#6756) +- Feature #6459: API for querying network clients from GS (#6736) +- Feature: New Russian Ruble & Mexican Peso as currencies (#6678, #7035) +- Feature #4186: Append '(City)' after city names in the town directory +- Feature #986: Automatic save when losing connection to a network game +- Add: [NewGRF] Flag to hide rail types from construction (#7118) +- Add: [NewGRF] Airport animation trigger for plane landing (#6334) +- Add #4115: Default starting company colour setting (#6998) +- Add: Mixer feature for streaming sampled music +- Add #6460: [AI] start_date parameter for Random AIs on new game +- Add: BACKSPACE can be mapped as a hotkey +- Add: 32bpp SSE2 blitter palette animator (#6795) +- Change: Make ships turn slowly when changing direction and stop when going up or down a lock (#7065, #7150) +- Change: Improve ship pathfinder performance +- Change: Decouple GUI timing from game ticks (#6780) +- Change: Desert tiles are now half-desert if a neighboured tile is non-desert or sea/coast (#4754) +- Change: Gradually slow down aircraft speed on breakdown (#6932) +- Change: [NewGRF] Increase rail type & cargo type limits to 64 +- Change: [NewGRF] Increase size of persistent storage to 256 +- Change: [NewGRF] Use last OpenTTD SVN revision in NewGRF version number (#6843) +- Change: Clone tool in depot window now behaves like clone button in vehicle window (#6754) +- Change #6397: Keep town growth rate in sync with house count +- Change: Scale default FreeType font size selection by UI zoom level +- Change: [OSX] Reversed pinch to zoom behaviour +- Change: Switch town growth rate and counter to actual game ticks (#6763) +- Change: Non-tag revisions are now named '--g' +- Change: Rewrite several bits of documentation in markdown +- Fix: Reinitialise graph GUI on game restart (#7191) +- Fix: Potential crash during shutdown after unpacking downloaded content (#7185) +- Fix #6584: Text layout in engine preview dialogue +- Fix #6636: Airplanes could be sent to helicopter station depots +- Fix: Deadlock when launched with -n switch (#7103) +- Fix: Various corrections to town names in non-English languages (#7038, 7141) +- Fix: Only consider airport tiles when placing (for non-rectangular airports) (#6613) +- Fix: Spelling fixes on some Latin American town names +- Fix #7001: Pathfinders should see standard road stations as tiles where to reverse +- Fix #6676: Prevent helicopters from stopping in midair during some kinds of landing +- Fix: Remove need to use Ctrl+Click when building stations next to competitors (#6906) +- Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits +- Fix #4109: Add more water checks to the Oil Rig layout +- Fix #6938: Incorrect value for "Cost to Clear" was displayed for Company Headquarters in tile inspector (#6939) +- Fix #6920: Make 9.8m/s^2 a common constant for TE-calculation +- Fix #6892: [Script] CONFIG_RANDOM did not use the full parameter range (#6902) +- Fix #6622: News message when GS constructs a town had empty company name +- Fix: [NewGRF] Action7 variable 0x85 had no bounds checks +- Fix #6875: Depot building cost did not include foundation build cost (#6883) +- Fix: Some pixels in ship autoreplace icon (sprite 106) were transparent +- Fix: Poor contrast in cargo dest flow legend window cargo labels +- Fix #6553: Make viewport button text unambiguous +- Fix: [OSX] Setting mouse-wheel to scroll the map does not disable pinch to zoom +- Fix #6969: Account for BOM when reading script files +- Fix #6898: Ability to use seeds above INT_MAX (#6936) +- Fix #6659: Bus stations could be demolished when not in demolish mode (#6815) +- Fix: One-way roads could be over-built by road stops regardless of road owner +- Fix: Use name of cargo instead of Passengers/Mail in town statistics (#6801) +- Fix: Prevent ships moving into docks after finishing (un)loading (#6791) +- Fix: Tractive effort was slightly too high as per NewGRF spec (#6785) +- Fix #6465: Add {NORMAL_FONT} and {MONO_FONT} control codes to GS strings (#6726) +- Fix: Four group action icons were misplaced and cropped +- Remove: PSP, WinCE support + + 1.8.0 (2018-04-01) ------------------------------------------------------------------------ (None) diff --git a/config.lib b/config.lib index 0a9a5ef5be..1c3fc2c94e 100644 --- a/config.lib +++ b/config.lib @@ -1,4 +1,4 @@ -# $Id: config.lib 28002 2018-04-01 11:14:34Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -31,7 +31,6 @@ set_default() { awk="awk" pkg_config="pkg-config" os="DETECT" - endian="AUTO" cpu_type="DETECT" config_log="config.log" prefix_dir="/usr/local" @@ -58,8 +57,8 @@ set_default() { enable_translator="0" enable_unicode="1" enable_console="1"; - enable_assert="0" - enable_strip="1" + enable_assert="1" + enable_strip="0" enable_universal="0" enable_osx_g5="0" enable_cocoa_quartz="1" @@ -78,17 +77,19 @@ set_default() { enable_builtin_depend="1" with_makedepend="0" with_direct_music="1" + with_xaudio2="1" with_sort="1" with_iconv="1" with_midi="" with_midi_arg="" with_libtimidity="1" + with_fluidsynth="1" with_freetype="1" with_fontconfig="1" with_icu_layout="1" with_icu_sort="1" static_icu="0" - with_psp_config="1" + with_uniscribe="1" with_threads="1" with_distcc="1" with_ccache="1" @@ -109,7 +110,6 @@ set_default() { awk pkg_config os - endian cpu_type config_log prefix_dir @@ -155,17 +155,19 @@ set_default() { enable_builtin_depend with_makedepend with_direct_music + with_xaudio2 with_sort with_iconv with_midi with_midi_arg with_libtimidity + with_fluidsynth with_freetype with_fontconfig with_icu_layout with_icu_sort static_icu - with_psp_config + with_uniscribe with_threads with_distcc with_ccache @@ -224,9 +226,6 @@ detect_params() { --lipo) prev_p="lipo";; --lipo=*) lipo="$optarg";; - --endian) prev_p="endian";; - --endian=*) endian="$optarg";; - # Alias --prefix with --prefix-dir, for compatibility with GNU autotools @@ -375,6 +374,10 @@ detect_params() { --without-libtimidity) with_libtimidity="0";; --with-libtimidity=*) with_libtimidity="$optarg";; + --with-fluidsynth) with_fluidsynth="2";; + --without-fluidsynth) with_fluidsynth="0";; + --with-fluidsynth=*) with_fluidsynth="$optarg";; + --with-freetype) with_freetype="2";; --without-freetype) with_freetype="0";; --with-freetype=*) with_freetype="$optarg";; @@ -406,9 +409,9 @@ detect_params() { --static-libicu) static_icu="1";; --static-libicu=*) static_icu="$optarg";; - --with-psp-config) with_psp_config="2";; - --without-psp-config) with_psp_config="0";; - --with-psp-config=*) with_psp_config="$optarg";; + --with-uniscribe) with_uniscribe="2";; + --without-uniscribe) with_uniscribe="0";; + --with-uniscribe=*) with_uniscribe="$optarg";; --disable-builtin-depend) enable_builtin_depend="0";; --enable-builtin-depend) enable_builtin_depend="2";; @@ -422,6 +425,10 @@ detect_params() { --without-direct-music) with_direct_music="0";; --with-direct-music=*) with_direct_music="$optarg";; + --with-xaudio2) with_xaudio2="2";; + --without-xaudio2) with_xaudio2="0";; + --with-xaudio2=*) with_xaudio2="$optarg";; + --with-sort) with_sort="2";; --without-sort) with_sort="0";; --with-sort=*) with_sort="$optarg";; @@ -537,7 +544,6 @@ check_params() { # Some params want to be in full uppercase, else they might not work as # expected.. fix that here - endian=`echo $endian | tr '[a-z]' '[A-Z]'` os=`echo $os | tr '[a-z]' '[A-Z]'` cpu_type=`echo $cpu_type | tr '[a-z]' '[A-Z]'` @@ -553,21 +559,10 @@ check_params() { # Check if all params have valid values - # Endian only allows AUTO, LE and, BE - if [ -z "`echo $endian | egrep '^(AUTO|LE|BE|PREPROCESSOR)$'`" ]; then - log 1 "configure: error: invalid option --endian=$endian" - log 1 " Available options are: --endian=[AUTO|LE|BE]" - exit 1 - fi - if [ "$endian" = "PREPROCESSOR" ] && [ "$os" != "OSX" ]; then - log 1 "configure: error: invalid option --endian=$endian" - log 1 " PREPROCESSOR is only available for OSX" - exit 1 - fi - # OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP - if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then + # OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS + if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS)$'`" ]; then log 1 "configure: error: invalid option --os=$os" - log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]" + log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS]" exit 1 fi # cpu_type can be either 32 or 64 @@ -766,13 +761,13 @@ check_params() { exit 1 fi else - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then log 1 "checking GDI video driver... found" else log 1 "checking GDI video driver... not Windows, skipping" fi - if [ -z "$allegro_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then + if [ -z "$allegro_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then log 1 "configure: error: no video driver development files found" log 1 " If you want a dedicated server use --enable-dedicated as parameter" exit 1 @@ -872,14 +867,36 @@ check_params() { fi fi + if [ "$with_uniscribe" != "0" ]; then + if [ "$os" != "MINGW" ]; then + if [ "$with_uniscribe" != "1" ]; then + log 1 "configure: error: Uniscribe is only supported on native Win32 targets" + exit 1 + fi + with_uniscribe="0" + + log 1 "checking Uniscribe text layout... not Windows, skipping" + else + log 1 "checking Uniscribe text layout... found" + + # Don't use ICU unless forced. + if [ "$with_icu_layout" = "1" ]; then + with_icu_layout="0" + fi + if [ "$with_icu_sort" = "1" ]; then + with_icu_sort="0" + fi + fi + fi + detect_xdg_basedir detect_png detect_freetype detect_fontconfig detect_icu_layout detect_icu_sort - detect_pspconfig detect_libtimidity + detect_fluidsynth if [ "$with_direct_music" != "0" ]; then if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then @@ -895,13 +912,21 @@ check_params() { fi fi - detect_sort + if [ "$with_xaudio2" != "0" ]; then + if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then + if [ "$with_xaudio2" != "1" ]; then + log 1 "configure: error: xaudio2 is only supported on Win32 targets" + exit 1 + fi + with_xaudio2="0" - if [ "$os" = "OSX" ] && [ "$endian" = "AUTO" ]; then - endian="PREPROCESSOR" + log 1 "checking xaudio2... not Windows, skipping" + else + check_xaudio2 + fi fi - log 1 "checking endianness... $endian" + detect_sort # Suppress language errors when there is a version defined, indicating a release # It just isn't pretty if any release produces warnings in the languages. @@ -1113,7 +1138,7 @@ check_params() { fi if [ "$personal_dir" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then personal_dir="OpenTTD" elif [ "$os" = "OSX" ]; then personal_dir="Documents/OpenTTD" @@ -1210,12 +1235,15 @@ make_compiler_cflags() { # $4 - name of the ldflags variable # $5 - name of the features variable + # Get the compiler to tell us who it is + version_line="`$1 --version | head -n1`" + eval eval "flags=\\\$$2" eval eval "cxxflags=\\\$$3" eval eval "ldflags=\\\$$4" eval eval "features=\\\$$5" - if [ `basename $1 | cut -c 1-3` = "icc" ]; then + if [ `echo "$version_line" | cut -d' ' -f1` = "icc" ]; then # Enable some things only for certain ICC versions cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g` @@ -1290,8 +1318,6 @@ make_compiler_cflags() { if [ $cc_version -ge 110 ]; then # remark #2259: non-pointer conversion from ... to ... may lose significant bits flags="$flags -wd2259" - # Use c++0x mode so static_assert() is available - cxxflags="$cxxflags -std=c++0x" fi if [ "$enable_lto" != "0" ]; then @@ -1302,9 +1328,10 @@ make_compiler_cflags() { features="$features lto" fi fi - elif [ `basename $1 | grep 'clang'` ]; then + elif echo "$version_line" | grep -q "clang"; then # Enable some things only for certain clang versions - cc_version="`$1 -v 2>&1 | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`" + # Need to try really hard to get the version line, because OSX clang likes to hide its true version + cc_version="`$1 -v 2>&1 | grep -i version | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`" # aliasing rules are not held in openttd code flags="$flags -fno-strict-aliasing" @@ -1352,13 +1379,10 @@ make_compiler_cflags() { flags="$flags -Wno-unused-variable" fi - if [ "$cc_version" -ge "33" ]; then - # clang completed C++11 support in version 3.3 - flags="$flags -std=c++11" - fi - # rdynamic is used to get useful stack traces from crash reports. ldflags="$ldflags -rdynamic" + + # Assume gcc, since it just uses argv[0] in its --version output else # Enable some things only for certain GCC versions # cc_version = major_version * 100 + minor_version @@ -1413,12 +1437,6 @@ make_compiler_cflags() { flags="$flags -Wnon-virtual-dtor" fi - if [ $cc_version -ge 403 ] && [ $cc_version -lt 600 ]; then - # Use gnu++0x mode so static_assert() is available. - # Don't use c++0x, it breaks mingw (with gcc 4.4.0). - cxxflags="$cxxflags -std=gnu++0x" - fi - if [ $cc_version -eq 405 ]; then # Prevent optimisation supposing enums are in a range specified by the standard # For details, see http://gcc.gnu.org/PR43680 @@ -1440,7 +1458,7 @@ make_compiler_cflags() { if [ $cc_version -ge 600 ]; then # -flifetime-dse=2 (default since GCC 6) doesn't play # well with our custom pool item allocator - cxxflags="$cxxflags -flifetime-dse=1 -std=gnu++14" + cxxflags="$cxxflags -flifetime-dse=1" fi if [ "$enable_lto" != "0" ]; then @@ -1474,21 +1492,27 @@ make_compiler_cflags() { make_cflags_and_ldflags() { # General CFlags for BUILD - CFLAGS_BUILD="$CFLAGS_BUILD" + CFLAGS_BUILD_ENV="$CFLAGS_BUILD" + CFLAGS_BUILD="" # Special CXXFlags for BUILD - CXXFLAGS_BUILD="$CXXFLAGS_BUILD" + CXXFLAGS_BUILD_ENV="$CXXFLAGS_BUILD" + CXXFLAGS_BUILD="" # LDFLAGS for BUILD - LDFLAGS_BUILD="$LDFLAGS_BUILD" + LDFLAGS_BUILD_ENV="$LDFLAGS_BUILD" + LDFLAGS_BUILD="" # FEATURES for BUILD (lto) FEATURES_BUILD="" # General CFlags for HOST - CFLAGS="$CFLAGS" + CFLAGS_ENV="$CFLAGS" + CFLAGS="" # Special CXXFlags for HOST - CXXFLAGS="$CXXFLAGS" + CXXFLAGS_ENV="$CXXFLAGS" + CXXFLAGS="" # Libs to compile. In fact this is just LDFLAGS - LIBS="-lstdc++" + LIBS="" # LDFLAGS used for HOST - LDFLAGS="$LDFLAGS" + LDFLAGS_ENV="$LDFLAGS" + LDFLAGS="" # FEATURES for HOST (lto) FEATURES="" @@ -1497,6 +1521,8 @@ make_cflags_and_ldflags() { CFLAGS="$CFLAGS -D$os" CFLAGS_BUILD="$CFLAGS_BUILD -D$os" + CXXFLAGS="$CXXFLAGS -std=c++11" + CXXFLAGS_BUILD="$CXXFLAGS_BUILD -std=c++11" if [ "$enable_debug" = "0" ]; then # No debug, add default stuff @@ -1517,9 +1543,6 @@ make_cflags_and_ldflags() { # Each debug level reduces the optimization by a bit if [ $enable_debug -ge 1 ]; then CFLAGS="$CFLAGS -g -D_DEBUG" - if [ "$os" = "PSP" ]; then - CFLAGS="$CFLAGS -G0" - fi fi if [ $enable_debug -ge 2 ]; then CFLAGS="$CFLAGS -fno-inline" @@ -1593,23 +1616,13 @@ make_cflags_and_ldflags() { fi fi - if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then + if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ]; then LIBS="$LIBS -lpthread" fi - if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ]; then + if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ]; then LIBS="$LIBS -lc" fi - if [ "$os" = "WINCE" ]; then - LIBS="$LIBS -lcoredll -lcorelibc -laygshell -lws2 -e WinMainCRTStartup" - fi - if [ "$os" = "PSP" ]; then - CFLAGS="$CFLAGS -I`$psp_config -p`/include" - LDFLAGS="$LDFLAGS -L`$psp_config -p`/lib" - - CFLAGS="$CFLAGS -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150" - LIBS="$LIBS -D_PSP_FW_VERSION=150 -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -lm" - fi if [ "$os" = "MORPHOS" ]; then # -Wstrict-prototypes generates much noise because of system headers @@ -1648,14 +1661,14 @@ make_cflags_and_ldflags() { CFLAGS="$CFLAGS -DUNIX" fi # And others like Windows - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then CFLAGS="$CFLAGS -DWIN" fi if [ -n "$allegro_config" ]; then CFLAGS="$CFLAGS -DWITH_ALLEGRO" CFLAGS="$CFLAGS `$allegro_config --cflags`" - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then + if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then if [ "$enable_static" != "0" ]; then LIBS="$LIBS `$allegro_config --static --libs`" else @@ -1668,7 +1681,7 @@ make_cflags_and_ldflags() { CFLAGS="$CFLAGS -DWITH_SDL" # SDL must not add _GNU_SOURCE as it breaks many platforms CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then + if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then if [ "$enable_static" != "0" ]; then LIBS="$LIBS `$sdl_config --static-libs`" else @@ -1765,7 +1778,7 @@ make_cflags_and_ldflags() { CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '`" + LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '` -lfreetype" else LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" fi @@ -1793,6 +1806,10 @@ make_cflags_and_ldflags() { fi fi + if [ "$with_uniscribe" != "0" ]; then + CFLAGS="$CFLAGS -DWITH_UNISCRIBE" + LIBS="$LIBS -lusp10" + fi if [ "$with_direct_music" != "0" ]; then CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT" @@ -1804,6 +1821,10 @@ make_cflags_and_ldflags() { fi fi + if [ "$with_xaudio2" != "0" ]; then + CFLAGS="$CFLAGS -DWITH_XAUDIO2" + fi + if [ -n "$libtimidity_config" ]; then CFLAGS="$CFLAGS -DLIBTIMIDITY" CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`" @@ -1815,6 +1836,11 @@ make_cflags_and_ldflags() { fi fi + if [ -n "$fluidsynth" ]; then + LIBS="$LIBS -lfluidsynth" + CFLAGS="$CFLAGS -DFLUIDSYNTH" + fi + if [ "$with_iconv" != "0" ]; then CFLAGS="$CFLAGS -DWITH_ICONV" if [ "$link_to_iconv" = "yes" ]; then @@ -1906,6 +1932,14 @@ make_cflags_and_ldflags() { fi fi + # All flags to be extended via the env + CFLAGS_BUILD="$CFLAGS_BUILD $CFLAGS_BUILD_ENV" + CXXFLAGS_BUILD="$CXXFLAGS_BUILD $CXXFLAGS_BUILD_ENV" + LDFLAGS_BUILD="$LDFLAGS_BUILD $LDFLAGS_BUILD_ENV" + CFLAGS="$CFLAGS $CFLAGS_ENV" + CXXFLAGS="$CXXFLAGS $CXXFLAGS_ENV" + LDFLAGS="$LDFLAGS $LDFLAGS_ENV" + log 1 "using CFLAGS_BUILD... $CFLAGS_BUILD" log 1 "using CXXFLAGS_BUILD... $CXXFLAGS_BUILD" log 1 "using LDFLAGS_BUILD... $LDFLAGS_BUILD" @@ -1925,7 +1959,7 @@ make_cflags_and_ldflags() { cflags_makedep="`echo | $cxx_host $CXXFLAGS -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`" # Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations - cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`" + cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g;s@[ ]*-[^D][^ ]*@@g'`" else makedepend="" fi @@ -1956,7 +1990,22 @@ check_compiler() { # $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo # $9 - What the command is to check for - if [ -n "$3" ]; then + if [ -n "$4" ]; then + # Check for manual compiler + machine=`$4 $9 2>/dev/null` + ret=$? + eval "$2=\"$4\"" + + log 2 "executing $4 $9" + log 2 " returned $machine" + log 2 " exit code $ret" + + if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then + log 1 "checking $1... $4 not found" + log 1 "the selected binary doesn't seem to be a $6 binary" + exit 1 + fi + elif [ -n "$3" ]; then # Check for system if [ -z "$6" ]; then compiler="$3" @@ -1999,21 +2048,6 @@ check_compiler() { log 1 "the compiler suggests it doesn't build code for the machine you specified" exit 1 fi - elif [ -n "$4" ]; then - # Check for manual compiler - machine=`$4 $9 2>/dev/null` - ret=$? - eval "$2=\"$4\"" - - log 2 "executing $4 $9" - log 2 " returned $machine" - log 2 " exit code $ret" - - if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then - log 1 "checking $1... $4 not found" - log 1 "the selected binary doesn't seem to be a $6 binary" - exit 1 - fi else # Nothing given, autodetect @@ -2076,26 +2110,13 @@ check_compiler() { } check_build() { - if [ "$os" = "FREEBSD" ]; then - # FreeBSD's C compiler does not support dump machine. - # However, removing C support is not possible because PSP must be linked with the C compiler. - check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CXX" "g++" "c++" "0" "-dumpmachine" - else - check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine" - fi + check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine" } check_host() { # By default the host is the build if [ -z "$host" ]; then host="$build"; fi - - if [ "$os" = "FREEBSD" ]; then - # FreeBSD's C compiler does not support dump machine. - # However, removing C support is not possible because PSP must be linked with the C compiler. - check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CXX" "g++" "c++" "0" "-dumpmachine" - else - check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine" - fi + check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine" } check_cxx_build() { @@ -2109,7 +2130,7 @@ check_cxx_host() { } check_windres() { - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then check_compiler "host windres" "windres" "$host" "$windres" "$WINDRES" "windres" "windres" "2" "-V" fi } @@ -2176,9 +2197,7 @@ check_direct_music() { echo " #include #include - #include #include - #include int main(int argc, char *argv[]) { }" > direct_music.test.c $cxx_host $CFLAGS direct_music.test.c -o direct_music.test 2> /dev/null res=$? @@ -2197,6 +2216,35 @@ check_direct_music() { fi } +check_xaudio2() { + echo " + #include + + #undef NTDDI_VERSION + #undef _WIN32_WINNT + + #define NTDDI_VERSION NTDDI_WIN8 + #define _WIN32_WINNT _WIN32_WINNT_WIN8 + + #include + int main(int argc, char *argv[]) { }" > xaudio2.test.c + $cxx_host $CFLAGS xaudio2.test.c -o xaudio2.test 2> /dev/null + res=$? + rm -f xaudio2.test.c xaudio2.test + + if [ "$res" != "0" ]; then + if [ "$with_xaudio2" != "1" ]; then + log 1 "configure: error: xaudio2 is not available on this system" + exit 1 + fi + with_xaudio2="0" + + log 1 "checking xaudio2... not found" + else + log 1 "checking xaudio2... found" + fi +} + check_makedepend() { if [ "$enable_builtin_depend" != "0" ]; then with_makedepend="0" @@ -2315,7 +2363,7 @@ detect_awk() { detect_os() { if [ "$os" = "DETECT" ]; then - # Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP + # Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, and DOS # Try first via dumpmachine, then via uname os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk ' @@ -2335,8 +2383,6 @@ detect_os() { /mingw/ { print "MINGW"; exit} /os2/ { print "OS2"; exit} /dos/ { print "DOS"; exit} - /wince/ { print "WINCE"; exit} - /psp/ { print "PSP"; exit} '` if [ -z "$os" ]; then @@ -2362,7 +2408,7 @@ detect_os() { if [ -z "$os" ]; then log 1 "detecting OS... none detected" log 1 "I couldn't detect your OS. Please use --os=OS to force one" - log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP" + log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS" exit 1 fi @@ -2621,6 +2667,11 @@ detect_library() { eval "res=\$$2" if [ -z "$res" ]; then log 2 " trying /mingw/include/$4$5... no" + eval "$2=`ls -1 /mingw$cpu_type/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" + fi + eval "res=\$$2" + if [ -z "$res" ]; then + log 2 " trying /mingw$cpu_type/include/$4$5... no" eval "$2=`ls -1 /opt/local/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" fi eval "res=\$$2" @@ -2669,6 +2720,11 @@ detect_library() { eval "res=\$$2" if [ -z "$res" ]; then log 2 " trying /mingw/lib/$3... no" + eval "$2=`ls /mingw$cpu_type/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" + fi + eval "res=\$$2" + if [ -z "$res" ]; then + log 2 " trying /mingw$cpu_type/lib/$3... no" log 1 "configure: error: $2 couldn't be found" log 1 "configure: error: you requested a static link, but I can't find $3" @@ -2721,6 +2777,10 @@ detect_libtimidity() { detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1" } +detect_fluidsynth() { + detect_library "$with_fluidsynth" "fluidsynth" "" "" "fluidsynth.h" +} + detect_pkg_config() { # $1 - config-param ($with_lzma value) # $2 - package name ('liblzma') @@ -2805,7 +2865,7 @@ detect_fontconfig() { fontconfig_config="" return 0 fi - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then log 1 "checking libfontconfig... WIN32, skipping" fontconfig_config="" return 0 @@ -2821,62 +2881,25 @@ detect_fontconfig() { } detect_icu_layout() { + if [ "$with_cocoa" != "0" ] && [ "$with_icu_layout" = "1" ]; then + log 1 "checking icu-lx... OSX, skipping" + icu_layout_config="" + return 0 + fi + detect_pkg_config "$with_icu_layout" "icu-lx" "icu_layout_config" "4.8" "1" } detect_icu_sort() { + if [ "$with_cocoa" != "0" ] && [ "$with_icu_sort" = "1" ]; then + log 1 "checking icu-i18n... OSX, skipping" + icu_sort_config="" + return 0 + fi + detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1" } -detect_pspconfig() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_psp_config" = "0" ]; then - log 1 "checking psp-config... disabled" - - psp_config="" - return 0 - fi - - if [ "$with_psp_config" = "1" ] && [ "$os" != "PSP" ]; then - log 1 "checking psp-config... not PSP, skipping" - - psp_config=""; - return 0 - fi - - if [ "$os" != "PSP" ]; then - log 1 "checking psp-config... not PSP" - - log 1 "configure: error: psp-config is only supported for PSP" - exit 1 - fi - - if [ "$with_psp_config" = "1" ] || [ "$with_psp_config" = "" ] || [ "$with_psp_config" = "2" ]; then - psp_config="psp-config" - else - psp_config="$with_psp_config" - fi - - version=`$psp_config -p 2>/dev/null` - ret=$? - log 2 "executing $psp_config -p" - log 2 " returned $version" - log 2 " exit code $ret" - - if [ -z "$version" ] || [ "$ret" != "0" ]; then - log 1 "checking psp-config... not found" - log 1 "configure: error: psp-config couldn't be found" - - # It was forced, so it should be found. - if [ "$with_psp_config" != "1" ]; then - log 1 "configure: error: you supplied '$with_psp_config', but it seems invalid" - fi - exit 1 - fi - - log 1 "checking psp-config... found" -} - detect_iconv() { # 0 means no, 1 is auto-detect, 2 is force if [ "$with_iconv" = "0" ]; then @@ -2895,10 +2918,16 @@ detect_iconv() { # Try to find iconv.h, seems to only thing to detect iconv with if [ "$with_iconv" = "1" ] || [ "$with_iconv" = "" ] || [ "$with_iconv" = "2" ]; then - iconv=`ls -1 /usr/include 2>/dev/null | grep "iconv.h"` - if [ -z "$iconv" ]; then - iconv=`ls -1 /usr/local/include 2>/dev/null | grep "iconv.h"` - fi + # Iterate over search paths + iconv="" + search_paths=`LC_ALL=C $cxx_host $OSX_SYSROOT $CFLAGS -E - -v &1 | \ + $awk '/#include <...> search starts here:/{flag=1;next}/End of search list./{flag=0}flag'` + for path in $search_paths; do + iconv=`ls -1 $path 2>/dev/null | grep "iconv.h"` + if [ -n "$iconv" ]; then + break + fi + done else # Make sure it exists iconv=`ls $with_iconv/include/iconv.h 2>/dev/null` @@ -3226,17 +3255,14 @@ make_sed() { s@!!INSTALL_DIR!!@$install_dir@g; s@!!BINARY_NAME!!@$binary_name@g; s@!!STRGEN!!@$STRGEN@g; - s@!!ENDIAN_CHECK!!@$ENDIAN_CHECK@g; s@!!DEPEND!!@$DEPEND@g; s@!!SETTINGSGEN!!@$SETTINGSGEN@g; - s@!!ENDIAN_FORCE!!@$endian@g; s@!!STAGE!!@$STAGE@g; s@!!MAKEDEPEND!!@$makedepend@g; s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g; s@!!SORT!!@$sort@g; s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g; s@!!CONFIG_CACHE_LINKER!!@config.cache.linker@g; - s@!!CONFIG_CACHE_ENDIAN!!@config.cache.endian@g; s@!!CONFIG_CACHE_SOURCE!!@config.cache.source@g; s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g; s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g; @@ -3470,8 +3496,7 @@ showhelp() { echo " --os=OS the OS we are compiling for [DETECT]" echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/" echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/" - echo " MINGW/OS2/DOS/WINCE/PSP/HAIKU" - echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)" + echo " MINGW/OS2/DOS/HAIKU" echo "" echo "Paths:" echo " --prefix-dir=dir specifies the prefix for all installed" @@ -3542,6 +3567,7 @@ showhelp() { echo " midi-player" echo " --with-libtimidity[=\"pkg-config libtimidity\"]" echo " enables libtimidity support" + echo " --with-fluidsynth enables fluidsynth support" echo " --with-allegro[=\"pkg-config allegro\"]" echo " enables Allegro video driver support" echo " --with-cocoa enables COCOA video driver (OSX ONLY)" @@ -3567,7 +3593,6 @@ showhelp() { echo " --static-icu try to link statically (libsicu instead of" echo " libicu; can fail as the new name is guessed)" echo " --with-iconv[=iconv-path] enables iconv support" - echo " --with-psp-config[=psp-config] enables psp-config support (PSP ONLY)" echo " --disable-builtin-depend disable use of builtin deps finder" echo " --with-makedepend[=makedepend] enables makedepend support" echo " --with-ccache enables ccache support" diff --git a/configure b/configure index 9abb76d981..afc1de51b4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: configure 27562 2016-05-12 17:24:06Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -75,13 +75,12 @@ save_params make_cflags_and_ldflags EXE="" -if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "DOS" ] || [ "$os" = "WINCE" ]; then +if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "DOS" ]; then EXE=".exe" fi TTD="openttd$EXE" STRGEN="strgen$EXE" -ENDIAN_CHECK="endian_check$EXE" DEPEND="depend$EXE" SETTINGSGEN="settings_gen$EXE" @@ -114,7 +113,6 @@ AWKCOMMAND=' if ($0 == "PNG" && "'$png_config'" == "") { next; } if ($0 == "OSX" && "'$os'" != "OSX") { next; } if ($0 == "OS2" && "'$os'" != "OS2") { next; } - if ($0 == "PSP" && "'$os'" != "PSP") { next; } if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; } if ($0 == "AI" && "'$enable_ai'" == "0") { next; } if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; } @@ -124,10 +122,10 @@ AWKCOMMAND=' if ($0 == "WIN32" && "'$os'" != "MINGW" && "'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; } if ($0 == "MORPHOS" && "'$os'" != "MORPHOS") { next; } - if ($0 == "WINCE" && "'$os'" != "WINCE") { next; } if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; } if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; } + if ($0 == "FLUIDSYNTH" && "'$fluidsynth'" == "" ) { next; } if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; } if ($0 == "SSE" && "'$with_sse'" != "1") { next; } diff --git a/docs/HOWTO_compile_lang_files.txt b/docs/HOWTO_compile_lang_files.txt index c56f97a621..547854e508 100644 --- a/docs/HOWTO_compile_lang_files.txt +++ b/docs/HOWTO_compile_lang_files.txt @@ -29,7 +29,7 @@ english.txt to work. Below are some examples of strgen usage. 1.1) Examples ---- -------- Example 1: -if you are in the root of your working copy (svn code), you should type +if you are in the root of your working copy (git repository), you should type strgen/strgen -s lang lang/english.txt to compile englist.txt into english.lng. It will be placed in the lang dir @@ -50,7 +50,7 @@ You can interchange english.txt to whichever language you want to generate a 1.2) strgen command switches ---- ----------------------- -v | --version -strgen will tell what svn revision it was last modified +strgen will tell what git revision it was last modified -t | --todo strgen will add to any untranslated/missing strings and use the english diff --git a/docs/landscape.html b/docs/landscape.html index f60e859fc3..a345128ea4 100644 --- a/docs/landscape.html +++ b/docs/landscape.html @@ -226,7 +226,7 @@
  • m1 bits 4..0: owner of the tile
  • m2: see signals
  • m3 bits 7..4: see signals
  • -
  • m3 bits 3..0 = track type: +
  • m8 bits 5..0 = track type: @@ -626,7 +626,8 @@
  • m5 bit 6 set: level crossing
    • m1 bits 4..0: owner of the railway track
    • -
    • m3 bits 3..0: railway track type
    • +
    • m5 bit 5: set if crossing lights are on
    • +
    • m5 bit 4: pbs reservation state
    • m5 bit 0: direction
  • 0 
    @@ -639,9 +640,8 @@
  • -
  • m5 bit 5: set if crossing lights are on
  • m7 bits 4..0: owner of the road type 0 (normal road)
  • -
  • m5 bit 4: pbs reservation state
  • +
  • m8 bits 5..0: railway track type
  • @@ -860,7 +860,6 @@
  • m2: index into the array of stations
  • m3 bits 7..4: persistent random data for railway stations/waypoints and airports)
  • m3 bits 7..4: owner of tram tracks (road stop)
  • -
  • m3 bits 3..0: track type for railway stations/waypoints
  • m4: custom station id; 0 means standard graphics
  • m5: graphics index (range from 0..255 for each station type): @@ -979,6 +978,7 @@
  • m7 bits 4..0: owner of road (road stops)
  • m7 bits 7..6: present road types (road stops)
  • m7: animation frame (railway stations/waypoints, airports)
  • +
  • m8 bits 5..0: track type for railway stations/waypoints
  • @@ -1444,7 +1444,6 @@
    • m1 bits 4..0: owner
    • m3 bits 7..4: owner of tram
    • -
    • m3 bits 3..0: track type for railway
    • m5 bit 4: pbs reservation state for railway
    • m5 bits 7 clear: tunnel entrance/exit
    • m5 bit 7 set: bridge ramp @@ -1582,6 +1581,7 @@
    • m7 bits 4..0: owner of road
    • m7 bit 5 set = on snow or desert
    • m7 bits 7..6: present road types for road
    • +
    • m8 bits 5..0: track type for railway
    diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html index d34fe9840c..8519fa990a 100644 --- a/docs/landscape_grid.html +++ b/docs/landscape_grid.html @@ -37,6 +37,7 @@ the array so you can quickly see what is used and what is not.
  • m5 - 8 bits in size, is used for general storage
  • m6 - 8 bits in size, is used for general storage
  • m7 - 8 bits in size, is used for general storage
  • +
  • m8 - 16 bits in size, is used for general storage
  • @@ -52,6 +53,7 @@ the array so you can quickly see what is used and what is not. + @@ -64,6 +66,7 @@ the array so you can quickly see what is used and what is not. + @@ -77,6 +80,7 @@ the array so you can quickly see what is used and what is not. + @@ -89,6 +93,7 @@ the array so you can quickly see what is used and what is not. + @@ -97,11 +102,12 @@ the array so you can quickly see what is used and what is not. - + + @@ -109,11 +115,12 @@ the array so you can quickly see what is used and what is not. - + + @@ -121,11 +128,12 @@ the array so you can quickly see what is used and what is not. - + + @@ -139,6 +147,7 @@ the array so you can quickly see what is used and what is not. + @@ -146,11 +155,12 @@ the array so you can quickly see what is used and what is not. - - - + + + + @@ -163,6 +173,7 @@ the array so you can quickly see what is used and what is not. + @@ -176,6 +187,7 @@ the array so you can quickly see what is used and what is not. + @@ -189,6 +201,7 @@ the array so you can quickly see what is used and what is not. + @@ -197,11 +210,12 @@ the array so you can quickly see what is used and what is not. - + + @@ -214,6 +228,7 @@ the array so you can quickly see what is used and what is not. + @@ -226,6 +241,7 @@ the array so you can quickly see what is used and what is not. + @@ -238,6 +254,7 @@ the array so you can quickly see what is used and what is not. + @@ -250,6 +267,7 @@ the array so you can quickly see what is used and what is not. + @@ -262,6 +280,7 @@ the array so you can quickly see what is used and what is not. + @@ -274,6 +293,7 @@ the array so you can quickly see what is used and what is not. + @@ -287,6 +307,7 @@ the array so you can quickly see what is used and what is not. + @@ -299,6 +320,7 @@ the array so you can quickly see what is used and what is not. + @@ -311,6 +333,7 @@ the array so you can quickly see what is used and what is not. + @@ -324,6 +347,7 @@ the array so you can quickly see what is used and what is not. + @@ -332,23 +356,25 @@ the array so you can quickly see what is used and what is not. - + + + - - + + @@ -362,6 +388,7 @@ the array so you can quickly see what is used and what is not. +
    m5 (8) m6 (8) m7 (8)m8 (16)
    bits7654 3210 7654 3210 7654 3210FEDC BA98 7654 3210
    0XXXX XXXX OOOX XXOO OOOO OOOOOOOO OOOO OOOO OOOO
    farmland-inherit- OOOX XXOO OOOO OOOOOOOO OOOO OOOO OOOO
    1XXXX XXXX OOOX XXXX OOOO XXXX OOOO OOOOOOOO XXXXOOOO OOOO OOOO XXXX XXXX XXXX OOOO OOOO OOOO OOOOOOOO OOOO OOXX XXXX
    rail with signals-inherit- -inherit- OOOO XXXX XXXX XXXXXXXX XXXXXXXX OOOO XXXX XXXX -inherit- OOOO OOOO OOOO OOOO-inherit-
    depot-inherit- -inherit- XXXX XXXX XXXX XXXXOOOO XXXX-inherit- OOOO XXXX XXOX OOXX OOOO OOOO OOOO OOOO-inherit-
    2XXXX XXXX OOXX XOOO XXXO XXXXOOOO OOOO OOOO OOOO
    level crossing-inherit- -inherit- -inherit-XXXX XXXX-inherit-XXXX OOOXXXXX OOOOOOOO OOOOXXXX OOOX OOXX XOOO XXXX XXXXOOOO OOOO OOXX XXXX
    road depotXXOO OOXX OOOO OOOO XXXO XXXXOOOO OOOO OOOO OOOO
    3XXXX XXXX XXXX XXOO XXXX XXXXOOOO OOOO OOOO OOOO
    4XXOO OXXX OOOO OOOO OOOO OOOOOOOO OOOO OOOO OOOO
    5XXXX XXXX OXXX XXXX XXXX XXXX XXXX XXXXXXXX XXXXXXXX OOOO XXXX XXXX XXXX XXXX OOXX XXOO XXXX XXXXOOOO OOOO OOXX XXXX
    rail waypoint-inherit- -inherit- -inherit--inherit-
    road stop~~~~ ~XXX OOXX XOOO XXOX XXXXOOOO OOOO OOOO OOOO
    dock~~~~ ~XXX OOXX XOOO OOOO OOOOOOOO OOOO OOOO OOOO
    airportXXXX XXXX OOXX XOOO XXXX XXXXOOOO OOOO OOOO OOOO
    buoy~~~~ ~~~~ OOXX XOOO OOOO OOOOOOOO OOOO OOOO OOOO
    oilrig~~~~ ~~~~ OOXX XOOO OOOO OOOOOOOO OOOO OOOO OOOO
    6X~~X XXXX OOOO OOOO OOOO OOOOOOOO OOOO OOOO OOOO
    canal, river-inherit- OOOO OOOO OOOO OOOOOOOO OOOO OOOO OOOO
    shipdepot-inherit- OOOO OOOO OOOO OOOOOOOO OOOO OOOO OOOO
    8XXXX XXXX OOXX XXOO XXXX XXXXOOOO OOOO OOOO OOOO
    9XXXX XXXX OOOX XXXX OOOO OOOO OOOO OOOOXXXX XXXXXXXX OOOO OOOO OOOO XOOX XXXX OOOO OOOO XXXX XXXXOOOO OOOO OOXX XXXX
    bridge ramp -inherit- -inherit- -inherit-OOOO OOOO OOOO OOOO -inherit--inherit--inherit-OOOO OOOO -inherit- OOXX XXOO -inherit--inherit-
    AXXXX XXXX OOOO OOOO XXXX XXXXOOOO OOOO OOOO OOOO
    diff --git a/docs/multiplayer.txt b/docs/multiplayer.txt index 7f4227cd8a..62314d7b4c 100644 --- a/docs/multiplayer.txt +++ b/docs/multiplayer.txt @@ -90,7 +90,7 @@ Table of contents - [network] sync_freq: change it in console with: 'set network.sync_freq ' the number should be between the 50 and 1000, not much lower, not much - higer. It indicates the time between sync-frames. A sync-frame is a frame + higher. It indicates the time between sync-frames. A sync-frame is a frame which checks if all clients are still in sync. When the value it too high, clients can desync in 1960, but the server detects it in 1970. Not really handy. The lower the value, the more bandwidth it uses. @@ -104,7 +104,7 @@ Table of contents - In UNIX like systems, you can fork your dedicated server by adding -f as parameter. - - You can automaticly clean companies that do not have a client connected to + - You can automatically clean companies that do not have a client connected to them, for, let's say, 3 years. You can do this via: 'set autoclean_companies' and 'set autoclean_protected' and 'set autoclean_unprotected'. Unprotected removes a password from a company when it is not used for more then the @@ -113,7 +113,7 @@ Table of contents - You can also do this manually via the console: 'reset_company'. - - You can let your server automaticly restart a map when, let's say, year 2030 + - You can let your server automatically restart a map when, let's say, year 2030 is reached. See 'set restart_game_date' for detail. - If you want to be on the server-list, enable Advertising. To do this, select diff --git a/docs/obm_format.txt b/docs/obm_format.txt index 40f829a522..45fe5f879e 100644 --- a/docs/obm_format.txt +++ b/docs/obm_format.txt @@ -45,12 +45,15 @@ description.en_US = howdie ; The file names are case sensitive. ; You can have empty file names; in that case no song will be loaded ; for that 'entry'. +; If you want to load music from the MPS DOS music driver "cat" format, +; specify just the name of the .cat file the song is located in, then +; fill out the "catindex" section. [files] ; The theme song for OpenTTD theme = THEME_SONG.GM ; The songs in the 'old style' category -old_0 = -old_1 = +old_0 = GM.CAT +old_1 = GM.CAT old_2 = old_3 = old_4 = @@ -86,9 +89,17 @@ ezy_9 = ; Note that the list of files is case sensitive. Each file listed in the ; files section must be listed here with it's song name, otherwise you ; will get a lot of warnings when starting OpenTTD. +; You don't need to fill this out for "cat" format music, the song names +; are loaded directly from the file in that case. [names] THEME_SONG.GM = Tycoon DELUXE Theme +; If you are loading music from the DOS version "cat" format, specify +; which index into the file the song has. +[catindex] +old_0 = 1 +old_1 = 3 + ; The md5s section lists the MD5 checksum for the files that replace them. ; Note that the list of files is case sensitive. Each file listed in the ; files section must be listed here with it's MD5 checksum, otherwise you @@ -96,6 +107,13 @@ THEME_SONG.GM = Tycoon DELUXE Theme [md5s] THEME_SONG.GM = 45cfec1b9d8c7a0ad45e755833cbf221 +; If a song needs to have parts of the start or end cut off to avoid long +; silences, you can specify MIDI tick codes for start:end of the actual +; music part for each file here. +; Not all music drivers might support this feature. +[timingtrim] +THEME_SONG.GM = 768:53760 + ; The origin section provides the possibility to put and extra line into ; the warning that a file is missing/corrupt. This can be used to tell ; them where to find it. It works on the filename specified in the diff --git a/findversion.sh b/findversion.sh index 6d74d862f9..5d2322adb7 100755 --- a/findversion.sh +++ b/findversion.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: findversion.sh 27079 2014-12-11 12:25:53Z planetmaker $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -14,42 +14,31 @@ if [ "$#" != "0" ]; then Usage: ./findversion.sh Finds the current revision and if the code is modified. -Output: \t\t\t -REV +Output: \t\t\t +VERSION a string describing what version of the code the current checkout is - based on. The exact format of this string depends on the version - control system in use, but it tries to identify the revision used as - close as possible (using the svn revision number or hg/git hash). - This also includes an indication of whether the checkout was - modified and which branch was checked out. This value is not + based on. + This also includes the commit date, an indication of whether the checkout + was modified and which branch was checked out. This value is not guaranteed to be sortable, but is mainly meant for identifying the revision and user display. If no revision identifier could be found, this is left empty. -REV_NR - the revision number of the svn revision this checkout is based on. - This can be used to determine which functionality is present in this - checkout. For trunk svn checkouts and hg/git branches based upon it, - this number should be accurate. For svn branch checkouts, this - number is mostly meaningless, at least when comparing with the - REV_NR from other branches or trunk. +ISODATE + the commit date of the revision this checkout is based on. + The commit date may differ from the author date. + This can be used to decide upon the age of the source. - This number should be sortable. Within a given branch or trunk, a - higher number means a newer version. However, when using git or hg, - this number will not increase on new commits. - - If no revision number could be found, this is left empty. + If no timestamp could be found, this is left empty. MODIFIED Whether (the src directory of) this checkout is modified or not. A value of 0 means not modified, a value of 2 means it was modified. - Modification is determined in relation to the commit identified by - REV, so not in relation to the svn revision identified by REV_NR. A value of 1 means that the modified status is unknown, because this - is not an svn/git/hg checkout for example. + is not an git checkout for example. -CLEAN_REV - the same as REV but without branch name +HASH + the git revision hash By setting the AWK environment variable, a caller can determine which version of "awk" is used. If nothing is set, this script defaults to @@ -70,21 +59,7 @@ ROOT_DIR=`pwd` # Determine if we are using a modified version # Assume the dir is not modified MODIFIED="0" -if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then - # We are an svn checkout - if [ -n "`svnversion | grep 'M'`" ]; then - MODIFIED="2" - fi - # Find the revision like: rXXXXM-branch - BRANCH=`LC_ALL=C svn info | "$AWK" '/^URL:.*branches/ { split($2, a, "/"); for(i in a) if (a[i]=="branches") { print a[i+1]; break } }'` - TAG=`LC_ALL=C svn info | "$AWK" '/^URL:.*tags/ { split($2, a, "/"); for(i in a) if (a[i]=="tags") { print a[i+1]; break } }'` - REV_NR=`LC_ALL=C svn info | "$AWK" '/^Last Changed Rev:/ { print $4 }'` - if [ -n "$TAG" ]; then - REV=$TAG - else - REV="r$REV_NR" - fi -elif [ -d "$ROOT_DIR/.git" ]; then +if [ -d "$ROOT_DIR/.git" ]; then # We are a git checkout # Refresh the index to make sure file stat info is in sync, then look for modifications git update-index --refresh >/dev/null @@ -92,36 +67,25 @@ elif [ -d "$ROOT_DIR/.git" ]; then MODIFIED="2" fi HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null` - REV="g`echo $HASH | cut -c1-8`" - BRANCH="`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@;s@^master$@@'`" - REV_NR=`LC_ALL=C git log --pretty=format:%s --grep="^(svn r[0-9]*)" -1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"` - if [ -z "$REV_NR" ]; then - # No rev? Maybe it is a custom git-svn clone - REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"` - fi + SHORTHASH=`echo ${HASH} | cut -c1-10` + ISODATE=`LC_ALL=C git show -s --pretty='format:%ci' HEAD | "$AWK" '{ gsub("-", "", $1); print $1 }'` + BRANCH="`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@'`" TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`" + + if [ "$MODIFIED" -eq "0" ]; then + hashprefix="-g" + elif [ "$MODIFIED" -eq "2" ]; then + hashprefix="-m" + else + hashprefix="-u" + fi + if [ -n "$TAG" ]; then - BRANCH="" - REV="$TAG" - fi -elif [ -d "$ROOT_DIR/.hg" ]; then - # We are a hg checkout - if [ -n "`HGPLAIN= hg status | grep -v '^?'`" ]; then - MODIFIED="2" - fi - HASH=`LC_ALL=C HGPLAIN= hg id -i | cut -c1-12` - REV="h`echo $HASH | cut -c1-8`" - BRANCH="`HGPLAIN= hg branch | sed 's@^default$@@'`" - TAG="`HGPLAIN= hg id -t | grep -v 'tip$'`" - if [ -n "$TAG" ]; then - BRANCH="" - REV="$TAG" - fi - REV_NR=`LC_ALL=C HGPLAIN= hg log -f -k "(svn r" -l 1 --template "{desc|firstline}\n" | grep "^(svn r[0-9]*)" | sed "s@.*(svn r\([0-9]*\)).*@\1@"` - if [ -z "$REV_NR" ]; then - # No rev? Maybe it is a custom hgsubversion clone - REV_NR=`LC_ALL=C HGPLAIN= hg parent --template="{svnrev}"` + VERSION="${TAG}" + else + VERSION="${ISODATE}-${BRANCH}${hashprefix}${SHORTHASH}" fi + elif [ -f "$ROOT_DIR/.ottdrev" ]; then # We are an exported source bundle cat $ROOT_DIR/.ottdrev @@ -129,19 +93,12 @@ elif [ -f "$ROOT_DIR/.ottdrev" ]; then else # We don't know MODIFIED="1" + HASH="" + SHORTHASH="" BRANCH="" - REV="" - REV_NR="" + ISODATE="" + TAG="" + VERSION="" fi -if [ "$MODIFIED" -eq "2" ]; then - REV="${REV}M" -fi - -CLEAN_REV=${REV} - -if [ -n "$BRANCH" ]; then - REV="${REV}-$BRANCH" -fi - -echo "$REV $REV_NR $MODIFIED $CLEAN_REV" +echo "$VERSION $ISODATE $MODIFIED $HASH" diff --git a/known-bugs.txt b/known-bugs.txt index f324b1dcb6..bcb9c354a9 100644 --- a/known-bugs.txt +++ b/known-bugs.txt @@ -1,6 +1,6 @@ OpenTTD's known bugs -Last updated: 2018-04-01 -Release version: 1.8.0 +Last updated: 2019-02-09 +Release version: 1.9.0-beta2 ------------------------------------------------------------------------ @@ -14,12 +14,12 @@ Table of contents ---- ----- All bugs listed below are marked as known. Please do not submit any bugs that are the same as these. If you do, do not act surprised, because -we WILL flame you!! +we WILL flame you! The current list of known bugs that we intend to fix can be found in our -bug tracking system at: http://bugs.openttd.org -Also check the closed bugs when searching for your bug in this system as -we might have fixed the bug in the mean time. +bug tracking system at https://github.com/OpenTTD/OpenTTD/issues +Also check the closed bugs when searching for your bug in this system as we +might have fixed the bug in the mean time. 2.0) Known bugs @@ -29,427 +29,383 @@ reasons why we think that fixing them is infeasible. We might make some minor improvements that reduce the scope of these bugs, but we will not be able to completely fix them. -No suitable AI can be found - If you have no AIs and an AI is started the so-called 'dummy' AI will - be loaded. This AI does nothing but writing a message on the AI debug - window and showing a red warning. There are basically two solutions - for this problem: Either you set the number of AI players to 0 so that - no AI is started. You find that setting at the top of the window in the - "AI / Game Scripts Settings" window. - The other solution is acquiring (downloading) some AI. The easiest way - to do this is via the "Check Online Content" button in the main (intro) - menu or directly in the "AI / Game Scripts Settings" dialogue via the - "Check Online Content" button. +No suitable AI can be found: + If you have no AIs and an AI is started the so-called 'dummy' AI will + be loaded. This AI does nothing but writing a message on the AI debug + window and showing a red warning. There are basically two solutions + for this problem: Either you set the number of AI players to 0 so that + no AI is started. You find that setting at the top of the window in the + "AI / Game Scripts Settings" window. + The other solution is acquiring (downloading) some AI. The easiest way + to do this is via the "Check Online Content" button in the main (intro) + menu or directly in the "AI / Game Scripts Settings" dialogue via the + "Check Online Content" button. -After a while of playing, colours get corrupted - In Windows 7 the background slideshow corrupts the colour mapping of - OpenTTD's 8bpp screen modes. Workarounds for this are: - a) Switching to windowed mode, instead of fullscreen - b) Switching off background slideshow - c) Setting up the 32bpp-anim or 32bpp-optimized blitter +After a while of playing, colours get corrupted: + In Windows 7 the background slideshow corrupts the colour mapping + of OpenTTD's 8bpp screen modes. Workarounds for this are: + a) Switching to windowed mode, instead of fullscreen + b) Switching off background slideshow + c) Setting up the 32bpp-anim or 32bpp-optimized blitter -Long delay between switching songs/music - On Windows there is a delay of a (few) second(s) between switching of - songs for the "win32" driver. This delay is caused by the fact that - opening a MIDI file via MCI is extremely slow. +Custom vehicle type name is incorrectly aligned: + Some NewGRFs use sprites that are bigger than normal in the "buy + vehicle" window. Due to this they have to encode an offset for + the vehicle type name. Upon renaming the vehicle type this encoded + offset is stripped from the name because the "edit box" cannot show + this encoding. As a result the custom vehicle type names will get + the default alignment. The only way to (partially) fix this is by + adding spaces to the custom name. - DirectMusic, known as "dmusic" in OpenTTD, has a much shorter delay. - However, under some circumstances DirectMusic does not reset its - state properly causing wrongly pitched/bad sounding songs. This - problem is in DirectMusic as it is reproducable with Microsoft's - DirectMusic Producer. DirectMusic has been deprecated since 2004 - and as such has no support for 64 bits OpenTTD. +Clipping problems [#119]: + In some cases sprites are not drawn as one would expect. Examples of + this are aircraft that might be hidden below the runway or trees that + in some cases are rendered over vehicles. + The primary cause of this problem is that OpenTTD does not have enough + data (like a 3D model) to properly determine what needs to be drawn in + front of what. OpenTTD has bounding boxes but in lots of cases they + are either too big or too small and then cause problems with what + needs to be drawn in front of what. Also some visual tricks are used. + For example trains at 8 pixels high, the catenary needs to be drawn + above that. When you want to draw bridges on top of that, which are + only one height level (= 8 pixels) higher, you are getting into some + big problems. + We can not change the height levels; it would require us to either + redraw all vehicle or all landscape graphics. Doing so would mean we + leave the Transport Tycoon graphics, which in effect means OpenTTD + will not be a Transport Tycoon clone anymore. - As a delay is favourable over bad sounding music the "win32" driver - is the default driver for OpenTTD. You can change this default by - setting the "musicdriver" in your openttd.cfg to "dmusic". +Mouse scrolling not possible at the edges of the screen [#383] [#3966]: + Scrolling the viewport with the mouse cursor at the edges of the screen + in the same direction of the edge will fail. If the cursor is near the + edge the scrolling will be very slow. + OpenTTD only receives cursor position updates when the cursor is inside + OpenTTD's window. It is not told how far you have moved the cursor + outside of OpenTTD's window. -Custom vehicle type name is incorrectly aligned - Some NewGRFs use sprites that are bigger than normal in the "buy - vehicle" window. Due to this they have to encode an offset for the - vehicle type name. Upon renaming the vehicle type this encoded offset - is stripped from the name because the "edit box" cannot show this - encoding. As a result the custom vehicle type names will get the - default alignment. The only way to (partly) fix this is by adding - spaces to the custom name. +Lost trains ignore (block) exit signals [#1473]: + If trains are lost they ignore block exit signals, blocking junctions + with presignals. This is caused because the path finders cannot tell + where the train needs to go. As such a random direction is chosen at + each junction. This causes the trains to occasionally to make choices + that are unwanted from a player's point of view. + This will not be fixed because lost trains are in almost all cases a + network problem, e.g. a train can never reach a specific place. This + makes the impact of fixing the bug enormously small against the amount + of work needed to write a system that prevents the lost trains from + taking the wrong direction. -Clipping problems [FS#119] - In some cases sprites are not drawn as one would expect. Examples of - this are aircraft that might be hidden below the runway or trees that - in some cases are rendered over vehicles. - The primary cause of this problem is that OpenTTD does not have enough - data (like a 3D model) to properly determine what needs to be drawn in - front of what. OpenTTD has bounding boxes but in lots of cases they - are either too big or too small and then cause problems with what - needs to be drawn in front of what. Also some visual tricks are used. - For example trains at 8 pixels high, the catenary needs to be drawn - above that. When you want to draw bridges on top of that, which are - only one height level (= 8 pixels) higher, you are getting into some - big problems. - We can not change the height levels; it would require us to either - redraw all vehicle or all landscape graphics. Doing so would mean we - leave the Transport Tycoon graphics, which in effect means OpenTTD - will not be a Transport Tycoon clone anymore. +Vehicle owner of last transfer leg gets paid for all [#2427]: + When you make a transfer system that switches vehicle owners. This + is only possible with 'industry stations', e.g. the oil rig station + the owner of the vehicle that does the final delivery gets paid for + the whole trip. It is not shared amongst the different vehicle + owners that have participated in transporting the cargo. + This sharing is not done because it would enormously increase the + memory and CPU usage in big games for something that is happening + in only one corner case. We think it is not worth the effort until + sharing of stations is an official feature. -Mouse scrolling not possible at the edges of the screen [FS#383] [FS#3966] - Scrolling the viewport with the mouse cursor at the edges of the screen - in the same direction of the edge will fail. If the cursor is near the - edge the scrolling will be very slow. - OpenTTD only receives cursor position updates when the cursor is inside - OpenTTD's window. It is not told how far you have moved the cursor - outside of OpenTTD's window. +Forbid 90 degree turns does not work for crossing PBS paths [#2737]: + When you run a train through itself on a X junction with PBS turned on + the train will not obey the 'forbid 90 degree turns' setting. This is + due to the fact that we can not be sure that the setting was turned + off when the track was reserved, which means that we assume it was + turned on and that the setting does not hold at the time. We made it + this way to allow one to change the setting in-game, but it breaks + slightly when you are running your train through itself. Running a + train through means that your network is broken and is thus a user + error which OpenTTD tries to graciously handle. + Fixing this bug means that we need to record whether this particular + setting was turned on or off at the time the reservation was made. This + means adding quite a bit of data to the savegame for solving an issue + that is basically an user error. We think it is not worth the effort. -Lost trains ignore (block) exit signals [FS#1473] - If trains are lost they ignore block exit signals, blocking junctions - with presignals. This is caused because the path finders cannot tell - where the train needs to go. As such a random direction is chosen at - each junction. This causes the trains to occasionally to make choices - that are unwanted from a player's point of view. - This will not be fixed because lost trains are in almost all cases a - network problem, e.g. a train can never reach a specific place. This - makes the impact of fixing the bug enormously small against the - amount of work needed to write a system that prevents the lost trains - from taking the wrong direction. +Duplicate (station) names after renaming [#3204]: + After renaming stations one can create duplicate station names. This + is done giving a station the same custom name as another station with + an automatically generated name. + The major part of this problem is that station names are translatable. + Meaning that a station is called e.g. ' Central' in English and + ' Centraal' in Dutch. This means that in network games the + renaming of a town could cause the rename to succeed on some clients + and fail at others. This creates an inconsistent game state that will + be seen as a 'desync'. Secondly the custom names are intended to fall + completely outside of the ' ' naming of stations, so when + you rename a town all station names are updated accordingly. + As a result the decision has been made that all custom names are only + compared to the other custom names in the same class and not compared + to the automatically generated names. -Vehicle owner of last transfer leg gets paid for all [FS#2427] - When you make a transfer system that switches vehicle owners. This - is only possible with 'industry stations', e.g. the oil rig station - the owner of the vehicle that does the final delivery gets paid for - the whole trip. It is not shared amongst the different vehicle - owners that have participated in transporting the cargo. - This sharing is not done because it would enormously increase the - memory and CPU usage in big games for something that is happening - in only one corner case. We think it is not worth the effort until - sharing of stations is an official feature. +Extreme CPU usage/hangs when using SDL and PulseAudio [#3294], +OpenTTD hangs/freezes when closing, OpenTTD is slow, OpenTTD uses a lot of CPU: + OpenTTD can be extremely slow/use a lot of CPU when the sound is + played via SDL and then through PulseAudio's ALSA wrapper. Under the + same configuration OpenTTD, or rather SDL, might hang when exiting + the game. This problem is seen most in Ubuntu 9.04 and higher. -Forbid 90 degree turns does not work for crossing PBS paths [FS#2737] - When you run a train through itself on a X junction with PBS turned on - the train will not obey the 'forbid 90 degree turns' setting. This is - due to the fact that we can not be sure that the setting was turned - off when the track was reserved, which means that we assume it was - turned on and that the setting does not hold at the time. We made it - this way to allow one to change the setting in-game, but it breaks - slightly when you are running your train through itself. Running a - train through means that your network is broken and is thus a user - error which OpenTTD tries to graciously handle. - Fixing this bug means that we need to record whether this particular - setting was turned on or off at the time the reservation was made. This - means adding quite a bit of data to the savegame for solving an issue - that is basically an user error. We think it is not worth the effort. + This is because recent versions of the PulseAudio sound server + are configured to use timer-based audio scheduling rather than + interrupt-based audio scheduling. Configuring PulseAudio to force + use of interrupt-based scheduling may resolve sound problems for + some users. Under recent versions of Ubuntu Linux (9.04 and higher) + this can be accomplished by changing the following line in the + /etc/pulse/default.pa file: + load-module module-udev-detect + to + load-module module-udev-detect tsched=0 + Note that PulseAudio must be restarted for changes to take effect. Older + versions of PulseAudio may use the module-hal-detect module instead. + Adding tsched=0 to the end of that line will have a similar effect. -Duplicate (station) names after renaming [FS#3204] - After renaming stations one can create duplicate station names. This - is done giving a station the same custom name as another station with - an automatically generated name. - The major part of this problem is that station names are translatable. - Meaning that a station is called e.g. ' Central' in English and - ' Centraal' in Dutch. This means that in network games the - renaming of a town could cause the rename to succeed on some clients - and fail at others. This creates an inconsistent game state that will - be seen as a 'desync'. Secondly the custom names are intended to fall - completely outside of the ' ' naming of stations, so when - you rename a town all station names are updated accordingly. - As a result the decision has been made that all custom names are only - compared to the other custom names in the same class and not compared - to the automatically generated names. + Another possible solution is selecting the "pulse" backend of SDL + by either using "SDL_AUDIODRIVER=pulse openttd" at the command + prompt or installing the 'libsdl1.2debian-pulseaudio' package from + Ubuntu's Universe repository. For other distributions a similar + package needs to be installed. -Extreme CPU usage/hangs when using SDL and PulseAudio [FS#3294] -OpenTTD hangs/freezes when closing, OpenTTD is slow, OpenTTD uses a lot of CPU - OpenTTD can be extremely slow/use a lot of CPU when the sound is - played via SDL and then through PulseAudio's ALSA wrapper. Under the - same configuration OpenTTD, or rather SDL, might hang when exiting - the game. This problem is seen most in Ubuntu 9.04 and higher. - - This is because recent versions of the PulseAudio sound server are - configured to use timer-based audio scheduling rather than - interrupt-based audio scheduling. Configuring PulseAudio to force - use of interrupt-based scheduling may resolve sound problems for - some users. Under recent versions of Ubuntu Linux (9.04 and higher) - this can be accomplished by changing the following line in the - /etc/pulse/default.pa file: - load-module module-udev-detect - to - load-module module-udev-detect tsched=0 - Note that PulseAudio must be restarted for changes to take effect. - Older versions of PulseAudio may use the module-hal-detect module - instead. Adding tsched=0 to the end of that line will have a similar - effect. - - Another possible solution is selecting the "pulse" backend of SDL - by either using "SDL_AUDIODRIVER=pulse openttd" at the command - prompt or installing the 'libsdl1.2debian-pulseaudio' package from - Ubuntu's Universe repository. For other distributions a similar - package needs to be installed. - -OpenTTD not properly resizing with SDL on X [FS#3305] - Under some X window managers OpenTTD's window does not properly - resize. You will either end up with a black bar at the right/bottom - side of the window or you cannot see the right/bottom of the window, - e.g you cannot see the status bar. The problem is that OpenTTD does - not always receive a resize event from SDL making it impossible for - OpenTTD to know that the window was resized; sometimes moving the - window will solve the problem. - Window managers that are known to exhibit this behaviour are KDE's - and GNOME's. With the XFCE's and LXDE's window managers the resize - event is sent when the user releases the mouse. +OpenTTD not properly resizing with SDL on X [#3305]: + Under some X window managers OpenTTD's window does not properly + resize. You will either end up with a black bar at the right/bottom + side of the window or you cannot see the right/bottom of the window, + e.g. you cannot see the status bar. The problem is that OpenTTD does + not always receive a resize event from SDL making it impossible for + OpenTTD to know that the window was resized; sometimes moving the + window will solve the problem. + Window managers that are known to exhibit this behaviour are GNOME's + and KDE's. With the XFCE's and LXDE's window managers the resize + event is sent when the user releases the mouse. Incorrect colours, crashes upon exit, debug warnings and smears upon -window resizing with SDL on Mac OS X [FS#3447] - Video handling with (lib)SDL under Mac OS X is known to fail on some - versions of Mac OS X with some hardware configurations. Some of the - problems happen only under some circumstances whereas others are - always present. - We suggest that the SDL video/sound backend is not used for OpenTTD - in combinations with Mac OS X. +window resizing with SDL on macOS [#3447]: + Video handling with (lib)SDL under macOS is known to fail on some + versions of macOS with some hardware configurations. Some of + the problems happen only under some circumstances whereas others + are always present. + We suggest that the SDL video/sound backend is not used for OpenTTD + in combinations with macOS. -Train crashes entering same junction from block and path signals [FS#3928] - When a train has reserved a path from a path signal to a two way - block signal and the reservation passes a path signal through the - back another train can enter the reserved path (only) via that same - two way block signal. - The reason for this has to do with optimisation; to fix this issue - the signal update has to pass all path signals until it finds either - a train or a backwards facing signal. This is a very expensive task. - The (signal) setups that allow these crashes can furthermore be - considered incorrectly signalled; one extra safe waiting point for - the train entering from path signal just after the backwards facing - signal (from the path signal train) resolves the issue. +Train crashes entering same junction from block and path signals [#3928]: + When a train has reserved a path from a path signal to a two way + block signal and the reservation passes a path signal through the + back another train can enter the reserved path (only) via that + same two way block signal. + The reason for this has to do with optimisation; to fix this issue + the signal update has to pass all path signals until it finds either + a train or a backwards facing signal. This is a very expensive task. + The (signal) setups that allow these crashes can furthermore be + considered incorrectly signalled; one extra safe waiting point for + the train entering from path signal just after the backwards facing + signal (from the path signal train) resolves the issue. -Crashes when playing music [FS#3941] - Mac OS X's QuickTime (default music driver) and Windows' MCI (win32 - music driver) crash on some songs from OpenMSX. OpenTTD cannot do - anything about this. Please report these crashes to the authors of - OpenMSX so the crash causing songs can be removed or fixed. +Crashes when run in a VM using Parallels Desktop [#4003]: + When the Windows version of OpenTTD is executed in a VM under + Parallels Desktop a privileged instruction exception may be thrown. + As OpenTTD works natively on macOS as well as natively on Windows and + these native builds both don't exhibit this behaviour this crash is + most likely due to a bug in the virtual machine, something out of + the scope of OpenTTD. Most likely this is due to Parallels Desktop + lacking support for RDTSC calls. The problem can be avoided by using + other VM-software, Wine, or running natively on macOS. -Crashes when run in a VM using Parallels Desktop [FS#4003] - When the Windows version of OpenTTD is executed in a VM under - Parallels Desktop a privileged instruction exception may be thrown. - As OpenTTD works natively on OSX as well as natively on Windows and - these native builds both don't exhibit this behaviour this crash is - most likely due to a bug in the virtual machine, something out of - the scope of OpenTTD. Most likely this is due to Parallels Desktop - lacking support for RDTSC calls. The problem can be avoided by using - other VM-software, Wine, or running natively on OSX. +Entry- and exit signals are not dragged [#4378]: + Unlike all other signal types, the entry- and exit signals are not + dragged but instead normal signals are placed on subsequent track + sections. This is done on purpose as this is the usually more + convenient solution. There are little to no occasions where more + than one entry or exit signal in a row are useful. This is different + for all other signal types where several in a row can serve one + purpose or another. -OpenTTD hangs when started on 32 bits Windows [FS#4083] - Under some circumstances OpenTTD might hang for hours on the - initialisation of the music driver. The exact circumstances are - unknown except that it is the "dmusic" music driver that has the - problem and that the "win32" music driver does not. - As a result using the "win32" music driver will work around this - issue. +Station build date is incorrect [#4415]: + The tile query tool will show the date of the last (re)construction + at the station and not the date of the first construction. This is + due to compatability reasons with NewGRFs and the fact that it is + wrong to say that the station is built in a particular year when it + was completely destroyed/rebuilt later on. + The tile query tool can be fixed by changing the "Build date" text + to "Date at which the last (re)construction took place" but this is + deemed too specific and long for that window. - As the exact circumstances are unknown, and the obvious - configuration settings related to the music driver are at their - default we are not able to detect this failure, except when Windows' - music initialisation function returns after several hours and then - there is no point in switching the music driver anymore. - The reason we still use the "win32" music driver as default are - described in the "Long delay between switching music/song" section - of this document. +(Temporary) wrong colours when switching to full screen [#4511]: + On Windows it can happen that you temporarily see wrong colours + when switching to full screen OpenTTD, either by starting + OpenTTD in full screen mode, changing to full screen mode or by + ALT-TAB-ing into a full screen OpenTTD. This is caused by the + fact that OpenTTD, by default, uses 8bpp paletted output. The + wrong colours you are seeing is a temporary effect of the video + driver switching to 8bpp palette mode. -Pre- and exit signals are not dragged [FS#4378] - Unlike all other signal types, the entry- and exit signals are not - dragged but instead normal signals are placed on subsequent track - sections. This is done on purpose as this is the usually more con- - venient solution. There are little to no occasions where more than - one entry or exit signal in a row are useful. This is different - for all other signal types where several in a row can serve one - purpose or another. + This issue can be worked around in two ways: + a) Setting fullscreen_bpp to 32 + b) Setting up the 32bpp-anim or 32bpp-optimized blitter -Station build date is incorrect [FS#4415] - The tile query tool will show the date of the last (re)construction - at the station and not the date of the first construction. This is - due to compatability reasons with NewGRFs and the fact that it is - wrong to say that the station is built in a particular year when it - was completely destroyed/rebuilt later on. - The tile query tool can be fixed by changing the "Build date" text - to "Date at which the last (re)construction took place" but this is - deemed too specific and long for that window. +Can't run OpenTTD with the -d option from a MSYS console [#4587]: + The MSYS console does not allow OpenTTD to open an extra console for + debugging output. Compiling OpenTTD with the --enable-console + configure option prevents this issue and allows the -d option to use + the MSYS console for its output. -Can't change volume inside OpenTTD [FS#4416] - Some backends do not provide a means to change the volume of sound - effects or music. The mixing of music and sound is left to external - libraries/the operating system we can't handle the volume control - in OpenTTD. As a result you can't change the volume inside OpenTTD - for backends such as SDL; just use the volume control provided by - your operating system. +Unreadable characters for non-latin locales [#4607]: + OpenTTD does not ship a non-latin font in its graphics files. As a + result OpenTTD needs to acquire the font from somewhere else. What + OpenTTD does is ask the operating system, or a system library, for + the best font for a given language if the currently loaded font + does not provide all characters of the chosen translation. This + means that OpenTTD has no influence over the quality of the chosen + font; it just does the best it can do. -Can't run OpenTTD with the -d option from a MSYS console [FS#4587] - The MSYS console does not allow OpenTTD to open an extra console for - debugging output. Compiling OpenTTD with the --enable-console - configure option prevents this issue and allows the -d option to use - the MSYS console for its output. + If the text is unreadable there are several steps that you can take + to improve this. The first step is finding a good font and configure + this in the configuration file. See section 9.0 of README.md for + more information. You can also increase the font size to make the + characters bigger and possible better readable. -Unreadable characters for non-latin locales [FS#4607] - OpenTTD does not ship a non-latin font in its graphics files. As a - result OpenTTD needs to acquire the font from somewhere else. What - OpenTTD does is ask the operating system, or a system library, for - the best font for a given language if the currently loaded font - does not provide all characters of the chosen translation. This - means that OpenTTD has no influence over the quality of the chosen - font; it just does the best it can do. + If the problem is with the clarity of the font you might want to + enable anti-aliasing by setting the small_aa/medium_aa/large_aa + settings to "true". However, anti-aliasing only works when a 32-bit + blitter has been selected, e.g. blitter = "32bpp-anim", as with the + 8 bits blitter there are not enough colours to properly perform the + anti-aliasing. - If the text is unreadable there are several steps that you can take - to improve this. The first step is finding a good font and configure - this in the configuration file. See section 9.0 of readme.txt for - more information. You can also increase the font size to make the - characters bigger and possible better readable. +Train does not crash with itself [#4635]: + When a train drives in a circle the front engine passes through + wagons of the same train without crashing. This is intentional. + Signals are only aware of tracks, they do not consider the train + length and whether there would be enough room for a train in some + circle it might drive on. Also the path a train might take is not + necessarily known when passing a signal. + Checking all circumstances would take a lot of additional + computational power for signals, which is not considered worth + the effort, as it does not add anything to gameplay. + Nevertheless trains shall not crash in normal operation, so making + a train not crash with itself is the best solution for everyone. - If the problem is with the clarity of the font you might want to - enable anti-aliasing by setting the small_aa/medium_aa/large_aa - settings to "true". However, anti-aliasing only works when a 32 bits - blitter has been selected, e.g. blitter = "32bpp-anim", as with the - 8 bits blitter there are not enough colours to properly perform the - anti-aliasing. +Aircraft coming through wall in rotated airports [#4705]: + With rotated airports, specifically hangars, you will see that the + aircraft will show a part through the back wall of the hangar. + This can be solved by only drawing a part of the plane when being + at the back of the hangar, however then with transparency turned on + the aircraft would be shown partially which would be even weirder. + As such the current behaviour is deemed the least bad. + The same applies to overly long ships and their depots. -(Temporary) wrong colours when switching to full screen [FS#4511]: - On Windows it can happen that you temporarily see wrong colours - when switching to full screen OpenTTD, either by starting - OpenTTD in full screen mode, changing to full screen mode or by - ALT-TAB-ing into a full screen OpenTTD. This is caused by the - fact that OpenTTD, by default, uses 8bpp paletted output. The - wrong colours you are seeing is a temporary effect of the video - driver switching to 8bpp palette mode. +Vehicles not keeping their "maximum" speed [#4815]: + Vehicles that have not enough power to reach and maintain their + advertised maximum speed might be constantly jumping between two + speeds. This is due to the fact that speed and its calculations + are done with integral numbers instead of floating point numbers. + As a result of this a vehicle will never reach its equilibrium + between the drag/friction and propulsion. So in effect it will be + in a vicious circle of speeding up and slowing down due to being + just at the other side of the equilibrium. - This issue can be worked around in two ways: - a) Setting fullscreen_bpp to 32 - b) Setting up the 32bpp-anim or 32bpp-optimized blitter + Not speeding up when near the equilibrium will cause the vehicle to + never come in the neighbourhood of the equilibrium and not slowing + down when near the equilibrium will cause the vehicle to never slow + down towards the equilibrium once it has come down a hill. -Train does not crash with itself [FS#4635]: - When a train drives in a circle the front engine passes through - wagons of the same train without crashing. This is intentional. - Signals are only aware of tracks, they do not consider the train - length and whether there would be enough room for a train in some - circle it might drive on. Also the path a train might take is not - necessarily known when passing a signal. - Checking all circumstances would take a lot of additional computational - power for signals, which is not considered worth the effort, as - it does not add anything to gameplay. - Nevertheless trains shall not crash in normal operation, so making - a train not crash with itself is the best solution for everyone. + It is possible to calculate whether the equilibrium will be passed, + but then all acceleration calculations need to be done twice. -Aircraft coming through wall in rotated airports [FS#4705]: - With rotated airports, specifically hangars, you will see that the - aircraft will show a part through the back wall of the hangar. - This can be solved by only drawing a part of the plane when being - at the back of the hangar, however then with transparency turned on - the aircraft would be shown partially which would be even weirder. - As such the current behaviour is deemed the least bad. - The same applies to overly long ships and their depots. +Settings not saved when OpenTTD crashes [#4846]: + The settings are not saved when OpenTTD crashes for several reasons. + The most important is that the game state is broken and as such the + settings might contain invalid values, or the settings have not even + been loaded yet. This would cause invalid or totally wrong settings + to be written to the configuration file. -Vehicles not keeping their "maximum" speed [FS#4815]: - Vehicles that have not enough power to reach and maintain their - advertised maximum speed might be constantly jumping between two - speeds. This is due to the fact that speed and its calculations - are done with integral numbers instead of floating point numbers. - As a result of this a vehicle will never reach its equilibrium - between the drag/friction and propulsion. So in effect it will be - in a vicious circle of speeding up and slowing down due to being - just at the other side of the equilibrium. + A solution to that would be saving the settings whenever one changes, + however due to the way the configuration file is saved this requires + a flush of the file to the disk and OpenTTD needs to wait till that + is finished. On some file system implementations this causes the + flush of all 'write-dirty' caches, which can be a significant amount + of data to be written. This can further be aggravated by spinning + down disks to conserve power, in which case this disk needs to be + spun up first. This means that many seconds may pass before the + configuration file is actually written, and all that time OpenTTD + will not be able to show any progress. Changing the way the + configuration file is saved is not an option as that leaves us more + vulnerable to corrupt configuration files. - Not speeding up when near the equilibrium will cause the vehicle - to never come in the neighbourhood of the equilibrium and not - slowing down when near the equilibrium will cause the vehicle - to never slow down towards the equilibrium once it has come down - a hill. + Finally, crashes should not be happening. If they happen they should + be reported and fixed, so essentially fixing this is fixing the wrong + thing. If you really need the configuration changes to be saved, + and you need to run a version that crashes regularly, then you can + use the 'saveconfig' command in the console to save the settings. - It is possible to calculate whether the equilibrium will be - passed, but then all acceleration calculations need to be done - twice. +Not all NewGRFs, AIs, game scripts are found [#4887]: + Under certain situations, where the path for the content within a + tar file is the same as other content on the file system or in another + tar file, it is possible that content is not found. A more thorough + explanation and solutions are described in section 4.4 of README.md. -Settings not saved when OpenTTD crashes [FS#4846]: - The settings are not saved when OpenTTD crashes for several reasons. - The most important is that the game state is broken and as such the - settings might contain invalid values, or the settings have not even - been loaded yet. This would cause invalid or totally wrong settings - to be written to the configuration file. +Mouse cursor going missing with SDL [#4997]: + Under certain circumstances SDL does not notify OpenTTD of changes with + respect to the mouse pointer, specifically whether the mouse pointer + is within the bounds of OpenTTD or not. For example, if you "Alt-Tab" + to another application the mouse cursor will still be shown in OpenTTD, + and when you move the mouse outside of the OpenTTD window so the cursor + gets hidden, open/move another application on top of the OpenTTD window + and then Alt-tab back into OpenTTD the cursor will not be shown. - A solution to that would be saving the settings whenever one changes, - however due to the way the configuration file is saved this requires - a flush of the file to the disk and OpenTTD needs to wait till that - is finished. On some file system implementations this causes the - flush of all 'write-dirty' caches, which can be a significant amount - of data to be written. This can further be aggravated by spinning - down disks to conserve power, in which case this disk needs to be - spun up first. This means that many seconds may pass before the - configuration file is actually written, and all that time OpenTTD - will not be able to show any progress. Changing the way the - configuration file is saved is not an option as that leaves us more - vulnerable to corrupt configuration files. + We cannot fix this problem as SDL simply does not provide the required + information in these corner cases. This is a bug in SDL and as such + there is little that we can do about it. - Finally, crashes should not be happening. If they happen they should - be reported and fixed, so essentially fixing this is fixing the - wrong thing. If you really need the configuration changes to be - saved, and you need to run a version that crashes regularly, then - you can use the 'saveconfig' command in the console to save the - settings. +Trains might not stop at platforms that are currently being changed [#5553]: + If you add tiles to or remove tiles from a platform while a train is + approaching to stop at the same platform, that train can miss the place + where it's supposed to stop and pass the station without stopping. + This is caused by the fact that the train is considered to already + have stopped if it's beyond its assigned stopping location. We can't + let the train stop just anywhere in the station because then it would + never leave the station if you have the same station in the order + list multiple times in a row or if there is only one station + in theorder list (see #5684). -Not all NewGRFs, AIs, game scripts are found [FS#4887]: - Under certain situations, where the path for the content within a - tar file is the same as other content on the file system or in another - tar file, it is possible that content is not found. A more thorough - explanation and solutions are described in section 4.4 of readme.txt. +Inconsistent catchment areas [#5661]: + Due to performance decisions the catchment area for cargo accepted by a + station for delivery to houses or industries differs from the catchment + area for cargo that is delivered to stations from houses or industries. -Mouse cursor going missing with SDL [FS#4997]: - Under certain circumstances SDL does not notify OpenTTD of changes - with respect to the mouse pointer, specifically whether the mouse - pointer is within the bounds of OpenTTD or not. For example, if you - Alt-tab to another application the mouse cursor will still be shown - in OpenTTD, and when you move the mouse outside of the OpenTTD - window so the cursor gets hidden, open/move another application on - top of the OpenTTD window and then Alt-tab back into OpenTTD the - cursor will not be shown. + Conceptually they work the same, but the effect in game differs. They + work by finding the closest destination "around" the source which is + within a certain distance. This distance depends on the type of station, + e.g. road stops have a smaller catchment area than large airports. + In both cases the bounding box, the smallest rectangle that contains + all tiles of something, is searched for the target of the cargo, + and then spiraling outwards finding the closest tile of the target. - We cannot fix this problem as SDL simply does not provide the - required information in these corner cases. This is a bug in SDL - and as such there is little that we can do about it. + In the case of a station with two tiles spread far apart with a house + that is within the station's bounding box, it would be possible that + the spiraling search from the house does not reach one of the station + tiles before the search ends, i.e. all tiles within that distance + are searched. So the house does not deliver cargo to the station. + On the other hand, the station will deliver cargo because the house + falls within the bounding box, and thus search area. -Inconsistent catchment areas [FS#5661]: - Due to performance decisions the catchment area for cargo accepted - by a station for delivery to houses or industries differs from the - catchment area for cargo that is delivered to stations from houses - or industries. + It is possible to make these consistent, but then cargo from a house + to a station needs to search up to 32 tiles around itself, i.e. 64 + by 64 tiles, to find all possible stations it could deliver to + instead of 10 by 10 tiles (40 times more tiles). Alternatively the + search from a station could be changed to use the actual tiles, but + that would require considering checking 10 by 10 tiles for each of + the tiles of a station, instead of just once. - Conceptually they work the same, but the effect in game differs. - They work by finding the closest destination "around" the source - which is within a certain distance. This distance depends on the - type of station, e.g. road stops have a smaller catchment area than - large airports. In both cases the bounding box, the smallest - rectangle that contains all tiles of something, is searched for the - target of the cargo, and then spiraling outwards finding the closest - tile of the target. +Some houses and industries are not affected by transparency [#5817]: + Some of the default houses and industries (f.e. the iron ore mine) are + not affected by the transparency options. This is because the graphics + do not (completely) separate the ground from the building. + This is a bug of the original graphics, and unfortunately cannot be + fixed with OpenGFX for the sake of maintaining compatibility with + the original graphics. - In the case of a station with two tiles spread far apart with a house - that is within the station's bounding box, it would be possible that - the spiraling search from the house does not reach one of the station - tiles before the search ends, i.e. all tiles within that distance - are searched. So the house does not deliver cargo to the station. On - the other hand, the station will deliver cargo because the house - falls within the bounding box, and thus search area. - - It is possible to make these consistent, but then cargo from a house - to a station needs to search up to 32 tiles around itself, i.e. 64 - by 64 tiles, to find all possible stations it could deliver to - instead of 10 by 10 tiles (40 times more tiles). Alternatively the - search from a station could be changed to use the actual tiles, but - that would require considering checking 10 by 10 tiles for each of - the tiles of a station, instead of just once. - -Trains might not stop at platforms that are currently being changed [FS#5553]: - If you add tiles to or remove tiles from a platform while a train is - approaching to stop at the same platform, that train can miss the place - where it's supposed to stop and pass the station without stopping. This - is caused by the fact that the train is considered to already have stopped - if it's beyond its assigned stopping location. We can't let the train stop - just anywhere in the station because then it would never leave the station - if you have the same station in the order list multiple times in a row or - if there is only one station in the order list (see FS#5684). - -Some houses and industries are not affected by transparency [FS#5817]: - Some of the default houses and industries (f.e. the iron ore mine) are - not affected by the transparency options. This is because the graphics do - not (completely) separate the ground from the building. - This is a bug of the original graphics, and unfortunately cannot be - fixed with OpenGFX for the sake of maintaining compatibility with the - original graphics. +Involuntary cargo exchange with cargodist via neutral station [#6114]: + When two players serve a neutral station at an industry, a cross-company + chain for cargo flow can and will be established which can only be + interrupted if one of the players stops competing for the ressources of + that industry. There is an easy fix for this: If you are loading at the + shared station make the order "no unload" and if you're unloading make + it "no load". Cargodist will then figure out that it should not create + such a route. diff --git a/media/baseset/no_music.obm b/media/baseset/no_music.obm index 85b6bd6bef..fd75cfef32 100644 --- a/media/baseset/no_music.obm +++ b/media/baseset/no_music.obm @@ -1,4 +1,4 @@ -; $Id: no_music.obm 25205 2013-04-24 20:30:02Z frosch $ +; $Id$ ; ; This represents more or less nothingness ; diff --git a/media/baseset/no_sound.obs b/media/baseset/no_sound.obs index 95cf5f56e4..e9d5741a0c 100644 --- a/media/baseset/no_sound.obs +++ b/media/baseset/no_sound.obs @@ -1,4 +1,4 @@ -; $Id: no_sound.obs 25205 2013-04-24 20:30:02Z frosch $ +; $Id$ ; ; This represents more or less nothingness ; diff --git a/media/baseset/orig_dos.obg b/media/baseset/orig_dos.obg index 6b1b7058ca..f9db843af1 100644 --- a/media/baseset/orig_dos.obg +++ b/media/baseset/orig_dos.obg @@ -1,4 +1,4 @@ -; $Id: orig_dos.obg 27730 2017-01-14 15:48:19Z frosch $ +; $Id$ ; ; This represents the original graphics as on the non-German Transport ; Tycoon Deluxe DOS CD. diff --git a/media/baseset/orig_dos.obs b/media/baseset/orig_dos.obs index 3ffa0a3833..e095b62210 100644 --- a/media/baseset/orig_dos.obs +++ b/media/baseset/orig_dos.obs @@ -1,4 +1,4 @@ -; $Id: orig_dos.obs 25205 2013-04-24 20:30:02Z frosch $ +; $Id$ ; ; This represents the original sounds as on the Transport ; Tycoon Deluxe DOS CD. diff --git a/media/baseset/orig_dos_de.obg b/media/baseset/orig_dos_de.obg index 8f26ea5a21..4e12582727 100644 --- a/media/baseset/orig_dos_de.obg +++ b/media/baseset/orig_dos_de.obg @@ -1,4 +1,4 @@ -; $Id: orig_dos_de.obg 27730 2017-01-14 15:48:19Z frosch $ +; $Id$ ; ; This represents the original graphics as on the German Transport ; Tycoon Deluxe DOS CD. It contains one broken sprite. diff --git a/media/baseset/orig_win.obg b/media/baseset/orig_win.obg index 73753b9553..393b5d3013 100644 --- a/media/baseset/orig_win.obg +++ b/media/baseset/orig_win.obg @@ -1,4 +1,4 @@ -; $Id: orig_win.obg 27730 2017-01-14 15:48:19Z frosch $ +; $Id$ ; ; This represents the original graphics as on the Transport ; Tycoon Deluxe for Windows CD. diff --git a/media/baseset/orig_win.obm b/media/baseset/orig_win.obm index 7314cc29ed..b5d4b024ed 100644 --- a/media/baseset/orig_win.obm +++ b/media/baseset/orig_win.obm @@ -1,4 +1,4 @@ -; $Id: orig_win.obm 25205 2013-04-24 20:30:02Z frosch $ +; $Id$ ; ; This represents the original music as on the Transport ; Tycoon Deluxe for Windows CD. @@ -90,5 +90,17 @@ GM_TT19.GM = Funk Central GM_TT20.GM = Jammit GM_TT21.GM = Movin' On +; MIDI timecodes where the playback should attemp to start and stop short. +; This is to allow fixing undesired silences in original MIDI files. +; However not all music drivers may support this. +[timingtrim] +; Theme has two beats silence at the beginning which prevents clean looping. +GM_TT00.GM = 768:53760 +; Can't Get There From Here from the Windows version has a long silence at the end, +; followed by a solo repeat. This isn't in the original DOS version music and is likely +; unintentional from the people who converted the music from the DOS version. +; Actual song ends after measure 152. +GM_TT10.GM = 0:235008 + [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/media/baseset/orig_win.obs b/media/baseset/orig_win.obs index f9a6a6ca47..e1c2c4e11d 100644 --- a/media/baseset/orig_win.obs +++ b/media/baseset/orig_win.obs @@ -1,4 +1,4 @@ -; $Id: orig_win.obs 25205 2013-04-24 20:30:02Z frosch $ +; $Id$ ; ; This represents the original sounds as on the Transport ; Tycoon Deluxe for Windows CD. diff --git a/media/extra_grf/2ccmap.nfo b/media/extra_grf/2ccmap.nfo index 9b950ea465..0e99ff8850 100644 --- a/media/extra_grf/2ccmap.nfo +++ b/media/extra_grf/2ccmap.nfo @@ -1,5 +1,5 @@ // -// $Id: 2ccmap.nfo 21535 2010-12-18 13:04:05Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/airport_preview.nfo b/media/extra_grf/airport_preview.nfo index 99a39ddf5c..a98fe67000 100644 --- a/media/extra_grf/airport_preview.nfo +++ b/media/extra_grf/airport_preview.nfo @@ -1,5 +1,5 @@ // -// $Id: airport_preview.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/airports.nfo b/media/extra_grf/airports.nfo index 6471407c32..45cd25de04 100644 --- a/media/extra_grf/airports.nfo +++ b/media/extra_grf/airports.nfo @@ -1,5 +1,5 @@ // -// $Id: airports.nfo 27976 2018-03-11 11:43:32Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/aqueduct.nfo b/media/extra_grf/aqueduct.nfo index 76cc81e877..d9ba739f53 100644 --- a/media/extra_grf/aqueduct.nfo +++ b/media/extra_grf/aqueduct.nfo @@ -1,5 +1,5 @@ // -// $Id: aqueduct.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/assemble_nfo.awk b/media/extra_grf/assemble_nfo.awk index fdef6b23cf..cf6b425c1d 100644 --- a/media/extra_grf/assemble_nfo.awk +++ b/media/extra_grf/assemble_nfo.awk @@ -1,4 +1,4 @@ -# $Id: assemble_nfo.awk 26708 2014-07-30 17:21:42Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/autorail.nfo b/media/extra_grf/autorail.nfo index 87204959a9..08aa5ef9fc 100644 --- a/media/extra_grf/autorail.nfo +++ b/media/extra_grf/autorail.nfo @@ -1,5 +1,5 @@ // -// $Id: autorail.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/canals.nfo b/media/extra_grf/canals.nfo index 4310b58a3f..e464762ee6 100644 --- a/media/extra_grf/canals.nfo +++ b/media/extra_grf/canals.nfo @@ -1,5 +1,5 @@ // -// $Id: canals.nfo 27731 2017-01-14 18:00:02Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/chars.nfo b/media/extra_grf/chars.nfo index 6b853e9226..32462f8c1c 100644 --- a/media/extra_grf/chars.nfo +++ b/media/extra_grf/chars.nfo @@ -1,5 +1,5 @@ // -// $Id: chars.nfo 27915 2017-09-11 18:31:32Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/elrails.nfo b/media/extra_grf/elrails.nfo index e1217eaef2..7b8e9dace4 100644 --- a/media/extra_grf/elrails.nfo +++ b/media/extra_grf/elrails.nfo @@ -1,5 +1,5 @@ // -// $Id: elrails.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/fix_graphics.nfo b/media/extra_grf/fix_graphics.nfo index af88e8988b..1144742230 100644 --- a/media/extra_grf/fix_graphics.nfo +++ b/media/extra_grf/fix_graphics.nfo @@ -1,5 +1,5 @@ // -// $Id: fix_graphics.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/flags.nfo b/media/extra_grf/flags.nfo index 5d3ec1b778..ab792ef525 100644 --- a/media/extra_grf/flags.nfo +++ b/media/extra_grf/flags.nfo @@ -1,5 +1,5 @@ // -// $Id: flags.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/foundations.nfo b/media/extra_grf/foundations.nfo index 9e063959c6..437fcd99eb 100644 --- a/media/extra_grf/foundations.nfo +++ b/media/extra_grf/foundations.nfo @@ -1,5 +1,5 @@ // -// $Id: foundations.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/mono.nfo b/media/extra_grf/mono.nfo index 3a3667ccf7..a5f0fe5eaa 100644 --- a/media/extra_grf/mono.nfo +++ b/media/extra_grf/mono.nfo @@ -1,5 +1,5 @@ // -// $Id: mono.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/oneway.nfo b/media/extra_grf/oneway.nfo index e0dc7c5d11..74264219ec 100644 --- a/media/extra_grf/oneway.nfo +++ b/media/extra_grf/oneway.nfo @@ -1,5 +1,5 @@ // -// $Id: oneway.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/openttd.nfo b/media/extra_grf/openttd.nfo index e0b526795c..460007d68e 100644 --- a/media/extra_grf/openttd.nfo +++ b/media/extra_grf/openttd.nfo @@ -2,7 +2,7 @@ // (Info version 32) // Format: spritenum imagefile depth xpos ypos xsize ysize xrel yrel zoom flags // -// $Id: openttd.nfo 27730 2017-01-14 15:48:19Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -14,6 +14,8 @@ // allowing it to be used. // +//@@WARNING DISABLE 60 + // // Number of sprites, it is wrong, but GRFcodec automagically gets it right. // diff --git a/media/extra_grf/openttdgui.nfo b/media/extra_grf/openttdgui.nfo index ea8fdeb0d2..d0fbba0e70 100644 --- a/media/extra_grf/openttdgui.nfo +++ b/media/extra_grf/openttdgui.nfo @@ -1,5 +1,5 @@ // -// $Id: openttdgui.nfo 25916 2013-10-27 15:09:41Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -7,7 +7,7 @@ // See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . // -1 * 0 0C "OpenTTD GUI graphics" - -1 * 3 05 15 \b 175 // OPENTTD_SPRITE_COUNT + -1 * 3 05 15 \b 179 // OPENTTD_SPRITE_COUNT -1 sprites/openttdgui.png 8bpp 66 8 64 31 -31 7 normal -1 sprites/openttdgui.png 8bpp 146 8 64 31 -31 7 normal -1 sprites/openttdgui.png 8bpp 226 8 64 31 -31 7 normal @@ -183,3 +183,7 @@ -1 sprites/openttdgui.png 8bpp 440 440 20 20 0 0 normal -1 sprites/openttdgui.png 8bpp 466 440 20 20 0 0 normal -1 sprites/openttdgui.png 8bpp 490 440 20 20 0 0 normal + -1 sprites/openttdgui_group_livery.png 8bpp 0 0 20 20 0 0 normal + -1 sprites/openttdgui_group_livery.png 8bpp 21 0 20 20 0 0 normal + -1 sprites/openttdgui_group_livery.png 8bpp 42 0 20 20 0 0 normal + -1 sprites/openttdgui_group_livery.png 8bpp 63 0 20 20 0 0 normal diff --git a/media/extra_grf/openttdgui.png b/media/extra_grf/openttdgui.png index 94871968d3..900a612a87 100644 Binary files a/media/extra_grf/openttdgui.png and b/media/extra_grf/openttdgui.png differ diff --git a/media/extra_grf/palette.nfo b/media/extra_grf/palette.nfo index a1a6cf1dcc..4a6ae69505 100644 --- a/media/extra_grf/palette.nfo +++ b/media/extra_grf/palette.nfo @@ -1,5 +1,5 @@ // -// $Id: palette.nfo 26869 2014-09-21 07:57:45Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/rivers/arctic.nfo b/media/extra_grf/rivers/arctic.nfo index eaddfc4050..646c9ed139 100644 --- a/media/extra_grf/rivers/arctic.nfo +++ b/media/extra_grf/rivers/arctic.nfo @@ -1,5 +1,5 @@ // -// $Id: arctic.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/rivers/rapids.nfo b/media/extra_grf/rivers/rapids.nfo index 41fb3277d2..f66f3dc445 100644 --- a/media/extra_grf/rivers/rapids.nfo +++ b/media/extra_grf/rivers/rapids.nfo @@ -1,5 +1,5 @@ // -// $Id: rapids.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/rivers/temperate.nfo b/media/extra_grf/rivers/temperate.nfo index 2e4a8342bf..a5af841b25 100644 --- a/media/extra_grf/rivers/temperate.nfo +++ b/media/extra_grf/rivers/temperate.nfo @@ -1,5 +1,5 @@ // -// $Id: temperate.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/rivers/toyland.nfo b/media/extra_grf/rivers/toyland.nfo index b75f360d12..ca65ce1e3b 100644 --- a/media/extra_grf/rivers/toyland.nfo +++ b/media/extra_grf/rivers/toyland.nfo @@ -1,5 +1,5 @@ // -// $Id: toyland.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/rivers/tropic.nfo b/media/extra_grf/rivers/tropic.nfo index 03806ea473..b1fa4cf3cf 100644 --- a/media/extra_grf/rivers/tropic.nfo +++ b/media/extra_grf/rivers/tropic.nfo @@ -1,5 +1,5 @@ // -// $Id: tropic.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/roadstops.nfo b/media/extra_grf/roadstops.nfo index 1decb6a278..dbb70211da 100644 --- a/media/extra_grf/roadstops.nfo +++ b/media/extra_grf/roadstops.nfo @@ -1,5 +1,5 @@ // -// $Id: roadstops.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/shore.nfo b/media/extra_grf/shore.nfo index 7040841549..7b7c12ad3b 100644 --- a/media/extra_grf/shore.nfo +++ b/media/extra_grf/shore.nfo @@ -1,5 +1,5 @@ // -// $Id: shore.nfo 27265 2015-05-03 10:10:04Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/signals.nfo b/media/extra_grf/signals.nfo index 3081fe3b9b..a2d2591470 100644 --- a/media/extra_grf/signals.nfo +++ b/media/extra_grf/signals.nfo @@ -1,5 +1,5 @@ // -// $Id: signals.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/sloped_tracks.nfo b/media/extra_grf/sloped_tracks.nfo index 80907251cd..ed17bc8445 100644 --- a/media/extra_grf/sloped_tracks.nfo +++ b/media/extra_grf/sloped_tracks.nfo @@ -1,5 +1,5 @@ // -// $Id: sloped_tracks.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/tramtracks.nfo b/media/extra_grf/tramtracks.nfo index 974c279f75..5a078194b9 100644 --- a/media/extra_grf/tramtracks.nfo +++ b/media/extra_grf/tramtracks.nfo @@ -1,5 +1,5 @@ // -// $Id: tramtracks.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/extra_grf/tunnel_portals.nfo b/media/extra_grf/tunnel_portals.nfo index ce77a38923..711229aab5 100644 --- a/media/extra_grf/tunnel_portals.nfo +++ b/media/extra_grf/tunnel_portals.nfo @@ -1,5 +1,5 @@ // -// $Id: tunnel_portals.nfo 23982 2012-02-24 22:29:44Z rubidium $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/media/openttd.desktop.in b/media/openttd.desktop.in index 9b16c1acc4..513ff712df 100644 --- a/media/openttd.desktop.in +++ b/media/openttd.desktop.in @@ -1,4 +1,4 @@ -# $Id: openttd.desktop.in 27221 2015-04-07 21:30:04Z frosch $ +# $Id$ # http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html [Desktop Entry] Type=Application diff --git a/media/openttd.desktop.translation.awk b/media/openttd.desktop.translation.awk index 4332c184ae..ee8fdd9700 100644 --- a/media/openttd.desktop.translation.awk +++ b/media/openttd.desktop.translation.awk @@ -1,4 +1,4 @@ -# $Id: openttd.desktop.translation.awk 24100 2012-04-08 14:29:31Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/os/debian/changelog b/os/debian/changelog index d55b9ab4ce..e429487ec0 100644 --- a/os/debian/changelog +++ b/os/debian/changelog @@ -1,3 +1,15 @@ +openttd (1.9.0~beta2-0) unstable; urgency=low + + * New upstream release 1.9.0-beta2 + + -- OpenTTD Sat, 09 Feb 2019 23:00:00 +0000 + +openttd (1.9.0~beta1-0) unstable; urgency=low + + * New upstream release 1.9.0-beta1 + + -- OpenTTD Sat, 09 Feb 2019 16:00:00 +0000 + openttd (1.8.0-0) unstable; urgency=low * New upstream release 1.8.0 @@ -1014,4 +1026,3 @@ openttd (0.3.5-1) unstable; urgency=low * Initial Release. -- Matthijs Kooijman Fri, 24 Dec 2004 02:58:47 +0100 - diff --git a/os/debian/copyright b/os/debian/copyright index 05cbfc4328..24d6d7052f 100644 --- a/os/debian/copyright +++ b/os/debian/copyright @@ -5,7 +5,7 @@ Source: http://www.openttd.org Files: * -Copyright: © 2004-2018 Ludvig Strigeous and others. +Copyright: © 2004-2019 Ludvig Strigeous and others. License: GPL-2.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.0 as diff --git a/os/dos/make_dos_binary_selfcontained.sh b/os/dos/make_dos_binary_selfcontained.sh index 859b80e90e..259e502372 100755 --- a/os/dos/make_dos_binary_selfcontained.sh +++ b/os/dos/make_dos_binary_selfcontained.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: make_dos_binary_selfcontained.sh 25780 2013-09-19 07:42:13Z matthijs $ +# $Id$ cd `dirname $0` cc -o exe2coff/exe2coff exe2coff/exe2coff.c || exit diff --git a/os/macosx/plistgen.sh b/os/macosx/plistgen.sh index b111344044..b6116d9102 100755 --- a/os/macosx/plistgen.sh +++ b/os/macosx/plistgen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: plistgen.sh 15062 2009-01-13 16:30:24Z smatz $ +# $Id$ # sets VERSION to the value if RELEASE if there are any, # otherwise it sets VERSION to revision number diff --git a/os/os2/installer/make_installer.cmd b/os/os2/installer/make_installer.cmd index 5e30e4c354..a15198b5f1 100644 --- a/os/os2/installer/make_installer.cmd +++ b/os/os2/installer/make_installer.cmd @@ -1,6 +1,6 @@ @echo off -set OPENTTD_VERSION=1.8.0 +set OPENTTD_VERSION=1.9.0 set OPENSFX_VERSION=0.8.0 set NOSOUND_VERSION=0.8.0 set OPENGFX_VERSION=1.2.0 diff --git a/os/rpm/openttd.spec b/os/rpm/openttd.spec index 27acc1b7df..d16230f312 100644 --- a/os/rpm/openttd.spec +++ b/os/rpm/openttd.spec @@ -2,7 +2,7 @@ # spec file for package openttd # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2007-2018 The OpenTTD developers +# Copyright (c) 2007-2019 The OpenTTD developers # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,9 @@ # Name: openttd -Version: 1.8.beta1 +Version: 1.9.beta2 Release: 0 -%define srcver 1.8.0-beta1 +%define srcver 1.9.0-beta2 Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe License: GPL-2.0 Group: Amusements/Games/Strategy/Other diff --git a/os/windows/installer/install.nsi b/os/windows/installer/install.nsi index a6fedacdca..d0c933ca21 100644 --- a/os/windows/installer/install.nsi +++ b/os/windows/installer/install.nsi @@ -1,9 +1,9 @@ # Version numbers to update !define APPV_MAJOR 1 -!define APPV_MINOR 8 +!define APPV_MINOR 9 !define APPV_MAINT 0 !define APPV_BUILD 1 -!define APPV_EXTRA "" +!define APPV_EXTRA "-beta2" !define APPNAME "OpenTTD" ; Define application name !define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version @@ -89,7 +89,7 @@ Page custom SelectCDEnter SelectCDExit ": TTD folder" !define MUI_FINISHPAGE_LINK "Visit the OpenTTD site for more information" !define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}" !define MUI_FINISHPAGE_NOREBOOTSUPPORT -!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt" +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.md" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBack @@ -139,7 +139,7 @@ Section "!OpenTTD" Section1 ; Copy the scripts SetOutPath "$INSTDIR\scripts\" File ${PATH_ROOT}bin\scripts\*.* - Push "$INSTDIR\scripts\readme.txt" + Push "$INSTDIR\scripts\README.md" Call unix2dos ; Copy some documention files @@ -158,8 +158,8 @@ Section "!OpenTTD" Section1 File ${PATH_ROOT}COPYING Push "$INSTDIR\COPYING" Call unix2dos - File ${PATH_ROOT}readme.txt - Push "$INSTDIR\readme.txt" + File ${PATH_ROOT}README.md + Push "$INSTDIR\README.md" Call unix2dos File ${PATH_ROOT}known-bugs.txt Push "$INSTDIR\known-bugs.txt" @@ -213,13 +213,13 @@ Section "!OpenTTD" Section1 CreateDirectory "$SMPROGRAMS\$SHORTCUTS" CreateShortCut "$SMPROGRAMS\$SHORTCUTS\OpenTTD.lnk" "$INSTDIR\openttd.exe" CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Uninstall.lnk" "$INSTDIR\uninstall.exe" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Readme.lnk" "$INSTDIR\Readme.txt" + CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Readme.lnk" "$INSTDIR\README.md" CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Changelog.lnk" "$INSTDIR\Changelog.txt" CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" "$INSTDIR\known-bugs.txt" CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Docs" CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Docs\Multiplayer.lnk" "$INSTDIR\docs\multiplayer.txt" CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Scripts" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Scripts\Readme.lnk" "$INSTDIR\scripts\readme.txt" + CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Scripts\Readme.lnk" "$INSTDIR\scripts\README.md" !insertmacro MUI_STARTMENU_WRITE_END SectionEnd @@ -304,6 +304,7 @@ Section /o "Copy data from Transport Tycoon Deluxe CD-ROM" Section2 ; Let's copy the files with size approximation SetOutPath "$INSTDIR\baseset" CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\baseset\" 1028 + CopyFiles "$CDDRIVE\gm.cat" "$INSTDIR\baseset\gm.cat" 415 CopyFiles "$CDDRIVE\sample.cat" "$INSTDIR\baseset\sample.cat" 1566 ; Copy Windows files CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\baseset\trg1r.grf" 2365 @@ -387,7 +388,7 @@ Section "Uninstall" ; Clean up OpenTTD dir Delete "$INSTDIR\changelog.txt" - Delete "$INSTDIR\readme.txt" + Delete "$INSTDIR\README.md" Delete "$INSTDIR\known-bugs.txt" Delete "$INSTDIR\openttd.exe" Delete "$INSTDIR\COPYING" @@ -426,6 +427,8 @@ Section "Uninstall" Delete "$INSTDIR\baseset\trgt.grf" Delete "$INSTDIR\baseset\trgc.grf" Delete "$INSTDIR\baseset\trgi.grf" + Delete "$INSTDIR\baseset\gm.cat" + Delete "$INSTDIR\baseset\gm-tto.cat" Delete "$INSTDIR\baseset\*.gm" Delete "$INSTDIR\data\sample.cat" @@ -467,8 +470,10 @@ Section "Uninstall" ; Base sets for music Delete "$INSTDIR\gm\orig_win.obm" + Delete "$INSTDIR\gm\orig_dos.obm" Delete "$INSTDIR\gm\no_music.obm" Delete "$INSTDIR\baseset\orig_win.obm" + Delete "$INSTDIR\baseset\orig_dos.obm" Delete "$INSTDIR\baseset\no_music.obm" ; Remove remaining directories diff --git a/os/windows/installer/version_win9x.txt b/os/windows/installer/version_win9x.txt index 077390eacb..21dbf6200a 100644 --- a/os/windows/installer/version_win9x.txt +++ b/os/windows/installer/version_win9x.txt @@ -1,5 +1,5 @@ !define APPBITS 32 ; Define number of bits for the architecture !define EXTRA_VERSION "95, 98, ME, 2000 and XP without SP3" !define APPARCH "win9x" ; Define the application architecture -!define BINARY_DIR "${PATH_ROOT}bin" +!define BINARY_DIR "${PATH_ROOT}objs\release" InstallDir "$PROGRAMFILES32\OpenTTD\" diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs index 2557ca6c63..98c704553c 100755 --- a/projects/determineversion.vbs +++ b/projects/determineversion.vbs @@ -1,6 +1,6 @@ Option Explicit -' $Id: determineversion.vbs 24826 2012-12-19 02:42:25Z glx $ +' $Id$ ' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -21,312 +21,138 @@ Sub FindReplaceInFile(filename, to_find, replacement) file.Close End Sub -Sub UpdateFile(modified, revision, version, cur_date, filename) +Sub UpdateFile(modified, isodate, version, cur_date, githash, filename) FSO.CopyFile filename & ".in", filename FindReplaceInFile filename, "!!MODIFIED!!", modified - FindReplaceInFile filename, "!!REVISION!!", revision + FindReplaceInFile filename, "!!ISODATE!!", isodate FindReplaceInFile filename, "!!VERSION!!", version FindReplaceInFile filename, "!!DATE!!", cur_date + FindReplaceInFile filename, "!!GITHASH!!", githash End Sub Sub UpdateFiles(version) - Dim modified, revision, cur_date + Dim modified, isodate, cur_date, githash cur_date = DatePart("D", Date) & "." & DatePart("M", Date) & "." & DatePart("YYYY", Date) If InStr(version, Chr(9)) Then - revision = Mid(version, InStr(version, Chr(9)) + 1) - modified = Mid(revision, InStr(revision, Chr(9)) + 1) - revision = Mid(revision, 1, InStr(revision, Chr(9)) - 1) + isodate = Mid(version, InStr(version, Chr(9)) + 1) + modified = Mid(isodate, InStr(isodate, Chr(9)) + 1) + githash = Mid(modified, InStr(modified, Chr(9)) + 1) + isodate = Mid(isodate, 1, InStr(isodate, Chr(9)) - 1) modified = Mid(modified, 1, InStr(modified, Chr(9)) - 1) version = Mid(version, 1, InStr(version, Chr(9)) - 1) Else - revision = 0 + isodate = 0 modified = 1 + githash = "" End If - UpdateFile modified, revision, version, cur_date, "../src/rev.cpp" - UpdateFile modified, revision, version, cur_date, "../src/os/windows/ottdres.rc" + UpdateFile modified, isodate, version, cur_date, githash, "../src/rev.cpp" + UpdateFile modified, isodate, version, cur_date, githash, "../src/os/windows/ottdres.rc" End Sub -Function ReadRegistryKey(shive, subkey, valuename, architecture) - Dim hiveKey, objCtx, objLocator, objServices, objReg, Inparams, Outparams - - ' First, get the Registry Provider for the requested architecture - Set objCtx = CreateObject("WbemScripting.SWbemNamedValueSet") - objCtx.Add "__ProviderArchitecture", architecture ' Must be 64 of 32 - Set objLocator = CreateObject("Wbemscripting.SWbemLocator") - Set objServices = objLocator.ConnectServer("","root\default","","",,,,objCtx) - Set objReg = objServices.Get("StdRegProv") - - ' Check the hive and give it the right value - Select Case shive - Case "HKCR", "HKEY_CLASSES_ROOT" - hiveKey = &h80000000 - Case "HKCU", "HKEY_CURRENT_USER" - hiveKey = &H80000001 - Case "HKLM", "HKEY_LOCAL_MACHINE" - hiveKey = &h80000002 - Case "HKU", "HKEY_USERS" - hiveKey = &h80000003 - Case "HKCC", "HKEY_CURRENT_CONFIG" - hiveKey = &h80000005 - Case "HKDD", "HKEY_DYN_DATA" ' Only valid for Windows 95/98 - hiveKey = &h80000006 - Case Else - MsgBox "Hive not valid (ReadRegistryKey)" - End Select - - Set Inparams = objReg.Methods_("GetStringValue").Inparameters - Inparams.Hdefkey = hiveKey - Inparams.Ssubkeyname = subkey - Inparams.Svaluename = valuename - Set Outparams = objReg.ExecMethod_("GetStringValue", Inparams,,objCtx) - - ReadRegistryKey = Outparams.SValue -End Function - -Function DetermineSVNVersion() - Dim WshShell, version, branch, modified, revision, clean_rev, url, oExec, line, hash +Function DetermineVersion() + Dim WshShell, branch, tag, modified, isodate, oExec, line, hash, shorthash Set WshShell = CreateObject("WScript.Shell") On Error Resume Next - revision = 0 + modified = 0 + hash = "" + shorthash = "" + branch = "" + isodate = "" + tag = "" - ' Try TortoiseSVN - ' Get the directory where TortoiseSVN (should) reside(s) - Dim sTortoise - ' First, try with 32-bit architecture - sTortoise = ReadRegistryKey("HKLM", "SOFTWARE\TortoiseSVN", "Directory", 32) - If sTortoise = "" Or IsNull(sTortoise) Then - ' No 32-bit version of TortoiseSVN installed, try 64-bit version (doesn't hurt on 32-bit machines, it returns nothing or is ignored) - sTortoise = ReadRegistryKey("HKLM", "SOFTWARE\TortoiseSVN", "Directory", 64) - End If + ' Set the environment to english + WshShell.Environment("PROCESS")("LANG") = "en" - ' If TortoiseSVN is installed, try to get the revision number - If sTortoise <> "" Then - Dim SubWCRev - Set SubWCRev = WScript.CreateObject("SubWCRev.object") - SubWCRev.GetWCInfo FSO.GetAbsolutePathName("../"), 0, 0 - revision = SubWCRev.Revision - version = "r" & revision - modified = 0 - if SubWCRev.HasModifications then modified = 2 - url = SubWCRev.Url - End If + Set oExec = WshShell.Exec("git rev-parse --verify HEAD") + If Err.Number = 0 Then + ' Wait till the application is finished ... + Do While oExec.Status = 0 + Loop - ' Looks like there is no TortoiseSVN installed either. Then we don't know it. - If revision = 0 Then - ' Reset error and version - Err.Clear - version = "norev000" - modified = 0 - - ' Set the environment to english - WshShell.Environment("PROCESS")("LANG") = "en" - - ' Do we have subversion installed? Check immediatelly whether we've got a modified WC. - Set oExec = WshShell.Exec("svnversion ../") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - - line = OExec.StdOut.ReadLine() - If line <> "exported" Then - If InStr(line, "M") Then - modified = 2 - End If - - ' And use svn info to get the correct revision and branch information. - Set oExec = WshShell.Exec("svn info ../") - If Err.Number = 0 Then - Do - line = OExec.StdOut.ReadLine() - If InStr(line, "URL") Then - url = line - End If - If InStr(line, "Last Changed Rev") Then - revision = Mid(line, 19) - version = "r" & revision - End If - Loop While Not OExec.StdOut.atEndOfStream - End If ' Err.Number = 0 - End If ' line <> "exported" - End If ' Err.Number = 0 - End If ' InStr(version, "$") - - If version <> "norev000" Then - If InStr(url, "branches") Then - branch = Mid(url, InStr(url, "branches/") + 9) - End If - If InStr(url, "tags") Then - version = Mid(url, InStr(url, "tags/") + 5) - End If - Else ' version <> "norev000" - ' svn detection failed, reset error and try git - Err.Clear - Set oExec = WshShell.Exec("git rev-parse --verify HEAD") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - - If oExec.ExitCode = 0 Then - hash = oExec.StdOut.ReadLine() - version = "g" & Mid(hash, 1, 8) - ' Make sure index is in sync with disk - Set oExec = WshShell.Exec("git update-index --refresh") - If Err.Number = 0 Then - ' StdOut and StdErr share a 4kB buffer so prevent it from filling up as we don't care about the output - oExec.StdOut.Close - oExec.StdErr.Close - ' Wait till the application is finished ... - Do While oExec.Status = 0 - WScript.Sleep 10 - Loop - End If - Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - - If oExec.ExitCode = 1 Then - modified = 2 - End If ' oExec.ExitCode = 1 - - Set oExec = WshShell.Exec("git symbolic-ref HEAD") - If Err.Number = 0 Then - line = oExec.StdOut.ReadLine() - line = Mid(line, InStrRev(line, "/") + 1) - If line <> "master" Then - branch = line - End If ' line <> "master" - End If ' Err.Number = 0 - - Set oExec = WshShell.Exec("git log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1") - if Err.Number = 0 Then - revision = Mid(oExec.StdOut.ReadLine(), 7) - revision = Mid(revision, 1, InStr(revision, ")") - 1) - End If ' Err.Number = 0 - If revision = "" Then - ' No revision? Maybe it is a custom git-svn clone - ' Reset error number as WshShell.Exec will not do that on success - Err.Clear - Set oExec = WshShell.Exec("git log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1") - If Err.Number = 0 Then - revision = oExec.StdOut.ReadLine() - revision = Mid(revision, InStr(revision, "@") + 1) - revision = Mid(revision, 1, InStr(revision, " ") - 1) - End If ' Err.Number = 0 - End If ' revision = "" - - ' Check if a tag is currently checked out - Err.Clear - Set oExec = WshShell.Exec("git name-rev --name-only --tags --no-undefined HEAD") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - If oExec.ExitCode = 0 Then - version = oExec.StdOut.ReadLine() - If Right(version, 2) = "^0" Then - version = Left(version, Len(version) - 2) - End If - branch = "" - End If ' oExec.ExitCode = 0 - End If ' Err.Number = 0 - End If ' Err.Number = 0 - End If ' oExec.ExitCode = 0 - End If ' Err.Number = 0 - - If version = "norev000" Then - ' git detection failed, reset error and try mercurial (hg) - Err.Clear - Set oExec = WshShell.Exec("hg id -i") + If oExec.ExitCode = 0 Then + hash = oExec.StdOut.ReadLine() + shorthash = Mid(hash, 1, 10) + ' Make sure index is in sync with disk + Set oExec = WshShell.Exec("git update-index --refresh") + If Err.Number = 0 Then + ' StdOut and StdErr share a 4kB buffer so prevent it from filling up as we don't care about the output + oExec.StdOut.Close + oExec.StdErr.Close + ' Wait till the application is finished ... + Do While oExec.Status = 0 + WScript.Sleep 10 + Loop + End If + Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../") If Err.Number = 0 Then ' Wait till the application is finished ... Do While oExec.Status = 0 Loop - If oExec.ExitCode = 0 Then - line = OExec.StdOut.ReadLine() - hash = Left(line, 12) - version = "h" & Mid(hash, 1, 8) + If oExec.ExitCode = 1 Then + modified = 2 + End If ' oExec.ExitCode = 1 - ' Check if a tag is currently checked out - Err.Clear - Set oExec = WshShell.Exec("hg id -t") - If Err.Number = 0 Then - line = oExec.StdOut.ReadLine() - If Len(line) > 0 And Right(line, 3) <> "tip" Then - version = line - branch = "" - End If ' Len(line) > 0 And Right(line, 3) <> "tip" - End If ' Err.Number = 0 + Set oExec = WshShell.Exec("git show -s --pretty=format:%ci") + if Err.Number = 0 Then + isodate = Mid(oExec.StdOut.ReadLine(), 1, 10) + isodate = Replace(isodate, "-", "") + End If ' Err.Number = 0 - Err.Clear - Set oExec = WshShell.Exec("hg status ../") - If Err.Number = 0 Then - Do - line = OExec.StdOut.ReadLine() - If Len(line) > 0 And Mid(line, 1, 1) <> "?" Then - modified = 2 - Exit Do - End If ' Len(line) > 0 And Mid(line, 1, 1) <> "?" - Loop While Not OExec.StdOut.atEndOfStream + ' Check branch + Err.Clear + Set oExec = WshShell.Exec("git symbolic-ref HEAD") + If Err.Number = 0 Then + line = oExec.StdOut.ReadLine() + branch = Mid(line, InStrRev(line, "/") + 1) + End If ' Err.Number = 0 - Set oExec = WshShell.Exec("hg branch") - If Err.Number = 0 Then - line = OExec.StdOut.ReadLine() - If line <> "default" Then - branch = line - End If ' line <> "default" - End If ' Err.Number = 0 - - Set oExec = WshShell.Exec("hg log -f -k " & Chr(34) & "(svn r" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc|firstline}\n" & Chr(34) & " --cwd ../") - If Err.Number = 0 Then - line = oExec.StdOut.ReadLine() - If Left(line, 6) = "(svn r" Then - revision = Mid(line, 7) - revision = Mid(revision, 1, InStr(revision, ")") - 1) - End If 'Left(line, 6) = "(svn r" - End If ' Err.Number = 0 - - If revision = "" Then - ' No rev? Maybe it is a custom hgsubversion clone - Err.Clear - Set oExec = WshShell.Exec("hg parent --template=" & Chr(34) & "{svnrev}" & Chr(34)) - If Err.Number = 0 Then - revision = oExec.StdOut.ReadLine() - End If ' Err.Number = 0 - End If ' revision = "" - End If ' Err.Number = 0 - End If ' oExec.ExitCode = 0 + ' Check if a tag is currently checked out + Err.Clear + Set oExec = WshShell.Exec("git name-rev --name-only --tags --no-undefined HEAD") + If Err.Number = 0 Then + ' Wait till the application is finished ... + Do While oExec.Status = 0 + Loop + If oExec.ExitCode = 0 Then + tag = oExec.StdOut.ReadLine() + If Right(tag, 2) = "^0" Then + tag = Left(tag, Len(tag) - 2) + End If + End If ' oExec.ExitCode = 0 + End If ' Err.Number = 0 End If ' Err.Number = 0 - End If ' version = "norev000" - End If ' version <> "norev000" + End If ' oExec.ExitCode = 0 + End If ' Err.Number = 0 - If version = "norev000" And FSO.FileExists("../.ottdrev") Then + If hash = "" And FSO.FileExists("../.ottdrev") Then Dim rev_file Set rev_file = FSO.OpenTextFile("../.ottdrev", 1, True, 0) - DetermineSVNVersion = rev_file.ReadLine() + DetermineVersion = rev_file.ReadLine() rev_file.Close() + ElseIf hash = "" Then + DetermineVersion = "norev000" + modified = 1 Else - If modified = 2 Then - version = version & "M" - End If - - clean_rev = version - If branch <> "" Then - version = version & "-" & branch - End If - - If version <> "norev000" Then - DetermineSVNVersion = version & Chr(9) & revision & Chr(9) & modified & Chr(9) & clean_rev + Dim version, hashprefix + If modified = 0 Then + hashprefix = "-g" + ElseIf modified = 2 Then + hashprefix = "-m" Else - DetermineSVNVersion = version + hashprefix = "-u" End If + + If tag <> "" Then + version = tag + Else + version = isodate & "-" & branch & hashprefix & shorthash + End If + + DetermineVersion = version & Chr(9) & isodate & Chr(9) & modified & Chr(9) & hash End If End Function @@ -359,7 +185,7 @@ Function CheckFile(filename) End Function Dim version -version = DetermineSVNVersion +version = DetermineVersion If Not (IsCachedVersion(version) And CheckFile("../src/rev.cpp") And CheckFile("../src/os/windows/ottdres.rc")) Then UpdateFiles version End If diff --git a/projects/dpi_aware.manifest b/projects/dpi_aware.manifest index 6f04161596..ee1c7ea224 100644 --- a/projects/dpi_aware.manifest +++ b/projects/dpi_aware.manifest @@ -1,7 +1,29 @@ - + + + + + + + + + - - True/PM + + True/PM + + + + + + + + + + + + + + diff --git a/projects/generate b/projects/generate index c96f541411..595fa3acc6 100755 --- a/projects/generate +++ b/projects/generate @@ -1,6 +1,6 @@ #!/bin/bash -# $Id: generate 27918 2017-09-24 16:19:29Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -22,6 +22,16 @@ then exit 1 fi +# openttd_vs142.sln is for MSVC 2019 +# openttd_vs142.vcxproj is for MSVC 2019 +# openttd_vs142.vcxproj.filters is for MSVC 2019 +# langs_vs142.vcxproj is for MSVC 2019 +# strgen_vs142.vcxproj is for MSVC 2019 +# strgen_vs142.vcxproj.filters is for MSVC 2019 +# generate_vs142.vcxproj is for MSVC 2019 +# version_vs142.vcxproj is for MSVC 2019 +# basesets_vs142.vcxproj is for MSVC 2019 + # openttd_vs141.sln is for MSVC 2017 # openttd_vs141.vcxproj is for MSVC 2017 # openttd_vs141.vcxproj.filters is for MSVC 2017 @@ -30,6 +40,7 @@ fi # strgen_vs141.vcxproj.filters is for MSVC 2017 # generate_vs141.vcxproj is for MSVC 2017 # version_vs141.vcxproj is for MSVC 2017 +# basesets_vs141.vcxproj is for MSVC 2017 # openttd_vs140.sln is for MSVC 2015 # openttd_vs140.vcxproj is for MSVC 2015 @@ -39,29 +50,8 @@ fi # strgen_vs140.vcxproj.filters is for MSVC 2015 # generate_vs140.vcxproj is for MSVC 2015 # version_vs140.vcxproj is for MSVC 2015 +# basesets_vs140.vcxproj is for MSVC 2015 -# openttd_vs100.sln is for MSVC 2010 -# openttd_vs100.vcxproj is for MSVC 2010 -# openttd_vs100.vcxproj.filters is for MSVC 2010 -# langs_vs100.vcxproj is for MSVC 2010 -# strgen_vs100.vcxproj is for MSVC 2010 -# strgen_vs100.vcxproj.filters is for MSVC 2010 -# generate_vs100.vcxproj is for MSVC 2010 -# version_vs100.vcxproj is for MSVC 2010 - -# openttd_vs90.sln is for MSVC 2008 -# openttd_vs90.vcproj is for MSVC 2008 -# langs_vs90.vcproj is for MSVC 2008 -# strgen_vs90.vcproj is for MSVC 2008 -# generate_vs90.vcproj is for MSVC 2008 -# version_vs90.vcproj is for MSVC 2008 - -# openttd_vs80.sln is for MSVC 2005 -# openttd_vs80.vcproj is for MSVC 2005 -# langs_vs80.vcproj is for MSVC 2005 -# strgen_vs80.vcproj is for MSVC 2005 -# generate_vs80.vcproj is for MSVC 2005 -# version_vs80.vcproj is for MSVC 2005 @@ -74,6 +64,7 @@ enable_dedicated="0" enable_ai="1" with_cocoa="0" enable_directmusic="1" +enable_fluidsynth="0" with_threads="1" file_prefix="..\\\\src\\\\" @@ -123,7 +114,6 @@ load_main_data() { if ($0 == "PNG" && "'$png_config'" == "") { next; } if ($0 == "OSX" && "'$os'" != "OSX") { next; } if ($0 == "OS2" && "'$os'" != "OS2") { next; } - if ($0 == "PSP" && "'$os'" != "PSP") { next; } if ($0 == "DOS" && "'$os'" != "DOS") { next; } if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; } if ($0 == "AI" && "'$enable_ai'" == "0") { next; } @@ -131,9 +121,9 @@ load_main_data() { if ($0 == "BEOS" && "'$os'" != "BEOS") { next; } if ($0 == "WIN32" && "'$os'" != "MINGW" && "'$os'" != "CYGWIN" && "'$os'" != "MSVC" ) { next; } - if ($0 == "WINCE" && "'$os'" != "WINCE") { next; } if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; } + if ($0 == "FLUIDSYNTH" && "'$enable_fluidsynth'" != "1") { next; } if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; } if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; } @@ -146,17 +136,7 @@ load_main_data() { gsub(" ", "", $0); gsub("^#", "", $0); gsub("^ ", "", $0); - - if (first_time != 0) { - print "#1 "; - } else { - first_time = 1; - } - filter = $0; - print "#1 "; print "#3 "; printf "#3 {c76ff9f1-1e62-46d8-8d55-%012d}\n", i; print "#3 "; @@ -170,10 +150,6 @@ load_main_data() { if (deep == skip) { gsub(" ", "", $0); gsub("/", "\\\\", $0); - print "#1 "; - print "#1 "; split($0, file, "."); cltype = "ClInclude" if (file[2] == "cpp") cltype = "ClCompile"; @@ -184,7 +160,6 @@ load_main_data() { print "#4 "; } } - END { print "#1 "; } '`" eval "$2=\"\$RES\"" @@ -192,29 +167,16 @@ load_main_data() { load_lang_data() { RES="" - for i in `ls $1` + # Windows Folder sort and Linux Folder sort are slightly different. + # By removing the extension and sorting it on Linux, they are the same. + for i in `ls $1 | sed s~.txt$~~g | sort` do - i=`basename $i | sed s~.txt$~~g` + i=`basename $i` if [ "$i" == "english" ] then continue fi RES="$RES -#1 -#1 -#1 -#1 -#1 #2 #2 Generating "$i" language file #2 ..\\objs\\strgen\\strgen.exe -s ..\\src\\lang -d ..\\bin\\lang \"%(FullPath)\" @@ -237,10 +199,6 @@ load_settings_data() { do i=`basename $i` RES="$RES -#1 -#1 #2 #4 #4 INI @@ -251,6 +209,44 @@ load_settings_data() { eval "$2=\"\$RES\$RES2\"" } +load_baseset_data() { + FIRST="" + RES="" + RES2=" +#4 " + # Windows Folder sort and Linux Folder sort are slightly different. + # By removing the extension and sorting it on Linux, they are the same. + for i in `ls $2 | sed s~.txt$~~g | sort` + do + if [ "$FIRST" != "" ]; then + RES2="$RES2;" + else + FIRST=1 + fi + i=`basename $i` + RES2="$RES2..\\src\\lang\\$i.txt" + done + RES2="$RES2" + # Windows Folder sort and Linux Folder sort are slightly different. + # By fiddling with the extension and sorting it on Linux, they are the same. + for i in `ls $1 | sed s~\\\.~000~g | sort | sed s~000~.~g` + do + i=`basename $i` + RES="$RES +#2 +#2 Generating "$i" baseset metadata file +#2 cscript //nologo ..\\media\\baseset\\translations.vbs \"%(FullPath)\" \"\$(OutputPath)$i\" ..\\src\\lang ..\\bin\\baseset\\orig_extra.grf +#2 \$(Langs);..\\bin\\baseset\\orig_extra.grf;%(AdditionalInputs) +#2 ..\\bin\\baseset\\"$i";%(Outputs) +#2 +#3 +#3 Baseset Metadata +#3 " + done + + eval "$3=\"\$RES\$RES2\"" +} + generate() { echo "Generating $2..." if [ $# -eq 3 ]; then @@ -307,40 +303,42 @@ load_main_data "$ROOT_DIR/source.list" openttd openttdfiles=`echo "$openttd" | grep "^#4" | sed "s~#4~~g"` openttdfilters=`echo "$openttd" | grep "^#3" | sed "s~#3~~g"` openttdvcxproj=`echo "$openttd" | grep "^#2" | sed "s~#2~~g"` -openttd=`echo "$openttd" | grep "^#1" | sed "s~#1~~g"` load_lang_data "$ROOT_DIR/src/lang/*.txt" lang langfiles=`echo "$lang" | grep "^#3" | sed "s~#3~~g"` langvcxproj=`echo "$lang" | grep "^#2" | sed "s~#2~~g"` -lang=`echo "$lang" | grep "^#1" | sed "s~#1~~g"` load_settings_data "$ROOT_DIR/src/table/*.ini" settings settingsfiles=`echo "$settings" | grep "^#4" | sed "s~#4~~g"` settingscommand=`echo "$settings" | grep "^#3" | sed "s~#3~~g"` settingsvcxproj=`echo "$settings" | grep "^#2" | sed "s~#2~~g"` -settings=`echo "$settings" | grep "^#1" | sed "s~#1~~g"` -generate "$openttd" "openttd_vs80.vcproj" -generate "$openttd" "openttd_vs90.vcproj" -generate "$openttdvcxproj" "openttd_vs100.vcxproj" -generate "$openttdfiles" "openttd_vs100.vcxproj.filters" "$openttdfilters" +load_baseset_data "$ROOT_DIR/media/baseset/*.ob?" "$ROOT_DIR/src/lang/*.txt" baseset +basesetfiles=`echo "$baseset" | grep "^#3" | sed "s-#3--g"` +basesetvcxproj=`echo "$baseset" | grep "^#2" | sed "s~#2~~g"` +basesetlangs=`echo "$baseset" | grep "^#4" | sed "s~#4~~g"` + generate "$openttdvcxproj" "openttd_vs140.vcxproj" generate "$openttdfiles" "openttd_vs140.vcxproj.filters" "$openttdfilters" generate "$openttdvcxproj" "openttd_vs141.vcxproj" generate "$openttdfiles" "openttd_vs141.vcxproj.filters" "$openttdfilters" -generate "$lang" "langs_vs80.vcproj" -generate "$lang" "langs_vs90.vcproj" -generate "$langvcxproj" "langs_vs100.vcxproj" -generate "$langfiles" "langs_vs100.vcxproj.filters" +generate "$openttdvcxproj" "openttd_vs142.vcxproj" +generate "$openttdfiles" "openttd_vs142.vcxproj.filters" "$openttdfilters" generate "$langvcxproj" "langs_vs140.vcxproj" generate "$langfiles" "langs_vs140.vcxproj.filters" generate "$langvcxproj" "langs_vs141.vcxproj" generate "$langfiles" "langs_vs141.vcxproj.filters" -generate "$settings" "settings_vs80.vcproj" "$settingscommand" -generate "$settings" "settings_vs90.vcproj" "$settingscommand" -generate "$settingsvcxproj" "settings_vs100.vcxproj" "$settingscommand" -generate "$settingsfiles" "settings_vs100.vcxproj.filters" +generate "$langvcxproj" "langs_vs142.vcxproj" +generate "$langfiles" "langs_vs142.vcxproj.filters" generate "$settingsvcxproj" "settings_vs140.vcxproj" "$settingscommand" generate "$settingsfiles" "settings_vs140.vcxproj.filters" generate "$settingsvcxproj" "settings_vs141.vcxproj" "$settingscommand" generate "$settingsfiles" "settings_vs141.vcxproj.filters" +generate "$settingsvcxproj" "settings_vs142.vcxproj" "$settingscommand" +generate "$settingsfiles" "settings_vs142.vcxproj.filters" +generate "$basesetvcxproj" "basesets_vs140.vcxproj" "$basesetlangs" +generate "$basesetfiles" "basesets_vs140.vcxproj.filters" +generate "$basesetvcxproj" "basesets_vs141.vcxproj" "$basesetlangs" +generate "$basesetfiles" "basesets_vs141.vcxproj.filters" +generate "$basesetvcxproj" "basesets_vs142.vcxproj" "$basesetlangs" +generate "$basesetfiles" "basesets_vs142.vcxproj.filters" diff --git a/projects/generate.vbs b/projects/generate.vbs index e303f955fc..e8cf13d03d 100755 --- a/projects/generate.vbs +++ b/projects/generate.vbs @@ -1,6 +1,6 @@ Option Explicit -' $Id: generate.vbs 27918 2017-09-24 16:19:29Z frosch $ +' $Id$ ' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -10,6 +10,16 @@ Option Explicit Dim FSO Set FSO = CreateObject("Scripting.FileSystemObject") +' openttd_vs142.sln is for MSVC 2019 +' openttd_vs142.vcxproj is for MSVC 2019 +' openttd_vs142.vcxproj.filters is for MSVC 2019 +' langs_vs142.vcxproj is for MSVC 2019 +' strgen_vs142.vcxproj is for MSVC 2019 +' strgen_vs142.vcxproj.filters is for MSVC 2019 +' generate_vs142.vcxproj is for MSVC 2019 +' version_vs142.vcxproj is for MSVC 2019 +' basesets_vs142.vcxproj is for MSVC 2019 + ' openttd_vs141.sln is for MSVC 2017 ' openttd_vs141.vcxproj is for MSVC 2017 ' openttd_vs141.vcxproj.filters is for MSVC 2017 @@ -18,6 +28,7 @@ Set FSO = CreateObject("Scripting.FileSystemObject") ' strgen_vs141.vcxproj.filters is for MSVC 2017 ' generate_vs141.vcxproj is for MSVC 2017 ' version_vs141.vcxproj is for MSVC 2017 +' basesets_vs141.vcxproj is for MSVC 2017 ' openttd_vs140.sln is for MSVC 2015 ' openttd_vs140.vcxproj is for MSVC 2015 @@ -27,29 +38,7 @@ Set FSO = CreateObject("Scripting.FileSystemObject") ' 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.vcxproj is for MSVC 2010 -' openttd_vs100.vcxproj.filters is for MSVC 2010 -' langs_vs100.vcxproj is for MSVC 2010 -' strgen_vs100.vcxproj is for MSVC 2010 -' strgen_vs100.vcxproj.filters is for MSVC 2010 -' generate_vs100.vcxproj is for MSVC 2010 -' version_vs100.vcxproj is for MSVC 2010 - -' openttd_vs90.sln is for MSVC 2008 -' openttd_vs90.vcproj is for MSVC 2008 -' langs_vs90.vcproj is for MSVC 2008 -' strgen_vs90.vcproj is for MSVC 2008 -' generate_vs90.vcproj is for MSVC 2008 -' version_vs90.vcproj is for MSVC 2008 - -' openttd_vs80.sln is for MSVC 2005 -' openttd_vs80.vcproj is for MSVC 2005 -' langs_vs80.vcproj is for MSVC 2005 -' strgen_vs80.vcproj is for MSVC 2005 -' generate_vs80.vcproj is for MSVC 2005 -' version_vs80.vcproj is for MSVC 2005 +' basesets_vs140.vcxproj is for MSVC 2015 Sub safety_check(filename) Dim file, line, regexp, list @@ -163,9 +152,8 @@ Sub headers_check(filename, dir) End If End Sub -Function load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) - Dim res, file, line, deep, skip, first_filter, first_file, filter, cltype, index - res = "" +Sub load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) + Dim file, line, deep, skip, first_filter, first_file, filter, cltype, index index = 0 ' Read the source.list and process it Set file = FSO.OpenTextFile(filename, 1, 0, 0) @@ -199,16 +187,11 @@ Function load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) if deep = skip Then line = Replace(line, "# ", "") if first_filter <> 0 Then - res = res & " " & vbCrLf filters = filters & vbCrLf Else first_filter = 1 End If filter = line - res = res & _ - " " & vbCrLf filters = filters & _ " " & vbCrLf & _ " {c76ff9f1-1e62-46d8-8d55-" & String(12 - Len(CStr(index)), "0") & index & "}" & vbCrLf & _ @@ -224,11 +207,6 @@ Function load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) Else first_file = 1 End If - res = res & _ - " " & vbCrLf & _ - " " & vbCrLf Select Case Split(Line, ".")(1) Case "cpp" cltype = "ClCompile" @@ -246,42 +224,22 @@ Function load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) End Select End If Wend - res = res & " " file.Close() - load_main_data = res -End Function +End Sub -Function load_lang_data(dir, ByRef vcxproj, ByRef files) - Dim res, folder, file, first_time - res = "" +Sub load_lang_data(dir, ByRef vcxproj, ByRef files) + Dim folder, file, first_time Set folder = FSO.GetFolder(dir) For Each file In folder.Files file = FSO.GetFileName(file) If file <> "english.txt" And FSO.GetExtensionName(file) = "txt" Then file = Left(file, Len(file) - 4) If first_time <> 0 Then - res = res & vbCrLf vcxproj = vcxproj & vbCrLf files = files & vbCrLf Else first_time = 1 End If - res = res & _ - " " & vbCrLf & _ - " " & vbCrLf & _ - " " & vbCrLf & _ - " " & vbCrLf & _ - " " vcxproj = vcxproj & _ " " & vbCrLf & _ " Generating " & file & " language file" & vbCrLf & _ @@ -295,29 +253,21 @@ Function load_lang_data(dir, ByRef vcxproj, ByRef files) " " End If Next - load_lang_data = res -End Function +End Sub -Function load_settings_data(dir, ByRef vcxproj, ByRef command, ByRef files) - Dim res, folder, file, first_time - res = "" +Sub load_settings_data(dir, ByRef vcxproj, ByRef command, ByRef files) + Dim folder, file, first_time command = "..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble" Set folder = FSO.GetFolder(dir) For Each file In folder.Files file = FSO.GetFileName(file) If FSO.GetExtensionName(file) = "ini" Then if first_time <> 0 Then - res = res & vbCrLf vcxproj = vcxproj & vbCrLf files = files & vbCrLf Else first_time = 1 End If - res = res & _ - " " & vbCrLf & _ - " " vcxproj = vcxproj & _ " " command = command & " ..\src\table\" & file @@ -327,8 +277,49 @@ Function load_settings_data(dir, ByRef vcxproj, ByRef command, ByRef files) " " End If Next - load_settings_data = res -End Function +End Sub + +Sub load_baseset_data(dir, langdir, ByRef vcxproj, ByRef files, ByRef langs) + Dim folder, file, ext, first_time + Set folder = FSO.GetFolder(langdir) + langs = " " + For Each file In folder.Files + If first_time <> 0 Then + langs = langs & ";" + Else + first_time = 1 + End If + file = FSO.GetFileName(file) + ext = FSO.GetExtensionName(file) + langs = langs & "..\src\lang\" & file + Next + langs = langs & "" + first_time = 0 + Set folder = FSO.GetFolder(dir) + For Each file In folder.Files + file = FSO.GetFileName(file) + ext = FSO.GetExtensionName(file) + If ext = "obm" Or ext = "obg" Or ext = "obs" Then + If first_time <> 0 Then + vcxproj = vcxproj & vbCrLf + files = files & vbCrLf + Else + first_time = 1 + End If + vcxproj = vcxproj & _ + " " & vbCrLf & _ + " Generating " & file & " baseset metadata file" & vbCrLf & _ + " cscript //nologo ..\media\baseset\translations.vbs " & Chr(34) & "%(FullPath)" & Chr(34) & " " & Chr(34) & "$(OutputPath)" & file & Chr(34) & " ..\src\lang ..\bin\baseset\orig_extra.grf" & vbCrLf & _ + " $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)" & vbCrLf & _ + " ..\bin\baseset\" & file & ";%(Outputs)" & vbCrLf & _ + " " + files = files & _ + " " & vbCrLf & _ + " Baseset Metadata" & vbCrLf & _ + " " + End If + Next +End Sub Sub generate(data, dest, data2) Dim srcfile, destfile, line @@ -381,35 +372,38 @@ End If safety_check ROOT_DIR & "/source.list" headers_check ROOT_DIR & "/source.list", ROOT_DIR & "\src\" ' Backslashes needed for DoFiles -Dim openttd, openttdvcxproj, openttdfilters, openttdfiles -openttd = load_main_data(ROOT_DIR & "/source.list", openttdvcxproj, openttdfilters, openttdfiles) -generate openttd, ROOT_DIR & "/projects/openttd_vs80.vcproj", Null -generate openttd, ROOT_DIR & "/projects/openttd_vs90.vcproj", Null -generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs100.vcxproj", Null -generate openttdfiles, ROOT_DIR & "/projects/openttd_vs100.vcxproj.filters", openttdfilters +Dim openttdvcxproj, openttdfilters, openttdfiles +load_main_data ROOT_DIR & "/source.list", openttdvcxproj, openttdfilters, openttdfiles generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs140.vcxproj", Null generate openttdfiles, ROOT_DIR & "/projects/openttd_vs140.vcxproj.filters", openttdfilters generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs141.vcxproj", Null generate openttdfiles, ROOT_DIR & "/projects/openttd_vs141.vcxproj.filters", openttdfilters +generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs142.vcxproj", Null +generate openttdfiles, ROOT_DIR & "/projects/openttd_vs142.vcxproj.filters", openttdfilters -Dim lang, langvcxproj, langfiles -lang = load_lang_data(ROOT_DIR & "/src/lang", langvcxproj, langfiles) -generate lang, ROOT_DIR & "/projects/langs_vs80.vcproj", Null -generate lang, ROOT_DIR & "/projects/langs_vs90.vcproj", Null -generate langvcxproj, ROOT_DIR & "/projects/langs_vs100.vcxproj", Null -generate langfiles, ROOT_DIR & "/projects/langs_vs100.vcxproj.filters", Null +Dim langvcxproj, langfiles +load_lang_data ROOT_DIR & "/src/lang", langvcxproj, langfiles generate langvcxproj, ROOT_DIR & "/projects/langs_vs140.vcxproj", Null generate langfiles, ROOT_DIR & "/projects/langs_vs140.vcxproj.filters", Null generate langvcxproj, ROOT_DIR & "/projects/langs_vs141.vcxproj", Null generate langfiles, ROOT_DIR & "/projects/langs_vs141.vcxproj.filters", Null +generate langvcxproj, ROOT_DIR & "/projects/langs_vs142.vcxproj", Null +generate langfiles, ROOT_DIR & "/projects/langs_vs142.vcxproj.filters", Null -Dim settings, settingsvcxproj, settingscommand, settingsfiles -settings = load_settings_data(ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles) -generate settings, ROOT_DIR & "/projects/settings_vs80.vcproj", settingscommand -generate settings, ROOT_DIR & "/projects/settings_vs90.vcproj", settingscommand -generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs100.vcxproj", settingscommand -generate settingsfiles, ROOT_DIR & "/projects/settings_vs100.vcxproj.filters", Null +Dim settingsvcxproj, settingscommand, settingsfiles +load_settings_data ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs140.vcxproj", settingscommand generate settingsfiles, ROOT_DIR & "/projects/settings_vs140.vcxproj.filters", Null generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs141.vcxproj", settingscommand generate settingsfiles, ROOT_DIR & "/projects/settings_vs141.vcxproj.filters", Null +generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs142.vcxproj", settingscommand +generate settingsfiles, ROOT_DIR & "/projects/settings_vs142.vcxproj.filters", Null + +Dim basesetvcxproj, basesetfiles, basesetlangs +load_baseset_data ROOT_DIR & "/media/baseset", ROOT_DIR & "/src/lang", basesetvcxproj, basesetfiles, basesetlangs +generate basesetvcxproj, ROOT_DIR & "/projects/basesets_vs140.vcxproj", basesetlangs +generate basesetfiles, ROOT_DIR & "/projects/basesets_vs140.vcxproj.filters", Null +generate basesetvcxproj, ROOT_DIR & "/projects/basesets_vs141.vcxproj", basesetlangs +generate basesetfiles, ROOT_DIR & "/projects/basesets_vs141.vcxproj.filters", Null +generate settingsvcxproj, ROOT_DIR & "/projects/basesets_vs142.vcxproj", settingscommand +generate settingsfiles, ROOT_DIR & "/projects/basesets_vs142.vcxproj.filters", Null diff --git a/projects/generate_vs140.vcxproj b/projects/generate_vs140.vcxproj index 67b1b7712c..b17142050b 100644 --- a/projects/generate_vs140.vcxproj +++ b/projects/generate_vs140.vcxproj @@ -31,10 +31,9 @@ Running %27generate.vbs%27 ... cscript "$(ProjectDir)generate.vbs" %(FullPath);%(AdditionalInputs) - $(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) - \ No newline at end of file + diff --git a/projects/langs_vs140.vcxproj b/projects/langs_vs140.vcxproj index 317fd34a11..25e7160bfb 100644 --- a/projects/langs_vs140.vcxproj +++ b/projects/langs_vs140.vcxproj @@ -317,18 +317,18 @@ ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) ..\bin\lang\slovenian.lng;%(Outputs) - - Generating spanish_MX language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish_MX.lng;%(Outputs) - Generating spanish language file ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) ..\bin\lang\spanish.lng;%(Outputs) + + Generating spanish_MX language file + ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" + ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) + ..\bin\lang\spanish_MX.lng;%(Outputs) + Generating swedish language file ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" diff --git a/projects/langs_vs140.vcxproj.filters b/projects/langs_vs140.vcxproj.filters index 0afc8c969a..bf5257ec82 100644 --- a/projects/langs_vs140.vcxproj.filters +++ b/projects/langs_vs140.vcxproj.filters @@ -142,10 +142,10 @@ Translations - + Translations - + Translations diff --git a/projects/openttd_vs140.sln b/projects/openttd_vs140.sln index d256cfa495..e2b7632f7e 100644 --- a/projects/openttd_vs140.sln +++ b/projects/openttd_vs140.sln @@ -4,10 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 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 @@ -18,12 +14,13 @@ 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 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regression", "regression_vs140.vcxproj", "{4712B013-437D-42CE-947F-DEBABA15261F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basesets", "basesets_vs140.vcxproj", "{E12E77CA-C0F1-4ADA-943F-4929274249D3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -84,6 +81,18 @@ Global {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 + {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|Win32.ActiveCfg = Debug|Win32 + {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|x64.ActiveCfg = Debug|Win32 + {4712B013-437D-42CE-947F-DEBABA15261F}.Release|Win32.ActiveCfg = Debug|Win32 + {4712B013-437D-42CE-947F-DEBABA15261F}.Release|x64.ActiveCfg = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.Build.0 = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.ActiveCfg = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.Build.0 = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.ActiveCfg = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.Build.0 = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.ActiveCfg = Debug|Win32 + {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.Build.0 = Debug|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/projects/openttd_vs140.vcxproj b/projects/openttd_vs140.vcxproj index 2180d4ec30..7ea8c7204c 100644 --- a/projects/openttd_vs140.vcxproj +++ b/projects/openttd_vs140.vcxproj @@ -22,6 +22,8 @@ openttd {668328A0-B40E-4CDB-BD72-D0064424414A} openttd + x86-windows-static + x64-windows-static @@ -105,7 +107,7 @@ Size true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) true Sync MultiThreaded @@ -136,7 +138,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true %(IgnoreSpecificDefaultLibraries) true @@ -152,8 +154,12 @@ 5.01 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + @@ -166,7 +172,7 @@ Disabled true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -188,7 +194,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) true @@ -202,8 +208,12 @@ 5.01 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + @@ -220,7 +230,7 @@ Size true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) true Sync MultiThreaded @@ -251,7 +261,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true %(IgnoreSpecificDefaultLibraries) true @@ -264,8 +274,12 @@ 5.02 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + @@ -279,7 +293,7 @@ Disabled true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -305,7 +319,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) true @@ -316,15 +330,18 @@ 5.02 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + - @@ -489,6 +506,7 @@ + @@ -505,6 +523,7 @@ + @@ -577,6 +596,8 @@ + + @@ -637,6 +658,7 @@ + @@ -691,6 +713,7 @@ + @@ -739,6 +762,7 @@ + @@ -803,6 +827,7 @@ + @@ -870,6 +895,7 @@ + @@ -1042,6 +1068,8 @@ + + @@ -1107,6 +1135,8 @@ + + @@ -1162,6 +1192,8 @@ + + @@ -1186,6 +1218,7 @@ + @@ -1306,25 +1339,36 @@ + + + - + {0f066b23-18df-4284-8265-f4a5e7e3b966} false + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + + {0817f629-589e-4a3b-b81a-8647bc571e35} + false + {a133a442-bd0a-4ade-b117-ad7545e4bdd1} false @@ -1333,6 +1377,10 @@ {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} false + + {e12e77ca-c0f1-4ada-943f-4929274249d3} + false + diff --git a/projects/openttd_vs140.vcxproj.filters b/projects/openttd_vs140.vcxproj.filters index b5100f9438..9959d7d71b 100644 --- a/projects/openttd_vs140.vcxproj.filters +++ b/projects/openttd_vs140.vcxproj.filters @@ -117,9 +117,6 @@ Source Files - - Source Files - Source Files @@ -612,6 +609,9 @@ Header Files + + Header Files + Header Files @@ -660,6 +660,9 @@ Header Files + + Header Files + Header Files @@ -876,6 +879,12 @@ Header Files + + Header Files + + + Header Files + Header Files @@ -1056,6 +1065,9 @@ Header Files + + Header Files + Header Files @@ -1218,6 +1230,9 @@ Header Files + + Header Files + Header Files @@ -1362,6 +1377,9 @@ GUI Source Code + + GUI Source Code + GUI Source Code @@ -1554,6 +1572,9 @@ Widgets + + Widgets + Widgets @@ -1755,6 +1776,9 @@ CityMania files + + CityMania files + Save/Load handlers @@ -2271,6 +2295,12 @@ Script API + + Script API + + + Script API + Script API @@ -2466,6 +2496,12 @@ Script API Implementation + + Script API Implementation + + + Script API Implementation + Script API Implementation @@ -2631,6 +2667,12 @@ Blitters + + Blitters + + + Blitters + Blitters @@ -2703,6 +2745,9 @@ Blitters + + Blitters + Blitters @@ -3063,6 +3108,9 @@ Music + + Music + Music @@ -3075,12 +3123,18 @@ Sound + + Sound + Windows files Windows files + + Windows files + Windows files @@ -3093,6 +3147,6 @@ - + diff --git a/projects/openttd_vs140.vcxproj.filters.in b/projects/openttd_vs140.vcxproj.filters.in index cda491072c..126bd61459 100644 --- a/projects/openttd_vs140.vcxproj.filters.in +++ b/projects/openttd_vs140.vcxproj.filters.in @@ -8,6 +8,6 @@ - + diff --git a/projects/openttd_vs140.vcxproj.in b/projects/openttd_vs140.vcxproj.in index ac51d814d9..951f8b6048 100644 --- a/projects/openttd_vs140.vcxproj.in +++ b/projects/openttd_vs140.vcxproj.in @@ -22,6 +22,8 @@ openttd {668328A0-B40E-4CDB-BD72-D0064424414A} openttd + x86-windows-static + x64-windows-static @@ -105,7 +107,7 @@ Size true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) true Sync MultiThreaded @@ -136,7 +138,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true %(IgnoreSpecificDefaultLibraries) true @@ -152,8 +154,12 @@ 5.01 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + @@ -166,7 +172,7 @@ Disabled true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -188,7 +194,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) true @@ -202,8 +208,12 @@ 5.01 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + @@ -220,7 +230,7 @@ Size true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) true Sync MultiThreaded @@ -251,7 +261,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true %(IgnoreSpecificDefaultLibraries) true @@ -264,8 +274,12 @@ 5.02 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + @@ -279,7 +293,7 @@ Disabled true ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -305,7 +319,7 @@ 0x0809 - 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) + winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) true LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) true @@ -316,21 +330,33 @@ 5.02 + os_versions.manifest PerMonitorHighDPIAware + + copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" + !!FILES!! - + {0f066b23-18df-4284-8265-f4a5e7e3b966} false + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + + {0817f629-589e-4a3b-b81a-8647bc571e35} + false + {a133a442-bd0a-4ade-b117-ad7545e4bdd1} false @@ -339,6 +365,10 @@ {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} false + + {e12e77ca-c0f1-4ada-943f-4929274249d3} + false + diff --git a/projects/settings_vs140.vcxproj b/projects/settings_vs140.vcxproj index 4fe07dbd64..9952df47bb 100644 --- a/projects/settings_vs140.vcxproj +++ b/projects/settings_vs140.vcxproj @@ -48,6 +48,12 @@ + + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + diff --git a/projects/settings_vs140.vcxproj.in b/projects/settings_vs140.vcxproj.in index 71ea738dcf..9bb0cc7f0b 100644 --- a/projects/settings_vs140.vcxproj.in +++ b/projects/settings_vs140.vcxproj.in @@ -42,6 +42,12 @@ + + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + diff --git a/projects/settingsgen_vs140.vcxproj b/projects/settingsgen_vs140.vcxproj index fc6d079e8e..12ce280f3a 100644 --- a/projects/settingsgen_vs140.vcxproj +++ b/projects/settingsgen_vs140.vcxproj @@ -80,4 +80,4 @@ - \ No newline at end of file + diff --git a/projects/strgen_vs140.vcxproj b/projects/strgen_vs140.vcxproj index ebf56a4daf..b972d873eb 100644 --- a/projects/strgen_vs140.vcxproj +++ b/projects/strgen_vs140.vcxproj @@ -92,4 +92,4 @@ - \ No newline at end of file + diff --git a/projects/version_vs140.vcxproj b/projects/version_vs140.vcxproj index baf374bca0..6e71a88201 100644 --- a/projects/version_vs140.vcxproj +++ b/projects/version_vs140.vcxproj @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/source.list b/source.list index 6d7486ffb4..72e2433a07 100644 --- a/source.list +++ b/source.list @@ -3,7 +3,6 @@ airport.cpp animated_tile.cpp articulated_vehicles.cpp autoreplace.cpp -bitstream.cpp bmp.cpp cargoaction.cpp cargomonitor.cpp @@ -96,22 +95,19 @@ tilearea.cpp townname.cpp #if WIN32 #else - #if WINCE + #if OS2 + os/os2/os2.cpp + 3rdparty/os2/getaddrinfo.c + 3rdparty/os2/getaddrinfo.h + 3rdparty/os2/getnameinfo.c + 3rdparty/os2/getnameinfo.h #else - #if OS2 - os/os2/os2.cpp - 3rdparty/os2/getaddrinfo.c - 3rdparty/os2/getaddrinfo.h - 3rdparty/os2/getnameinfo.c - 3rdparty/os2/getnameinfo.h + #if OSX + os/macosx/crashlog_osx.cpp #else - #if OSX - os/macosx/crashlog_osx.cpp - #else - os/unix/crashlog_unix.cpp - #end - os/unix/unix.cpp + os/unix/crashlog_unix.cpp #end + os/unix/unix.cpp #end #end vehicle.cpp @@ -199,6 +195,7 @@ fileio_type.h fios.h fontcache.h fontdetection.h +framerate_type.h base_consist.h gamelog.h gamelog_internal.h @@ -215,6 +212,7 @@ group.h group_gui.h group_type.h gui.h +guitimer_func.h heightmap.h highscore.h hotkeys.h @@ -287,6 +285,8 @@ newgrf_townname.h news_func.h news_gui.h news_type.h +music/midi.h +music/midifile.hpp music/null_m.h sound/null_s.h video/null_v.h @@ -347,6 +347,7 @@ strgen/strgen.h string_base.h string_func.h string_type.h +os/windows/string_uniscribe.h stringfilter_type.h strings_func.h strings_type.h @@ -401,6 +402,7 @@ video/win32_v.h window_func.h window_gui.h window_type.h +sound/xaudio2_s.h zoning.h zoom_func.h zoom_type.h @@ -410,11 +412,13 @@ music/bemidi.h music/cocoa_m.h music/extmidi.h music/libtimidity.h +music/fluidsynth.h music/os2_m.h music/qtmidi.h os/macosx/macos.h os/macosx/osx_stdafx.h os/macosx/splash.h +os/macosx/string_osx.h sound/cocoa_s.h video/cocoa/cocoa_keys.h video/cocoa/cocoa_v.h @@ -468,6 +472,7 @@ dock_gui.cpp engine_gui.cpp error_gui.cpp fios_gui.cpp +framerate_gui.cpp genworld_gui.cpp goal_gui.cpp graph_gui.cpp @@ -534,6 +539,7 @@ widgets/dropdown_widget.h widgets/engine_widget.h widgets/error_widget.h widgets/fios_widget.h +widgets/framerate_widget.h widgets/genworld_widget.h widgets/goal_widget.h widgets/graph_widget.h @@ -603,6 +609,7 @@ waypoint_cmd.cpp zoning_cmd.cpp # CityMania files +bitstream.cpp citymania/base64.h citymania/base64.cpp newgrf_revisions.hpp @@ -800,6 +807,8 @@ script/api/script_bridgelist.hpp script/api/script_cargo.hpp script/api/script_cargolist.hpp script/api/script_cargomonitor.hpp +script/api/script_client.hpp +script/api/script_clientlist.hpp script/api/script_company.hpp script/api/script_companymode.hpp script/api/script_controller.hpp @@ -867,6 +876,8 @@ script/api/script_bridgelist.cpp script/api/script_cargo.cpp script/api/script_cargolist.cpp script/api/script_cargomonitor.cpp +script/api/script_client.cpp +script/api/script_clientlist.cpp script/api/script_company.cpp script/api/script_companymode.cpp script/api/script_controller.cpp @@ -927,6 +938,8 @@ script/api/script_window.cpp blitter/32bpp_anim.cpp blitter/32bpp_anim.hpp #if SSE +blitter/32bpp_anim_sse2.cpp +blitter/32bpp_anim_sse2.hpp blitter/32bpp_anim_sse4.cpp blitter/32bpp_anim_sse4.hpp #end @@ -955,6 +968,7 @@ blitter/8bpp_simple.hpp #end blitter/base.cpp blitter/base.hpp +blitter/common.hpp blitter/factory.hpp blitter/null.cpp blitter/null.hpp @@ -1102,9 +1116,6 @@ video/null_v.cpp #if WIN32 video/win32_v.cpp #end -#if WINCE - video/win32_v.cpp -#end #end # Music @@ -1118,22 +1129,17 @@ video/null_v.cpp #end #end music/null_m.cpp +music/midifile.cpp #if DEDICATED #else #if WIN32 music/win32_m.cpp #else - #if WINCE + #if DOS #else - #if PSP + #if MORPHOS #else - #if DOS - #else - #if MORPHOS - #else - music/extmidi.cpp - #end - #end + music/extmidi.cpp #end #end #end @@ -1143,6 +1149,9 @@ music/null_m.cpp #if LIBTIMIDITY music/libtimidity.cpp #end +#if FLUIDSYNTH + music/fluidsynth.cpp +#end #end # Sound @@ -1157,6 +1166,7 @@ sound/null_s.cpp #end #if WIN32 sound/win32_s.cpp + sound/xaudio2_s.cpp #end #end @@ -1178,6 +1188,7 @@ sound/null_s.cpp music/cocoa_m.cpp sound/cocoa_s.cpp os/macosx/splash.cpp + os/macosx/string_osx.cpp #end #end @@ -1185,10 +1196,7 @@ sound/null_s.cpp #if WIN32 os/windows/crashlog_win.cpp os/windows/ottdres.rc - os/windows/win32.cpp -#end -#if WINCE - os/windows/ottdres.rc + os/windows/string_uniscribe.cpp os/windows/win32.cpp #end diff --git a/src/3rdparty/md5/md5.cpp b/src/3rdparty/md5/md5.cpp index fbd2bebfed..2111a8eb81 100644 --- a/src/3rdparty/md5/md5.cpp +++ b/src/3rdparty/md5/md5.cpp @@ -1,4 +1,4 @@ -/* $Id: md5.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /** @file md5.cpp Creating MD5 checksums of files. */ diff --git a/src/3rdparty/md5/md5.h b/src/3rdparty/md5/md5.h index 3d62fe84d3..9748dc444f 100644 --- a/src/3rdparty/md5/md5.h +++ b/src/3rdparty/md5/md5.h @@ -1,4 +1,4 @@ -/* $Id: md5.h 17883 2009-10-26 23:03:03Z smatz $ */ +/* $Id$ */ /** @file md5.h Functions to create MD5 checksums. */ diff --git a/src/3rdparty/squirrel/squirrel/sqdebug.cpp b/src/3rdparty/squirrel/squirrel/sqdebug.cpp index b163fae52e..2f24e83b66 100644 --- a/src/3rdparty/squirrel/squirrel/sqdebug.cpp +++ b/src/3rdparty/squirrel/squirrel/sqdebug.cpp @@ -115,7 +115,7 @@ void SQVM::Raise_ParamTypeError(SQInteger nparam,SQInteger typemask,SQInteger ty SQInteger found = 0; for(SQInteger i=0; i<16; i++) { - SQInteger mask = 0x00000001 << i; + SQInteger mask = 0x00000001LL << i; if(typemask & (mask)) { if(found>0) StringCat(exptypes,SQString::Create(_ss(this), "|", -1), exptypes); found ++; diff --git a/src/3rdparty/squirrel/squirrel/squtils.h b/src/3rdparty/squirrel/squirrel/squtils.h index 28c6cbec2b..b1138dcb1a 100644 --- a/src/3rdparty/squirrel/squirrel/squtils.h +++ b/src/3rdparty/squirrel/squirrel/squtils.h @@ -90,7 +90,7 @@ public: { _vals[idx].~T(); if(idx < (_size - 1)) { - memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - (size_t)idx - 1)); + memmove(static_cast(&_vals[idx]), &_vals[idx+1], sizeof(T) * (_size - (size_t)idx - 1)); } _size--; } diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp index c66c4aca59..03ffea2303 100644 --- a/src/3rdparty/squirrel/squirrel/sqvm.cpp +++ b/src/3rdparty/squirrel/squirrel/sqvm.cpp @@ -378,8 +378,7 @@ bool SQVM::StartCall(SQClosure *closure,SQInteger target,SQInteger args,SQIntege } if (!tailcall) { - CallInfo lc; - memset(&lc, 0, sizeof(lc)); + CallInfo lc = {}; lc._generator = NULL; lc._etraps = 0; lc._prevstkbase = (SQInt32) ( stackbase - _stackbase ); @@ -1159,8 +1158,7 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb SQInteger oldtop = _top; SQInteger oldstackbase = _stackbase; _top = stackbase + nargs; - CallInfo lci; - memset(&lci, 0, sizeof(lci)); + CallInfo lci = {}; lci._closure = nclosure; lci._generator = NULL; lci._etraps = 0; diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp index 09f97d6c97..1b5b6c07da 100644 --- a/src/ai/ai.hpp +++ b/src/ai/ai.hpp @@ -1,4 +1,4 @@ -/* $Id: ai.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,7 +32,7 @@ public: START_NEXT_EASY = DAYS_IN_YEAR * 2, START_NEXT_MEDIUM = DAYS_IN_YEAR, START_NEXT_HARD = DAYS_IN_YEAR / 2, - START_NEXT_MIN = 1, + START_NEXT_MIN = 0, START_NEXT_MAX = 3600, START_NEXT_DEVIATION = 60, }; diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp index 3beb74cb57..20e913c2e9 100644 --- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_config.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -118,3 +118,14 @@ void AIConfig::SetSetting(const char *name, int value) ScriptConfig::SetSetting(name, value); } + +void AIConfig::AddRandomDeviation() +{ + int start_date = this->GetSetting("start_date"); + + ScriptConfig::AddRandomDeviation(); + + /* start_date = 0 is a special case, where random deviation does not occur. + * If start_date was not already 0, then a minimum value of 1 must apply. */ + this->SetSetting("start_date", start_date != 0 ? max(1, this->GetSetting("start_date")) : 0); +} diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp index feff61c8f8..600ae1af93 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -1,4 +1,4 @@ -/* $Id: ai_config.hpp 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -34,6 +34,7 @@ public: /* virtual */ int GetSetting(const char *name) const; /* virtual */ void SetSetting(const char *name, int value); + /* virtual */ void AddRandomDeviation(); /** * When ever the AI Scanner is reloaded, all infos become invalid. This diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 82c3b3e307..d4ff233116 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_core.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 5b7ebb3ddf..dbdd772452 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_gui.cpp 27787 2017-03-12 18:19:01Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -29,6 +29,7 @@ #include "../widgets/dropdown_func.h" #include "../hotkeys.h" #include "../core/geometry_func.hpp" +#include "../guitimer_func.h" #include "ai.hpp" #include "ai_gui.hpp" @@ -286,7 +287,7 @@ struct AISettingsWindow : public Window { bool clicked_increase; ///< Whether we clicked the increase or decrease button. bool clicked_dropdown; ///< Whether the dropdown is open. bool closing_dropdown; ///< True, if the dropdown list is currently closing. - int timeout; ///< Timeout for unclicking the button. + GUITimer timeout; ///< Timeout for unclicking the button. int clicked_row; ///< The clicked row of settings. int line_height; ///< Height of a row in the matrix widget. Scrollbar *vscroll; ///< Cache of the vertical scrollbar. @@ -377,7 +378,7 @@ struct AISettingsWindow : public Window { for (; this->vscroll->IsVisible(i) && it != visible_settings.end(); i++, it++) { const ScriptConfigItem &config_item = **it; int current_value = config->GetSetting((config_item).name); - bool editable = _game_mode == GM_MENU || ((this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot)) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0; + bool editable = this->IsEditableItem(config_item); StringID str; TextColour colour; @@ -440,7 +441,7 @@ struct AISettingsWindow : public Window { VisibleSettingsList::const_iterator it = this->visible_settings.begin(); for (int i = 0; i < num; i++) it++; const ScriptConfigItem config_item = **it; - if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (config_item.flags & SCRIPTCONFIG_INGAME) == 0) return; + if (!this->IsEditableItem(config_item)) return; if (this->clicked_row != num) { DeleteChildWindows(WC_QUERY_STRING); @@ -505,7 +506,7 @@ struct AISettingsWindow : public Window { if (new_val != old_val) { this->ai_config->SetSetting(config_item.name, new_val); this->clicked_button = num; - this->timeout = 5; + this->timeout.SetInterval(150); } } else if (!bool_item && !config_item.complete_labels) { /* Display a query box so users can enter a custom value. */ @@ -568,9 +569,9 @@ struct AISettingsWindow : public Window { this->vscroll->SetCapacityFromWidget(this, WID_AIS_BACKGROUND); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->timeout == 0) { + if (this->timeout.Elapsed(delta_ms)) { this->clicked_button = -1; this->SetDirty(); } @@ -585,6 +586,12 @@ struct AISettingsWindow : public Window { { this->RebuildVisibleSettings(); } + +private: + bool IsEditableItem(const ScriptConfigItem config_item) const + { + return _game_mode == GM_MENU || ((this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot)) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0; + } }; /** Widgets for the AI settings window. */ @@ -653,7 +660,7 @@ struct ScriptTextfileWindow : public TextfileWindow { */ void ShowScriptTextfileWindow(TextfileType file_type, CompanyID slot) { - DeleteWindowByClass(WC_TEXTFILE); + DeleteWindowById(WC_TEXTFILE, file_type); new ScriptTextfileWindow(file_type, slot); } @@ -868,7 +875,6 @@ struct AIConfigWindow : public Window { new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1); } IConsoleSetSetting("difficulty.max_no_competitors", new_value); - this->InvalidateData(); break; } @@ -1276,8 +1282,8 @@ struct AIDebugWindow : public Window { case WID_AID_RELOAD_TOGGLE: if (ai_debug_company == OWNER_DEITY) break; /* First kill the company of the AI, then start a new one. This should start the current AI again */ - DoCommandP(0, 2 | ai_debug_company << 16, CRR_MANUAL, CMD_COMPANY_CTRL); - DoCommandP(0, 1 | ai_debug_company << 16, 0, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_DELETE | ai_debug_company << 16, CRR_MANUAL, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_NEW_AI | ai_debug_company << 16, 0, CMD_COMPANY_CTRL); break; case WID_AID_SETTINGS: diff --git a/src/ai/ai_gui.hpp b/src/ai/ai_gui.hpp index baecf7289a..ad6eed8fd1 100644 --- a/src/ai/ai_gui.hpp +++ b/src/ai/ai_gui.hpp @@ -1,4 +1,4 @@ -/* $Id: ai_gui.hpp 24554 2012-09-23 14:37:59Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index be9c3b1a52..43a4345460 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_info.cpp 27780 2017-03-11 20:50:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -29,12 +29,12 @@ static bool CheckAPIVersion(const char *api_version) return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 || strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 || strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0 || - strcmp(api_version, "1.8") == 0; + strcmp(api_version, "1.8") == 0 || strcmp(api_version, "1.9") == 0; } -#if defined(WIN32) +#if defined(_WIN32) #undef GetClassName -#endif /* WIN32 */ +#endif /* _WIN32 */ template <> const char *GetClassName() { return "AIInfo"; } /* static */ void AIInfo::RegisterAPI(Squirrel *engine) diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp index 3953ca7df4..51cfb7d8a0 100644 --- a/src/ai/ai_info.hpp +++ b/src/ai/ai_info.hpp @@ -1,4 +1,4 @@ -/* $Id: ai_info.hpp 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index 9b4917d690..c03e745992 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_instance.cpp 26893 2014-09-21 16:20:48Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp index d333cfb707..204bf9712a 100644 --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -1,4 +1,4 @@ -/* $Id: ai_instance.hpp 24468 2012-08-13 19:22:26Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 04e2a71314..5f16de3f91 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_scanner.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp index 65bacfe2da..d8e8a6993d 100644 --- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -1,4 +1,4 @@ -/* $Id: ai_scanner.hpp 26487 2014-04-23 21:16:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/aircraft.h b/src/aircraft.h index 8743daaf8c..f4fce09be1 100644 --- a/src/aircraft.h +++ b/src/aircraft.h @@ -1,4 +1,4 @@ -/* $Id: aircraft.h 27666 2016-10-16 14:57:56Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -45,6 +45,8 @@ enum AirVehicleFlags { * landscape at a fixed altitude. This only has effect when there are more than 15 height levels. */ VAF_IN_MAX_HEIGHT_CORRECTION = 1, ///< The vehicle is currently lowering its altitude because it hit the upper bound. VAF_IN_MIN_HEIGHT_CORRECTION = 2, ///< The vehicle is currently raising its altitude because it hit the lower bound. + + VAF_HELI_DIRECT_DESCENT = 3, ///< The helicopter is descending directly at its destination (helipad or in front of hangar) }; static const int ROTOR_Z_OFFSET = 5; ///< Z Offset between helicopter- and rotorsprite. @@ -90,7 +92,7 @@ struct Aircraft FINAL : public SpecializedVehicle { virtual ~Aircraft() { this->PreDestructor(); } void MarkDirty(); - void UpdateDeltaXY(Direction direction); + void UpdateDeltaXY(); ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; } bool IsPrimaryVehicle() const { return this->IsNormalAircraft(); } void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const; @@ -137,7 +139,7 @@ struct Aircraft FINAL : public SpecializedVehicle { }; /** - * Macro for iterating over all aircrafts. + * Macro for iterating over all aircraft. */ #define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var) diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index a67035c433..d6d99ae242 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: aircraft_cmd.cpp 27668 2016-10-16 14:59:44Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -37,12 +37,14 @@ #include "core/backup_type.hpp" #include "zoom_func.h" #include "disaster_vehicle.h" +#include "newgrf_airporttiles.h" +#include "framerate_type.h" #include "table/strings.h" #include "safeguards.h" -void Aircraft::UpdateDeltaXY(Direction direction) +void Aircraft::UpdateDeltaXY() { this->x_offs = -1; this->y_offs = -1; @@ -126,16 +128,15 @@ static StationID FindNearestHangar(const Aircraft *v) const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); FOR_ALL_STATIONS(st) { - if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT)) continue; + if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT) || !st->airport.HasHangar()) continue; const AirportFTAClass *afc = st->airport.GetFTA(); - if (!st->airport.HasHangar() || ( - /* don't crash the plane if we know it can't land at the airport */ - (afc->flags & AirportFTAClass::SHORT_STRIP) && - (avi->subtype & AIR_FAST) && - !_cheats.no_jetcrash.value)) { - continue; - } + + /* don't crash the plane if we know it can't land at the airport */ + if ((afc->flags & AirportFTAClass::SHORT_STRIP) && (avi->subtype & AIR_FAST) && !_cheats.no_jetcrash.value) continue; + + /* the plane won't land at any helicopter station */ + if (!(afc->flags & AirportFTAClass::AIRPLANES) && (avi->subtype & AIR_CTOL)) continue; /* v->tile can't be used here, when aircraft is flying v->tile is set to 0 */ uint distance = DistanceSquare(vtile, st->airport.tile); @@ -247,7 +248,7 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoff * @param flags type of operation. * @param e the engine to build. * @param data unused. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) @@ -303,10 +304,10 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine * u->engine_type = e->index; v->subtype = (avi->subtype & AIR_CTOL ? AIR_AIRCRAFT : AIR_HELICOPTER); - v->UpdateDeltaXY(INVALID_DIR); + v->UpdateDeltaXY(); u->subtype = AIR_SHADOW; - u->UpdateDeltaXY(INVALID_DIR); + u->UpdateDeltaXY(); v->reliability = e->reliability; v->reliability_spd_dec = e->reliability_spd_dec; @@ -363,7 +364,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine * w->random_bits = VehicleRandomBits(); /* Use rotor's air.state to store the rotor animation frame */ w->state = HRS_ROTOR_STOPPED; - w->UpdateDeltaXY(INVALID_DIR); + w->UpdateDeltaXY(); u->SetNext(w); w->UpdatePosition(); @@ -378,7 +379,7 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination, { const Station *st = GetTargetAirportIfValid(this); /* If the station is not a valid airport or if it has no hangars */ - if (st == NULL || !st->airport.HasHangar()) { + if (st == NULL || !CanVehicleUseStation(this, st) || !st->airport.HasHangar()) { /* the aircraft has to search for a hangar on its own */ StationID station = FindNearestHangar(this); @@ -634,6 +635,12 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE, * and take-off speeds being too low. */ speed_limit *= _settings_game.vehicle.plane_speed; + /* adjust speed for broken vehicles */ + if (v->vehstatus & VS_AIRCRAFT_BROKEN) { + if (SPEED_LIMIT_BROKEN < speed_limit) hard_limit = false; + speed_limit = min(speed_limit, SPEED_LIMIT_BROKEN); + } + if (v->vcache.cached_max_speed < speed_limit) { if (v->cur_speed < speed_limit) hard_limit = false; speed_limit = v->vcache.cached_max_speed; @@ -653,9 +660,6 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE, spd = min(v->cur_speed + (spd >> 8) + (v->subspeed < t), speed_limit); - /* adjust speed for broken vehicles */ - if (v->vehstatus & VS_AIRCRAFT_BROKEN) spd = min(spd, SPEED_LIMIT_BROKEN); - /* updates statusbar only if speed have changed to save CPU time */ if (spd != v->cur_speed) { v->cur_speed = spd; @@ -693,9 +697,9 @@ int GetTileHeightBelowAircraft(const Vehicle *v) * When the maximum is reached the vehicle should consider descending. * When the minimum is reached the vehicle should consider ascending. * - * @param v The vehicle to get the flight levels for. - * @param [out] min_level The minimum bounds for flight level. - * @param [out] max_level The maximum bounds for flight level. + * @param v The vehicle to get the flight levels for. + * @param[out] min_level The minimum bounds for flight level. + * @param[out] max_level The maximum bounds for flight level. */ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_level) { @@ -727,7 +731,7 @@ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_lev /** * Gets the maximum 'flight level' for the holding pattern of the aircraft, - * in pixels 'z_pos' 0, depending on terrain below.. + * in pixels 'z_pos' 0, depending on terrain below. * * @param v The aircraft that may or may not need to decrease its altitude. * @return Maximal aircraft holding altitude, while in normal flight, in pixels. @@ -749,7 +753,7 @@ int GetAircraftFlightLevel(T *v, bool takeoff) GetAircraftFlightLevelBounds(v, &aircraft_min_altitude, &aircraft_max_altitude); int aircraft_middle_altitude = (aircraft_min_altitude + aircraft_max_altitude) / 2; - /* If those assumptions would be violated, aircrafts would behave fairly strange. */ + /* If those assumptions would be violated, aircraft would behave fairly strange. */ assert(aircraft_min_altitude < aircraft_middle_altitude); assert(aircraft_middle_altitude < aircraft_max_altitude); @@ -914,6 +918,8 @@ static bool AircraftController(Aircraft *v) /* Helicopter landing. */ if (amd.flag & AMED_HELI_LOWER) { + SetBit(v->flags, VAF_HELI_DIRECT_DESCENT); + if (st == NULL) { /* FIXME - AircraftController -> if station no longer exists, do not land * helicopter will circle until sign disappears, then go to next order @@ -934,7 +940,10 @@ static bool AircraftController(Aircraft *v) Vehicle *u = v->Next()->Next(); /* Increase speed of rotors. When speed is 80, we've landed. */ - if (u->cur_speed >= 80) return true; + if (u->cur_speed >= 80) { + ClrBit(v->flags, VAF_HELI_DIRECT_DESCENT); + return true; + } u->cur_speed += 4; } else { count = UpdateAircraftSpeed(v); @@ -1361,7 +1370,13 @@ static void AircraftEntersTerminal(Aircraft *v) */ static void AircraftLandAirplane(Aircraft *v) { - v->UpdateDeltaXY(INVALID_DIR); + Station *st = Station::Get(v->targetairport); + + TileIndex vt = TileVirtXY(v->x_pos, v->y_pos); + + v->UpdateDeltaXY(); + + AirportTileAnimationTrigger(st, vt, AAT_STATION_AIRPLANE_LAND); if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) { SndPlayVehicleFx(SND_17_SKID_PLANE, v); @@ -1530,7 +1545,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass * go_to_hangar = Station::Get(v->targetairport)->airport.HasHangar(); } - if (go_to_hangar) { + if (go_to_hangar && Station::Get(v->targetairport)->airport.HasHangar()) { v->state = HANGAR; } else { /* airplane goto state takeoff, helicopter to helitakeoff */ @@ -1553,7 +1568,7 @@ static void AircraftEventHandler_TakeOff(Aircraft *v, const AirportFTAClass *apc static void AircraftEventHandler_StartTakeOff(Aircraft *v, const AirportFTAClass *apc) { v->state = ENDTAKEOFF; - v->UpdateDeltaXY(INVALID_DIR); + v->UpdateDeltaXY(); } static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass *apc) @@ -1566,7 +1581,7 @@ static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass * static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass *apc) { v->state = FLYING; - v->UpdateDeltaXY(INVALID_DIR); + v->UpdateDeltaXY(); /* get the next position to go to, differs per airport */ AircraftNextAirportPos_and_Order(v); @@ -1599,6 +1614,7 @@ static void AircraftEventHandler_Flying(Aircraft *v, const AirportFTAClass *apc) uint16 tsubspeed = v->subspeed; if (!AirportHasBlock(v, current, apc)) { v->state = landingtype; // LANDING / HELILANDING + if (v->state == HELILANDING) SetBit(v->flags, VAF_HELI_DIRECT_DESCENT); /* it's a bit dirty, but I need to set position to next position, otherwise * if there are multiple runways, plane won't know which one it took (because * they all have heading LANDING). And also occupy that block! */ @@ -1632,7 +1648,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *apc static void AircraftEventHandler_HeliLanding(Aircraft *v, const AirportFTAClass *apc) { v->state = HELIENDLANDING; - v->UpdateDeltaXY(INVALID_DIR); + v->UpdateDeltaXY(); } static void AircraftEventHandler_EndLanding(Aircraft *v, const AirportFTAClass *apc) @@ -1888,7 +1904,7 @@ static bool FreeTerminal(Aircraft *v, byte i, byte last_terminal) /** * Get the number of terminals at the airport. - * @param afc Airport description. + * @param apc Airport description. * @return Number of terminals. */ static uint GetNumTerminals(const AirportFTAClass *apc) @@ -2038,6 +2054,8 @@ bool Aircraft::Tick() { if (!this->IsNormalAircraft()) return true; + PerformanceAccumulator framerate(PFE_GL_AIRCRAFT); + this->tick_counter++; if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++; diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index e92bfa6ab4..6693b1f8ad 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: aircraft_gui.cpp 27689 2016-12-10 14:33:58Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/airport.cpp b/src/airport.cpp index 1b90aa09c1..7985e017aa 100644 --- a/src/airport.cpp +++ b/src/airport.cpp @@ -1,4 +1,4 @@ -/* $Id: airport.cpp 27908 2017-08-31 06:55:38Z adf88 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/airport.h b/src/airport.h index 9772c682d9..31c68ef002 100644 --- a/src/airport.h +++ b/src/airport.h @@ -1,4 +1,4 @@ -/* $Id: airport.h 25841 2013-10-12 16:34:59Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index f0db39f6c0..243f91b247 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: airport_gui.cpp 27163 2015-02-22 15:26:27Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -543,7 +543,7 @@ public: this->SelectFirstAvailableAirport(false); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } diff --git a/src/animated_tile.cpp b/src/animated_tile.cpp index 8a58a7d7b1..2a4cd89583 100644 --- a/src/animated_tile.cpp +++ b/src/animated_tile.cpp @@ -1,4 +1,4 @@ -/* $Id: animated_tile.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -11,17 +11,15 @@ #include "stdafx.h" #include "core/alloc_func.hpp" +#include "core/smallvec_type.hpp" #include "tile_cmd.h" #include "viewport_func.h" +#include "framerate_type.h" #include "safeguards.h" /** The table/list with animated tiles. */ -TileIndex *_animated_tile_list = NULL; -/** The number of animated tiles in the current state. */ -uint _animated_tile_count = 0; -/** The number of slots for animated tiles allocated currently. */ -uint _animated_tile_allocated = 0; +SmallVector _animated_tiles; /** * Removes the given tile from the animated tile table. @@ -29,17 +27,11 @@ uint _animated_tile_allocated = 0; */ void DeleteAnimatedTile(TileIndex tile) { - for (TileIndex *ti = _animated_tile_list; ti < _animated_tile_list + _animated_tile_count; ti++) { - if (tile == *ti) { - /* Remove the hole - * The order of the remaining elements must stay the same, otherwise the animation loop - * may miss a tile; that's why we must use memmove instead of just moving the last element. - */ - memmove(ti, ti + 1, (_animated_tile_list + _animated_tile_count - (ti + 1)) * sizeof(*ti)); - _animated_tile_count--; - MarkTileDirtyByTile(tile); - return; - } + TileIndex *to_remove = _animated_tiles.Find(tile); + if (to_remove != _animated_tiles.End()) { + /* The order of the remaining elements must stay the same, otherwise the animation loop may miss a tile. */ + _animated_tiles.ErasePreservingOrder(to_remove); + MarkTileDirtyByTile(tile); } } @@ -51,19 +43,7 @@ void DeleteAnimatedTile(TileIndex tile) void AddAnimatedTile(TileIndex tile) { MarkTileDirtyByTile(tile); - - for (const TileIndex *ti = _animated_tile_list; ti < _animated_tile_list + _animated_tile_count; ti++) { - if (tile == *ti) return; - } - - /* Table not large enough, so make it larger */ - if (_animated_tile_count == _animated_tile_allocated) { - _animated_tile_allocated *= 2; - _animated_tile_list = ReallocT(_animated_tile_list, _animated_tile_allocated); - } - - _animated_tile_list[_animated_tile_count] = tile; - _animated_tile_count++; + _animated_tiles.Include(tile); } /** @@ -71,8 +51,10 @@ void AddAnimatedTile(TileIndex tile) */ void AnimateAnimatedTiles() { - const TileIndex *ti = _animated_tile_list; - while (ti < _animated_tile_list + _animated_tile_count) { + PerformanceAccumulator framerate(PFE_GL_LANDSCAPE); + + const TileIndex *ti = _animated_tiles.Begin(); + while (ti < _animated_tiles.End()) { const TileIndex curr = *ti; AnimateTile(curr); /* During the AnimateTile call, DeleteAnimatedTile could have been called, @@ -93,7 +75,5 @@ void AnimateAnimatedTiles() */ void InitializeAnimatedTiles() { - _animated_tile_list = ReallocT(_animated_tile_list, 256); - _animated_tile_count = 0; - _animated_tile_allocated = 256; + _animated_tiles.Clear(); } diff --git a/src/animated_tile_func.h b/src/animated_tile_func.h index a0f4fead10..9634ecdee3 100644 --- a/src/animated_tile_func.h +++ b/src/animated_tile_func.h @@ -1,4 +1,4 @@ -/* $Id: animated_tile_func.h 23704 2012-01-01 17:22:32Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index c8323370eb..44ad587895 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -1,4 +1,4 @@ -/* $Id: articulated_vehicles.cpp 27666 2016-10-16 14:57:56Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -119,12 +119,12 @@ static inline uint16 GetVehicleDefaultCapacity(EngineID engine, CargoID *cargo_t * @param include_initial_cargo_type if true the default cargo type of the vehicle is included; if false only the refit_mask * @return bit set of CargoIDs */ -static inline uint32 GetAvailableVehicleCargoTypes(EngineID engine, bool include_initial_cargo_type) +static inline CargoTypes GetAvailableVehicleCargoTypes(EngineID engine, bool include_initial_cargo_type) { const Engine *e = Engine::Get(engine); if (!e->CanCarryCargo()) return 0; - uint32 cargoes = e->info.refit_mask; + CargoTypes cargoes = e->info.refit_mask; if (include_initial_cargo_type) { SetBit(cargoes, e->GetDefaultCargoType()); @@ -169,7 +169,7 @@ CargoArray GetCapacityOfArticulatedParts(EngineID engine) * @param[out] cargoes Total amount of units that can be transported, summed by cargo. * @param[out] refits Whether a (possibly partial) refit for each cargo is possible. */ -void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, uint32 *refits) +void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits) { cargoes->Clear(); *refits = 0; @@ -228,12 +228,12 @@ bool IsArticulatedVehicleRefittable(EngineID engine) * @param union_mask returns bit mask of CargoIDs which are a refit option for at least one articulated part * @param intersection_mask returns bit mask of CargoIDs which are a refit option for every articulated part (with default capacity > 0) */ -void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, uint32 *union_mask, uint32 *intersection_mask) +void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, CargoTypes *union_mask, CargoTypes *intersection_mask) { const Engine *e = Engine::Get(engine); - uint32 veh_cargoes = GetAvailableVehicleCargoTypes(engine, include_initial_cargo_type); + CargoTypes veh_cargoes = GetAvailableVehicleCargoTypes(engine, include_initial_cargo_type); *union_mask = veh_cargoes; - *intersection_mask = (veh_cargoes != 0) ? veh_cargoes : UINT32_MAX; + *intersection_mask = (veh_cargoes != 0) ? veh_cargoes : ALL_CARGOTYPES; if (!e->IsGroundVehicle()) return; if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return; @@ -254,9 +254,9 @@ void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, * @param include_initial_cargo_type if true the default cargo type of the vehicle is included; if false only the refit_mask * @return bit mask of CargoIDs which are a refit option for at least one articulated part */ -uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type) +CargoTypes GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type) { - uint32 union_mask, intersection_mask; + CargoTypes union_mask, intersection_mask; GetArticulatedRefitMasks(engine, include_initial_cargo_type, &union_mask, &intersection_mask); return union_mask; } @@ -267,9 +267,9 @@ uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_car * @param include_initial_cargo_type if true the default cargo type of the vehicle is included; if false only the refit_mask * @return bit mask of CargoIDs which are a refit option for every articulated part (with default capacity > 0) */ -uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type) +CargoTypes GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type) { - uint32 union_mask, intersection_mask; + CargoTypes union_mask, intersection_mask; GetArticulatedRefitMasks(engine, include_initial_cargo_type, &union_mask, &intersection_mask); return intersection_mask; } @@ -314,16 +314,16 @@ void CheckConsistencyOfArticulatedVehicle(const Vehicle *v) { const Engine *engine = v->GetEngine(); - uint32 purchase_refit_union, purchase_refit_intersection; + CargoTypes purchase_refit_union, purchase_refit_intersection; GetArticulatedRefitMasks(v->engine_type, true, &purchase_refit_union, &purchase_refit_intersection); CargoArray purchase_default_capacity = GetCapacityOfArticulatedParts(v->engine_type); - uint32 real_refit_union = 0; - uint32 real_refit_intersection = UINT_MAX; + CargoTypes real_refit_union = 0; + CargoTypes real_refit_intersection = ALL_CARGOTYPES; CargoArray real_default_capacity; do { - uint32 refit_mask = GetAvailableVehicleCargoTypes(v->engine_type, true); + CargoTypes refit_mask = GetAvailableVehicleCargoTypes(v->engine_type, true); real_refit_union |= refit_mask; if (refit_mask != 0) real_refit_intersection &= refit_mask; diff --git a/src/articulated_vehicles.h b/src/articulated_vehicles.h index d8fa44f09f..77322fb4c7 100644 --- a/src/articulated_vehicles.h +++ b/src/articulated_vehicles.h @@ -1,4 +1,4 @@ -/* $Id: articulated_vehicles.h 24029 2012-03-14 20:49:54Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,9 +18,9 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window); CargoArray GetCapacityOfArticulatedParts(EngineID engine); void AddArticulatedParts(Vehicle *first); -void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, uint32 *union_mask, uint32 *intersection_mask); -uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type); -uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type); +void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, CargoTypes *union_mask, CargoTypes *intersection_mask); +CargoTypes GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type); +CargoTypes GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type); bool IsArticulatedVehicleCarryingDifferentCargoes(const Vehicle *v, CargoID *cargo_type); bool IsArticulatedVehicleRefittable(EngineID engine); bool IsArticulatedEngine(EngineID engine_type); diff --git a/src/autoreplace.cpp b/src/autoreplace.cpp index 656334708f..3b7f739726 100644 --- a/src/autoreplace.cpp +++ b/src/autoreplace.cpp @@ -1,4 +1,4 @@ -/* $Id: autoreplace.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/autoreplace_base.h b/src/autoreplace_base.h index 3b91d69782..5d265866d8 100644 --- a/src/autoreplace_base.h +++ b/src/autoreplace_base.h @@ -1,4 +1,4 @@ -/* $Id: autoreplace_base.h 24136 2012-04-17 19:44:02Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 13473a7192..95568e3811 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: autoreplace_cmd.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,6 +19,7 @@ #include "autoreplace_gui.h" #include "articulated_vehicles.h" #include "core/random_func.hpp" +#include "vehiclelist.h" #include "table/strings.h" @@ -32,13 +33,12 @@ extern void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index); * Figure out if two engines got at least one type of cargo in common (refitting if needed) * @param engine_a one of the EngineIDs * @param engine_b the other EngineID - * @param type the type of the engines * @return true if they can both carry the same type of cargo (or at least one of them got no capacity at all) */ static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b) { - uint32 available_cargoes_a = GetUnionOfArticulatedRefitMasks(engine_a, true); - uint32 available_cargoes_b = GetUnionOfArticulatedRefitMasks(engine_b, true); + CargoTypes available_cargoes_a = GetUnionOfArticulatedRefitMasks(engine_a, true); + CargoTypes available_cargoes_b = GetUnionOfArticulatedRefitMasks(engine_b, true); return (available_cargoes_a == 0 || available_cargoes_b == 0 || (available_cargoes_a & available_cargoes_b) != 0); } @@ -173,9 +173,8 @@ static void TransferCargo(Vehicle *old_veh, Vehicle *new_head, bool part_of_chai */ static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, EngineID engine_type) { - - uint32 union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, false); - uint32 union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, false); + CargoTypes union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, false); + CargoTypes union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, false); const Order *o; const Vehicle *u = (v->type == VEH_TRAIN) ? v->First() : v; @@ -201,7 +200,7 @@ static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, EngineID engine_ty */ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool part_of_chain) { - uint32 available_cargo_types, union_mask; + CargoTypes available_cargo_types, union_mask; GetArticulatedRefitMasks(engine_type, true, &union_mask, &available_cargo_types); if (union_mask == 0) return CT_NO_REFIT; // Don't try to refit an engine with no cargo capacity @@ -238,7 +237,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool * @param v The vehicle to find a replacement for * @param c The vehicle's owner (it's faster to forward the pointer than refinding it) * @param always_replace Always replace, even if not old. - * @param [out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found + * @param[out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found * @return Error if the engine to build is not available */ static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, bool always_replace, EngineID &e) @@ -779,6 +778,9 @@ CommandCost CmdSetAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, ui if (flags & DC_EXEC) { GroupStatistics::UpdateAutoreplace(_current_company); if (IsLocalCompany()) SetWindowDirty(WC_REPLACE_VEHICLE, Engine::Get(old_engine_type)->type); + + const VehicleType vt = Engine::Get(old_engine_type)->type; + SetWindowDirty(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack()); } if ((flags & DC_EXEC) && IsLocalCompany()) InvalidateAutoreplaceWindow(old_engine_type, id_g); diff --git a/src/autoreplace_func.h b/src/autoreplace_func.h index efd892bcf8..3a6fc83a81 100644 --- a/src/autoreplace_func.h +++ b/src/autoreplace_func.h @@ -1,4 +1,4 @@ -/* $Id: autoreplace_func.h 24136 2012-04-17 19:44:02Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 06cb8267e8..eae0a378eb 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: autoreplace_gui.cpp 27683 2016-12-08 20:21:39Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -81,7 +81,7 @@ class ReplaceVehicleWindow : public Window { EngineID sel_engine[2]; ///< Selected engine left and right. GUIEngineList engines[2]; ///< Left and right list of engines. bool replace_engines; ///< If \c true, engines are replaced, if \c false, wagons are replaced (only for trains). - bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right (#update_left and/or #update_right) and no valid engine selected. + bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right and no valid engine selected. GroupID sel_group; ///< Group selected to replace. int details_height; ///< Minimal needed height of the details panels (found so far). byte sort_criteria; ///< Criteria of sorting vehicles. diff --git a/src/autoreplace_gui.h b/src/autoreplace_gui.h index d87fba658c..046ac89921 100644 --- a/src/autoreplace_gui.h +++ b/src/autoreplace_gui.h @@ -1,4 +1,4 @@ -/* $Id: autoreplace_gui.h 21844 2011-01-18 22:17:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/autoreplace_type.h b/src/autoreplace_type.h index 70c31d15d4..30ba7e2b44 100644 --- a/src/autoreplace_type.h +++ b/src/autoreplace_type.h @@ -1,4 +1,4 @@ -/* $Id: autoreplace_type.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/autoslope.h b/src/autoslope.h index bbf0c2d888..e504610c39 100644 --- a/src/autoslope.h +++ b/src/autoslope.h @@ -1,4 +1,4 @@ -/* $Id: autoslope.h 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/base_consist.cpp b/src/base_consist.cpp index 08ffd2b982..200512786c 100644 --- a/src/base_consist.cpp +++ b/src/base_consist.cpp @@ -1,4 +1,4 @@ -/* $Id: base_consist.cpp 27280 2015-05-11 16:40:06Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/base_consist.h b/src/base_consist.h index 5beb5f0aa4..3679afd351 100644 --- a/src/base_consist.h +++ b/src/base_consist.h @@ -1,4 +1,4 @@ -/* $Id: base_consist.h 24998 2013-02-14 17:24:55Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/base_media_base.h b/src/base_media_base.h index ed66875dbc..b040abcf9d 100644 --- a/src/base_media_base.h +++ b/src/base_media_base.h @@ -1,4 +1,4 @@ -/* $Id: base_media_base.h 24487 2012-08-20 21:01:40Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,6 +26,7 @@ struct ContentInfo; struct MD5File { /** The result of a checksum check */ enum ChecksumResult { + CR_UNKNOWN, ///< The file has not been checked yet CR_MATCH, ///< The file did exist and the md5 checksum did match CR_MISMATCH, ///< The file did exist, just the md5 checksum did not match CR_NO_FILE, ///< The file did not exist @@ -34,6 +35,7 @@ struct MD5File { const char *filename; ///< filename uint8 hash[16]; ///< md5 sum of the file const char *missing_warning; ///< warning when this file is missing + ChecksumResult check_result; ///< cached result of md5 check ChecksumResult CheckMD5(Subdirectory subdir, size_t max_size) const; }; @@ -219,6 +221,11 @@ public: static bool HasSet(const ContentInfo *ci, bool md5sum); }; +template /* static */ const char *BaseMedia::ini_set; +template /* static */ const Tbase_set *BaseMedia::used_set; +template /* static */ Tbase_set *BaseMedia::available_sets; +template /* static */ Tbase_set *BaseMedia::duplicate_sets; + /** * Check whether there's a base set matching some information. * @param ci The content info to compare it to. @@ -280,11 +287,32 @@ static const uint NUM_SONGS_AVAILABLE = 1 + NUM_SONG_CLASSES * NUM_SONGS_CLASS; /** Maximum number of songs in the (custom) playlist */ static const uint NUM_SONGS_PLAYLIST = 32; +/* Functions to read DOS music CAT files, similar to but not quite the same as sound effect CAT files */ +char *GetMusicCatEntryName(const char *filename, size_t entrynum); +byte *GetMusicCatEntryData(const char *filename, size_t entrynum, size_t &entrylen); + +enum MusicTrackType { + MTT_STANDARDMIDI, ///< Standard MIDI file + MTT_MPSMIDI, ///< MPS GM driver MIDI format (contained in a CAT file) +}; + +/** Metadata about a music track. */ +struct MusicSongInfo { + char songname[32]; ///< name of song displayed in UI + byte tracknr; ///< track number of song displayed in UI + const char *filename; ///< file on disk containing song (when used in MusicSet class, this pointer is owned by MD5File object for the file) + MusicTrackType filetype; ///< decoder required for song file + int cat_index; ///< entry index in CAT file, for filetype==MTT_MPSMIDI + bool loop; ///< song should play in a tight loop if possible, never ending + int override_start; ///< MIDI ticks to skip over in beginning + int override_end; ///< MIDI tick to end the song at (0 if no override) +}; + /** All data of a music set. */ struct MusicSet : BaseSet { - /** The name of the different songs. */ - char song_name[NUM_SONGS_AVAILABLE][32]; - byte track_nr[NUM_SONGS_AVAILABLE]; + /** Data about individual songs in set. */ + MusicSongInfo songinfo[NUM_SONGS_AVAILABLE]; + /** Number of valid songs in set. */ byte num_available; bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename); diff --git a/src/base_media_func.h b/src/base_media_func.h index a31dd105c3..f7afca0edb 100644 --- a/src/base_media_func.h +++ b/src/base_media_func.h @@ -1,4 +1,4 @@ -/* $Id: base_media_func.h 26637 2014-06-09 17:43:59Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,11 +17,6 @@ #include "ini_type.h" #include "string_func.h" -template /* static */ const char *BaseMedia::ini_set; -template /* static */ const Tbase_set *BaseMedia::used_set; -template /* static */ Tbase_set *BaseMedia::available_sets; -template /* static */ Tbase_set *BaseMedia::duplicate_sets; - /** * Try to read a single piece of metadata and return false if it doesn't exist. * @param name the name of the item to fetch. @@ -45,8 +40,6 @@ template /* static */ Tbase_set *BaseMedia::duplica template bool BaseSet::FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename) { - memset(this, 0, sizeof(*this)); - IniGroup *metadata = ini->GetGroup("metadata"); IniItem *item; @@ -134,7 +127,11 @@ bool BaseSet::FillSetDetails(IniFile *ini, const file->missing_warning = stredup(item->value); } - switch (T::CheckMD5(file, BASESET_DIR)) { + file->check_result = T::CheckMD5(file, BASESET_DIR); + switch (file->check_result) { + case MD5File::CR_UNKNOWN: + break; + case MD5File::CR_MATCH: this->valid_files++; this->found_files++; diff --git a/src/base_station_base.h b/src/base_station_base.h index 1889ef07f0..cd512c5177 100644 --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -1,4 +1,4 @@ -/* $Id: base_station_base.h 26085 2013-11-24 14:41:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -71,7 +71,7 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> { uint16 random_bits; ///< Random bits assigned to this station byte waiting_triggers; ///< Waiting triggers (NewGRF) for this station uint8 cached_anim_triggers; ///< NOSAVE: Combined animation trigger bitmask, used to determine if trigger processing should happen. - uint32 cached_cargo_triggers; ///< NOSAVE: Combined cargo trigger bitmask + CargoTypes cached_cargo_triggers; ///< NOSAVE: Combined cargo trigger bitmask TileArea train_station; ///< Tile area the train 'station' part covers StationRect rect; ///< NOSAVE: Station spread out rectangle maintained by StationRect::xxx() functions diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index b242e23145..27b1fbd5b8 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_anim.cpp 27796 2017-03-18 17:14:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,6 +12,7 @@ #include "../stdafx.h" #include "../video/video_driver.hpp" #include "32bpp_anim.hpp" +#include "common.hpp" #include "../table/sprites.h" @@ -22,7 +23,7 @@ static FBlitter_32bppAnim iFBlitter_32bppAnim; Blitter_32bppAnim::~Blitter_32bppAnim() { - free(this->anim_buf); + free(this->anim_alloc); } template @@ -39,8 +40,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel } Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below. - uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left; + uint16 *anim = this->anim_buf + this->ScreenToAnimOffset((uint32 *)bp->dst) + bp->top * this->anim_buf_pitch + bp->left; const byte *remap = bp->remap; // store so we don't have to access it via bp everytime @@ -280,8 +280,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height, } Colour *udst = (Colour *)dst; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'dst' into an 'anim_buf' offset below. - uint16 *anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr); + uint16 *anim = this->anim_buf + this->ScreenToAnimOffset((uint32 *)dst); if (pal == PALETTE_TO_TRANSPARENT) { do { @@ -319,8 +318,26 @@ void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 colour) /* Set the colour in the anim-buffer too, if we are rendering to the screen */ if (_screen_disable_anim) return; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below. - this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_pitch] = colour | (DEFAULT_BRIGHTNESS << 8); + + this->anim_buf[this->ScreenToAnimOffset((uint32 *)video) + x + y * this->anim_buf_pitch] = colour | (DEFAULT_BRIGHTNESS << 8); +} + +void Blitter_32bppAnim::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) +{ + const Colour c = LookupColourInPalette(colour); + + if (_screen_disable_anim) { + this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [&](int x, int y) { + *((Colour *)video + x + y * _screen.pitch) = c; + }); + } else { + uint16 * const offset_anim_buf = this->anim_buf + this->ScreenToAnimOffset((uint32 *)video); + const uint16 anim_colour = colour | (DEFAULT_BRIGHTNESS << 8); + this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [&](int x, int y) { + *((Colour *)video + x + y * _screen.pitch) = c; + offset_anim_buf[x + y * this->anim_buf_pitch] = anim_colour; + }); + } } void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour) @@ -332,8 +349,7 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou } Colour colour32 = LookupColourInPalette(colour); - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below. - uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf; + uint16 *anim_line = this->ScreenToAnimOffset((uint32 *)video) + this->anim_buf; do { Colour *dst = (Colour *)video; @@ -357,15 +373,14 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width, assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch); Colour *dst = (Colour *)video; const uint32 *usrc = (const uint32 *)src; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below. - uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf; + uint16 *anim_line = this->ScreenToAnimOffset((uint32 *)video) + this->anim_buf; for (; height > 0; height--) { /* We need to keep those for palette animation. */ Colour *dst_pal = dst; uint16 *anim_pal = anim_line; - memcpy(dst, usrc, width * sizeof(uint32)); + memcpy(static_cast(dst), usrc, width * sizeof(uint32)); usrc += width; dst += _screen.pitch; /* Copy back the anim-buffer */ @@ -401,8 +416,7 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in if (this->anim_buf == NULL) return; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below. - const uint16 *anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf; + const uint16 *anim_line = this->ScreenToAnimOffset((const uint32 *)video) + this->anim_buf; for (; height > 0; height--) { memcpy(udst, src, width * sizeof(uint32)); @@ -485,18 +499,22 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette) Colour *dst = (Colour *)_screen.dst_ptr; /* Let's walk the anim buffer and try to find the pixels */ + const int width = this->anim_buf_width; + const int pitch_offset = _screen.pitch - width; + const int anim_pitch_offset = this->anim_buf_pitch - width; for (int y = this->anim_buf_height; y != 0 ; y--) { - for (int x = this->anim_buf_width; x != 0 ; x--) { - uint colour = GB(*anim, 0, 8); + for (int x = width; x != 0 ; x--) { + uint16 value = *anim; + uint8 colour = GB(value, 0, 8); if (colour >= PALETTE_ANIM_START) { /* Update this pixel */ - *dst = this->AdjustBrightness(LookupColourInPalette(colour), GB(*anim, 8, 8)); + *dst = this->AdjustBrightness(LookupColourInPalette(colour), GB(value, 8, 8)); } dst++; anim++; } - dst += _screen.pitch - this->anim_buf_width; - anim += this->anim_buf_pitch - this->anim_buf_width; + dst += pitch_offset; + anim += anim_pitch_offset; } /* Make sure the backend redraws the whole screen */ @@ -513,10 +531,13 @@ void Blitter_32bppAnim::PostResize() if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height || _screen.pitch != this->anim_buf_pitch) { /* The size of the screen changed; we can assume we can wipe all data from our buffer */ - free(this->anim_buf); + free(this->anim_alloc); this->anim_buf_width = _screen.width; this->anim_buf_height = _screen.height; - this->anim_buf_pitch = _screen.pitch; - this->anim_buf = CallocT(this->anim_buf_height * this->anim_buf_pitch); + this->anim_buf_pitch = (_screen.width + 7) & ~7; + this->anim_alloc = CallocT(this->anim_buf_pitch * this->anim_buf_height + 8); + + /* align buffer to next 16 byte boundary */ + this->anim_buf = reinterpret_cast((reinterpret_cast(this->anim_alloc) + 0xF) & (~0xF)); } } diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp index 06083ab4ca..ecf6dcfca0 100644 --- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_anim.hpp 27796 2017-03-18 17:14:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,14 +18,16 @@ class Blitter_32bppAnim : public Blitter_32bppOptimized { protected: uint16 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation + void *anim_alloc; ///< The raw allocated buffer, not necessarily aligned correctly int anim_buf_width; ///< The width of the animation buffer. int anim_buf_height; ///< The height of the animation buffer. - int anim_buf_pitch; ///< The pitch of the animation buffer. + int anim_buf_pitch; ///< The pitch of the animation buffer (width rounded up to 16 byte boundary). Palette palette; ///< The current palette. public: Blitter_32bppAnim() : anim_buf(NULL), + anim_alloc(NULL), anim_buf_width(0), anim_buf_height(0), anim_buf_pitch(0) @@ -38,6 +40,7 @@ public: /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); + /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); @@ -58,6 +61,15 @@ public: return this->palette.palette[index]; } + inline int ScreenToAnimOffset(const uint32 *video) + { + int raw_offset = video - (const uint32 *)_screen.dst_ptr; + if (_screen.pitch == this->anim_buf_pitch) return raw_offset; + int lines = raw_offset / _screen.pitch; + int across = raw_offset % _screen.pitch; + return across + (lines * this->anim_buf_pitch); + } + template void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom); }; diff --git a/src/blitter/32bpp_anim_sse2.cpp b/src/blitter/32bpp_anim_sse2.cpp new file mode 100644 index 0000000000..d5fa4268a8 --- /dev/null +++ b/src/blitter/32bpp_anim_sse2.cpp @@ -0,0 +1,100 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file 32bpp_anim.cpp Implementation of a partially SSSE2 32bpp blitter with animation support. */ + +#ifdef WITH_SSE + +#include "../stdafx.h" +#include "../video/video_driver.hpp" +#include "32bpp_anim_sse2.hpp" +#include "32bpp_sse_func.hpp" + +#include "../safeguards.h" + +/** Instantiation of the partially SSSE2 32bpp with animation blitter factory. */ +static FBlitter_32bppSSE2_Anim iFBlitter_32bppSSE2_Anim; + +void Blitter_32bppSSE2_Anim::PaletteAnimate(const Palette &palette) +{ + assert(!_screen_disable_anim); + + this->palette = palette; + /* If first_dirty is 0, it is for 8bpp indication to send the new + * palette. However, only the animation colours might possibly change. + * Especially when going between toyland and non-toyland. */ + assert(this->palette.first_dirty == PALETTE_ANIM_START || this->palette.first_dirty == 0); + + const uint16 *anim = this->anim_buf; + Colour *dst = (Colour *)_screen.dst_ptr; + + bool screen_dirty = false; + + /* Let's walk the anim buffer and try to find the pixels */ + const int width = this->anim_buf_width; + const int screen_pitch = _screen.pitch; + const int anim_pitch = this->anim_buf_pitch; + __m128i anim_cmp = _mm_set1_epi16(PALETTE_ANIM_START - 1); + __m128i brightness_cmp = _mm_set1_epi16(Blitter_32bppBase::DEFAULT_BRIGHTNESS); + __m128i colour_mask = _mm_set1_epi16(0xFF); + for (int y = this->anim_buf_height; y != 0 ; y--) { + Colour *next_dst_ln = dst + screen_pitch; + const uint16 *next_anim_ln = anim + anim_pitch; + int x = width; + while (x > 0) { + __m128i data = _mm_load_si128((const __m128i *) anim); + + /* low bytes only, shifted into high positions */ + __m128i colour_data = _mm_and_si128(data, colour_mask); + + /* test if any colour >= PALETTE_ANIM_START */ + int colour_cmp_result = _mm_movemask_epi8(_mm_cmpgt_epi16(colour_data, anim_cmp)); + if (colour_cmp_result) { + /* test if any brightness is unexpected */ + if (x < 8 || colour_cmp_result != 0xFFFF || + _mm_movemask_epi8(_mm_cmpeq_epi16(_mm_srli_epi16(data, 8), brightness_cmp)) != 0xFFFF) { + /* slow path: < 8 pixels left or unexpected brightnesses */ + for (int z = min(x, 8); z != 0 ; z--) { + int value = _mm_extract_epi16(data, 0); + uint8 colour = GB(value, 0, 8); + if (colour >= PALETTE_ANIM_START) { + /* Update this pixel */ + *dst = AdjustBrightneSSE(LookupColourInPalette(colour), GB(value, 8, 8)); + screen_dirty = true; + } + data = _mm_srli_si128(data, 2); + dst++; + } + } else { + /* medium path: 8 pixels to animate all of expected brightnesses */ + for (int z = 0; z < 8; z++) { + *dst = LookupColourInPalette(_mm_extract_epi16(colour_data, 0)); + colour_data = _mm_srli_si128(colour_data, 2); + dst++; + } + screen_dirty = true; + } + } else { + /* fast path, no animation */ + dst += 8; + } + anim += 8; + x -= 8; + } + dst = next_dst_ln; + anim = next_anim_ln; + } + + if (screen_dirty) { + /* Make sure the backend redraws the whole screen */ + VideoDriver::GetInstance()->MakeDirty(0, 0, _screen.width, _screen.height); + } +} + +#endif /* WITH_SSE */ diff --git a/src/blitter/32bpp_anim_sse2.hpp b/src/blitter/32bpp_anim_sse2.hpp new file mode 100644 index 0000000000..0d4a5f1e65 --- /dev/null +++ b/src/blitter/32bpp_anim_sse2.hpp @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file 32bpp_anim.hpp A partially SSE2 32 bpp blitter with animation support. */ + +#ifndef BLITTER_32BPP_SSE2_ANIM_HPP +#define BLITTER_32BPP_SSE2_ANIM_HPP + +#ifdef WITH_SSE + +#ifndef SSE_VERSION +#define SSE_VERSION 2 +#endif + +#ifndef FULL_ANIMATION +#define FULL_ANIMATION 1 +#endif + +#include "32bpp_anim.hpp" +#include "32bpp_sse2.hpp" + +/** A partially 32 bpp blitter with palette animation. */ +class Blitter_32bppSSE2_Anim : public Blitter_32bppAnim { +public: + /* virtual */ void PaletteAnimate(const Palette &palette); + /* virtual */ const char *GetName() { return "32bpp-sse2-anim"; } +}; + +/** Factory for the partially 32bpp blitter with animation. */ +class FBlitter_32bppSSE2_Anim : public BlitterFactory { +public: + FBlitter_32bppSSE2_Anim() : BlitterFactory("32bpp-sse2-anim", "32bpp partially SSE2 Animation Blitter (palette animation)", HasCPUIDFlag(1, 3, 26)) {} + /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE2_Anim(); } +}; + +#endif /* WITH_SSE */ +#endif /* BLITTER_32BPP_ANIM_HPP */ diff --git a/src/blitter/32bpp_anim_sse4.cpp b/src/blitter/32bpp_anim_sse4.cpp index d53b877082..24d1d7531f 100644 --- a/src/blitter/32bpp_anim_sse4.cpp +++ b/src/blitter/32bpp_anim_sse4.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_anim_sse4.cpp 27796 2017-03-18 17:14:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/** @file 32bpp_sse4_anim.cpp Implementation of the SSE4 32 bpp blitter with animation support. */ +/** @file 32bpp_anim_sse4.cpp Implementation of the SSE4 32 bpp blitter with animation support. */ #ifdef WITH_SSE @@ -35,8 +35,7 @@ inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomL { const byte * const remap = bp->remap; Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below. - uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left; + uint16 *anim_line = this->anim_buf + this->ScreenToAnimOffset((uint32 *)bp->dst) + bp->top * this->anim_buf_pitch + bp->left; int effective_width = bp->width; /* Find where to start reading in the source sprite. */ diff --git a/src/blitter/32bpp_anim_sse4.hpp b/src/blitter/32bpp_anim_sse4.hpp index cfdb5962f0..5ff1fb01be 100644 --- a/src/blitter/32bpp_anim_sse4.hpp +++ b/src/blitter/32bpp_anim_sse4.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_anim_sse4.hpp 26260 2014-01-13 18:20:23Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/** @file 32bpp_sse4_anim.hpp A SSE4 32 bpp blitter with animation support. */ +/** @file 32bpp_anim_sse4.hpp A SSE4 32 bpp blitter with animation support. */ #ifndef BLITTER_32BPP_SSE4_ANIM_HPP #define BLITTER_32BPP_SSE4_ANIM_HPP @@ -23,13 +23,14 @@ #endif #include "32bpp_anim.hpp" +#include "32bpp_anim_sse2.hpp" #include "32bpp_sse4.hpp" #undef MARGIN_NORMAL_THRESHOLD #define MARGIN_NORMAL_THRESHOLD 4 /** The SSE4 32 bpp blitter with palette animation. */ -class Blitter_32bppSSE4_Anim FINAL : public Blitter_32bppAnim, public Blitter_32bppSSE_Base { +class Blitter_32bppSSE4_Anim FINAL : public Blitter_32bppSSE2_Anim, public Blitter_32bppSSE_Base { private: public: diff --git a/src/blitter/32bpp_base.cpp b/src/blitter/32bpp_base.cpp index 376ea5ab72..b2e66b0be1 100644 --- a/src/blitter/32bpp_base.cpp +++ b/src/blitter/32bpp_base.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_base.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -11,6 +11,7 @@ #include "../stdafx.h" #include "32bpp_base.hpp" +#include "common.hpp" #include "../safeguards.h" @@ -24,6 +25,14 @@ void Blitter_32bppBase::SetPixel(void *video, int x, int y, uint8 colour) *((Colour *)video + x + y * _screen.pitch) = LookupColourInPalette(colour); } +void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) +{ + const Colour c = LookupColourInPalette(colour); + this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [=](int x, int y) { + *((Colour *)video + x + y * _screen.pitch) = c; + }); +} + void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 colour) { Colour colour32 = LookupColourInPalette(colour); @@ -143,6 +152,36 @@ void Blitter_32bppBase::PaletteAnimate(const Palette &palette) /* By default, 32bpp doesn't have palette animation */ } +Colour Blitter_32bppBase::ReallyAdjustBrightness(Colour colour, uint8 brightness) +{ + assert(DEFAULT_BRIGHTNESS == 1 << 7); + + uint64 combined = (((uint64) colour.r) << 32) | (((uint64) colour.g) << 16) | ((uint64) colour.b); + combined *= brightness; + + uint16 r = GB(combined, 39, 9); + uint16 g = GB(combined, 23, 9); + uint16 b = GB(combined, 7, 9); + + if ((combined & 0x800080008000L) == 0L) { + return Colour(r, g, b, colour.a); + } + + uint16 ob = 0; + /* Sum overbright */ + if (r > 255) ob += r - 255; + if (g > 255) ob += g - 255; + if (b > 255) ob += b - 255; + + /* Reduce overbright strength */ + ob /= 2; + return Colour( + r >= 255 ? 255 : min(r + ob * (255 - r) / 256, 255), + g >= 255 ? 255 : min(g + ob * (255 - g) / 256, 255), + b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255), + colour.a); +} + Blitter::PaletteAnimation Blitter_32bppBase::UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp index 8ff11e0f5c..697593da6a 100644 --- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_base.hpp 26463 2014-04-13 19:22:23Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,6 +23,7 @@ public: /* virtual */ uint8 GetScreenDepth() { return 32; } /* virtual */ void *MoveTo(void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); + /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); @@ -146,30 +147,14 @@ public: static const int DEFAULT_BRIGHTNESS = 128; + static Colour ReallyAdjustBrightness(Colour colour, uint8 brightness); + static inline Colour AdjustBrightness(Colour colour, uint8 brightness) { /* Shortcut for normal brightness */ if (brightness == DEFAULT_BRIGHTNESS) return colour; - uint16 ob = 0; - uint16 r = colour.r * brightness / DEFAULT_BRIGHTNESS; - uint16 g = colour.g * brightness / DEFAULT_BRIGHTNESS; - uint16 b = colour.b * brightness / DEFAULT_BRIGHTNESS; - - /* Sum overbright */ - if (r > 255) ob += r - 255; - if (g > 255) ob += g - 255; - if (b > 255) ob += b - 255; - - if (ob == 0) return Colour(r, g, b, colour.a); - - /* Reduce overbright strength */ - ob /= 2; - return Colour( - r >= 255 ? 255 : min(r + ob * (255 - r) / 256, 255), - g >= 255 ? 255 : min(g + ob * (255 - g) / 256, 255), - b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255), - colour.a); + return ReallyAdjustBrightness(colour, brightness); } }; diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index c505bff52d..cc056f5b59 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_optimized.cpp 26969 2014-10-06 18:45:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_optimized.hpp b/src/blitter/32bpp_optimized.hpp index 3408c08638..c261aa33d6 100644 --- a/src/blitter/32bpp_optimized.hpp +++ b/src/blitter/32bpp_optimized.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_optimized.hpp 26209 2014-01-02 22:41:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index 54cf38a2ba..92375be165 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_simple.cpp 26969 2014-10-06 18:45:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_simple.hpp b/src/blitter/32bpp_simple.hpp index b4d99677c4..0751f6f753 100644 --- a/src/blitter/32bpp_simple.hpp +++ b/src/blitter/32bpp_simple.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_simple.hpp 26209 2014-01-02 22:41:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_sse2.cpp b/src/blitter/32bpp_sse2.cpp index dd1208cef6..ae2b3ccc52 100644 --- a/src/blitter/32bpp_sse2.cpp +++ b/src/blitter/32bpp_sse2.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_sse2.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_sse2.hpp b/src/blitter/32bpp_sse2.hpp index 9c403b5abd..d6b17f679c 100644 --- a/src/blitter/32bpp_sse2.hpp +++ b/src/blitter/32bpp_sse2.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_sse2.hpp 26260 2014-01-13 18:20:23Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_sse4.cpp b/src/blitter/32bpp_sse4.cpp index 5f053fd9f4..723264f03f 100644 --- a/src/blitter/32bpp_sse4.cpp +++ b/src/blitter/32bpp_sse4.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_sse4.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_sse4.hpp b/src/blitter/32bpp_sse4.hpp index 8079948f62..9c59d253f5 100644 --- a/src/blitter/32bpp_sse4.hpp +++ b/src/blitter/32bpp_sse4.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_sse4.hpp 26260 2014-01-13 18:20:23Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_sse_func.hpp b/src/blitter/32bpp_sse_func.hpp index 2ad3602eea..fb0ce9eb6e 100644 --- a/src/blitter/32bpp_sse_func.hpp +++ b/src/blitter/32bpp_sse_func.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_sse_func.hpp 27020 2014-10-15 18:31:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_sse_type.h b/src/blitter/32bpp_sse_type.h index a890e5ddac..49c7a68c20 100644 --- a/src/blitter/32bpp_sse_type.h +++ b/src/blitter/32bpp_sse_type.h @@ -1,4 +1,4 @@ -/* $Id: 32bpp_sse_type.h 26258 2014-01-13 18:12:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -7,10 +7,10 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/** @file 32bpp_sse_type.hpp Types related to SSE 32 bpp blitter. */ +/** @file 32bpp_sse_type.h Types related to SSE 32 bpp blitter. */ -#ifndef BLITTER_32BPP_SSE_TYPE_HPP -#define BLITTER_32BPP_SSE_TYPE_HPP +#ifndef BLITTER_32BPP_SSE_TYPE_H +#define BLITTER_32BPP_SSE_TYPE_H #ifdef WITH_SSE @@ -27,6 +27,8 @@ #define MARGIN_NORMAL_THRESHOLD (zoom == ZOOM_LVL_OUT_32X ? 8 : 4) ///< Minimum width to use margins with BM_NORMAL. #define MARGIN_REMAP_THRESHOLD 4 ///< Minimum width to use margins with BM_COLOUR_REMAP. +#undef ALIGN + #ifdef _MSC_VER #define ALIGN(n) __declspec(align(n)) #else @@ -53,4 +55,4 @@ typedef union ALIGN(16) um128i { #define TRANSPARENT_NOM_BASE _mm_setr_epi16(256, 256, 256, 256, 256, 256, 256, 256) #endif /* WITH_SSE */ -#endif /* BLITTER_32BPP_SSE_TYPE_HPP */ +#endif /* BLITTER_32BPP_SSE_TYPE_H */ diff --git a/src/blitter/32bpp_ssse3.cpp b/src/blitter/32bpp_ssse3.cpp index dbf99b4549..ab6c9eba5d 100644 --- a/src/blitter/32bpp_ssse3.cpp +++ b/src/blitter/32bpp_ssse3.cpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_ssse3.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/32bpp_ssse3.hpp b/src/blitter/32bpp_ssse3.hpp index b3375a7c8d..e9cac8ff0b 100644 --- a/src/blitter/32bpp_ssse3.hpp +++ b/src/blitter/32bpp_ssse3.hpp @@ -1,4 +1,4 @@ -/* $Id: 32bpp_ssse3.hpp 26260 2014-01-13 18:20:23Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/8bpp_base.cpp b/src/blitter/8bpp_base.cpp index e94c1e0ff2..dccfda3d70 100644 --- a/src/blitter/8bpp_base.cpp +++ b/src/blitter/8bpp_base.cpp @@ -1,4 +1,4 @@ -/* $Id: 8bpp_base.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,6 +12,7 @@ #include "../stdafx.h" #include "../gfx_func.h" #include "8bpp_base.hpp" +#include "common.hpp" #include "../safeguards.h" @@ -35,6 +36,13 @@ void Blitter_8bppBase::SetPixel(void *video, int x, int y, uint8 colour) *((uint8 *)video + x + y * _screen.pitch) = colour; } +void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) +{ + this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [=](int x, int y) { + *((uint8 *)video + x + y * _screen.pitch) = colour; + }); +} + void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8 colour) { do { diff --git a/src/blitter/8bpp_base.hpp b/src/blitter/8bpp_base.hpp index c330247ba1..8f75dda5d3 100644 --- a/src/blitter/8bpp_base.hpp +++ b/src/blitter/8bpp_base.hpp @@ -1,4 +1,4 @@ -/* $Id: 8bpp_base.hpp 23448 2011-12-08 19:37:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,6 +21,7 @@ public: /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); /* virtual */ void *MoveTo(void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); + /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); diff --git a/src/blitter/8bpp_optimized.cpp b/src/blitter/8bpp_optimized.cpp index f1aa0054e1..0f07e7c7bb 100644 --- a/src/blitter/8bpp_optimized.cpp +++ b/src/blitter/8bpp_optimized.cpp @@ -1,4 +1,4 @@ -/* $Id: 8bpp_optimized.cpp 26969 2014-10-06 18:45:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/8bpp_optimized.hpp b/src/blitter/8bpp_optimized.hpp index 4d7b1bf54e..b5b5324b91 100644 --- a/src/blitter/8bpp_optimized.hpp +++ b/src/blitter/8bpp_optimized.hpp @@ -1,4 +1,4 @@ -/* $Id: 8bpp_optimized.hpp 26209 2014-01-02 22:41:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/8bpp_simple.cpp b/src/blitter/8bpp_simple.cpp index 8b87fe917d..2131a04682 100644 --- a/src/blitter/8bpp_simple.cpp +++ b/src/blitter/8bpp_simple.cpp @@ -1,4 +1,4 @@ -/* $Id: 8bpp_simple.cpp 27837 2017-03-30 21:33:40Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/8bpp_simple.hpp b/src/blitter/8bpp_simple.hpp index c061f354ce..c00c75ac04 100644 --- a/src/blitter/8bpp_simple.hpp +++ b/src/blitter/8bpp_simple.hpp @@ -1,4 +1,4 @@ -/* $Id: 8bpp_simple.hpp 26209 2014-01-02 22:41:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp index d0eec25a59..388359441f 100644 --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -1,4 +1,4 @@ -/* $Id: base.hpp 26969 2014-10-06 18:45:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -122,7 +122,7 @@ public: * @param width Line width. * @param dash Length of dashes for dashed lines. 0 means solid line. */ - virtual void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash = 0); + virtual void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash = 0) = 0; /** * Copy from a buffer to the screen. @@ -203,6 +203,8 @@ public: virtual void PostResize() { }; virtual ~Blitter() { } + + template void DrawLineGeneric(int x, int y, int x2, int y2, int screen_width, int screen_height, int width, int dash, SetPixelT set_pixel); }; #endif /* BLITTER_BASE_HPP */ diff --git a/src/blitter/common.hpp b/src/blitter/common.hpp new file mode 100644 index 0000000000..3e4911d003 --- /dev/null +++ b/src/blitter/common.hpp @@ -0,0 +1,197 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file common.hpp Common functionality for all blitter implementations. */ + +#ifndef BLITTER_COMMON_HPP +#define BLITTER_COMMON_HPP + +#include "base.hpp" +#include "../core/math_func.hpp" + +#include + +template +void Blitter::DrawLineGeneric(int x, int y, int x2, int y2, int screen_width, int screen_height, int width, int dash, SetPixelT set_pixel) +{ + int dy; + int dx; + int stepx; + int stepy; + + dy = (y2 - y) * 2; + if (dy < 0) { + dy = -dy; + stepy = -1; + } else { + stepy = 1; + } + + dx = (x2 - x) * 2; + if (dx < 0) { + dx = -dx; + stepx = -1; + } else { + stepx = 1; + } + + if (dx == 0 && dy == 0) { + /* The algorithm below cannot handle this special case; make it work at least for line width 1 */ + if (x >= 0 && x < screen_width && y >= 0 && y < screen_height) set_pixel(x, y); + return; + } + + int frac_diff = width * max(dx, dy); + if (width > 1) { + /* compute frac_diff = width * sqrt(dx*dx + dy*dy) + * Start interval: + * max(dx, dy) <= sqrt(dx*dx + dy*dy) <= sqrt(2) * max(dx, dy) <= 3/2 * max(dx, dy) */ + int64 frac_sq = ((int64) width) * ((int64) width) * (((int64) dx) * ((int64) dx) + ((int64) dy) * ((int64) dy)); + int frac_max = 3 * frac_diff / 2; + while (frac_diff < frac_max) { + int frac_test = (frac_diff + frac_max) / 2; + if (((int64) frac_test) * ((int64) frac_test) < frac_sq) { + frac_diff = frac_test + 1; + } else { + frac_max = frac_test - 1; + } + } + } + + int gap = dash; + if (dash == 0) dash = 1; + int dash_count = 0; + if (dx > dy) { + if (stepx < 0) { + std::swap(x, x2); + std::swap(y, y2); + stepy = -stepy; + } + if (x2 < 0 || x >= screen_width) return; + + int y_low = y; + int y_high = y; + int frac_low = dy - frac_diff / 2; + int frac_high = dy + frac_diff / 2; + + while (frac_low < -(dx / 2)) { + frac_low += dx; + y_low -= stepy; + } + while (frac_high >= dx / 2) { + frac_high -= dx; + y_high += stepy; + } + + if (x < 0) { + dash_count = (-x) % (dash + gap); + auto adjust_frac = [&](int64 frac, int &y_bound) -> int { + frac -= ((int64) dy) * ((int64) x); + if (frac >= 0) { + int quotient = frac / dx; + int remainder = frac % dx; + y_bound += (1 + quotient) * stepy; + frac = remainder - dx; + } + return frac; + }; + frac_low = adjust_frac(frac_low, y_low); + frac_high = adjust_frac(frac_high, y_high); + x = 0; + } + x2++; + if (x2 > screen_width) { + x2 = screen_width; + } + + while (x != x2) { + if (dash_count < dash) { + for (int y = y_low; y != y_high; y += stepy) { + if (y >= 0 && y < screen_height) set_pixel(x, y); + } + } + if (frac_low >= 0) { + y_low += stepy; + frac_low -= dx; + } + if (frac_high >= 0) { + y_high += stepy; + frac_high -= dx; + } + x++; + frac_low += dy; + frac_high += dy; + if (++dash_count >= dash + gap) dash_count = 0; + } + } else { + if (stepy < 0) { + std::swap(x, x2); + std::swap(y, y2); + stepx = -stepx; + } + if (y2 < 0 || y >= screen_height) return; + + int x_low = x; + int x_high = x; + int frac_low = dx - frac_diff / 2; + int frac_high = dx + frac_diff / 2; + + while (frac_low < -(dy / 2)) { + frac_low += dy; + x_low -= stepx; + } + while (frac_high >= dy / 2) { + frac_high -= dy; + x_high += stepx; + } + + if (y < 0) { + dash_count = (-y) % (dash + gap); + auto adjust_frac = [&](int64 frac, int &x_bound) -> int { + frac -= ((int64) dx) * ((int64) y); + if (frac >= 0) { + int quotient = frac / dy; + int remainder = frac % dy; + x_bound += (1 + quotient) * stepx; + frac = remainder - dy; + } + return frac; + }; + frac_low = adjust_frac(frac_low, x_low); + frac_high = adjust_frac(frac_high, x_high); + y = 0; + } + y2++; + if (y2 > screen_height) { + y2 = screen_height; + } + + while (y != y2) { + if (dash_count < dash) { + for (int x = x_low; x != x_high; x += stepx) { + if (x >= 0 && x < screen_width) set_pixel(x, y); + } + } + if (frac_low >= 0) { + x_low += stepx; + frac_low -= dy; + } + if (frac_high >= 0) { + x_high += stepx; + frac_high -= dy; + } + y++; + frac_low += dx; + frac_high += dx; + if (++dash_count >= dash + gap) dash_count = 0; + } + } +} + +#endif /* BLITTER_COMMON_HPP */ diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp index 8a7724e49d..01faca68fd 100644 --- a/src/blitter/factory.hpp +++ b/src/blitter/factory.hpp @@ -1,4 +1,4 @@ -/* $Id: factory.hpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/null.cpp b/src/blitter/null.cpp index b722e25fe8..e968abe13f 100644 --- a/src/blitter/null.cpp +++ b/src/blitter/null.cpp @@ -1,4 +1,4 @@ -/* $Id: null.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/blitter/null.hpp b/src/blitter/null.hpp index 7bbda6f0a2..a6fed2ebca 100644 --- a/src/blitter/null.hpp +++ b/src/blitter/null.hpp @@ -1,4 +1,4 @@ -/* $Id: null.hpp 26209 2014-01-02 22:41:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/bmp.cpp b/src/bmp.cpp index 63fc62fced..1033d89f11 100644 --- a/src/bmp.cpp +++ b/src/bmp.cpp @@ -1,4 +1,4 @@ -/* $Id: bmp.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/bmp.h b/src/bmp.h index 9205983ef5..cf2b538f39 100644 --- a/src/bmp.h +++ b/src/bmp.h @@ -1,4 +1,4 @@ -/* $Id: bmp.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/bootstrap_gui.cpp b/src/bootstrap_gui.cpp index f417ef59f5..3fb52a1f9e 100644 --- a/src/bootstrap_gui.cpp +++ b/src/bootstrap_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: bootstrap_gui.cpp 26538 2014-04-28 21:06:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -220,7 +220,7 @@ bool HandleBootstrap() if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() == 0) goto failure; /* If there is no network or no freetype, then there is nothing we can do. Go straight to failure. */ -#if defined(ENABLE_NETWORK) && defined(WITH_FREETYPE) && (defined(WITH_FONTCONFIG) || defined(WIN32) || defined(__APPLE__)) +#if defined(ENABLE_NETWORK) && defined(WITH_FREETYPE) && (defined(WITH_FONTCONFIG) || defined(_WIN32) || defined(__APPLE__)) if (!_network_available) goto failure; /* First tell the game we're bootstrapping. */ @@ -264,6 +264,6 @@ bool HandleBootstrap() /* Failure to get enough working to get a graphics set. */ failure: - usererror("Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 4.1 of readme.txt."); + usererror("Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 4.1 of README.md."); return false; } diff --git a/src/bridge.h b/src/bridge.h index 097ae46444..badf045e39 100644 --- a/src/bridge.h +++ b/src/bridge.h @@ -1,4 +1,4 @@ -/* $Id: bridge.h 22413 2011-05-02 20:59:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 019768d23c..6dea429dda 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: bridge_gui.cpp 26960 2014-10-05 11:20:02Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,7 +56,7 @@ typedef GUIList GUIBridgeList; ///< List of bridges, used in #B * @param p1 packed start tile coords (~ dx) * @param p2 various bitstuffed elements * - p2 = (bit 0- 7) - bridge type (hi bh) - * - p2 = (bit 8-11) - rail type or road types. + * - p2 = (bit 8-13) - rail type or road types. * - p2 = (bit 15-16) - transport type. */ void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2) diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp index 9330fd0821..b738895065 100644 --- a/src/bridge_map.cpp +++ b/src/bridge_map.cpp @@ -1,4 +1,4 @@ -/* $Id: bridge_map.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,7 +56,7 @@ TileIndex GetSouthernBridgeEnd(TileIndex t) /** * Starting at one bridge end finds the other bridge end - * @param t the bridge ramp tile to find the other bridge ramp for + * @param tile the bridge ramp tile to find the other bridge ramp for */ TileIndex GetOtherBridgeEnd(TileIndex tile) { @@ -66,7 +66,7 @@ TileIndex GetOtherBridgeEnd(TileIndex tile) /** * Get the height ('z') of a bridge. - * @param tile the bridge ramp tile to get the bridge height from + * @param t the bridge ramp tile to get the bridge height from * @return the height of the bridge. */ int GetBridgeHeight(TileIndex t) diff --git a/src/bridge_map.h b/src/bridge_map.h index 3b272f3551..75b20498d1 100644 --- a/src/bridge_map.h +++ b/src/bridge_map.h @@ -1,4 +1,4 @@ -/* $Id: bridge_map.h 26879 2014-09-21 11:24:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -131,11 +131,12 @@ static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, D SetTileType(t, MP_TUNNELBRIDGE); SetTileOwner(t, o); _m[t].m2 = 0; - _m[t].m3 = rt; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = 1 << 7 | tt << 2 | d; SB(_me[t].m6, 2, 4, bridgetype); _me[t].m7 = 0; + _me[t].m8 = rt; } /** diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index e2cfc3e25b..3b68e22139 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: build_vehicle_gui.cpp 27799 2017-03-18 20:46:15Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -524,7 +524,7 @@ const StringID _engine_sort_listing[][12] = {{ static bool CDECL CargoFilter(const EngineID *eid, const CargoID cid) { if (cid == CF_ANY) return true; - uint32 refit_mask = GetUnionOfArticulatedRefitMasks(*eid, true) & _standard_cargo_mask; + CargoTypes refit_mask = GetUnionOfArticulatedRefitMasks(*eid, true) & _standard_cargo_mask; return (cid == CF_NONE ? refit_mask == 0 : HasBit(refit_mask, cid)); } @@ -535,7 +535,7 @@ static GUIEngineList::FilterFunction * const _filter_funcs[] = { static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine) { CargoArray cap; - uint32 refits; + CargoTypes refits; GetArticulatedVehicleCargoesAndRefits(engine, &cap, &refits); for (CargoID c = 0; c < NUM_CARGO; c++) { @@ -1070,7 +1070,7 @@ struct BuildVehicleWindow : Window { * This could also be useful for eyecandy vehicles of other types, but is likely too confusing for joe, */ if (this->vehicle_type == VEH_TRAIN) { this->cargo_filter[filter_items] = CF_NONE; - this->cargo_filter_texts[filter_items] = STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE; + this->cargo_filter_texts[filter_items] = STR_PURCHASE_INFO_NONE; filter_items++; } diff --git a/src/cargo_type.h b/src/cargo_type.h index e9a004666d..79d1c84f46 100644 --- a/src/cargo_type.h +++ b/src/cargo_type.h @@ -1,4 +1,4 @@ -/* $Id: cargo_type.h 23826 2012-01-20 20:18:19Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -22,7 +22,7 @@ typedef byte CargoID; /** Available types of cargo */ -enum CargoTypes { +enum CargoType { /* Temperate */ CT_PASSENGERS = 0, CT_COAL = 1, @@ -63,13 +63,22 @@ enum CargoTypes { CT_PLASTIC = 10, CT_FIZZY_DRINKS = 11, - NUM_CARGO = 32, ///< Maximal number of cargo types in a game. + NUM_CARGO = 64, ///< Maximal number of cargo types in a game. CT_AUTO_REFIT = 0xFD, ///< Automatically choose cargo type when doing auto refitting. CT_NO_REFIT = 0xFE, ///< Do not refit cargo of a vehicle (used in vehicle orders and auto-replace/auto-new). CT_INVALID = 0xFF, ///< Invalid cargo type. }; +/** Test whether cargo type is not CT_INVALID */ +inline bool IsCargoTypeValid(CargoType t) { return t != CT_INVALID; } +/** Test whether cargo type is not CT_INVALID */ +inline bool IsCargoIDValid(CargoID t) { return t != CT_INVALID; } + +typedef uint64 CargoTypes; + +static const CargoTypes ALL_CARGOTYPES = (CargoTypes)UINT64_MAX; + /** Class for storing amounts of cargo */ struct CargoArray { private: diff --git a/src/cargoaction.cpp b/src/cargoaction.cpp index 3f608dd02d..96ddc3708e 100644 --- a/src/cargoaction.cpp +++ b/src/cargoaction.cpp @@ -1,4 +1,4 @@ -/* $Id: cargoaction.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cargoaction.h b/src/cargoaction.h index bac569d996..0311efcae1 100644 --- a/src/cargoaction.h +++ b/src/cargoaction.h @@ -1,4 +1,4 @@ -/* $Id: cargoaction.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cargomonitor.cpp b/src/cargomonitor.cpp index aad1c4de3c..b1d52d6b18 100644 --- a/src/cargomonitor.cpp +++ b/src/cargomonitor.cpp @@ -1,4 +1,4 @@ -/* $Id: cargomonitor.cpp 26685 2014-07-12 17:04:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cargomonitor.h b/src/cargomonitor.h index f292ba993e..e74f717e05 100644 --- a/src/cargomonitor.h +++ b/src/cargomonitor.h @@ -1,4 +1,4 @@ -/* $Id: cargomonitor.h 26685 2014-07-12 17:04:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -45,11 +45,14 @@ enum CargoCompanyBits { CCB_IS_INDUSTRY_BIT = 16, ///< Bit indicating the town/industry number is an industry. CCB_IS_INDUSTRY_BIT_VALUE = 1ul << CCB_IS_INDUSTRY_BIT, ///< Value of the #CCB_IS_INDUSTRY_BIT bit. CCB_CARGO_TYPE_START = 19, ///< Start bit of the cargo type field. - CCB_CARGO_TYPE_LENGTH = 5, ///< Number of bits of the cargo type field. - CCB_COMPANY_START = 24, ///< Start bit of the company field. - CCB_COMPANY_LENGTH = 8, ///< Number of bits of the company field. + CCB_CARGO_TYPE_LENGTH = 6, ///< Number of bits of the cargo type field. + CCB_COMPANY_START = 25, ///< Start bit of the company field. + CCB_COMPANY_LENGTH = 4, ///< Number of bits of the company field. }; +assert_compile(NUM_CARGO <= (1 << CCB_CARGO_TYPE_LENGTH)); +assert_compile(MAX_COMPANIES <= (1 << CCB_COMPANY_LENGTH)); + /** * Encode a cargo monitor for pickup or delivery at an industry. @@ -61,6 +64,7 @@ enum CargoCompanyBits { static inline CargoMonitorID EncodeCargoIndustryMonitor(CompanyID company, CargoID ctype, IndustryID ind) { assert(ctype < (1 << CCB_CARGO_TYPE_LENGTH)); + assert(company < (1 << CCB_COMPANY_LENGTH)); uint32 ret = 0; SB(ret, CCB_TOWN_IND_NUMBER_START, CCB_TOWN_IND_NUMBER_LENGTH, ind); @@ -80,6 +84,7 @@ static inline CargoMonitorID EncodeCargoIndustryMonitor(CompanyID company, Cargo static inline CargoMonitorID EncodeCargoTownMonitor(CompanyID company, CargoID ctype, TownID town) { assert(ctype < (1 << CCB_CARGO_TYPE_LENGTH)); + assert(company < (1 << CCB_COMPANY_LENGTH)); uint32 ret = 0; SB(ret, CCB_TOWN_IND_NUMBER_START, CCB_TOWN_IND_NUMBER_LENGTH, town); diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index 3fdeee40eb..9e699d6f42 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -1,4 +1,4 @@ -/* $Id: cargopacket.cpp 26575 2014-05-11 12:49:51Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -602,7 +602,7 @@ uint VehicleCargoList::ReassignIsValid()) #define FOR_ALL_CARGOSPECS(var) FOR_ALL_CARGOSPECS_FROM(var, 0) -#define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, uint, cargo_bits) +#define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, CargoTypes, cargo_bits) /** * Loop header for iterating over cargoes, sorted by name. This includes phony cargoes like regearing cargoes. diff --git a/src/cheat.cpp b/src/cheat.cpp index 36ae3b4fc1..8b300c9668 100644 --- a/src/cheat.cpp +++ b/src/cheat.cpp @@ -1,4 +1,4 @@ -/* $Id: cheat.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cheat_func.h b/src/cheat_func.h index 690853ee81..e774abc686 100644 --- a/src/cheat_func.h +++ b/src/cheat_func.h @@ -1,4 +1,4 @@ -/* $Id: cheat_func.h 21844 2011-01-18 22:17:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 5f9c0b7be5..fda2b246e4 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: cheat_gui.cpp 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cheat_type.h b/src/cheat_type.h index 3fbef096eb..a75acf35e3 100644 --- a/src/cheat_type.h +++ b/src/cheat_type.h @@ -1,4 +1,4 @@ -/* $Id: cheat_type.h 26887 2014-09-21 12:39:24Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 30b9862313..c4aeb3a52e 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: clear_cmd.cpp 27657 2016-10-02 13:41:56Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -208,16 +208,19 @@ static void TileLoopClearAlps(TileIndex tile) } /** - * Tests if at least one surrounding tile is desert + * Tests if at least one surrounding tile is non-desert * @param tile tile to check - * @return does this tile have at least one desert tile around? + * @return does this tile have at least one non-desert tile around? */ -static inline bool NeighbourIsDesert(TileIndex tile) +static inline bool NeighbourIsNormal(TileIndex tile) { - return GetTropicZone(tile + TileDiffXY( 1, 0)) == TROPICZONE_DESERT || - GetTropicZone(tile + TileDiffXY( -1, 0)) == TROPICZONE_DESERT || - GetTropicZone(tile + TileDiffXY( 0, 1)) == TROPICZONE_DESERT || - GetTropicZone(tile + TileDiffXY( 0, -1)) == TROPICZONE_DESERT; + for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { + TileIndex t = tile + TileOffsByDiagDir(dir); + if (!IsValidTile(t)) continue; + if (GetTropicZone(t) != TROPICZONE_DESERT) return true; + if (HasTileWaterClass(t) && GetWaterClass(t) == WATER_CLASS_SEA) return true; + } + return false; } static void TileLoopClearDesert(TileIndex tile) @@ -229,9 +232,7 @@ static void TileLoopClearDesert(TileIndex tile) /* Expected desert level - 0 if it shouldn't be desert */ uint expected = 0; if (GetTropicZone(tile) == TROPICZONE_DESERT) { - expected = 3; - } else if (NeighbourIsDesert(tile)) { - expected = 1; + expected = NeighbourIsNormal(tile) ? 1 : 3; } if (current == expected) return; diff --git a/src/clear_func.h b/src/clear_func.h index d8abc40c0c..b128288d1b 100644 --- a/src/clear_func.h +++ b/src/clear_func.h @@ -1,4 +1,4 @@ -/* $Id: clear_func.h 23168 2011-11-08 19:48:47Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/clear_map.h b/src/clear_map.h index ea200d39e8..d24916de35 100644 --- a/src/clear_map.h +++ b/src/clear_map.h @@ -1,4 +1,4 @@ -/* $Id: clear_map.h 27037 2014-10-23 17:13:44Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -269,6 +269,7 @@ static inline void MakeClear(TileIndex t, ClearGround g, uint density) SetClearGroundDensity(t, g, density); // Sets m5 _me[t].m6 = 0; _me[t].m7 = 0; + _me[t].m8 = 0; } @@ -289,6 +290,7 @@ static inline void MakeField(TileIndex t, uint field_type, IndustryID industry) SetClearGroundDensity(t, CLEAR_FIELDS, 3); SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = 0; } /** diff --git a/src/cmd_helper.h b/src/cmd_helper.h index d17b59221b..569708dfc5 100644 --- a/src/cmd_helper.h +++ b/src/cmd_helper.h @@ -1,4 +1,4 @@ -/* $Id: cmd_helper.h 23742 2012-01-03 21:58:26Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/command.cpp b/src/command.cpp index 1487aa8aec..31af7aaa37 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1,4 +1,4 @@ -/* $Id: command.cpp 26802 2014-09-07 16:12:58Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -171,6 +171,7 @@ CommandProc CmdSetStoryPageDate; CommandProc CmdShowStoryPage; CommandProc CmdRemoveStoryPage; CommandProc CmdRemoveStoryPageElement; +CommandProc CmdScrollViewport; CommandProc CmdLevelLand; @@ -193,6 +194,7 @@ CommandProc CmdAddVehicleGroup; CommandProc CmdAddSharedVehicleGroup; CommandProc CmdRemoveAllVehiclesGroup; CommandProc CmdSetGroupReplaceProtection; +CommandProc CmdSetGroupLivery; CommandProc CmdMoveOrder; CommandProc CmdChangeTimetable; @@ -285,7 +287,7 @@ static const Command _command_proc_table[] = { DEF_CMD(CmdTurnRoadVeh, 0, CMDT_VEHICLE_MANAGEMENT ), // CMD_TURN_ROADVEH - DEF_CMD(CmdPause, CMD_SERVER, CMDT_SERVER_SETTING ), // CMD_PAUSE + DEF_CMD(CmdPause, CMD_SERVER | CMD_NO_EST, CMDT_SERVER_SETTING ), // CMD_PAUSE DEF_CMD(CmdBuyShareInCompany, 0, CMDT_MONEY_MANAGEMENT ), // CMD_BUY_SHARE_IN_COMPANY DEF_CMD(CmdSellShareInCompany, 0, CMDT_MONEY_MANAGEMENT ), // CMD_SELL_SHARE_IN_COMPANY @@ -309,7 +311,7 @@ static const Command _command_proc_table[] = { DEF_CMD(CmdChangeBankBalance, CMD_DEITY, CMDT_MONEY_MANAGEMENT ), // CMD_CHANGE_BANK_BALANCE DEF_CMD(CmdBuildCanal, CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_CANAL DEF_CMD(CmdCreateSubsidy, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_CREATE_SUBSIDY - DEF_CMD(CmdCompanyCtrl, CMD_SPECTATOR | CMD_CLIENT_ID, CMDT_SERVER_SETTING ), // CMD_COMPANY_CTRL + DEF_CMD(CmdCompanyCtrl, CMD_SPECTATOR | CMD_CLIENT_ID | CMD_NO_EST, CMDT_SERVER_SETTING ), // CMD_COMPANY_CTRL DEF_CMD(CmdCustomNewsItem, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_CUSTOM_NEWS_ITEM DEF_CMD(CmdCreateGoal, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_CREATE_GOAL DEF_CMD(CmdRemoveGoal, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_GOAL @@ -326,6 +328,7 @@ static const Command _command_proc_table[] = { DEF_CMD(CmdShowStoryPage, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_SHOW_STORY_PAGE DEF_CMD(CmdRemoveStoryPage, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_PAGE DEF_CMD(CmdRemoveStoryPageElement, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_ELEMENT_PAGE + DEF_CMD(CmdScrollViewport, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_SCROLL_VIEWPORT DEF_CMD(CmdLevelLand, CMD_ALL_TILES | CMD_NO_TEST | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_LEVEL_LAND; test run might clear tiles multiple times, in execution that only happens once @@ -351,6 +354,7 @@ static const Command _command_proc_table[] = { DEF_CMD(CmdAddSharedVehicleGroup, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_ADD_SHARE_VEHICLE_GROUP DEF_CMD(CmdRemoveAllVehiclesGroup, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_REMOVE_ALL_VEHICLES_GROUP DEF_CMD(CmdSetGroupReplaceProtection, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_SET_GROUP_REPLACE_PROTECTION + DEF_CMD(CmdSetGroupLivery, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_SET_GROUP_LIVERY DEF_CMD(CmdMoveOrder, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_MOVE_ORDER DEF_CMD(CmdChangeTimetable, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_CHANGE_TIMETABLE DEF_CMD(CmdSetVehicleOnTime, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_SET_VEHICLE_ON_TIME @@ -551,22 +555,15 @@ bool DoCommandP(const CommandContainer *container, bool my_cmd) bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd) { /* Cost estimation is generally only done when the - * local user presses shift while constructing somthing. - * However, in case of incoming network commands or - * map generation we do want to execute. */ - bool estimate_only = false; - if (!(cmd & CMD_NO_ESTIMATE)) { - switch (_command_proc_table[cmd & CMD_ID_MASK].type) { - case CMDT_LANDSCAPE_CONSTRUCTION: - case CMDT_VEHICLE_CONSTRUCTION: - estimate_only = _shift_pressed && IsLocalCompany() && - !_generating_world && !(cmd & CMD_NETWORK_COMMAND); - break; - default: - break; // just to silence warnings - } - } - cmd &= ~CMD_NO_ESTIMATE; + * local user presses shift while doing somthing. + * However, in case of incoming network commands, + * map generation or the pause button we do want + * to execute. */ + bool estimate_only = _shift_pressed && IsLocalCompany() && + !_generating_world && + !(cmd & CMD_NETWORK_COMMAND) && + !(GetCommandFlags(cmd) & CMD_NO_EST) && + !(cmd & CMD_NO_ESTIMATE); /* We're only sending the command, so don't do * fancy things for 'success'. */ @@ -615,7 +612,6 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac /** * Helper to deduplicate the code for returning. * @param cmd the command cost to return. - * @param clear whether to keep the storage changes or not. */ #define return_dcpi(cmd) { _docommand_recursive = 0; return cmd; } diff --git a/src/command_func.h b/src/command_func.h index c7066cbc4f..3369475675 100644 --- a/src/command_func.h +++ b/src/command_func.h @@ -1,4 +1,4 @@ -/* $Id: command_func.h 27571 2016-05-22 10:07:48Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/command_type.h b/src/command_type.h index 281d821f17..ef0bce745e 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -1,4 +1,4 @@ -/* $Id: command_type.h 26802 2014-09-07 16:12:58Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -293,6 +293,8 @@ enum Commands { CMD_SHOW_STORY_PAGE, ///< show a story page CMD_REMOVE_STORY_PAGE, ///< remove a story page CMD_REMOVE_STORY_PAGE_ELEMENT, ///< remove a story page element + CMD_SCROLL_VIEWPORT, ///< scroll main viewport of players + CMD_LEVEL_LAND, ///< level land CMD_BUILD_LOCK, ///< build a lock @@ -320,6 +322,7 @@ enum Commands { CMD_ADD_SHARED_VEHICLE_GROUP, ///< add all other shared vehicles to a group which are missing CMD_REMOVE_ALL_VEHICLES_GROUP, ///< remove all vehicles from a group CMD_SET_GROUP_REPLACE_PROTECTION, ///< set the autoreplace-protection for a group + CMD_SET_GROUP_LIVERY, ///< set the livery for a group CMD_MOVE_ORDER, ///< move an order CMD_CHANGE_TIMETABLE, ///< change the timetable for a vehicle @@ -393,6 +396,7 @@ enum CommandFlags { CMD_CLIENT_ID = 0x080, ///< set p2 with the ClientID of the sending client. CMD_DEITY = 0x100, ///< the command may be executed by COMPANY_DEITY CMD_STR_CTRL = 0x200, ///< the command's string may contain control strings + CMD_NO_EST = 0x400, ///< the command is never estimated. }; DECLARE_ENUM_AS_BIT_SET(CommandFlags) diff --git a/src/company_base.h b/src/company_base.h index 4911e6faa9..30f5520ce9 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -1,4 +1,4 @@ -/* $Id: company_base.h 27757 2017-02-26 19:41:14Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -69,8 +69,6 @@ struct CompanyProperties { byte colour; ///< Company colour. - RailTypes avail_railtypes; ///< Rail types available to the company. - byte block_preview; ///< Number of quarters that the company is not allowed to get new exclusive engine previews (see CompaniesGenStatistics). TileIndex location_of_HQ; ///< Northern tile of HQ; #INVALID_TILE when there is none. @@ -95,12 +93,18 @@ struct CompanyProperties { */ bool is_ai; - Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #Expenses category. + Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #ExpensesType category. CompanyEconomyEntry cur_economy; ///< Economic data of the company of this quarter. CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters. byte num_valid_stat_ent; ///< Number of valid statistical entries in #old_economy. - CompanyProperties() : name(NULL), president_name(NULL) {} + // TODO: Change some of these member variables to use relevant INVALID_xxx constants + CompanyProperties() + : name_2(0), name_1(0), name(NULL), president_name_1(0), president_name_2(0), president_name(NULL), + face(0), money(0), money_fraction(0), current_loan(0), colour(0), block_preview(0), + location_of_HQ(0), last_build_coordinate(0), share_owners(), inaugurated_year(0), + months_of_bankruptcy(0), bankrupt_asked(0), bankrupt_timeout(0), bankrupt_value(0), + terraform_limit(0), clear_limit(0), tree_limit(0), is_ai(false) {} ~CompanyProperties() { @@ -114,6 +118,7 @@ struct Company : CompanyPool::PoolItem<&_company_pool>, CompanyProperties { ~Company(); Livery livery[LS_END]; + RailTypes avail_railtypes; ///< Rail types available to this company. RoadTypes avail_roadtypes; ///< Road types available to this company. class AIInstance *ai_instance; diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 78005adf4b..29421b2061 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: company_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -193,7 +193,7 @@ void InvalidateCompanyWindows(const Company *company) /** * Verify whether the company can pay the bill. - * @param cost [inout] Money to pay, is changed to an error if the company does not have enough money. + * @param[in,out] cost Money to pay, is changed to an error if the company does not have enough money. * @return Function returns \c true if the company has enough money, else it returns \c false. */ bool CheckCompanyHasMoney(CommandCost &cost) @@ -522,10 +522,19 @@ restart:; void ResetCompanyLivery(Company *c) { for (LiveryScheme scheme = LS_BEGIN; scheme < LS_END; scheme++) { - c->livery[scheme].in_use = false; + c->livery[scheme].in_use = 0; c->livery[scheme].colour1 = c->colour; c->livery[scheme].colour2 = c->colour; } + + Group *g; + FOR_ALL_GROUPS(g) { + if (g->owner == c->index) { + g->livery.in_use = 0; + g->livery.colour1 = c->colour; + g->livery.colour2 = c->colour; + } + } } /** @@ -605,10 +614,10 @@ void StartupCompanies() } /** Start a new competitor company if possible. */ -static void MaybeStartNewCompany() +static bool MaybeStartNewCompany() { #ifdef ENABLE_NETWORK - if (_networking && Company::GetNumItems() >= _settings_client.network.max_companies) return; + if (_networking && Company::GetNumItems() >= _settings_client.network.max_companies) return false; #endif /* ENABLE_NETWORK */ Company *c; @@ -622,8 +631,10 @@ static void MaybeStartNewCompany() if (n < (uint)_settings_game.difficulty.max_no_competitors) { /* Send a command to all clients to start up a new AI. * Works fine for Multiplayer and Singleplayer */ - DoCommandP(0, 1 | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL); + return DoCommandP(0, CCA_NEW_AI | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL); } + + return false; } /** Initialize the pool of companies. */ @@ -724,11 +735,19 @@ void OnTick_Companies() } if (_next_competitor_start == 0) { - _next_competitor_start = AI::GetStartNextTime() * DAY_TICKS; + /* AI::GetStartNextTime() can return 0. */ + _next_competitor_start = max(1, AI::GetStartNextTime() * DAY_TICKS); } - if (AI::CanStartNew() && _game_mode != GM_MENU && --_next_competitor_start == 0) { - MaybeStartNewCompany(); + if (_game_mode != GM_MENU && AI::CanStartNew() && --_next_competitor_start == 0) { + /* Allow multiple AIs to possibly start in the same tick. */ + do { + if (!MaybeStartNewCompany()) break; + + /* In networking mode, we can only send a command to start but it + * didn't execute yet, so we cannot loop. */ + if (_networking) break; + } while (AI::GetStartNextTime() == 0); } _cur_company_tick_index = (_cur_company_tick_index + 1) % MAX_COMPANIES; @@ -814,10 +833,7 @@ void CompanyAdminRemove(CompanyID company_id, CompanyRemoveReason reason) * @param tile unused * @param flags operation to perform * @param p1 various functionality - * - bits 0..15: - * = 0 - create a new company - * = 1 - create a new AI company - * = 2 - delete a company + * - bits 0..15: CompanyCtrlAction * - bits 16..24: CompanyID * @param p2 ClientID * @param text unused @@ -831,8 +847,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 ClientID client_id = (ClientID)p2; #endif /* ENABLE_NETWORK */ - switch (GB(p1, 0, 16)) { - case 0: { // Create a new company + switch ((CompanyCtrlAction)GB(p1, 0, 16)) { + case CCA_NEW: { // Create a new company /* This command is only executed in a multiplayer game */ if (!_networking) return CMD_ERROR; @@ -882,7 +898,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 break; } - case 1: { // Make a new AI company + case CCA_NEW_AI: { // Make a new AI company if (!(flags & DC_EXEC)) return CommandCost(); if (company_id != INVALID_COMPANY && (company_id >= MAX_COMPANIES || Company::IsValidID(company_id))) return CMD_ERROR; @@ -893,7 +909,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 break; } - case 2: { // Delete a company + case CCA_DELETE: { // Delete a company CompanyRemoveReason reason = (CompanyRemoveReason)GB(p2, 0, 2); if (reason >= CRR_END) return CMD_ERROR; @@ -965,23 +981,26 @@ CommandCost CmdSetCompanyManagerFace(TileIndex tile, DoCommandFlag flags, uint32 * @param flags operation to perform * @param p1 bitstuffed: * p1 bits 0-7 scheme to set - * p1 bits 8-9 set in use state or first/second colour + * p1 bit 8 set first/second colour * @param p2 new colour for vehicles, property, etc. * @param text unused * @return the cost of this operation or an error */ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { - Colours colour = Extract(p2); + Colours colour = Extract(p2); LiveryScheme scheme = Extract(p1); - byte state = GB(p1, 8, 2); + bool second = HasBit(p1, 8); - if (scheme >= LS_END || state >= 3 || colour == INVALID_COLOUR) return CMD_ERROR; + if (scheme >= LS_END || (colour >= COLOUR_END && colour != INVALID_COLOUR)) return CMD_ERROR; + + /* Default scheme can't be reset to invalid. */ + if (scheme == LS_DEFAULT && colour == INVALID_COLOUR) return CMD_ERROR; Company *c = Company::Get(_current_company); /* Ensure no two companies have the same primary colour */ - if (scheme == LS_DEFAULT && state == 0) { + if (scheme == LS_DEFAULT && !second) { const Company *cc; FOR_ALL_COMPANIES(cc) { if (cc != c && cc->colour == colour) return CMD_ERROR; @@ -989,52 +1008,48 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, } if (flags & DC_EXEC) { - switch (state) { - case 0: - c->livery[scheme].colour1 = colour; + if (!second) { + if (scheme != LS_DEFAULT) SB(c->livery[scheme].in_use, 0, 1, colour != INVALID_COLOUR); + if (colour == INVALID_COLOUR) colour = (Colours)c->livery[LS_DEFAULT].colour1; + c->livery[scheme].colour1 = colour; - /* If setting the first colour of the default scheme, adjust the - * original and cached company colours too. */ - if (scheme == LS_DEFAULT) { - _company_colours[_current_company] = colour; - c->colour = colour; - CompanyAdminUpdate(c); + /* If setting the first colour of the default scheme, adjust the + * original and cached company colours too. */ + if (scheme == LS_DEFAULT) { + for (int i = 1; i < LS_END; i++) { + if (!HasBit(c->livery[i].in_use, 0)) c->livery[i].colour1 = colour; } - break; + _company_colours[_current_company] = colour; + c->colour = colour; + CompanyAdminUpdate(c); + } + } else { + if (scheme != LS_DEFAULT) SB(c->livery[scheme].in_use, 1, 1, colour != INVALID_COLOUR); + if (colour == INVALID_COLOUR) colour = (Colours)c->livery[LS_DEFAULT].colour2; + c->livery[scheme].colour2 = colour; - case 1: - c->livery[scheme].colour2 = colour; - break; + if (scheme == LS_DEFAULT) { + for (int i = 1; i < LS_END; i++) { + if (!HasBit(c->livery[i].in_use, 1)) c->livery[i].colour2 = colour; + } + } + } - case 2: - c->livery[scheme].in_use = colour != 0; - - /* Now handle setting the default scheme's in_use flag. - * This is different to the other schemes, as it signifies if any - * scheme is active at all. If this flag is not set, then no - * processing of vehicle types occurs at all, and only the default - * colours will be used. */ - - /* If enabling a scheme, set the default scheme to be in use too */ - if (colour != 0) { - c->livery[LS_DEFAULT].in_use = true; + if (c->livery[scheme].in_use != 0) { + /* If enabling a scheme, set the default scheme to be in use too */ + c->livery[LS_DEFAULT].in_use = 1; + } else { + /* Else loop through all schemes to see if any are left enabled. + * If not, disable the default scheme too. */ + c->livery[LS_DEFAULT].in_use = 0; + for (scheme = LS_DEFAULT; scheme < LS_END; scheme++) { + if (c->livery[scheme].in_use != 0) { + c->livery[LS_DEFAULT].in_use = 1; break; } - - /* Else loop through all schemes to see if any are left enabled. - * If not, disable the default scheme too. */ - c->livery[LS_DEFAULT].in_use = false; - for (scheme = LS_DEFAULT; scheme < LS_END; scheme++) { - if (c->livery[scheme].in_use) { - c->livery[LS_DEFAULT].in_use = true; - break; - } - } - break; - - default: - break; + } } + ResetVehicleColourMap(); MarkWholeScreenDirty(); diff --git a/src/company_func.h b/src/company_func.h index 2af836a4fd..128bd5916e 100644 --- a/src/company_func.h +++ b/src/company_func.h @@ -1,4 +1,4 @@ -/* $Id: company_func.h 24996 2013-02-14 17:08:56Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 4d4034a104..c66068a854 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: company_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -36,6 +36,7 @@ #include "water.h" #include "station_func.h" #include "zoom_func.h" +#include "sortlist_type.h" #include "widgets/company_widget.h" @@ -268,10 +269,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = { EndContainer(), }; -/** - * Window class displaying the company finances. - * @todo #money_width should be calculated dynamically. - */ +/** Window class displaying the company finances. */ struct CompanyFinancesWindow : Window { static Money max_money; ///< The maximum amount of money a company has had this 'run' bool small; ///< Window is toggled to 'small'. @@ -525,7 +523,7 @@ public: StringID String() const { - return _colour_dropdown[this->result]; + return this->result >= COLOUR_END ? STR_COLOUR_DEFAULT : _colour_dropdown[this->result]; } uint Height(uint width) const @@ -544,7 +542,7 @@ public: int height = bottom - top; int icon_y_offset = height / 2; int text_y_offset = (height - FONT_HEIGHT_NORMAL) / 2 + 1; - DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + this->result, + DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + (this->result % COLOUR_END), rtl ? right - 2 - ScaleGUITrad(14) : left + ScaleGUITrad(14) + 2, top + icon_y_offset); DrawString(rtl ? left + 2 : left + ScaleGUITrad(28) + 4, @@ -553,60 +551,197 @@ public: } }; +static const int LEVEL_WIDTH = 10; ///< Indenting width of a sub-group in pixels + +typedef GUIList GUIGroupList; + /** Company livery colour scheme window. */ struct SelectCompanyLiveryWindow : public Window { private: uint32 sel; LiveryClass livery_class; Dimension square; - Dimension box; + uint rows; uint line_height; + GUIGroupList groups; + SmallVector indents; + Scrollbar *vscroll; void ShowColourDropDownMenu(uint32 widget) { uint32 used_colours = 0; - const Livery *livery; - LiveryScheme scheme; + const Company *c; + const Livery *livery, *default_livery = NULL; + bool primary = widget == WID_SCL_PRI_COL_DROPDOWN; + byte default_col; /* Disallow other company colours for the primary colour */ - if (HasBit(this->sel, LS_DEFAULT) && widget == WID_SCL_PRI_COL_DROPDOWN) { - const Company *c; + if (this->livery_class < LC_GROUP_RAIL && HasBit(this->sel, LS_DEFAULT) && primary) { FOR_ALL_COMPANIES(c) { if (c->index != _local_company) SetBit(used_colours, c->colour); } } - /* Get the first selected livery to use as the default dropdown item */ - for (scheme = LS_BEGIN; scheme < LS_END; scheme++) { - if (HasBit(this->sel, scheme)) break; + c = Company::Get((CompanyID)this->window_number); + + if (this->livery_class < LC_GROUP_RAIL) { + /* Get the first selected livery to use as the default dropdown item */ + LiveryScheme scheme; + for (scheme = LS_BEGIN; scheme < LS_END; scheme++) { + if (HasBit(this->sel, scheme)) break; + } + if (scheme == LS_END) scheme = LS_DEFAULT; + livery = &c->livery[scheme]; + if (scheme != LS_DEFAULT) default_livery = &c->livery[LS_DEFAULT]; + } else { + const Group *g = Group::Get(this->sel); + livery = &g->livery; + if (g->parent == INVALID_GROUP) { + default_livery = &c->livery[LS_DEFAULT]; + } else { + const Group *pg = Group::Get(g->parent); + default_livery = &pg->livery; + } } - if (scheme == LS_END) scheme = LS_DEFAULT; - livery = &Company::Get((CompanyID)this->window_number)->livery[scheme]; DropDownList *list = new DropDownList(); + if (default_livery != NULL) { + /* Add COLOUR_END to put the colour out of range, but also allow us to show what the default is */ + default_col = (primary ? default_livery->colour1 : default_livery->colour2) + COLOUR_END; + *list->Append() = new DropDownListColourItem(default_col, false); + } for (uint i = 0; i < lengthof(_colour_dropdown); i++) { *list->Append() = new DropDownListColourItem(i, HasBit(used_colours, i)); } - ShowDropDownList(this, list, widget == WID_SCL_PRI_COL_DROPDOWN ? livery->colour1 : livery->colour2, widget); + byte sel = (default_livery == NULL || HasBit(livery->in_use, primary ? 0 : 1)) ? (primary ? livery->colour1 : livery->colour2) : default_col; + ShowDropDownList(this, list, sel, widget); + } + + static int CDECL GroupNameSorter(const Group * const *a, const Group * const *b) + { + static const Group *last_group[2] = { NULL, NULL }; + static char last_name[2][64] = { "", "" }; + + if (*a != last_group[0]) { + last_group[0] = *a; + SetDParam(0, (*a)->index); + GetString(last_name[0], STR_GROUP_NAME, lastof(last_name[0])); + } + + if (*b != last_group[1]) { + last_group[1] = *b; + SetDParam(0, (*b)->index); + GetString(last_name[1], STR_GROUP_NAME, lastof(last_name[1])); + } + + int r = strnatcmp(last_name[0], last_name[1]); // Sort by name (natural sorting). + if (r == 0) return (*a)->index - (*b)->index; + return r; + } + + void AddChildren(GUIGroupList *source, GroupID parent, int indent) + { + for (const Group **g = source->Begin(); g != source->End(); g++) { + if ((*g)->parent != parent) continue; + *this->groups.Append() = *g; + *this->indents.Append() = indent; + AddChildren(source, (*g)->index, indent + 1); + } + } + + void BuildGroupList(CompanyID owner) + { + if (!this->groups.NeedRebuild()) return; + + this->groups.Clear(); + this->indents.Clear(); + + if (this->livery_class >= LC_GROUP_RAIL) { + GUIGroupList list; + VehicleType vtype = (VehicleType)(this->livery_class - LC_GROUP_RAIL); + + const Group *g; + FOR_ALL_GROUPS(g) { + if (g->owner == owner && g->vehicle_type == vtype) { + *list.Append() = g; + } + } + + list.ForceResort(); + list.Sort(&GroupNameSorter); + + AddChildren(&list, INVALID_GROUP, 0); + } + + this->groups.Compact(); + this->groups.RebuildDone(); + } + + void SetRows() + { + if (this->livery_class < LC_GROUP_RAIL) { + this->rows = 0; + for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { + if (_livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme)) { + this->rows++; + } + } + } else { + this->rows = this->groups.Length(); + } + + this->vscroll->SetCount(this->rows); } public: - SelectCompanyLiveryWindow(WindowDesc *desc, CompanyID company) : Window(desc) + SelectCompanyLiveryWindow(WindowDesc *desc, CompanyID company, GroupID group) : Window(desc) { - this->livery_class = LC_OTHER; - this->sel = 1; + this->CreateNestedTree(); + this->vscroll = this->GetScrollbar(WID_SCL_MATRIX_SCROLLBAR); - this->square = GetSpriteSize(SPR_SQUARE); - this->box = maxdim(GetSpriteSize(SPR_BOX_CHECKED), GetSpriteSize(SPR_BOX_EMPTY)); - this->line_height = max(max(this->square.height, this->box.height), (uint)FONT_HEIGHT_NORMAL) + 4; + if (group == INVALID_GROUP) { + this->livery_class = LC_OTHER; + this->sel = 1; + this->LowerWidget(WID_SCL_CLASS_GENERAL); + this->BuildGroupList(company); + this->SetRows(); + } else { + this->SetSelectedGroup(group); + } - this->InitNested(company); + this->FinishInitNested(company); this->owner = company; - this->LowerWidget(WID_SCL_CLASS_GENERAL); this->InvalidateData(1); } + void SetSelectedGroup(GroupID group) + { + this->RaiseWidget(this->livery_class + WID_SCL_CLASS_GENERAL); + const Group *g = Group::Get(group); + switch (g->vehicle_type) { + case VEH_TRAIN: this->livery_class = LC_GROUP_RAIL; break; + case VEH_ROAD: this->livery_class = LC_GROUP_ROAD; break; + case VEH_SHIP: this->livery_class = LC_GROUP_SHIP; break; + case VEH_AIRCRAFT: this->livery_class = LC_GROUP_AIRCRAFT; break; + default: NOT_REACHED(); + } + this->sel = group; + this->LowerWidget(this->livery_class + WID_SCL_CLASS_GENERAL); + + this->groups.ForceRebuild(); + this->BuildGroupList((CompanyID)this->window_number); + this->SetRows(); + + /* Position scrollbar to selected group */ + for (uint i = 0; i < this->rows; i++) { + if (this->groups[i]->index == sel) { + this->vscroll->SetPosition(Clamp(i - this->vscroll->GetCapacity() / 2, 0, max(this->vscroll->GetCount() - this->vscroll->GetCapacity(), 0))); + break; + } + } + } + virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) { switch (widget) { @@ -616,19 +751,28 @@ public: for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { d = maxdim(d, GetStringBoundingBox(STR_LIVERY_DEFAULT + scheme)); } - size->width = max(size->width, 5 + this->box.width + d.width + WD_FRAMERECT_RIGHT); + + /* And group names */ + const Group *g; + FOR_ALL_GROUPS(g) { + if (g->owner == (CompanyID)this->window_number) { + SetDParam(0, g->index); + d = maxdim(d, GetStringBoundingBox(STR_GROUP_NAME)); + } + } + + size->width = max(size->width, 5 + d.width + WD_FRAMERECT_RIGHT); break; } case WID_SCL_MATRIX: { - uint livery_height = 0; - for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { - if (_livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme)) { - livery_height++; - } - } - size->height = livery_height * this->line_height; - this->GetWidget(WID_SCL_MATRIX)->widget_data = (livery_height << MAT_ROW_START) | (1 << MAT_COL_START); + /* 11 items in the default rail class */ + this->square = GetSpriteSize(SPR_SQUARE); + this->line_height = max(this->square.height, (uint)FONT_HEIGHT_NORMAL) + 4; + + size->height = 11 * this->line_height; + resize->width = 1; + resize->height = this->line_height; break; } @@ -640,10 +784,12 @@ public: FALLTHROUGH; case WID_SCL_PRI_COL_DROPDOWN: { + this->square = GetSpriteSize(SPR_SQUARE); int padding = this->square.width + NWidgetScrollbar::GetVerticalDimension().width + 10; for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) { size->width = max(size->width, GetStringBoundingBox(*id).width + padding); } + size->width = max(size->width, GetStringBoundingBox(STR_COLOUR_DEFAULT).width + padding); break; } } @@ -651,9 +797,14 @@ public: virtual void OnPaint() { + bool local = (CompanyID)this->window_number == _local_company; + /* Disable dropdown controls if no scheme is selected */ - this->SetWidgetDisabledState(WID_SCL_PRI_COL_DROPDOWN, this->sel == 0); - this->SetWidgetDisabledState(WID_SCL_SEC_COL_DROPDOWN, this->sel == 0); + bool disabled = this->livery_class < LC_GROUP_RAIL ? (this->sel == 0) : (this->sel == INVALID_GROUP); + this->SetWidgetDisabledState(WID_SCL_PRI_COL_DROPDOWN, !local || disabled); + this->SetWidgetDisabledState(WID_SCL_SEC_COL_DROPDOWN, !local || disabled); + + this->BuildGroupList((CompanyID)this->window_number); this->DrawWidgets(); } @@ -661,18 +812,38 @@ public: virtual void SetStringParameters(int widget) const { switch (widget) { + case WID_SCL_CAPTION: + SetDParam(0, (CompanyID)this->window_number); + break; + case WID_SCL_PRI_COL_DROPDOWN: case WID_SCL_SEC_COL_DROPDOWN: { const Company *c = Company::Get((CompanyID)this->window_number); - LiveryScheme scheme = LS_DEFAULT; + bool primary = widget == WID_SCL_PRI_COL_DROPDOWN; + StringID colour = STR_COLOUR_DEFAULT; - if (this->sel != 0) { - for (scheme = LS_BEGIN; scheme < LS_END; scheme++) { - if (HasBit(this->sel, scheme)) break; + if (this->livery_class < LC_GROUP_RAIL) { + if (this->sel != 0) { + LiveryScheme scheme = LS_DEFAULT; + for (scheme = LS_BEGIN; scheme < LS_END; scheme++) { + if (HasBit(this->sel, scheme)) break; + } + if (scheme == LS_END) scheme = LS_DEFAULT; + const Livery *livery = &c->livery[scheme]; + if (scheme == LS_DEFAULT || HasBit(livery->in_use, primary ? 0 : 1)) { + colour = STR_COLOUR_DARK_BLUE + (primary ? livery->colour1 : livery->colour2); + } + } + } else { + if (this->sel != INVALID_GROUP) { + const Group *g = Group::Get(this->sel); + const Livery *livery = &g->livery; + if (HasBit(livery->in_use, primary ? 0 : 1)) { + colour = STR_COLOUR_DARK_BLUE + (primary ? livery->colour1 : livery->colour2); + } } - if (scheme == LS_END) scheme = LS_DEFAULT; } - SetDParam(0, STR_COLOUR_DARK_BLUE + ((widget == WID_SCL_PRI_COL_DROPDOWN) ? c->livery[scheme].colour1 : c->livery[scheme].colour2)); + SetDParam(0, colour); break; } } @@ -697,36 +868,47 @@ public: int sec_left = nwi->pos_x; int sec_right = sec_left + nwi->current_x - 1; - int text_left = (rtl ? (uint)WD_FRAMERECT_LEFT : (this->box.width + 5)); - int text_right = (rtl ? (this->box.width + 5) : (uint)WD_FRAMERECT_RIGHT); + int text_left = (rtl ? (uint)WD_FRAMERECT_LEFT : (this->square.width + 5)); + int text_right = (rtl ? (this->square.width + 5) : (uint)WD_FRAMERECT_RIGHT); - int box_offs = (this->line_height - this->box.height) / 2; int square_offs = (this->line_height - this->square.height) / 2 + 1; int text_offs = (this->line_height - FONT_HEIGHT_NORMAL) / 2 + 1; int y = r.top; - const Company *c = Company::Get((CompanyID)this->window_number); - for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { - if (_livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme)) { - bool sel = HasBit(this->sel, scheme) != 0; - /* Optional check box + scheme name. */ - if (scheme != LS_DEFAULT) { - DrawSprite(c->livery[scheme].in_use ? SPR_BOX_CHECKED : SPR_BOX_EMPTY, PAL_NONE, (rtl ? sch_right - (this->box.width + 5) + WD_FRAMERECT_RIGHT : sch_left) + WD_FRAMERECT_LEFT, y + box_offs); + /* Helper function to draw livery info. */ + auto draw_livery = [&](StringID str, const Livery &liv, bool sel, bool def, int indent) { + /* Livery Label. */ + DrawString(sch_left + WD_FRAMERECT_LEFT + (rtl ? 0 : indent), sch_right - WD_FRAMERECT_RIGHT - (rtl ? indent : 0), y + text_offs, str, sel ? TC_WHITE : TC_BLACK); + + /* Text below the first dropdown. */ + DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOUR(liv.colour1), (rtl ? pri_right - (this->square.width + 5) + WD_FRAMERECT_RIGHT : pri_left) + WD_FRAMERECT_LEFT, y + square_offs); + DrawString(pri_left + text_left, pri_right - text_right, y + text_offs, (def || HasBit(liv.in_use, 0)) ? STR_COLOUR_DARK_BLUE + liv.colour1 : STR_COLOUR_DEFAULT, sel ? TC_WHITE : TC_GOLD); + + /* Text below the second dropdown. */ + if (sec_right > sec_left) { // Second dropdown has non-zero size. + DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOUR(liv.colour2), (rtl ? sec_right - (this->square.width + 5) + WD_FRAMERECT_RIGHT : sec_left) + WD_FRAMERECT_LEFT, y + square_offs); + DrawString(sec_left + text_left, sec_right - text_right, y + text_offs, (def || HasBit(liv.in_use, 1)) ? STR_COLOUR_DARK_BLUE + liv.colour2 : STR_COLOUR_DEFAULT, sel ? TC_WHITE : TC_GOLD); + } + + y += this->line_height; + }; + + if (livery_class < LC_GROUP_RAIL) { + int pos = this->vscroll->GetPosition(); + const Company *c = Company::Get((CompanyID)this->window_number); + for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { + if (_livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme)) { + if (pos-- > 0) continue; + draw_livery(STR_LIVERY_DEFAULT + scheme, c->livery[scheme], HasBit(this->sel, scheme), scheme == LS_DEFAULT, 0); } - DrawString(sch_left + text_left, sch_right - text_right, y + text_offs, STR_LIVERY_DEFAULT + scheme, sel ? TC_WHITE : TC_BLACK); - - /* Text below the first dropdown. */ - DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOUR(c->livery[scheme].colour1), (rtl ? pri_right - (this->box.width + 5) + WD_FRAMERECT_RIGHT : pri_left) + WD_FRAMERECT_LEFT, y + square_offs); - DrawString(pri_left + text_left, pri_right - text_right, y + text_offs, STR_COLOUR_DARK_BLUE + c->livery[scheme].colour1, sel ? TC_WHITE : TC_GOLD); - - /* Text below the second dropdown. */ - if (sec_right > sec_left) { // Second dropdown has non-zero size. - DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOUR(c->livery[scheme].colour2), (rtl ? sec_right - (this->box.width + 5) + WD_FRAMERECT_RIGHT : sec_left) + WD_FRAMERECT_LEFT, y + square_offs); - DrawString(sec_left + text_left, sec_right - text_right, y + text_offs, STR_COLOUR_DARK_BLUE + c->livery[scheme].colour2, sel ? TC_WHITE : TC_GOLD); - } - - y += this->line_height; + } + } else { + uint max = min(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), this->groups.Length()); + for (uint i = this->vscroll->GetPosition(); i < max; ++i) { + const Group *g = this->groups[i]; + SetDParam(0, g->index); + draw_livery(STR_GROUP_NAME, g->livery, this->sel == g->index, false, this->indents[i] * LEVEL_WIDTH); } } } @@ -740,20 +922,35 @@ public: case WID_SCL_CLASS_ROAD: case WID_SCL_CLASS_SHIP: case WID_SCL_CLASS_AIRCRAFT: + case WID_SCL_GROUPS_RAIL: + case WID_SCL_GROUPS_ROAD: + case WID_SCL_GROUPS_SHIP: + case WID_SCL_GROUPS_AIRCRAFT: this->RaiseWidget(this->livery_class + WID_SCL_CLASS_GENERAL); this->livery_class = (LiveryClass)(widget - WID_SCL_CLASS_GENERAL); this->LowerWidget(this->livery_class + WID_SCL_CLASS_GENERAL); /* Select the first item in the list */ - this->sel = 0; - for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { - if (_livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme)) { - this->sel = 1 << scheme; - break; + if (this->livery_class < LC_GROUP_RAIL) { + this->sel = 0; + for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { + if (_livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme)) { + this->sel = 1 << scheme; + break; + } + } + } else { + this->sel = INVALID_GROUP; + this->groups.ForceRebuild(); + this->BuildGroupList((CompanyID)this->window_number); + + if (this->groups.Length() > 0) { + this->sel = this->groups[0]->index; } } - this->ReInit(); + this->SetRows(); + this->SetDirty(); break; case WID_SCL_PRI_COL_DROPDOWN: // First colour dropdown @@ -765,24 +962,24 @@ public: break; case WID_SCL_MATRIX: { - const NWidgetBase *wid = this->GetWidget(WID_SCL_MATRIX); - LiveryScheme j = (LiveryScheme)((pt.y - wid->pos_y) / this->line_height); + uint row = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SCL_MATRIX, 0, this->line_height); + if (row >= this->rows) return; - for (LiveryScheme scheme = LS_BEGIN; scheme <= j; scheme++) { - if (_livery_class[scheme] != this->livery_class || !HasBit(_loaded_newgrf_features.used_liveries, scheme)) j++; - if (scheme >= LS_END) return; - } - if (j >= LS_END) return; + if (this->livery_class < LC_GROUP_RAIL) { + LiveryScheme j = (LiveryScheme)row; - /* If clicking on the left edge, toggle using the livery */ - if (_current_text_dir == TD_RTL ? pt.x - wid->pos_x > wid->current_x - (this->box.width + 5) : pt.x - wid->pos_x < (this->box.width + 5)) { - DoCommandP(0, j | (2 << 8), !Company::Get((CompanyID)this->window_number)->livery[j].in_use, CMD_SET_COMPANY_COLOUR); - } + for (LiveryScheme scheme = LS_BEGIN; scheme <= j && scheme < LS_END; scheme++) { + if (_livery_class[scheme] != this->livery_class || !HasBit(_loaded_newgrf_features.used_liveries, scheme)) j++; + } + assert(j < LS_END); - if (_ctrl_pressed) { - ToggleBit(this->sel, j); + if (_ctrl_pressed) { + ToggleBit(this->sel, j); + } else { + this->sel = 1 << j; + } } else { - this->sel = 1 << j; + this->sel = this->groups[row]->index; } this->SetDirty(); break; @@ -790,13 +987,29 @@ public: } } + virtual void OnResize() + { + this->vscroll->SetCapacityFromWidget(this, WID_SCL_MATRIX); + } + virtual void OnDropdownSelect(int widget, int index) { - for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { - /* Changed colour for the selected scheme, or all visible schemes if CTRL is pressed. */ - if (HasBit(this->sel, scheme) || (_ctrl_pressed && _livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme))) { - DoCommandP(0, scheme | (widget == WID_SCL_PRI_COL_DROPDOWN ? 0 : 256), index, CMD_SET_COMPANY_COLOUR); + bool local = (CompanyID)this->window_number == _local_company; + if (!local) return; + + if (index >= COLOUR_END) index = INVALID_COLOUR; + + if (this->livery_class < LC_GROUP_RAIL) { + /* Set company colour livery */ + for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { + /* Changed colour for the selected scheme, or all visible schemes if CTRL is pressed. */ + if (HasBit(this->sel, scheme) || (_ctrl_pressed && _livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme))) { + DoCommandP(0, scheme | (widget == WID_SCL_PRI_COL_DROPDOWN ? 0 : 256), index, CMD_SET_COMPANY_COLOUR); + } } + } else { + /* Setting group livery */ + DoCommandP(0, this->sel, (widget == WID_SCL_PRI_COL_DROPDOWN ? 0 : 256) | (index << 16), CMD_SET_GROUP_LIVERY); } } @@ -808,15 +1021,27 @@ public: virtual void OnInvalidateData(int data = 0, bool gui_scope = true) { if (!gui_scope) return; + + if (data != -1) { + /* data contains a VehicleType, rebuild list if it displayed */ + if (this->livery_class == data + LC_GROUP_RAIL) { + if (!Group::IsValidID(this->sel)) this->sel = INVALID_GROUP; + this->groups.ForceRebuild(); + this->BuildGroupList((CompanyID)this->window_number); + this->SetDirty(); + } + return; + } + this->SetWidgetsDisabledState(true, WID_SCL_CLASS_RAIL, WID_SCL_CLASS_ROAD, WID_SCL_CLASS_SHIP, WID_SCL_CLASS_AIRCRAFT, WIDGET_LIST_END); - bool current_class_valid = this->livery_class == LC_OTHER; + bool current_class_valid = this->livery_class == LC_OTHER || this->livery_class >= LC_GROUP_RAIL; if (_settings_client.gui.liveries == LIT_ALL || (_settings_client.gui.liveries == LIT_COMPANY && this->window_number == _local_company)) { for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { if (HasBit(_loaded_newgrf_features.used_liveries, scheme)) { if (_livery_class[scheme] == this->livery_class) current_class_valid = true; this->EnableWidget(WID_SCL_CLASS_GENERAL + _livery_class[scheme]); - } else { + } else if (this->livery_class < LC_GROUP_RAIL) { ClrBit(this->sel, scheme); } } @@ -825,8 +1050,6 @@ public: if (!current_class_valid) { Point pt = {0, 0}; this->OnClick(pt, WID_SCL_CLASS_GENERAL, 1); - } else if (data == 0) { - this->ReInit(); } } }; @@ -842,6 +1065,10 @@ static const NWidgetPart _nested_select_company_livery_widgets [] = { NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_ROAD), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRUCKLIST, STR_LIVERY_ROAD_VEHICLE_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_SHIP), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIPLIST, STR_LIVERY_SHIP_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_AIRCRAFT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_AIRPLANESLIST, STR_LIVERY_AIRCRAFT_TOOLTIP), + NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_RAIL), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_TRAIN, STR_LIVERY_TRAIN_TOOLTIP), + NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_ROAD), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_ROADVEH, STR_LIVERY_ROAD_VEHICLE_TOOLTIP), + NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_SHIP), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_SHIP, STR_LIVERY_SHIP_TOOLTIP), + NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_AIRCRAFT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_AIRCRAFT, STR_LIVERY_AIRCRAFT_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(90, 22), SetFill(1, 1), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -850,7 +1077,13 @@ static const NWidgetPart _nested_select_company_livery_widgets [] = { NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_SCL_SEC_COL_DROPDOWN), SetMinimalSize(125, 12), SetFill(0, 1), SetDataTip(STR_BLACK_STRING, STR_LIVERY_SECONDARY_TOOLTIP), EndContainer(), - NWidget(WWT_MATRIX, COLOUR_GREY, WID_SCL_MATRIX), SetMinimalSize(275, 15), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_LIVERY_PANEL_TOOLTIP), + NWidget(NWID_HORIZONTAL), + NWidget(WWT_MATRIX, COLOUR_GREY, WID_SCL_MATRIX), SetMinimalSize(275, 0), SetResize(1, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_LIVERY_PANEL_TOOLTIP), SetScrollbar(WID_SCL_MATRIX_SCROLLBAR), + NWidget(NWID_VERTICAL), + NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SCL_MATRIX_SCROLLBAR), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), + EndContainer(), + EndContainer(), }; static WindowDesc _select_company_livery_desc( @@ -860,6 +1093,16 @@ static WindowDesc _select_company_livery_desc( _nested_select_company_livery_widgets, lengthof(_nested_select_company_livery_widgets) ); +void ShowCompanyLiveryWindow(CompanyID company, GroupID group) +{ + SelectCompanyLiveryWindow *w = (SelectCompanyLiveryWindow *)BringWindowToFrontById(WC_COMPANY_COLOUR, company); + if (w == NULL) { + new SelectCompanyLiveryWindow(&_select_company_livery_desc, company, group); + } else if (group != INVALID_GROUP) { + w->SetSelectedGroup(group); + } +} + /** * Draws the face of a company manager's face. * @param cmf the company manager's face @@ -1509,9 +1752,6 @@ static WindowDesc _select_company_manager_face_desc( * Open the simple/advanced company manager face selection window * * @param parent the parent company window - * @param adv simple or advanced face selection window - * @param top previous top position of the window - * @param left previous left position of the window */ static void DoSelectCompanyManagerFace(Window *parent) { @@ -2243,16 +2483,16 @@ struct CompanyWindow : Window uint y = r.top; /* Collect rail and road counts. */ - uint rail_pices = c->infrastructure.signal; + uint rail_pieces = c->infrastructure.signal; uint road_pieces = 0; - for (uint i = 0; i < lengthof(c->infrastructure.rail); i++) rail_pices += c->infrastructure.rail[i]; + for (uint i = 0; i < lengthof(c->infrastructure.rail); i++) rail_pieces += c->infrastructure.rail[i]; for (uint i = 0; i < lengthof(c->infrastructure.road); i++) road_pieces += c->infrastructure.road[i]; - if (rail_pices == 0 && road_pieces == 0 && c->infrastructure.water == 0 && c->infrastructure.station == 0 && c->infrastructure.airport == 0) { + if (rail_pieces == 0 && road_pieces == 0 && c->infrastructure.water == 0 && c->infrastructure.station == 0 && c->infrastructure.airport == 0) { DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_NONE); } else { - if (rail_pices != 0) { - SetDParam(0, rail_pices); + if (rail_pieces != 0) { + SetDParam(0, rail_pieces); DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL); y += FONT_HEIGHT_NORMAL; } @@ -2331,8 +2571,7 @@ struct CompanyWindow : Window case WID_C_NEW_FACE: DoSelectCompanyManagerFace(this); break; case WID_C_COLOUR_SCHEME: - if (BringWindowToFrontById(WC_COMPANY_COLOUR, this->window_number)) break; - new SelectCompanyLiveryWindow(&_select_company_livery_desc, (CompanyID)this->window_number); + ShowCompanyLiveryWindow((CompanyID)this->window_number, INVALID_GROUP); break; case WID_C_PRESIDENT_NAME: diff --git a/src/company_gui.h b/src/company_gui.h index 6f0bb2ed0e..c5593d15d3 100644 --- a/src/company_gui.h +++ b/src/company_gui.h @@ -1,4 +1,4 @@ -/* $Id: company_gui.h 23410 2011-12-03 23:40:08Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -13,11 +13,13 @@ #define COMPANY_GUI_H #include "company_type.h" +#include "group.h" #include "gfx_type.h" TextColour GetDrawStringCompanyColour(CompanyID company); void DrawCompanyIcon(CompanyID c, int x, int y); +void ShowCompanyLiveryWindow(CompanyID company, GroupID group); void ShowCompanyStations(CompanyID company); void ShowCompanyFinances(CompanyID company); void ShowCompany(CompanyID company); diff --git a/src/company_manager_face.h b/src/company_manager_face.h index ebbc6a348a..511f85b7d5 100644 --- a/src/company_manager_face.h +++ b/src/company_manager_face.h @@ -1,4 +1,4 @@ -/* $Id: company_manager_face.h 27975 2018-03-11 07:16:58Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/company_type.h b/src/company_type.h index 4b85868e09..771e6d8b93 100644 --- a/src/company_type.h +++ b/src/company_type.h @@ -1,4 +1,4 @@ -/* $Id: company_type.h 23602 2011-12-19 20:50:36Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -64,4 +64,13 @@ enum CompanyRemoveReason { CRR_END, ///< Sentinel for end. }; +/** The action to do with CMD_COMPANY_CTRL. */ +enum CompanyCtrlAction { + CCA_NEW, ///< Create a new company. + CCA_NEW_AI, ///< Create a new AI company. + CCA_DELETE, ///< Delete a company. + + CCA_END, ///< Sentinel for end. +}; + #endif /* COMPANY_TYPE_H */ diff --git a/src/console.cpp b/src/console.cpp index a3e005c90d..2cf9d96958 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -1,4 +1,4 @@ -/* $Id: console.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -235,8 +235,8 @@ void IConsoleAddSorted(T **base, T *item_new) /** * Remove underscores from a string; the string will be modified! - * @param name The string to remove the underscores from. - * @return #name. + * @param[in,out] name String to remove the underscores from. + * @return \a name, with its contents modified. */ char *RemoveUnderscores(char *name) { diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 1efc72068b..732ace6a2b 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1,4 +1,4 @@ -/* $Id: console_cmds.cpp 27914 2017-09-10 14:03:29Z adf88 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -62,7 +62,7 @@ public: /** * (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload. - * @param Always reload the file storage cache. + * @param force_reload Always reload the file storage cache. */ void ValidateFileList(bool force_reload = false) { @@ -256,8 +256,8 @@ DEF_CONSOLE_CMD(ConResetTile) /** * Scroll to a tile on the map. - * @param arg1 tile tile number or tile x coordinate. - * @param arg2 optionally tile y coordinate. + * param x tile number or tile x coordinate. + * param y optional y coordinate. * @note When only one argument is given it is intepreted as the tile number. * When two arguments are given, they are interpreted as the tile's x * and y coordinates. @@ -304,7 +304,7 @@ DEF_CONSOLE_CMD(ConScrollToTile) /** * Save the map to a file. - * @param filename the filename to save the map to. + * param filename the filename to save the map to. * @return True when help was displayed or the file attempted to be saved. */ DEF_CONSOLE_CMD(ConSave) @@ -836,7 +836,7 @@ DEF_CONSOLE_CMD(ConResetCompany) } /* It is safe to remove this company */ - DoCommandP(0, 2 | index << 16, CRR_MANUAL, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_DELETE | index << 16, CRR_MANUAL, CMD_COMPANY_CTRL); IConsolePrint(CC_DEFAULT, "Company deleted."); return true; @@ -1178,7 +1178,7 @@ DEF_CONSOLE_CMD(ConStartAI) } /* Start a new AI company */ - DoCommandP(0, 1 | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_NEW_AI | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL); return true; } @@ -1213,8 +1213,8 @@ DEF_CONSOLE_CMD(ConReloadAI) } /* First kill the company of the AI, then start a new one. This should start the current AI again */ - DoCommandP(0, 2 | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL); - DoCommandP(0, 1 | company_id << 16, 0, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_DELETE | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_NEW_AI | company_id << 16, 0, CMD_COMPANY_CTRL); IConsolePrint(CC_DEFAULT, "AI reloaded."); return true; @@ -1250,7 +1250,7 @@ DEF_CONSOLE_CMD(ConStopAI) } /* Now kill the company of the AI. */ - DoCommandP(0, 2 | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_DELETE | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL); IConsolePrint(CC_DEFAULT, "AI stopped, company deleted."); return true; @@ -1895,6 +1895,37 @@ static void IConsoleDebugLibRegister() } #endif +DEF_CONSOLE_CMD(ConFramerate) +{ + extern void ConPrintFramerate(); // framerate_gui.cpp + + if (argc == 0) { + IConsoleHelp("Show frame rate and game speed information"); + return true; + } + + ConPrintFramerate(); + return true; +} + +DEF_CONSOLE_CMD(ConFramerateWindow) +{ + extern void ShowFramerateWindow(); + + if (argc == 0) { + IConsoleHelp("Open the frame rate window"); + return true; + } + + if (_network_dedicated) { + IConsoleError("Can not open frame rate window on a dedicated server"); + return false; + } + + ShowFramerateWindow(); + return true; +} + /******************************* * console command registration *******************************/ @@ -2025,6 +2056,8 @@ void IConsoleStdLibRegister() #ifdef _DEBUG IConsoleDebugLibRegister(); #endif + IConsoleCmdRegister("fps", ConFramerate); + IConsoleCmdRegister("fps_wnd", ConFramerateWindow); /* NewGRF development stuff */ IConsoleCmdRegister("reload_newgrfs", ConNewGRFReload, ConHookNewGRFDeveloperTool); diff --git a/src/console_func.h b/src/console_func.h index e2d744e366..6f58bdf544 100644 --- a/src/console_func.h +++ b/src/console_func.h @@ -1,4 +1,4 @@ -/* $Id: console_func.h 21707 2011-01-03 20:54:20Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 5d7423629a..ed46938cd5 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: console_gui.cpp 26538 2014-04-28 21:06:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/console_gui.h b/src/console_gui.h index 813888b3ab..54e8dc2bc8 100644 --- a/src/console_gui.h +++ b/src/console_gui.h @@ -1,4 +1,4 @@ -/* $Id: console_gui.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/console_internal.h b/src/console_internal.h index e3d2ce276d..1b63b26f0d 100644 --- a/src/console_internal.h +++ b/src/console_internal.h @@ -1,4 +1,4 @@ -/* $Id: console_internal.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/console_type.h b/src/console_type.h index c776fbcf23..18da4131db 100644 --- a/src/console_type.h +++ b/src/console_type.h @@ -1,4 +1,4 @@ -/* $Id: console_type.h 23595 2011-12-19 17:48:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/alloc_func.cpp b/src/core/alloc_func.cpp index 81207200b4..b78023f4d6 100644 --- a/src/core/alloc_func.cpp +++ b/src/core/alloc_func.cpp @@ -1,4 +1,4 @@ -/* $Id: alloc_func.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/alloc_func.hpp b/src/core/alloc_func.hpp index 036d89cf33..c33e733016 100644 --- a/src/core/alloc_func.hpp +++ b/src/core/alloc_func.hpp @@ -1,4 +1,4 @@ -/* $Id: alloc_func.hpp 23640 2011-12-20 17:57:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -125,7 +125,7 @@ static inline T *ReallocT(T *t_ptr, size_t num_elements) /* Ensure the size does not overflow. */ CheckAllocationConstraints(num_elements); - t_ptr = (T*)realloc(t_ptr, num_elements * sizeof(T)); + t_ptr = (T*)realloc(static_cast(t_ptr), num_elements * sizeof(T)); if (t_ptr == NULL) ReallocError(num_elements * sizeof(T)); return t_ptr; } diff --git a/src/core/alloc_type.hpp b/src/core/alloc_type.hpp index be3413af11..9c25cc9e3f 100644 --- a/src/core/alloc_type.hpp +++ b/src/core/alloc_type.hpp @@ -1,4 +1,4 @@ -/* $Id: alloc_type.hpp 23880 2012-02-04 13:28:35Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/backup_type.hpp b/src/core/backup_type.hpp index 75fc2d3697..7e3771b70f 100644 --- a/src/core/backup_type.hpp +++ b/src/core/backup_type.hpp @@ -1,4 +1,4 @@ -/* $Id: backup_type.hpp 19931 2010-06-05 12:16:12Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -53,7 +53,7 @@ struct Backup { { /* We cannot assert here, as missing restoration is 'normal' when exceptions are thrown. * Exceptions are especially used to abort world generation. */ - DEBUG(misc, 0, "%s:%d: Backupped value was not restored!", this->file, this->line); + DEBUG(misc, 0, "%s:%d: Backed-up value was not restored!", this->file, this->line); this->Restore(); } } diff --git a/src/core/bitmath_func.cpp b/src/core/bitmath_func.cpp index 87f01ab2c3..7763227315 100644 --- a/src/core/bitmath_func.cpp +++ b/src/core/bitmath_func.cpp @@ -1,4 +1,4 @@ -/* $Id: bitmath_func.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/bitmath_func.hpp b/src/core/bitmath_func.hpp index 1fa7358c7d..fd05aa3f59 100644 --- a/src/core/bitmath_func.hpp +++ b/src/core/bitmath_func.hpp @@ -1,4 +1,4 @@ -/* $Id: bitmath_func.hpp 25685 2013-08-05 20:37:29Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -302,6 +302,7 @@ static inline bool HasAtMostOneBit(T value) template static inline T ROL(const T x, const uint8 n) { + if (n == 0) return x; return (T)(x << n | x >> (sizeof(x) * 8 - n)); } @@ -317,6 +318,7 @@ static inline T ROL(const T x, const uint8 n) template static inline T ROR(const T x, const uint8 n) { + if (n == 0) return x; return (T)(x >> n | x << (sizeof(x) * 8 - n)); } diff --git a/src/core/endian_func.hpp b/src/core/endian_func.hpp index 63f9f73f2c..ab5b181500 100644 --- a/src/core/endian_func.hpp +++ b/src/core/endian_func.hpp @@ -1,4 +1,4 @@ -/* $Id: endian_func.hpp 23640 2011-12-20 17:57:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/endian_type.hpp b/src/core/endian_type.hpp index d3f5482baf..4058c5c19a 100644 --- a/src/core/endian_type.hpp +++ b/src/core/endian_type.hpp @@ -1,4 +1,4 @@ -/* $Id: endian_type.hpp 22411 2011-05-02 17:42:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,15 +26,22 @@ #define TTD_BIG_ENDIAN 1 /* Windows has always LITTLE_ENDIAN */ -#if defined(WIN32) || defined(__OS2__) || defined(WIN64) - #define TTD_ENDIAN TTD_LITTLE_ENDIAN +#if defined(_WIN32) || defined(__OS2__) +# define TTD_ENDIAN TTD_LITTLE_ENDIAN +#elif defined(OSX) +# include +# if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN +# define TTD_ENDIAN TTD_LITTLE_ENDIAN +# else +# define TTD_ENDIAN TTD_BIG_ENDIAN +# endif #elif !defined(TESTING) - /* Else include endian[target/host].h, which has the endian-type, autodetected by the Makefile */ - #if defined(STRGEN) || defined(SETTINGSGEN) - #include "endian_host.h" - #else - #include "endian_target.h" - #endif -#endif /* WIN32 || __OS2__ || WIN64 */ +# include +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define TTD_ENDIAN TTD_LITTLE_ENDIAN +# else +# define TTD_ENDIAN TTD_BIG_ENDIAN +# endif +#endif /* _WIN32 || __OS2__ */ #endif /* ENDIAN_TYPE_HPP */ diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp index ebef05bda2..35a0cb2926 100644 --- a/src/core/enum_type.hpp +++ b/src/core/enum_type.hpp @@ -1,4 +1,4 @@ -/* $Id: enum_type.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/geometry_func.cpp b/src/core/geometry_func.cpp index b61e2fbf14..86f317a372 100644 --- a/src/core/geometry_func.cpp +++ b/src/core/geometry_func.cpp @@ -1,4 +1,4 @@ -/* $Id: geometry_func.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/geometry_func.hpp b/src/core/geometry_func.hpp index 025af37661..e7c53251c7 100644 --- a/src/core/geometry_func.hpp +++ b/src/core/geometry_func.hpp @@ -1,4 +1,4 @@ -/* $Id: geometry_func.hpp 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index 31eb9d98ce..2bd8ffbade 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -1,4 +1,4 @@ -/* $Id: geometry_type.hpp 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/math_func.cpp b/src/core/math_func.cpp index 255873b8de..d927702083 100644 --- a/src/core/math_func.cpp +++ b/src/core/math_func.cpp @@ -1,4 +1,4 @@ -/* $Id: math_func.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 801afe7552..4a19033f45 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -1,4 +1,4 @@ -/* $Id: math_func.hpp 26651 2014-06-17 19:01:45Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -346,6 +346,23 @@ static inline int RoundDivSU(int a, uint b) } } +/** + * Computes (a / b) rounded away from zero. + * @param a Numerator + * @param b Denominator + * @return Quotient, rounded away from zero + */ +static inline int DivAwayFromZero(int a, uint b) +{ + const int _b = static_cast(b); + if (a > 0) { + return (a + _b - 1) / _b; + } else { + /* Note: Behaviour of negative numerator division is truncation toward zero. */ + return (a - _b + 1) / _b; + } +} + uint32 IntSqrt(uint32 num); #endif /* MATH_FUNC_HPP */ diff --git a/src/core/mem_func.hpp b/src/core/mem_func.hpp index bc7e840855..6878711645 100644 --- a/src/core/mem_func.hpp +++ b/src/core/mem_func.hpp @@ -1,4 +1,4 @@ -/* $Id: mem_func.hpp 23640 2011-12-20 17:57:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/multimap.hpp b/src/core/multimap.hpp index 3acaaa2859..e906677141 100644 --- a/src/core/multimap.hpp +++ b/src/core/multimap.hpp @@ -1,4 +1,4 @@ -/* $Id: multimap.hpp 25371 2013-06-09 13:18:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/overflowsafe_type.hpp b/src/core/overflowsafe_type.hpp index 39c3fc2c0a..edc25d2755 100644 --- a/src/core/overflowsafe_type.hpp +++ b/src/core/overflowsafe_type.hpp @@ -1,4 +1,4 @@ -/* $Id: overflowsafe_type.hpp 26685 2014-07-12 17:04:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/pool_func.cpp b/src/core/pool_func.cpp index 0f39242145..f8ff93cecc 100644 --- a/src/core/pool_func.cpp +++ b/src/core/pool_func.cpp @@ -1,4 +1,4 @@ -/* $Id: pool_func.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/pool_func.hpp b/src/core/pool_func.hpp index b89082b9f4..5569addbd7 100644 --- a/src/core/pool_func.hpp +++ b/src/core/pool_func.hpp @@ -1,4 +1,4 @@ -/* $Id: pool_func.hpp 27381 2015-08-10 20:24:13Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp index 3cbc4f4849..4d20ed1abb 100644 --- a/src/core/pool_type.hpp +++ b/src/core/pool_type.hpp @@ -1,4 +1,4 @@ -/* $Id: pool_type.hpp 26333 2014-02-11 20:34:48Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index 2dafa649a5..e4593c4076 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -1,4 +1,4 @@ -/* $Id: random_func.cpp 27049 2014-10-28 11:32:19Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp index 59c5329562..ae476624e8 100644 --- a/src/core/random_func.hpp +++ b/src/core/random_func.hpp @@ -1,4 +1,4 @@ -/* $Id: random_func.hpp 25893 2013-10-20 14:48:08Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -29,7 +29,7 @@ struct Randomizer { void SetSeed(uint32 seed); }; extern Randomizer _random; ///< Random used in the game state calculations -extern Randomizer _interactive_random; ///< Random used every else where is does not (directly) influence the game state +extern Randomizer _interactive_random; ///< Random used everywhere else, where it does not (directly) influence the game state /** Stores the state of all random number generators */ struct SavedRandomSeeds { diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp index 854d35f09a..dda0fc2a1e 100644 --- a/src/core/smallmap_type.hpp +++ b/src/core/smallmap_type.hpp @@ -1,4 +1,4 @@ -/* $Id: smallmap_type.hpp 24741 2012-11-14 22:50:30Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/smallmatrix_type.hpp b/src/core/smallmatrix_type.hpp index 1556cd5119..cd4dee4e3a 100644 --- a/src/core/smallmatrix_type.hpp +++ b/src/core/smallmatrix_type.hpp @@ -1,4 +1,4 @@ -/* $Id: smallmatrix_type.hpp 25256 2013-05-19 14:06:26Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -159,7 +159,7 @@ public: /** * Erase a row, replacing it with the last one. - * @param x Position of the row. + * @param y Position of the row. */ void EraseRow(uint y) { @@ -174,7 +174,7 @@ public: /** * Remove columns from the matrix while preserving the order of other columns. - * @param x First column to remove. + * @param y First column to remove. * @param count Number of consecutive columns to remove. */ void EraseRowPreservingOrder(uint y, uint count = 1) @@ -210,8 +210,8 @@ public: /** * Set the size to a specific width and height, preserving item positions * as far as possible in the process. - * @param width Target width. - * @param height Target height. + * @param new_width Target width. + * @param new_height Target height. */ inline void Resize(uint new_width, uint new_height) { @@ -297,7 +297,7 @@ public: /** * Get column "number" (const) * - * @param X Position of the column. + * @param x Position of the column. * @return Column at "number". */ inline const T *operator[](uint x) const @@ -309,7 +309,7 @@ public: /** * Get column "number" (const) * - * @param X Position of the column. + * @param x Position of the column. * @return Column at "number". */ inline T *operator[](uint x) diff --git a/src/core/smallstack_type.hpp b/src/core/smallstack_type.hpp index 31edba0817..06b5aaafa6 100644 --- a/src/core/smallstack_type.hpp +++ b/src/core/smallstack_type.hpp @@ -195,10 +195,10 @@ public: inline void Push(const Titem &item) { if (this->value != Tinvalid) { - ThreadMutexLocker lock(_pool.GetMutex()); - Tindex new_item = _pool.Create(); + ThreadMutexLocker lock(SmallStack::GetPool().GetMutex()); + Tindex new_item = SmallStack::GetPool().Create(); if (new_item != Tmax_size) { - PooledSmallStack &pushed = _pool.Get(new_item); + PooledSmallStack &pushed = SmallStack::GetPool().Get(new_item); pushed.value = this->value; pushed.next = this->next; pushed.branch_count = 0; @@ -218,16 +218,16 @@ public: if (this->next == Tmax_size) { this->value = Tinvalid; } else { - ThreadMutexLocker lock(_pool.GetMutex()); - PooledSmallStack &popped = _pool.Get(this->next); + ThreadMutexLocker lock(SmallStack::GetPool().GetMutex()); + PooledSmallStack &popped = SmallStack::GetPool().Get(this->next); this->value = popped.value; if (popped.branch_count == 0) { - _pool.Destroy(this->next); + SmallStack::GetPool().Destroy(this->next); } else { --popped.branch_count; /* We can't use Branch() here as we already have the mutex.*/ if (popped.next != Tmax_size) { - ++(_pool.Get(popped.next).branch_count); + ++(SmallStack::GetPool().Get(popped.next).branch_count); } } /* Accessing popped here is no problem as the pool will only set @@ -257,11 +257,11 @@ public: { if (item == Tinvalid || item == this->value) return true; if (this->next != Tmax_size) { - ThreadMutexLocker lock(_pool.GetMutex()); + ThreadMutexLocker lock(SmallStack::GetPool().GetMutex()); const SmallStack *in_list = this; do { in_list = static_cast( - static_cast(&_pool.Get(in_list->next))); + static_cast(&SmallStack::GetPool().Get(in_list->next))); if (in_list->value == item) return true; } while (in_list->next != Tmax_size); } @@ -269,7 +269,11 @@ public: } protected: - static SmallStackPool _pool; + static SmallStackPool &GetPool() + { + static SmallStackPool pool; + return pool; + } /** * Create a branch in the pool if necessary. @@ -277,8 +281,8 @@ protected: inline void Branch() { if (this->next != Tmax_size) { - ThreadMutexLocker lock(_pool.GetMutex()); - ++(_pool.Get(this->next).branch_count); + ThreadMutexLocker lock(SmallStack::GetPool().GetMutex()); + ++(SmallStack::GetPool().Get(this->next).branch_count); } } }; diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 1d891fe915..588dd599dc 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -1,4 +1,4 @@ -/* $Id: smallvec_type.hpp 27641 2016-09-04 12:50:22Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -158,6 +158,23 @@ public: } } + /** + * Insert a new item at a specific position into the vector, moving all following items. + * @param item Position at which the new item should be inserted + * @return pointer to the new item + */ + inline T *Insert(T *item) + { + assert(item >= this->Begin() && item <= this->End()); + + size_t to_move = this->End() - item; + size_t start = item - this->Begin(); + + this->Append(); + if (to_move > 0) MemMoveT(this->Begin() + start + 1, this->Begin() + start, to_move); + return this->Begin() + start; + } + /** * Search for the first occurrence of an item. * The '!=' operator of T is used for comparison. @@ -232,13 +249,24 @@ public: * @param count Number of consecutive items to remove. */ void ErasePreservingOrder(uint pos, uint count = 1) + { + ErasePreservingOrder(this->data + pos, count); + } + + /** + * Remove items from the vector while preserving the order of other items. + * @param item First item to remove. + * @param count Number of consecutive items to remove. + */ + inline void ErasePreservingOrder(T *item, uint count = 1) { if (count == 0) return; - assert(pos < this->items); - assert(pos + count <= this->items); + assert(item >= this->Begin()); + assert(item + count <= this->End()); + this->items -= count; - uint to_move = this->items - pos; - if (to_move > 0) MemMoveT(this->data + pos, this->data + pos + count, to_move); + ptrdiff_t to_move = this->End() - item; + if (to_move > 0) MemMoveT(item, item + count, to_move); } /** diff --git a/src/core/sort_func.hpp b/src/core/sort_func.hpp index bff0219f0f..470a0ccf4d 100644 --- a/src/core/sort_func.hpp +++ b/src/core/sort_func.hpp @@ -1,4 +1,4 @@ -/* $Id: sort_func.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/core/string_compare_type.hpp b/src/core/string_compare_type.hpp index 402b29762c..77180747ba 100644 --- a/src/core/string_compare_type.hpp +++ b/src/core/string_compare_type.hpp @@ -1,4 +1,4 @@ -/* $Id: string_compare_type.hpp 22411 2011-05-02 17:42:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/cpu.cpp b/src/cpu.cpp index 9e52602af6..9393ea0613 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -1,4 +1,4 @@ -/* $Id: cpu.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,7 +18,7 @@ /* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc * from external win64.asm because VS2005 does not support inline assembly */ -#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) && !defined(WINCE) +#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) #include uint64 ottd_rdtsc() { @@ -71,10 +71,7 @@ uint64 ottd_rdtsc() /* In all other cases we have no support for rdtsc. No major issue, * you just won't be able to profile your code with TIC()/TOC() */ #if !defined(RDTSC_AVAILABLE) -/* MSVC (in case of WinCE) can't handle #warning */ -# if !defined(_MSC_VER) #warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC" -# endif uint64 ottd_rdtsc() {return 0;} #endif diff --git a/src/cpu.h b/src/cpu.h index aca8a12206..08495dfc14 100644 --- a/src/cpu.h +++ b/src/cpu.h @@ -1,4 +1,4 @@ -/* $Id: cpu.h 26207 2014-01-02 18:52:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 7756bce64e..5ff19c2424 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -1,4 +1,4 @@ -/* $Id: crashlog.cpp 27653 2016-09-04 16:06:50Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -27,6 +27,7 @@ #include "network/network.h" #include "language.h" #include "fontcache.h" +#include "news_gui.h" #include "ai/ai_info.hpp" #include "game/game.hpp" @@ -308,6 +309,27 @@ char *CrashLog::LogGamelog(char *buffer, const char *last) const return CrashLog::gamelog_buffer + seprintf(CrashLog::gamelog_buffer, last, "\n"); } +/** + * Writes any recent news messages to the buffer. + * @param buffer The begin where to write at. + * @param last The last position in the buffer to write to. + * @return the position of the \c '\0' character after the buffer. + */ +char *CrashLog::LogRecentNews(char *buffer, const char *last) const +{ + buffer += seprintf(buffer, last, "Recent news messages:\n"); + + for (NewsItem *news = _oldest_news; news != NULL; news = news->next) { + YearMonthDay ymd; + ConvertDateToYMD(news->date, &ymd); + buffer += seprintf(buffer, last, "(%i-%02i-%02i) StringID: %u, Type: %u, Ref1: %u, %u, Ref2: %u, %u\n", + ymd.year, ymd.month + 1, ymd.day, news->string_id, news->type, + news->reftype1, news->ref1, news->reftype2, news->ref2); + } + buffer += seprintf(buffer, last, "\n"); + return buffer; +} + /** * Fill the crash log buffer with all data of a crash log. * @param buffer The begin where to write at. @@ -334,6 +356,7 @@ char *CrashLog::FillCrashLog(char *buffer, const char *last) const buffer = this->LogLibraries(buffer, last); buffer = this->LogModules(buffer, last); buffer = this->LogGamelog(buffer, last); + buffer = this->LogRecentNews(buffer, last); buffer += seprintf(buffer, last, "*** End of OpenTTD Crash Report ***\n"); return buffer; diff --git a/src/crashlog.h b/src/crashlog.h index 6a2a577ccb..b9bc8afa24 100644 --- a/src/crashlog.h +++ b/src/crashlog.h @@ -1,4 +1,4 @@ -/* $Id: crashlog.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -85,6 +85,7 @@ protected: char *LogConfiguration(char *buffer, const char *last) const; char *LogLibraries(char *buffer, const char *last) const; char *LogGamelog(char *buffer, const char *last) const; + char *LogRecentNews(char *buffer, const char *list) const; public: /** Stub destructor to silence some compilers. */ diff --git a/src/currency.cpp b/src/currency.cpp index e313760337..b87f77393b 100644 --- a/src/currency.cpp +++ b/src/currency.cpp @@ -1,4 +1,4 @@ -/* $Id: currency.cpp 26989 2014-10-10 23:07:59Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -62,6 +62,8 @@ static const CurrencySpec origin_currency_specs[CURRENCY_END] = { { 1, "", CF_NOEURO, "", "", 2, STR_GAME_OPTIONS_CURRENCY_CUSTOM }, ///< custom currency (add further languages below) { 3, "", CF_NOEURO, "", NBSP "GEL", 1, STR_GAME_OPTIONS_CURRENCY_GEL }, ///< Georgian Lari { 4901, "", CF_NOEURO, "", NBSP "Rls", 1, STR_GAME_OPTIONS_CURRENCY_IRR }, ///< Iranian Rial + { 80, "", CF_NOEURO, "", NBSP "rub", 1, STR_GAME_OPTIONS_CURRENCY_RUB }, ///< New Russian Ruble + { 24, "", CF_NOEURO, "$", "", 0, STR_GAME_OPTIONS_CURRENCY_MXN }, ///< Mexican peso }; /** Array of currencies used by the system */ diff --git a/src/currency.h b/src/currency.h index 518eb45cda..401df5ec1f 100644 --- a/src/currency.h +++ b/src/currency.h @@ -1,4 +1,4 @@ -/* $Id: currency.h 25076 2013-03-09 16:31:56Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -58,6 +58,8 @@ enum Currencies { CURRENCY_CUSTOM, ///< Custom currency CURRENCY_GEL, ///< Georgian Lari CURRENCY_IRR, ///< Iranian Rial + CURRENCY_RUB, ///< New Russian Ruble + CURRENCY_MXN, ///< Mexican Peso CURRENCY_END, ///< always the last item }; diff --git a/src/date.cpp b/src/date.cpp index cf4300e770..9c25af40ee 100644 --- a/src/date.cpp +++ b/src/date.cpp @@ -1,4 +1,4 @@ -/* $Id: date.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/date_func.h b/src/date_func.h index df9aafa124..6bbde59556 100644 --- a/src/date_func.h +++ b/src/date_func.h @@ -1,4 +1,4 @@ -/* $Id: date_func.h 22411 2011-05-02 17:42:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/date_gui.cpp b/src/date_gui.cpp index 9e8809d9b4..468a74db99 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: date_gui.cpp 26657 2014-06-20 20:57:32Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/date_gui.h b/src/date_gui.h index d4d55f14dc..314baba3ca 100644 --- a/src/date_gui.h +++ b/src/date_gui.h @@ -1,4 +1,4 @@ -/* $Id: date_gui.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/date_type.h b/src/date_type.h index ad933f6556..b20ace91ec 100644 --- a/src/date_type.h +++ b/src/date_type.h @@ -1,4 +1,4 @@ -/* $Id: date_type.h 25260 2013-05-19 14:26:14Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/debug.cpp b/src/debug.cpp index af7188cb8f..13df98db34 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -1,4 +1,4 @@ -/* $Id: debug.cpp 26506 2014-04-24 19:51:45Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,6 +17,10 @@ #include "fileio_func.h" #include "settings_type.h" +#if defined(_WIN32) +#include "os/windows/win32.h" +#endif + #include #if defined(ENABLE_NETWORK) @@ -100,8 +104,6 @@ char *DumpDebugFacilityNames(char *buf, char *last) return buf; } -#if !defined(NO_DEBUG_MESSAGES) - /** * Internal function for outputting the debug line. * @param dbg Debug category. @@ -137,10 +139,10 @@ static void debug_print(const char *dbg, const char *buf) } else { char buffer[512]; seprintf(buffer, lastof(buffer), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf); -#if defined(WINCE) - NKDbgPrintfW(OTTD2FS(buffer)); -#elif defined(WIN32) || defined(WIN64) - _fputts(OTTD2FS(buffer, true), stderr); +#if defined(_WIN32) + TCHAR system_buf[512]; + convert_to_fs(buffer, system_buf, lengthof(system_buf), true); + _fputts(system_buf, stderr); #else fputs(buffer, stderr); #endif @@ -168,7 +170,6 @@ void CDECL debug(const char *dbg, const char *format, ...) debug_print(dbg, buf); } -#endif /* NO_DEBUG_MESSAGES */ /** * Set debugging levels by parsing the text in \a s. diff --git a/src/debug.h b/src/debug.h index d3b2fbdd65..ce454c962e 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,4 +1,4 @@ -/* $Id: debug.h 26195 2014-01-02 08:45:28Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,37 +28,33 @@ * 6.. - extremely detailed spamming */ -#ifdef NO_DEBUG_MESSAGES - #define DEBUG(name, level, ...) { } -#else /* NO_DEBUG_MESSAGES */ - /** - * Output a line of debugging information. - * @param name Category - * @param level Debugging level, higher levels means more detailed information. - */ - #define DEBUG(name, level, ...) if ((level) == 0 || _debug_ ## name ## _level >= (level)) debug(#name, __VA_ARGS__) +/** + * Output a line of debugging information. + * @param name Category + * @param level Debugging level, higher levels means more detailed information. + */ +#define DEBUG(name, level, ...) if ((level) == 0 || _debug_ ## name ## _level >= (level)) debug(#name, __VA_ARGS__) - extern int _debug_driver_level; - extern int _debug_grf_level; - extern int _debug_map_level; - extern int _debug_misc_level; - extern int _debug_net_level; - extern int _debug_sprite_level; - extern int _debug_oldloader_level; - extern int _debug_npf_level; - extern int _debug_yapf_level; - extern int _debug_freetype_level; - extern int _debug_script_level; - extern int _debug_sl_level; - extern int _debug_gamelog_level; - extern int _debug_desync_level; - extern int _debug_console_level; +extern int _debug_driver_level; +extern int _debug_grf_level; +extern int _debug_map_level; +extern int _debug_misc_level; +extern int _debug_net_level; +extern int _debug_sprite_level; +extern int _debug_oldloader_level; +extern int _debug_npf_level; +extern int _debug_yapf_level; +extern int _debug_freetype_level; +extern int _debug_script_level; +extern int _debug_sl_level; +extern int _debug_gamelog_level; +extern int _debug_desync_level; +extern int _debug_console_level; #ifdef RANDOM_DEBUG - extern int _debug_random_level; +extern int _debug_random_level; #endif - void CDECL debug(const char *dbg, const char *format, ...) WARN_FORMAT(2, 3); -#endif /* NO_DEBUG_MESSAGES */ +void CDECL debug(const char *dbg, const char *format, ...) WARN_FORMAT(2, 3); char *DumpDebugFacilityNames(char *buf, char *last); void SetDebugString(const char *s); diff --git a/src/dedicated.cpp b/src/dedicated.cpp index 969979d4eb..ce383ee4a5 100644 --- a/src/dedicated.cpp +++ b/src/dedicated.cpp @@ -1,4 +1,4 @@ -/* $Id: dedicated.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp index 11eea58aa5..9f8de891bd 100644 --- a/src/depend/depend.cpp +++ b/src/depend/depend.cpp @@ -1,4 +1,4 @@ -/* $Id: depend.cpp 26060 2013-11-23 13:16:45Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -217,22 +217,22 @@ enum Token { TOKEN_LOCAL, ///< Read a local include TOKEN_GLOBAL, ///< Read a global include TOKEN_IDENTIFIER, ///< Identifier within the data. - TOKEN_DEFINE, ///< (#)define in code - TOKEN_IF, ///< (#)if in code - TOKEN_IFDEF, ///< (#)ifdef in code - TOKEN_IFNDEF, ///< (#)ifndef in code - TOKEN_ELIF, ///< (#)elif in code - TOKEN_ELSE, ///< (#)else in code - TOKEN_ENDIF, ///< (#)endif in code - TOKEN_UNDEF, ///< (#)undef in code - TOKEN_OR, ///< '||' within #if expression - TOKEN_AND, ///< '&&' within #if expression - TOKEN_DEFINED, ///< 'defined' within #if expression - TOKEN_OPEN, ///< '(' within #if expression - TOKEN_CLOSE, ///< ')' within #if expression - TOKEN_NOT, ///< '!' within #if expression - TOKEN_ZERO, ///< '0' within #if expression - TOKEN_INCLUDE, ///< (#)include in code + TOKEN_DEFINE, ///< \c \#define in code + TOKEN_IF, ///< \c \#if in code + TOKEN_IFDEF, ///< \c \#ifdef in code + TOKEN_IFNDEF, ///< \c \#ifndef in code + TOKEN_ELIF, ///< \c \#elif in code + TOKEN_ELSE, ///< \c \#else in code + TOKEN_ENDIF, ///< \c \#endif in code + TOKEN_UNDEF, ///< \c \#undef in code + TOKEN_OR, ///< '||' within \c \#if expression + TOKEN_AND, ///< '&&' within \c \#if expression + TOKEN_DEFINED, ///< 'defined' within \c \#if expression + TOKEN_OPEN, ///< '(' within \c \#if expression + TOKEN_CLOSE, ///< ')' within \c \#if expression + TOKEN_NOT, ///< '!' within \c \#if expression + TOKEN_ZERO, ///< '0' within \c \#if expression + TOKEN_INCLUDE, ///< \c \#include in code }; /** Mapping from a C-style keyword representation to a Token. */ @@ -681,8 +681,8 @@ bool ExpressionOr(Lexer *lexer, StringSet *defines, bool verbose) /** Enumerator to tell how long to ignore 'stuff'. */ enum Ignore { NOT_IGNORE, ///< No ignoring. - IGNORE_UNTIL_ELSE, ///< Ignore till a #else is reached. - IGNORE_UNTIL_ENDIF, ///< Ignore till a #endif is reached. + IGNORE_UNTIL_ELSE, ///< Ignore till a \c \#else is reached. + IGNORE_UNTIL_ENDIF, ///< Ignore till a \c \#endif is reached. }; /** @@ -1008,7 +1008,7 @@ int main(int argc, char *argv[]) fclose(src); /* Then append it to the real file. */ - src = fopen(backup, "rb"); + src = fopen(backup, "r"); while (fgets(content, size, src) != NULL) { fputs(content, dst); if (!strncmp(content, delimiter, strlen(delimiter))) found_delimiter = true; diff --git a/src/depot.cpp b/src/depot.cpp index acbcf29b0f..821399fd2b 100644 --- a/src/depot.cpp +++ b/src/depot.cpp @@ -1,4 +1,4 @@ -/* $Id: depot.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/depot_base.h b/src/depot_base.h index 3d4dd3c58d..e5eb3b622c 100644 --- a/src/depot_base.h +++ b/src/depot_base.h @@ -1,4 +1,4 @@ -/* $Id: depot_base.h 23640 2011-12-20 17:57:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/depot_cmd.cpp b/src/depot_cmd.cpp index 44a57fdf2a..5101b7c2ca 100644 --- a/src/depot_cmd.cpp +++ b/src/depot_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: depot_cmd.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/depot_func.h b/src/depot_func.h index 92b439b00d..f0d65e7640 100644 --- a/src/depot_func.h +++ b/src/depot_func.h @@ -1,4 +1,4 @@ -/* $Id: depot_func.h 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 3d20ed9889..275ee6e297 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: depot_gui.cpp 27938 2017-12-10 13:48:49Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -887,9 +887,16 @@ struct DepotWindow : Window { */ virtual bool OnVehicleSelect(const Vehicle *v) { - if (DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle)) { - ResetObjectToPlace(); + if (_ctrl_pressed) { + /* Share-clone, do not open new viewport, and keep tool active */ + DoCommandP(this->window_number, v->index, 1, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), NULL); + } else { + /* Copy-clone, open viewport for new vehicle, and deselect the tool (assume player wants to changs things on new vehicle) */ + if (DoCommandP(this->window_number, v->index, 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle)) { + ResetObjectToPlace(); + } } + return true; } diff --git a/src/depot_map.h b/src/depot_map.h index 576606845e..c304790f8a 100644 --- a/src/depot_map.h +++ b/src/depot_map.h @@ -1,4 +1,4 @@ -/* $Id: depot_map.h 26692 2014-07-16 20:56:39Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/depot_type.h b/src/depot_type.h index dc31c1bb32..d6374bed51 100644 --- a/src/depot_type.h +++ b/src/depot_type.h @@ -1,4 +1,4 @@ -/* $Id: depot_type.h 22411 2011-05-02 17:42:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/direction_func.h b/src/direction_func.h index bd10c8515b..12aee58639 100644 --- a/src/direction_func.h +++ b/src/direction_func.h @@ -1,4 +1,4 @@ -/* $Id: direction_func.h 27422 2015-10-30 16:20:00Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/direction_type.h b/src/direction_type.h index a0276e39b0..e6e08a182f 100644 --- a/src/direction_type.h +++ b/src/direction_type.h @@ -1,4 +1,4 @@ -/* $Id: direction_type.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/disaster_vehicle.cpp b/src/disaster_vehicle.cpp index 369347e8e3..64ebcd3fa1 100644 --- a/src/disaster_vehicle.cpp +++ b/src/disaster_vehicle.cpp @@ -1,4 +1,4 @@ -/* $Id: disaster_vehicle.cpp 27668 2016-10-16 14:59:44Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -164,7 +164,7 @@ DisasterVehicle::DisasterVehicle(int x, int y, Direction direction, DisasterSubT this->direction = direction; this->tile = TileVirtXY(x, y); this->subtype = subtype; - this->UpdateDeltaXY(INVALID_DIR); + this->UpdateDeltaXY(); this->owner = OWNER_NONE; this->image_override = 0; this->current_order.Free(); @@ -973,7 +973,7 @@ void ReleaseDisastersTargetingVehicle(VehicleID vehicle) } } -void DisasterVehicle::UpdateDeltaXY(Direction direction) +void DisasterVehicle::UpdateDeltaXY() { this->x_offs = -1; this->y_offs = -1; diff --git a/src/disaster_vehicle.h b/src/disaster_vehicle.h index 5b2d3f9da4..e86d96e97d 100644 --- a/src/disaster_vehicle.h +++ b/src/disaster_vehicle.h @@ -1,4 +1,4 @@ -/* $Id: disaster_vehicle.h 26872 2014-09-21 11:12:42Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -48,7 +48,7 @@ struct DisasterVehicle FINAL : public SpecializedVehicle 0) { - _score_part[owner][SCORE_MIN_PROFIT] = ClampToI32(min_profit); + _score_part[owner][SCORE_MIN_PROFIT] = min_profit; } } @@ -214,10 +214,10 @@ int UpdateCompanyRatingAndValue(Company *c, bool update) } while (++cee, --numec); if (min_income > 0) { - _score_part[owner][SCORE_MIN_INCOME] = ClampToI32(min_income); + _score_part[owner][SCORE_MIN_INCOME] = min_income; } - _score_part[owner][SCORE_MAX_INCOME] = ClampToI32(max_income); + _score_part[owner][SCORE_MAX_INCOME] = max_income; } } @@ -231,7 +231,7 @@ int UpdateCompanyRatingAndValue(Company *c, bool update) total_delivered += cee->delivered_cargo.GetSum(); } while (++cee, --numec); - _score_part[owner][SCORE_DELIVERED] = ClampToI32(total_delivered); + _score_part[owner][SCORE_DELIVERED] = total_delivered; } } @@ -243,13 +243,13 @@ int UpdateCompanyRatingAndValue(Company *c, bool update) /* Generate score for company's money */ { if (c->money > 0) { - _score_part[owner][SCORE_MONEY] = ClampToI32(c->money); + _score_part[owner][SCORE_MONEY] = c->money; } } /* Generate score for loan */ { - _score_part[owner][SCORE_LOAN] = ClampToI32(_score_info[SCORE_LOAN].needed - c->current_loan); + _score_part[owner][SCORE_LOAN] = _score_info[SCORE_LOAN].needed - c->current_loan; } /* Now we calculate the score for each item.. */ @@ -645,7 +645,7 @@ static void CompanyCheckBankrupt(Company *c) * that changing the current company is okay. In case of single * player we are sure (the above check) that we are not the local * company and thus we won't be moved. */ - if (!_networking || _network_server) DoCommandP(0, 2 | (c->index << 16), CRR_BANKRUPT, CMD_COMPANY_CTRL); + if (!_networking || _network_server) DoCommandP(0, CCA_DELETE | (c->index << 16), CRR_BANKRUPT, CMD_COMPANY_CTRL); break; } } @@ -699,9 +699,10 @@ static void CompaniesGenStatistics() if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, _cur_month)) return; FOR_ALL_COMPANIES(c) { - memmove(&c->old_economy[1], &c->old_economy[0], sizeof(c->old_economy) - sizeof(c->old_economy[0])); + /* Drop the oldest history off the end */ + std::copy_backward(c->old_economy, c->old_economy + MAX_HISTORY_QUARTERS - 1, c->old_economy + MAX_HISTORY_QUARTERS); c->old_economy[0] = c->cur_economy; - memset(&c->cur_economy, 0, sizeof(c->cur_economy)); + c->cur_economy = {}; if (c->num_valid_stat_ent != MAX_HISTORY_QUARTERS) c->num_valid_stat_ent++; @@ -1064,6 +1065,7 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n uint amount = min(num_pieces, 0xFFFFU - ind->incoming_cargo_waiting[cargo_index]); ind->incoming_cargo_waiting[cargo_index] += amount; + ind->last_cargo_accepted_at[cargo_index] = _date; num_pieces -= amount; accepted += amount; } @@ -1158,7 +1160,6 @@ static void TriggerIndustryProduction(Industry *i) uint16 callback = indspec->callback_mask; i->was_cargo_delivered = true; - i->last_cargo_accepted_at = _date; if (HasBit(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(callback, CBM_IND_PRODUCTION_256_TICKS)) { if (HasBit(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL)) { @@ -1167,14 +1168,15 @@ static void TriggerIndustryProduction(Industry *i) SetWindowDirty(WC_INDUSTRY_VIEW, i->index); } } else { - for (uint cargo_index = 0; cargo_index < lengthof(i->incoming_cargo_waiting); cargo_index++) { - uint cargo_waiting = i->incoming_cargo_waiting[cargo_index]; + for (uint ci_in = 0; ci_in < lengthof(i->incoming_cargo_waiting); ci_in++) { + uint cargo_waiting = i->incoming_cargo_waiting[ci_in]; if (cargo_waiting == 0) continue; - i->produced_cargo_waiting[0] = min(i->produced_cargo_waiting[0] + (cargo_waiting * indspec->input_cargo_multiplier[cargo_index][0] / 256), 0xFFFF); - i->produced_cargo_waiting[1] = min(i->produced_cargo_waiting[1] + (cargo_waiting * indspec->input_cargo_multiplier[cargo_index][1] / 256), 0xFFFF); + for (uint ci_out = 0; ci_out < lengthof(i->produced_cargo_waiting); ci_out++) { + i->produced_cargo_waiting[ci_out] = min(i->produced_cargo_waiting[ci_out] + (cargo_waiting * indspec->input_cargo_multiplier[ci_in][ci_out] / 256), 0xFFFF); + } - i->incoming_cargo_waiting[cargo_index] = 0; + i->incoming_cargo_waiting[ci_in] = 0; } } @@ -1262,7 +1264,6 @@ Money CargoPayment::PayTransfer(const CargoPacket *cp, uint count) /** * Prepare the vehicle to be unloaded. - * @param curr_station the station where the consist is at the moment * @param front_v the vehicle to be unloaded */ void PrepareUnload(Vehicle *front_v) @@ -1387,14 +1388,14 @@ struct IsEmptyAction struct PrepareRefitAction { CargoArray &consist_capleft; ///< Capacities left in the consist. - uint32 &refit_mask; ///< Bitmask of possible refit cargoes. + CargoTypes &refit_mask; ///< Bitmask of possible refit cargoes. /** * Create a refit preparation action. * @param consist_capleft Capacities left in consist, to be updated here. * @param refit_mask Refit mask to be constructed from refit information of vehicles. */ - PrepareRefitAction(CargoArray &consist_capleft, uint32 &refit_mask) : + PrepareRefitAction(CargoArray &consist_capleft, CargoTypes &refit_mask) : consist_capleft(consist_capleft), refit_mask(refit_mask) {} /** @@ -1490,7 +1491,7 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station Backup cur_company(_current_company, v->owner, FILE_LINE); - uint32 refit_mask = v->GetEngine()->info.refit_mask; + CargoTypes refit_mask = v->GetEngine()->info.refit_mask; /* Remove old capacity from consist capacity and collect refit mask. */ IterateVehicleParts(v_start, PrepareRefitAction(consist_capleft, refit_mask)); @@ -1504,7 +1505,7 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station if (st->goods[cid].cargo.HasCargoFor(next_station)) { /* Try to find out if auto-refitting would succeed. In case the refit is allowed, * the returned refit capacity will be greater than zero. */ - DoCommand(v_start->tile, v_start->index, cid | 1U << 6 | 0xFF << 8 | 1U << 16, DC_QUERY_COST, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts. + DoCommand(v_start->tile, v_start->index, cid | 1U << 24 | 0xFF << 8 | 1U << 16, DC_QUERY_COST, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts. /* Try to balance different loadable cargoes between parts of the consist, so that * all of them can be loaded. Avoid a situation where all vehicles suddenly switch * to the first loadable cargo for which there is only one packet. If the capacities @@ -1527,7 +1528,7 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station * "via any station" before reserving. We rather produce some more "any station" cargo than * misrouting it. */ IterateVehicleParts(v_start, ReturnCargoAction(st, INVALID_STATION)); - CommandCost cost = DoCommand(v_start->tile, v_start->index, new_cid | 1U << 6 | 0xFF << 8 | 1U << 16, DC_EXEC, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts. + CommandCost cost = DoCommand(v_start->tile, v_start->index, new_cid | 1U << 24 | 0xFF << 8 | 1U << 16, DC_EXEC, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts. if (cost.Succeeded()) v->First()->profit_this_year -= cost.GetCost() << 8; } @@ -1648,10 +1649,10 @@ static void LoadUnloadVehicle(Vehicle *front) bool completely_emptied = true; bool anything_unloaded = false; bool anything_loaded = false; - uint32 full_load_amount = 0; - uint32 cargo_not_full = 0; - uint32 cargo_full = 0; - uint32 reservation_left = 0; + CargoTypes full_load_amount = 0; + CargoTypes cargo_not_full = 0; + CargoTypes cargo_full = 0; + CargoTypes reservation_left = 0; front->cur_speed = 0; @@ -1859,7 +1860,7 @@ static void LoadUnloadVehicle(Vehicle *front) /* if the aircraft carries passengers and is NOT full, then * continue loading, no matter how much mail is in */ if ((front->type == VEH_AIRCRAFT && IsCargoInClass(front->cargo_type, CC_PASSENGERS) && front->cargo_cap > front->cargo.StoredCount()) || - (cargo_not_full && (cargo_full & ~cargo_not_full) == 0)) { // There are still non-full cargoes + (cargo_not_full != 0 && (cargo_full & ~cargo_not_full) == 0)) { // There are still non-full cargoes finished_loading = false; } } else if (cargo_not_full != 0) { diff --git a/src/economy_base.h b/src/economy_base.h index c96c5e3170..60b0964a95 100644 --- a/src/economy_base.h +++ b/src/economy_base.h @@ -1,4 +1,4 @@ -/* $Id: economy_base.h 25011 2013-02-17 14:50:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/economy_func.h b/src/economy_func.h index 953fc6a6aa..7b369b7d60 100644 --- a/src/economy_func.h +++ b/src/economy_func.h @@ -1,4 +1,4 @@ -/* $Id: economy_func.h 24565 2012-10-01 19:31:55Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -22,7 +22,7 @@ void ResetPriceBaseMultipliers(); void SetPriceBaseMultiplier(Price price, int factor); extern const ScoreInfo _score_info[]; -extern int _score_part[MAX_COMPANIES][SCORE_END]; +extern int64 _score_part[MAX_COMPANIES][SCORE_END]; extern Economy _economy; /* Prices and also the fractional part. */ extern Prices _price; diff --git a/src/economy_type.h b/src/economy_type.h index c76cf82cae..31f74aacc7 100644 --- a/src/economy_type.h +++ b/src/economy_type.h @@ -1,4 +1,4 @@ -/* $Id: economy_type.h 25788 2013-09-21 13:07:42Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -152,12 +152,12 @@ enum ExpensesType { EXPENSES_NEW_VEHICLES, ///< New vehicles. EXPENSES_TRAIN_RUN, ///< Running costs trains. EXPENSES_ROADVEH_RUN, ///< Running costs road vehicles. - EXPENSES_AIRCRAFT_RUN, ///< Running costs aircrafts. + EXPENSES_AIRCRAFT_RUN, ///< Running costs aircraft. EXPENSES_SHIP_RUN, ///< Running costs ships. EXPENSES_PROPERTY, ///< Property costs. EXPENSES_TRAIN_INC, ///< Income from trains. EXPENSES_ROADVEH_INC, ///< Income from road vehicles. - EXPENSES_AIRCRAFT_INC, ///< Income from aircrafts. + EXPENSES_AIRCRAFT_INC, ///< Income from aircraft. EXPENSES_SHIP_INC, ///< Income from ships. EXPENSES_LOAN_INT, ///< Interest payments over the loan. EXPENSES_OTHER, ///< Other expenses. diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp index 831c43c050..4d8f58acb8 100644 --- a/src/effectvehicle.cpp +++ b/src/effectvehicle.cpp @@ -1,4 +1,4 @@ -/* $Id: effectvehicle.cpp 27668 2016-10-16 14:59:44Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -603,7 +603,7 @@ EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type) v->y_pos = y; v->z_pos = z; v->tile = 0; - v->UpdateDeltaXY(INVALID_DIR); + v->UpdateDeltaXY(); v->vehstatus = VS_UNCLICKABLE; _effect_init_procs[type](v); @@ -647,7 +647,7 @@ bool EffectVehicle::Tick() return _effect_tick_procs[this->subtype](this); } -void EffectVehicle::UpdateDeltaXY(Direction direction) +void EffectVehicle::UpdateDeltaXY() { this->x_offs = 0; this->y_offs = 0; diff --git a/src/effectvehicle_base.h b/src/effectvehicle_base.h index 9a7db8ba16..d809657fab 100644 --- a/src/effectvehicle_base.h +++ b/src/effectvehicle_base.h @@ -1,4 +1,4 @@ -/* $Id: effectvehicle_base.h 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,7 +32,7 @@ struct EffectVehicle FINAL : public SpecializedVehicletype) { case VEH_TRAIN: - return (10 * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_TRAIN_TRACTIVE_EFFORT, this->u.rail.tractive_effort)) / 256; + return (GROUND_ACCELERATION * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_TRAIN_TRACTIVE_EFFORT, this->u.rail.tractive_effort)) / 256 / 1000; case VEH_ROAD: - return (10 * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_ROADVEH_TRACTIVE_EFFORT, this->u.road.tractive_effort)) / 256; + return (GROUND_ACCELERATION * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_ROADVEH_TRACTIVE_EFFORT, this->u.road.tractive_effort)) / 256 / 1000; default: NOT_REACHED(); } @@ -573,7 +573,7 @@ static bool IsWagon(EngineID index) } /** - * Update #reliability of engine \a e, (if needed) update the engine GUIs. + * Update #Engine::reliability and (if needed) update the engine GUIs. * @param e %Engine to update. */ static void CalcEngineReliability(Engine *e) @@ -752,7 +752,7 @@ static CompanyID GetPreviewCompany(Engine *e) CompanyID best_company = INVALID_COMPANY; /* For trains the cargomask has no useful meaning, since you can attach other wagons */ - uint32 cargomask = e->type != VEH_TRAIN ? GetUnionOfArticulatedRefitMasks(e->index, true) : (uint32)-1; + CargoTypes cargomask = e->type != VEH_TRAIN ? GetUnionOfArticulatedRefitMasks(e->index, true) : ALL_CARGOTYPES; int32 best_hist = -1; const Company *c; @@ -1117,7 +1117,9 @@ bool IsEngineRefittable(EngineID engine) /* Is there any cargo except the default cargo? */ CargoID default_cargo = e->GetDefaultCargoType(); - return default_cargo != CT_INVALID && ei->refit_mask != 1U << default_cargo; + CargoTypes default_cargo_mask = 0; + SetBit(default_cargo_mask, default_cargo); + return default_cargo != CT_INVALID && ei->refit_mask != default_cargo_mask; } /** diff --git a/src/engine_base.h b/src/engine_base.h index 0e857028c8..25c6bfbeb9 100644 --- a/src/engine_base.h +++ b/src/engine_base.h @@ -1,4 +1,4 @@ -/* $Id: engine_base.h 27797 2017-03-18 20:43:43Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/engine_func.h b/src/engine_func.h index 2286245011..37fb005092 100644 --- a/src/engine_func.h +++ b/src/engine_func.h @@ -1,4 +1,4 @@ -/* $Id: engine_func.h 26849 2014-09-18 19:53:22Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,7 +26,7 @@ extern const uint8 _engine_offsets[4]; bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company); bool IsEngineRefittable(EngineID engine); -void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, uint32 *refits); +void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits); void SetYearEngineAgingStops(); void StartupOneEngine(Engine *e, Date aging_date); diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 87a08ace02..51c7e14836 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: engine_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -108,7 +108,7 @@ struct EnginePreviewWindow : Window { EngineID engine = this->window_number; SetDParam(0, GetEngineCategoryName(engine)); - int y = r.top + GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, r.right - r.top + 1); + int y = r.top + GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, r.right - r.left + 1); y = DrawStringMultiLine(r.left, r.right, r.top, y, STR_ENGINE_PREVIEW_MESSAGE, TC_FROMSTRING, SA_CENTER) + WD_PAR_VSEP_WIDE; SetDParam(0, engine); diff --git a/src/engine_gui.h b/src/engine_gui.h index 0ce73ca50f..fc0b7ad7d9 100644 --- a/src/engine_gui.h +++ b/src/engine_gui.h @@ -1,4 +1,4 @@ -/* $Id: engine_gui.h 26804 2014-09-07 16:14:06Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/engine_type.h b/src/engine_type.h index 0ad830f904..82f10d9d87 100644 --- a/src/engine_type.h +++ b/src/engine_type.h @@ -1,4 +1,4 @@ -/* $Id: engine_type.h 27668 2016-10-16 14:59:44Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -137,7 +137,7 @@ struct EngineInfo { byte load_amount; byte climates; ///< Climates supported by the engine. CargoID cargo_type; - uint32 refit_mask; + CargoTypes refit_mask; byte refit_cost; byte misc_flags; ///< Miscellaneous flags. @see EngineMiscFlags byte callback_mask; ///< Bitmask of vehicle callbacks that have to be called diff --git a/src/error.h b/src/error.h index efe2c6b642..597b62efbe 100644 --- a/src/error.h +++ b/src/error.h @@ -1,4 +1,4 @@ -/* $Id: error.h 26241 2014-01-12 18:00:39Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/error_gui.cpp b/src/error_gui.cpp index 6b1c869dd0..1c59b7e8d0 100644 --- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: error_gui.cpp 27307 2015-06-20 12:57:34Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -425,7 +425,7 @@ void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel /** * Schedule a list of errors. * Note: This does not try to display the error now. This is useful if the window system is not yet running. - * @param data Error message datas; cleared afterwards + * @param datas Error message datas; cleared afterwards */ void ScheduleErrorMessage(ErrorList &datas) { diff --git a/src/fileio.cpp b/src/fileio.cpp index cdcdbfcd90..0e6d86e3c7 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -1,4 +1,4 @@ -/* $Id: fileio.cpp 27954 2017-12-27 22:07:59Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,7 +15,7 @@ #include "fios.h" #include "string_func.h" #include "tar_type.h" -#ifdef WIN32 +#ifdef _WIN32 #include # define access _taccess #elif defined(__HAIKU__) @@ -325,15 +325,7 @@ bool FioCheckFileExists(const char *filename, Subdirectory subdir) */ bool FileExists(const char *filename) { -#if defined(WINCE) - /* There is always one platform that doesn't support basic commands... */ - HANDLE hand = CreateFile(OTTD2FS(filename), 0, 0, NULL, OPEN_EXISTING, 0, NULL); - if (hand == INVALID_HANDLE_VALUE) return 1; - CloseHandle(hand); - return 0; -#else return access(OTTD2FS(filename), 0) == 0; -#endif } /** @@ -355,7 +347,7 @@ char *FioGetFullPath(char *buf, const char *last, Searchpath sp, Subdirectory su /** * Find a path to the filename in one of the search directories. - * @param buf [out] Destination buffer for the path. + * @param[out] buf Destination buffer for the path. * @param last End of the destination buffer. * @param subdir Subdirectory to try. * @param filename Filename to look for. @@ -369,7 +361,7 @@ char *FioFindFullPath(char *buf, const char *last, Subdirectory subdir, const ch FOR_ALL_SEARCHPATHS(sp) { FioGetFullPath(buf, last, sp, subdir, filename); if (FileExists(buf)) return buf; -#if !defined(WIN32) +#if !defined(_WIN32) /* Be, as opening files, aware that sometimes the filename * might be in uppercase when it is in lowercase on the * disk. Of course Windows doesn't care about casing. */ @@ -407,7 +399,7 @@ char *FioGetDirectory(char *buf, const char *last, Subdirectory subdir) static FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subdirectory subdir, size_t *filesize) { -#if defined(WIN32) && defined(UNICODE) +#if defined(_WIN32) && defined(UNICODE) /* fopen is implemented as a define with ellipses for * Unicode support (prepend an L). As we are not sending * a string, but a variable, it 'renames' the variable, @@ -424,12 +416,12 @@ static FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath s seprintf(buf, lastof(buf), "%s%s%s", _searchpaths[sp], _subdirs[subdir], filename); } -#if defined(WIN32) +#if defined(_WIN32) if (mode[0] == 'r' && GetFileAttributes(OTTD2FS(buf)) == INVALID_FILE_ATTRIBUTES) return NULL; #endif f = fopen(buf, mode); -#if !defined(WIN32) +#if !defined(_WIN32) if (f == NULL && strtolower(buf + ((subdir == NO_DIRECTORY) ? 0 : strlen(_searchpaths[sp]) - 1))) { f = fopen(buf, mode); } @@ -446,7 +438,7 @@ static FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath s /** * Opens a file from inside a tar archive. * @param entry The entry to open. - * @param filesize [out] If not \c NULL, size of the opened file. + * @param[out] filesize If not \c NULL, size of the opened file. * @return File handle of the opened file, or \c NULL if the file is not available. * @note The file is read from within the tar file, and may not return \c EOF after reading the whole file. */ @@ -468,7 +460,6 @@ FILE *FioFOpenFileTar(TarFileListEntry *entry, size_t *filesize) * Opens a OpenTTD file somewhere in a personal or global directory. * @param filename Name of the file to open. * @param subdir Subdirectory to open. - * @param filename Name of the file to open. * @return File handle of the opened file, or \c NULL if the file is not available. */ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, size_t *filesize) @@ -540,11 +531,11 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, * Create a directory with the given name * @param name the new name of the directory */ -static void FioCreateDirectory(const char *name) +void FioCreateDirectory(const char *name) { /* Ignore directory creation errors; they'll surface later on, and most * of the time they are 'directory already exists' errors anyhow. */ -#if defined(WIN32) || defined(WINCE) +#if defined(_WIN32) CreateDirectory(OTTD2FS(name), NULL); #elif defined(OS2) && !defined(__INNOTEK_LIBC__) mkdir(OTTD2FS(name)); @@ -640,7 +631,7 @@ static void SimplifyFileName(char *name) /** * Perform the scanning of a particular subdirectory. - * @param subdir The subdirectory to scan. + * @param sd The subdirectory to scan. * @return The number of found tar files. */ uint TarScanner::DoScan(Subdirectory sd) @@ -988,14 +979,14 @@ bool ExtractTar(const char *tar_filename, Subdirectory subdir) return true; } -#if defined(WIN32) || defined(WINCE) +#if defined(_WIN32) /** * Determine the base (personal dir and game data dir) paths * @param exe the path from the current path to the executable * @note defined in the OS related files (os2.cpp, win32.cpp, unix.cpp etc) */ extern void DetermineBasePaths(const char *exe); -#else /* defined(WIN32) || defined(WINCE) */ +#else /* defined(_WIN32) */ /** * Changes the working directory to the path of the give executable. @@ -1158,7 +1149,7 @@ extern void cocoaSetApplicationBundleDir(); _searchpaths[SP_APPLICATION_BUNDLE_DIR] = NULL; #endif } -#endif /* defined(WIN32) || defined(WINCE) */ +#endif /* defined(_WIN32) */ const char *_personal_dir; @@ -1311,7 +1302,7 @@ void SanitizeFilename(char *filename) /** * Load a file into memory. * @param filename Name of the file to load. - * @param lenp [out] Length of loaded data. + * @param[out] lenp Length of loaded data. * @param maxsize Maximum size to load. * @return Pointer to new memory containing the loaded data, or \c NULL if loading failed. * @note If \a maxsize less than the length of the file, loading fails. diff --git a/src/fileio_func.h b/src/fileio_func.h index bac9ffaf2f..f5ef58ac06 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -1,4 +1,4 @@ -/* $Id: fileio_func.h 26489 2014-04-23 21:23:21Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -55,6 +55,7 @@ char *FioGetFullPath(char *buf, const char *last, Searchpath sp, Subdirectory su char *FioFindFullPath(char *buf, const char *last, Subdirectory subdir, const char *filename); char *FioAppendDirectory(char *buf, const char *last, Searchpath sp, Subdirectory subdir); char *FioGetDirectory(char *buf, const char *last, Subdirectory subdir); +void FioCreateDirectory(const char *name); const char *FiosGetScreenshotDir(); @@ -117,7 +118,7 @@ public: DECLARE_ENUM_AS_BIT_SET(TarScanner::Mode) /* Implementation of opendir/readdir/closedir for Windows */ -#if defined(WIN32) +#if defined(_WIN32) struct DIR; struct dirent { // XXX - only d_name implemented @@ -135,7 +136,7 @@ int closedir(DIR *d); /* Use system-supplied opendir/readdir/closedir functions */ # include # include -#endif /* defined(WIN32) */ +#endif /* defined(_WIN32) */ /** * A wrapper around opendir() which will convert the string from @@ -149,4 +150,17 @@ static inline DIR *ttd_opendir(const char *path) return opendir(OTTD2FS(path)); } + +/** Auto-close a file upon scope exit. */ +class FileCloser { + FILE *f; + +public: + FileCloser(FILE *_f) : f(_f) {} + ~FileCloser() + { + fclose(f); + } +}; + #endif /* FILEIO_FUNC_H */ diff --git a/src/fileio_type.h b/src/fileio_type.h index c9bdae5b43..fd3ac84554 100644 --- a/src/fileio_type.h +++ b/src/fileio_type.h @@ -1,4 +1,4 @@ -/* $Id: fileio_type.h 27653 2016-09-04 16:06:50Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/fios.cpp b/src/fios.cpp index 9eb79941df..73365ddc29 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -1,4 +1,4 @@ -/* $Id: fios.cpp 27896 2017-08-20 21:04:21Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -20,9 +20,9 @@ #include "string_func.h" #include -#ifndef WIN32 +#ifndef _WIN32 # include -#endif /* WIN32 */ +#endif /* _WIN32 */ #include "table/strings.h" @@ -153,9 +153,7 @@ const char *FiosBrowseTo(const FiosItem *item) { switch (item->type) { case FIOS_TYPE_DRIVE: -#if defined(WINCE) - seprintf(_fios_path, _fios_path_last, PATHSEP ""); -#elif defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) seprintf(_fios_path, _fios_path_last, "%c:" PATHSEP, item->title[0]); #endif break; @@ -320,7 +318,7 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons } FiosItem *fios = file_list.Append(); -#ifdef WIN32 +#ifdef _WIN32 struct _stat sb; if (_tstat(OTTD2FS(filename), &sb) == 0) { #else diff --git a/src/fios.h b/src/fios.h index acab7d98cf..24c9f370eb 100644 --- a/src/fios.h +++ b/src/fios.h @@ -1,4 +1,4 @@ -/* $Id: fios.h 27729 2017-01-14 13:12:49Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,6 +18,13 @@ #include "network/core/tcp_content.h" +/** Special values for save-load window for the data parameter of #InvalidateWindowData. */ +enum SaveLoadInvalidateWindowData { + SLIWD_RESCAN_FILES, ///< Rescan all files (when changed directory, ...) + SLIWD_SELECTION_CHANGES, ///< File selection has changed (user click, ...) + SLIWD_FILTER_CHANGES, ///< The filename filter has changed (via the editbox) +}; + typedef SmallMap CompanyPropertiesMap; /** diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index d8b00e5d0c..63bb589d77 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: fios_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,6 +28,7 @@ #include "date_func.h" #include "core/geometry_func.hpp" #include "gamelog.h" +#include "stringfilter_type.h" #include "widgets/fios_widget.h" @@ -76,9 +77,20 @@ static const NWidgetPart _nested_load_dialog_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION), NWidget(WWT_DEFSIZEBOX, COLOUR_GREY), EndContainer(), + /* Current directory and free space */ NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(), + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(NWID_VERTICAL), + /* Left side : filter box and available files */ + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 1), + /* Filter box with label */ + NWidget(NWID_HORIZONTAL), SetPadding(WD_FRAMERECT_TOP, 0, WD_FRAMERECT_BOTTOM, 0), + SetPIP(WD_FRAMETEXT_LEFT, WD_FRAMETEXT_RIGHT, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL), + NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetMinimalSize(50, 12), SetResize(1, 0), + SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP), + EndContainer(), + /* Sort buttons */ NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_SORT_BYNAME), SetDataTip(STR_SORT_BY_CAPTION_NAME, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0), @@ -86,6 +98,7 @@ static const NWidgetPart _nested_load_dialog_widgets[] = { EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_SL_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON), EndContainer(), + /* Files */ NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND), NWidget(NWID_HORIZONTAL), NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetFill(1, 1), SetPadding(2, 1, 2, 2), @@ -98,6 +111,8 @@ static const NWidgetPart _nested_load_dialog_widgets[] = { EndContainer(), EndContainer(), EndContainer(), + + /* Right side : game details */ NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_MISSING_NEWGRFS), SetDataTip(STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_BUTTON, STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_TOOLTIP), SetFill(1, 0), SetResize(1, 0), @@ -119,8 +134,18 @@ static const NWidgetPart _nested_load_heightmap_dialog_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION), NWidget(WWT_DEFSIZEBOX, COLOUR_GREY), EndContainer(), + /* Current directory and free space */ NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(), - NWidget(NWID_VERTICAL), + + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 1), + /* Filter box with label */ + NWidget(NWID_HORIZONTAL), SetPadding(WD_FRAMERECT_TOP, 0, WD_FRAMERECT_BOTTOM, 0), + SetPIP(WD_FRAMETEXT_LEFT, WD_FRAMETEXT_RIGHT, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL), + NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetMinimalSize(50, 12), SetResize(1, 0), + SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP), + EndContainer(), + /* Sort Buttons */ NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_SORT_BYNAME), SetDataTip(STR_SORT_BY_CAPTION_NAME, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0), @@ -128,6 +153,7 @@ static const NWidgetPart _nested_load_heightmap_dialog_widgets[] = { EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_SL_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON), EndContainer(), + /* Files */ NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND), NWidget(NWID_HORIZONTAL), NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetFill(1, 1), SetPadding(2, 1, 2, 2), @@ -152,9 +178,19 @@ static const NWidgetPart _nested_save_dialog_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION), NWidget(WWT_DEFSIZEBOX, COLOUR_GREY), EndContainer(), + /* Current directory and free space */ NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(NWID_VERTICAL), + /* Left side : filter box and available files */ + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 1), + /* Filter box with label */ + NWidget(NWID_HORIZONTAL), SetPadding(WD_FRAMERECT_TOP, 0, WD_FRAMERECT_BOTTOM, 0), + SetPIP(WD_FRAMETEXT_LEFT, WD_FRAMETEXT_RIGHT, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL), + NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetMinimalSize(50, 12), SetResize(1, 0), + SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP), + EndContainer(), + /* Sort buttons */ NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_SORT_BYNAME), SetDataTip(STR_SORT_BY_CAPTION_NAME, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0), @@ -162,6 +198,7 @@ static const NWidgetPart _nested_save_dialog_widgets[] = { EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_SL_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON), EndContainer(), + /* Files */ NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND), NWidget(NWID_HORIZONTAL), NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetPadding(2, 1, 0, 2), @@ -171,11 +208,14 @@ static const NWidgetPart _nested_save_dialog_widgets[] = { NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_SAVE_OSK_TITLE), SetPadding(3, 2, 2, 2), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_SAVELOAD_OSKTITLE, STR_SAVELOAD_EDITBOX_TOOLTIP), EndContainer(), + /* Save/delete buttons */ NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_DELETE_SELECTION), SetDataTip(STR_SAVELOAD_DELETE_BUTTON, STR_SAVELOAD_DELETE_TOOLTIP), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_SAVE_GAME), SetDataTip(STR_SAVELOAD_SAVE_BUTTON, STR_SAVELOAD_SAVE_TOOLTIP), SetFill(1, 0), SetResize(1, 0), EndContainer(), EndContainer(), + + /* Right side : game details */ NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1), NWidget(NWID_HORIZONTAL), @@ -201,7 +241,7 @@ static const TextColour _fios_colours[] = { /** * Sort the collected list save games prior to displaying it in the save/load gui. - * @param [inout] file_list List of save game files found in the directory. + * @param[in,out] file_list List of save game files found in the directory. */ static void SortSaveGameList(FileList &file_list) { @@ -227,6 +267,8 @@ static void SortSaveGameList(FileList &file_list) struct SaveLoadWindow : public Window { private: + static const uint EDITBOX_MAX_SIZE = 50; + QueryString filename_editbox; ///< Filename editbox. AbstractFileType abstract_filetype; /// Type of file to select. SaveLoadOperation fop; ///< File operation to perform. @@ -234,6 +276,23 @@ private: FiosItem o_dir; const FiosItem *selected; ///< Selected game in #fios_items, or \c NULL. Scrollbar *vscroll; + + StringFilter string_filter; ///< Filter for available games. + QueryString filter_editbox; ///< Filter editbox; + SmallVector fios_items_shown; ///< Map of the filtered out fios items + + static void SaveGameConfirmationCallback(Window *w, bool confirmed) + { + /* File name has already been written to _file_to_saveload */ + if (confirmed) _switch_mode = SM_SAVE_GAME; + } + + static void SaveHeightmapConfirmationCallback(Window *w, bool confirmed) + { + /* File name has already been written to _file_to_saveload */ + if (confirmed) _switch_mode = SM_SAVE_HEIGHTMAP; + } + public: /** Generate a default save filename. */ @@ -244,7 +303,7 @@ public: } SaveLoadWindow(WindowDesc *desc, AbstractFileType abstract_filetype, SaveLoadOperation fop) - : Window(desc), filename_editbox(64), abstract_filetype(abstract_filetype), fop(fop) + : Window(desc), filename_editbox(64), abstract_filetype(abstract_filetype), fop(fop), filter_editbox(EDITBOX_MAX_SIZE) { assert(this->fop == SLO_SAVE || this->fop == SLO_LOAD); @@ -296,6 +355,8 @@ public: this->FinishInitNested(0); this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST); + this->querystrings[WID_SL_FILTER] = &this->filter_editbox; + this->filter_editbox.cancel_button = QueryString::ACTION_CLEAR; /* pause is only used in single-player, non-editor mode, non-menu mode. It * will be unpaused in the WE_DESTROY event handler. */ @@ -304,7 +365,7 @@ public: } SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0); - this->OnInvalidateData(0); + this->OnInvalidateData(SLIWD_RESCAN_FILES); ResetObjectToPlace(); @@ -327,8 +388,15 @@ public: strecpy(o_dir.name, _personal_dir, lastof(o_dir.name)); } - /* Focus the edit box by default in the save windows */ - if (this->fop == SLO_SAVE) this->SetFocusedWidget(WID_SL_SAVE_OSK_TITLE); + switch (this->fop) { + case SLO_SAVE: + /* Focus the edit box by default in the save window */ + this->SetFocusedWidget(WID_SL_SAVE_OSK_TITLE); + break; + + default: + this->SetFocusedWidget(WID_SL_FILTER); + } } virtual ~SaveLoadWindow() @@ -370,6 +438,10 @@ public: uint y = r.top + WD_FRAMERECT_TOP; for (uint pos = this->vscroll->GetPosition(); pos < this->fios_items.Length(); pos++) { + if (!this->fios_items_shown[pos]) { + /* The current item is filtered out : we do not show it */ + continue; + } const FiosItem *item = this->fios_items.Get(pos); if (item == this->selected) { @@ -507,7 +579,6 @@ public: SortSaveGameList(this->fios_items); } - this->vscroll->SetCount(this->fios_items.Length()); this->DrawWidgets(); } @@ -530,7 +601,7 @@ public: case WID_SL_HOME_BUTTON: // OpenTTD 'button', jumps to OpenTTD directory FiosBrowseTo(&o_dir); - this->InvalidateData(); + this->InvalidateData(SLIWD_RESCAN_FILES); break; case WID_SL_LOAD_BUTTON: @@ -572,6 +643,12 @@ public: int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP); if (y == INT_MAX) return; + /* Get the corresponding non-filtered out item from the list */ + int i = 0; + while (i <= y) { + if (!this->fios_items_shown[i]) y++; + i++; + } const FiosItem *file = this->fios_items.Get(y); const char *name = FiosBrowseTo(file); @@ -586,7 +663,7 @@ public: SaveOrLoad(name, SLO_CHECK, DFT_GAME_FILE, NO_DIRECTORY, false); } - this->InvalidateData(1); + this->InvalidateData(SLIWD_SELECTION_CHANGES); } if (this->fop == SLO_SAVE) { /* Copy clicked name to editbox */ @@ -611,7 +688,7 @@ public: } } else { /* Changed directory, need refresh. */ - this->InvalidateData(); + this->InvalidateData(SLIWD_RESCAN_FILES); } break; } @@ -660,17 +737,25 @@ public: if (!FiosDelete(this->filename_editbox.text.buf)) { ShowErrorMessage(STR_ERROR_UNABLE_TO_DELETE_FILE, INVALID_STRING_ID, WL_ERROR); } else { - this->InvalidateData(); + this->InvalidateData(SLIWD_RESCAN_FILES); /* Reset file name to current date on successful delete */ if (this->abstract_filetype == FT_SAVEGAME) GenerateFileName(); } } else if (this->IsWidgetLowered(WID_SL_SAVE_GAME)) { // Save button clicked if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) { - _switch_mode = SM_SAVE_GAME; FiosMakeSavegameName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name)); + if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) { + ShowQuery(STR_SAVELOAD_OVERWRITE_TITLE, STR_SAVELOAD_OVERWRITE_WARNING, this, SaveLoadWindow::SaveGameConfirmationCallback); + } else { + _switch_mode = SM_SAVE_GAME; + } } else { - _switch_mode = SM_SAVE_HEIGHTMAP; FiosMakeHeightmapName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name)); + if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) { + ShowQuery(STR_SAVELOAD_OVERWRITE_TITLE, STR_SAVELOAD_OVERWRITE_WARNING, this, SaveLoadWindow::SaveHeightmapConfirmationCallback); + } else { + _switch_mode = SM_SAVE_HEIGHTMAP; + } } /* In the editor set up the vehicle engines correctly (date might have changed) */ @@ -691,7 +776,7 @@ public: virtual void OnInvalidateData(int data = 0, bool gui_scope = true) { switch (data) { - case 0: + case SLIWD_RESCAN_FILES: /* Rescan files */ this->selected = NULL; _load_check_data.Clear(); @@ -702,9 +787,13 @@ public: this->vscroll->SetCount(this->fios_items.Length()); this->selected = NULL; _load_check_data.Clear(); + + /* We reset the files filtered */ + this->OnInvalidateData(SLIWD_FILTER_CHANGES); + FALLTHROUGH; - case 1: + case SLIWD_SELECTION_CHANGES: /* Selection changes */ if (!gui_scope) break; @@ -732,6 +821,41 @@ public: NOT_REACHED(); } break; + + case SLIWD_FILTER_CHANGES: + /* Filter changes */ + this->fios_items_shown.Resize(this->fios_items.Length()); + uint items_shown_count = 0; ///< The number of items shown in the list + /* We pass through every fios item */ + for (uint i = 0; i < this->fios_items.Length(); i++) { + if (this->string_filter.IsEmpty()) { + /* We don't filter anything out if the filter editbox is empty */ + this->fios_items_shown[i] = true; + items_shown_count++; + } else { + this->string_filter.ResetState(); + this->string_filter.AddLine(this->fios_items[i].title); + /* We set the vector to show this fios element as filtered depending on the result of the filter */ + this->fios_items_shown[i] = this->string_filter.GetState(); + if (this->fios_items_shown[i]) items_shown_count++; + + if (&(this->fios_items[i]) == this->selected && this->fios_items_shown[i] == false) { + /* The selected element has been filtered out */ + this->selected = NULL; + this->OnInvalidateData(SLIWD_SELECTION_CHANGES); + } + } + } + this->vscroll->SetCount(items_shown_count); + break; + } + } + + virtual void OnEditboxChanged(int wid) + { + if (wid == WID_SL_FILTER) { + this->string_filter.SetFilterTerm(this->filter_editbox.text.buf); + this->InvalidateData(SLIWD_FILTER_CHANGES); } } }; diff --git a/src/fontcache.cpp b/src/fontcache.cpp index c334f3bbc9..98e8bdf41c 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -1,4 +1,4 @@ -/* $Id: fontcache.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -86,6 +86,7 @@ public: virtual GlyphID MapCharToGlyph(WChar key) { assert(IsPrintable(key)); return SPRITE_GLYPH | key; } virtual const void *GetFontTable(uint32 tag, size_t &length) { length = 0; return NULL; } virtual const char *GetFontName() { return "sprite"; } + virtual bool IsBuiltInFont() { return true; } }; /** @@ -208,6 +209,8 @@ bool SpriteFontCache::GetDrawGlyphShadow() class FreeTypeFontCache : public FontCache { private: FT_Face face; ///< The font face associated with this font. + int req_size; ///< Requested font size. + int used_size; ///< Used font size. typedef SmallMap > FontTable; ///< Table with font table cache FontTable font_tables; ///< Cached font tables. @@ -236,10 +239,12 @@ private: GlyphEntry *GetGlyphPtr(GlyphID key); void SetGlyphPtr(GlyphID key, const GlyphEntry *glyph, bool duplicate = false); + void SetFontSize(FontSize fs, FT_Face face, int pixels); public: FreeTypeFontCache(FontSize fs, FT_Face face, int pixels); ~FreeTypeFontCache(); + virtual int GetFontSize() const { return this->used_size; } virtual SpriteID GetUnicodeGlyph(WChar key) { return this->parent->GetUnicodeGlyph(key); } virtual void SetUnicodeGlyph(WChar key, SpriteID sprite) { this->parent->SetUnicodeGlyph(key, sprite); } virtual void InitializeUnicodeGlyphMap() { this->parent->InitializeUnicodeGlyphMap(); } @@ -250,6 +255,7 @@ public: virtual GlyphID MapCharToGlyph(WChar key); virtual const void *GetFontTable(uint32 tag, size_t &length); virtual const char *GetFontName() { return face->family_name; } + virtual bool IsBuiltInFont() { return false; } }; FT_Library _library = NULL; @@ -265,22 +271,29 @@ static const byte SHADOW_COLOUR = 2; * @param face The font that has to be loaded. * @param pixels The number of pixels this font should be high. */ -FreeTypeFontCache::FreeTypeFontCache(FontSize fs, FT_Face face, int pixels) : FontCache(fs), face(face), glyph_to_sprite(NULL) +FreeTypeFontCache::FreeTypeFontCache(FontSize fs, FT_Face face, int pixels) : FontCache(fs), face(face), req_size(pixels), glyph_to_sprite(NULL) { assert(face != NULL); + this->SetFontSize(fs, face, pixels); +} + +void FreeTypeFontCache::SetFontSize(FontSize fs, FT_Face face, int pixels) +{ if (pixels == 0) { /* Try to determine a good height based on the minimal height recommended by the font. */ - pixels = _default_font_height[this->fs]; + int scaled_height = ScaleGUITrad(_default_font_height[this->fs]); + pixels = scaled_height; TT_Header *head = (TT_Header *)FT_Get_Sfnt_Table(this->face, ft_sfnt_head); if (head != NULL) { /* Font height is minimum height plus the difference between the default * height for this font size and the small size. */ - int diff = _default_font_height[this->fs] - _default_font_height[FS_SMALL]; - pixels = Clamp(min(head->Lowest_Rec_PPEM, 20) + diff, _default_font_height[this->fs], MAX_FONT_SIZE); + int diff = scaled_height - ScaleGUITrad(_default_font_height[FS_SMALL]); + pixels = Clamp(min(head->Lowest_Rec_PPEM, 20) + diff, scaled_height, MAX_FONT_SIZE); } } + this->used_size = pixels; FT_Error err = FT_Set_Pixel_Sizes(this->face, 0, pixels); if (err != FT_Err_Ok) { @@ -393,6 +406,7 @@ found_face: FreeTypeFontCache::~FreeTypeFontCache() { FT_Done_Face(this->face); + this->face = NULL; this->ClearFontCache(); for (FontTable::iterator iter = this->font_tables.Begin(); iter != this->font_tables.End(); iter++) { @@ -422,6 +436,9 @@ void FreeTypeFontCache::ClearFontCache() this->glyph_to_sprite = NULL; Layouter::ResetFontCache(this->fs); + + /* GUI scaling might have changed, determine font size anew if it was automatically selected. */ + if (this->face != NULL && this->req_size == 0) this->SetFontSize(this->fs, this->face, this->req_size); } FreeTypeFontCache::GlyphEntry *FreeTypeFontCache::GetGlyphPtr(GlyphID key) @@ -529,7 +546,7 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key) return glyph->sprite; } } - FT_Load_Glyph(this->face, key, FT_LOAD_DEFAULT); + FT_Load_Glyph(this->face, key, aa ? FT_LOAD_TARGET_NORMAL : FT_LOAD_TARGET_MONO); FT_Render_Glyph(this->face->glyph, aa ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO); /* Despite requesting a normal glyph, FreeType may have returned a bitmap */ diff --git a/src/fontcache.h b/src/fontcache.h index ff4584bee3..1f5e56d924 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -1,4 +1,4 @@ -/* $Id: fontcache.h 27004 2014-10-12 20:43:25Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -64,6 +64,12 @@ public: */ inline int GetUnitsPerEM() const { return this->units_per_em; } + /** + * Get the nominal font size of the font. + * @return The nominal font size. + */ + virtual int GetFontSize() const { return this->height; } + /** * Get the SpriteID mapped to the given key * @param key The key to get the sprite for. @@ -143,6 +149,11 @@ public: { return this->parent != NULL; } + + /** + * Is this a built-in sprite font? + */ + virtual bool IsBuiltInFont() = 0; }; /** Get the SpriteID mapped to the given font size and key */ diff --git a/src/fontdetection.cpp b/src/fontdetection.cpp index 860f3edfa3..012dd00b33 100644 --- a/src/fontdetection.cpp +++ b/src/fontdetection.cpp @@ -1,4 +1,4 @@ -/* $Id: fontdetection.cpp 26709 2014-07-30 20:19:29Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,7 +28,7 @@ extern FT_Library _library; * Windows support * ======================================================================================== */ -#ifdef WIN32 +#ifdef _WIN32 #include "core/alloc_func.hpp" #include "core/math_func.hpp" #include @@ -382,38 +382,67 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face) FT_Error err = FT_Err_Cannot_Open_Resource; /* Get font reference from name. */ - CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name, kCFStringEncodingUTF8); - ATSFontRef font = ATSFontFindFromName(name, kATSOptionFlagsDefault); - CFRelease(name); - if (font == kInvalidFont) return err; - - /* Get a file system reference for the font. */ - FSRef ref; + UInt8 file_path[PATH_MAX]; OSStatus os_err = -1; -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) - if (MacOSVersionIsAtLeast(10, 5, 0)) { - os_err = ATSFontGetFileReference(font, &ref); + CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name, kCFStringEncodingUTF8); + +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if (MacOSVersionIsAtLeast(10, 6, 0)) { + /* Simply creating the font using CTFontCreateWithNameAndSize will *always* return + * something, no matter the name. As such, we can't use it to check for existance. + * We instead query the list of all font descriptors that match the given name which + * does not do this stupid name fallback. */ + CTFontDescriptorRef name_desc = CTFontDescriptorCreateWithNameAndSize(name, 0.0); + CFSetRef mandatory_attribs = CFSetCreate(kCFAllocatorDefault, (const void **)&kCTFontNameAttribute, 1, &kCFTypeSetCallBacks); + CFArrayRef descs = CTFontDescriptorCreateMatchingFontDescriptors(name_desc, mandatory_attribs); + CFRelease(mandatory_attribs); + CFRelease(name_desc); + CFRelease(name); + + /* Loop over all matches until we can get a path for one of them. */ + for (CFIndex i = 0; descs != NULL && i < CFArrayGetCount(descs) && os_err != noErr; i++) { + CTFontRef font = CTFontCreateWithFontDescriptor((CTFontDescriptorRef)CFArrayGetValueAtIndex(descs, i), 0.0, NULL); + CFURLRef fontURL = (CFURLRef)CTFontCopyAttribute(font, kCTFontURLAttribute); + if (CFURLGetFileSystemRepresentation(fontURL, true, file_path, lengthof(file_path))) os_err = noErr; + CFRelease(font); + CFRelease(fontURL); + } + if (descs != NULL) CFRelease(descs); } else #endif { -#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) && !defined(__LP64__) - /* This type was introduced with the 10.5 SDK. */ -#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) - #define ATSFSSpec FSSpec +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) + ATSFontRef font = ATSFontFindFromName(name, kATSOptionFlagsDefault); + CFRelease(name); + if (font == kInvalidFont) return err; + + /* Get a file system reference for the font. */ + FSRef ref; +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) + if (MacOSVersionIsAtLeast(10, 5, 0)) { + os_err = ATSFontGetFileReference(font, &ref); + } else #endif - FSSpec spec; - os_err = ATSFontGetFileSpecification(font, (ATSFSSpec *)&spec); - if (os_err == noErr) os_err = FSpMakeFSRef(&spec, &ref); + { +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) && !defined(__LP64__) + /* This type was introduced with the 10.5 SDK. */ +#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) +#define ATSFSSpec FSSpec +#endif + FSSpec spec; + os_err = ATSFontGetFileSpecification(font, (ATSFSSpec *)&spec); + if (os_err == noErr) os_err = FSpMakeFSRef(&spec, &ref); +#endif + } + + /* Get unix path for file. */ + if (os_err == noErr) os_err = FSRefMakePath(&ref, file_path, sizeof(file_path)); #endif } if (os_err == noErr) { - /* Get unix path for file. */ - UInt8 file_path[PATH_MAX]; - if (FSRefMakePath(&ref, file_path, sizeof(file_path)) == noErr) { - DEBUG(freetype, 3, "Font path for %s: %s", font_name, file_path); - err = FT_New_Face(_library, (const char *)file_path, 0, face); - } + DEBUG(freetype, 3, "Font path for %s: %s", font_name, file_path); + err = FT_New_Face(_library, (const char *)file_path, 0, face); } return err; @@ -496,6 +525,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i } else #endif { +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) /* Create a font iterator and iterate over all fonts that * are available to the application. */ ATSFontIterator itr; @@ -529,6 +559,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i } } ATSFontIteratorRelease(&itr); +#endif } if (!result) { diff --git a/src/fontdetection.h b/src/fontdetection.h index d7e9681bb3..edb961e6d3 100644 --- a/src/fontdetection.h +++ b/src/fontdetection.h @@ -1,4 +1,4 @@ -/* $Id: fontdetection.h 25450 2013-06-23 18:32:02Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp new file mode 100644 index 0000000000..908cf81c0b --- /dev/null +++ b/src/framerate_gui.cpp @@ -0,0 +1,862 @@ +/* $Id$ */ + +/* +* This file is part of OpenTTD. +* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . +*/ + +/** @file framerate_gui.cpp GUI for displaying framerate/game speed information. */ + +#include "framerate_type.h" +#include +#include "gfx_func.h" +#include "window_gui.h" +#include "table/sprites.h" +#include "strings_func.h" +#include "console_func.h" +#include "console_type.h" +#include "guitimer_func.h" + +#include "widgets/framerate_widget.h" + + +/** + * Private declarations for performance measurement implementation + */ +namespace { + + /** Number of data points to keep in buffer for each performance measurement */ + const int NUM_FRAMERATE_POINTS = 512; + /** %Units a second is divided into in performance measurements */ + const TimingMeasurement TIMESTAMP_PRECISION = 1000000; + + struct PerformanceData { + /** Duration value indicating the value is not valid should be considered a gap in measurements */ + static const TimingMeasurement INVALID_DURATION = UINT64_MAX; + + /** Time spent processing each cycle of the performance element, circular buffer */ + TimingMeasurement durations[NUM_FRAMERATE_POINTS]; + /** Start time of each cycle of the performance element, circular buffer */ + TimingMeasurement timestamps[NUM_FRAMERATE_POINTS]; + /** Expected number of cycles per second when the system is running without slowdowns */ + double expected_rate; + /** Next index to write to in \c durations and \c timestamps */ + int next_index; + /** Last index written to in \c durations and \c timestamps */ + int prev_index; + /** Number of data points recorded, clamped to \c NUM_FRAMERATE_POINTS */ + int num_valid; + + /** Current accumulated duration */ + TimingMeasurement acc_duration; + /** Start time for current accumulation cycle */ + TimingMeasurement acc_timestamp; + + /** + * Initialize a data element with an expected collection rate + * @param expected_rate + * Expected number of cycles per second of the performance element. Use 1 if unknown or not relevant. + * The rate is used for highlighting slow-running elements in the GUI. + */ + explicit PerformanceData(double expected_rate) : expected_rate(expected_rate), next_index(0), prev_index(0), num_valid(0) { } + + /** Collect a complete measurement, given start and ending times for a processing block */ + void Add(TimingMeasurement start_time, TimingMeasurement end_time) + { + this->durations[this->next_index] = end_time - start_time; + this->timestamps[this->next_index] = start_time; + this->prev_index = this->next_index; + this->next_index += 1; + if (this->next_index >= NUM_FRAMERATE_POINTS) this->next_index = 0; + this->num_valid = min(NUM_FRAMERATE_POINTS, this->num_valid + 1); + } + + /** Begin an accumulation of multiple measurements into a single value, from a given start time */ + void BeginAccumulate(TimingMeasurement start_time) + { + this->timestamps[this->next_index] = this->acc_timestamp; + this->durations[this->next_index] = this->acc_duration; + this->prev_index = this->next_index; + this->next_index += 1; + if (this->next_index >= NUM_FRAMERATE_POINTS) this->next_index = 0; + this->num_valid = min(NUM_FRAMERATE_POINTS, this->num_valid + 1); + + this->acc_duration = 0; + this->acc_timestamp = start_time; + } + + /** Accumulate a period onto the current measurement */ + void AddAccumulate(TimingMeasurement duration) + { + this->acc_duration += duration; + } + + /** Indicate a pause/expected discontinuity in processing the element */ + void AddPause(TimingMeasurement start_time) + { + if (this->durations[this->prev_index] != INVALID_DURATION) { + this->timestamps[this->next_index] = start_time; + this->durations[this->next_index] = INVALID_DURATION; + this->prev_index = this->next_index; + this->next_index += 1; + if (this->next_index >= NUM_FRAMERATE_POINTS) this->next_index = 0; + this->num_valid += 1; + } + } + + /** Get average cycle processing time over a number of data points */ + double GetAverageDurationMilliseconds(int count) + { + count = min(count, this->num_valid); + + int first_point = this->prev_index - count; + if (first_point < 0) first_point += NUM_FRAMERATE_POINTS; + + /* Sum durations, skipping invalid points */ + double sumtime = 0; + for (int i = first_point; i < first_point + count; i++) { + auto d = this->durations[i % NUM_FRAMERATE_POINTS]; + if (d != INVALID_DURATION) { + sumtime += d; + } else { + /* Don't count the invalid durations */ + count--; + } + } + + if (count == 0) return 0; // avoid div by zero + return sumtime * 1000 / count / TIMESTAMP_PRECISION; + } + + /** Get current rate of a performance element, based on approximately the past one second of data */ + double GetRate() + { + /* Start at last recorded point, end at latest when reaching the earliest recorded point */ + int point = this->prev_index; + int last_point = this->next_index - this->num_valid; + if (last_point < 0) last_point += NUM_FRAMERATE_POINTS; + + /* Number of data points collected */ + int count = 0; + /* Time of previous data point */ + TimingMeasurement last = this->timestamps[point]; + /* Total duration covered by collected points */ + TimingMeasurement total = 0; + + while (point != last_point) { + /* Only record valid data points, but pretend the gaps in measurements aren't there */ + if (this->durations[point] != INVALID_DURATION) { + total += last - this->timestamps[point]; + count++; + } + last = this->timestamps[point]; + if (total >= TIMESTAMP_PRECISION) break; // end after 1 second has been collected + point--; + if (point < 0) point = NUM_FRAMERATE_POINTS - 1; + } + + if (total == 0 || count == 0) return 0; + return (double)count * TIMESTAMP_PRECISION / total; + } + }; + + /** %Game loop rate, cycles per second */ + static const double GL_RATE = 1000.0 / MILLISECONDS_PER_TICK; + + /** + * Storage for all performance element measurements. + * Elements are initialized with the expected rate in recorded values per second. + * @hideinitializer + */ + PerformanceData _pf_data[PFE_MAX] = { + PerformanceData(GL_RATE), // PFE_GAMELOOP + PerformanceData(1), // PFE_ACC_GL_ECONOMY + PerformanceData(1), // PFE_ACC_GL_TRAINS + PerformanceData(1), // PFE_ACC_GL_ROADVEHS + PerformanceData(1), // PFE_ACC_GL_SHIPS + PerformanceData(1), // PFE_ACC_GL_AIRCRAFT + PerformanceData(1), // PFE_GL_LANDSCAPE + PerformanceData(1), // PFE_GL_LINKGRAPH + PerformanceData(GL_RATE), // PFE_DRAWING + PerformanceData(1), // PFE_ACC_DRAWWORLD + PerformanceData(60.0), // PFE_VIDEO + PerformanceData(1000.0 * 8192 / 44100), // PFE_SOUND + }; + +} + + +/** + * Return a timestamp with \c TIMESTAMP_PRECISION ticks per second precision. + * The basis of the timestamp is implementation defined, but the value should be steady, + * so differences can be taken to reliably measure intervals. + */ +static TimingMeasurement GetPerformanceTimer() +{ + using namespace std::chrono; + return (TimingMeasurement)time_point_cast(high_resolution_clock::now()).time_since_epoch().count(); +} + + +/** + * Begin a cycle of a measured element. + * @param elem The element to be measured + */ +PerformanceMeasurer::PerformanceMeasurer(PerformanceElement elem) +{ + assert(elem < PFE_MAX); + + this->elem = elem; + this->start_time = GetPerformanceTimer(); +} + +/** Finish a cycle of a measured element and store the measurement taken. */ +PerformanceMeasurer::~PerformanceMeasurer() +{ + _pf_data[this->elem].Add(this->start_time, GetPerformanceTimer()); +} + +/** Set the rate of expected cycles per second of a performance element. */ +void PerformanceMeasurer::SetExpectedRate(double rate) +{ + _pf_data[this->elem].expected_rate = rate; +} + +/** + * Indicate that a cycle of "pause" where no processing occurs. + * @param elem The element not currently being processed + */ +void PerformanceMeasurer::Paused(PerformanceElement elem) +{ + _pf_data[elem].AddPause(GetPerformanceTimer()); +} + + +/** + * Begin measuring one block of the accumulating value. + * @param elem The element to be measured + */ +PerformanceAccumulator::PerformanceAccumulator(PerformanceElement elem) +{ + assert(elem < PFE_MAX); + + this->elem = elem; + this->start_time = GetPerformanceTimer(); +} + +/** Finish and add one block of the accumulating value. */ +PerformanceAccumulator::~PerformanceAccumulator() +{ + _pf_data[this->elem].AddAccumulate(GetPerformanceTimer() - this->start_time); +} + +/** + * Store the previous accumulator value and reset for a new cycle of accumulating measurements. + * @note This function must be called once per frame, otherwise measurements are not collected. + * @param elem The element to begin a new measurement cycle of + */ +void PerformanceAccumulator::Reset(PerformanceElement elem) +{ + _pf_data[elem].BeginAccumulate(GetPerformanceTimer()); +} + + +void ShowFrametimeGraphWindow(PerformanceElement elem); + + +/** @hideinitializer */ +static const NWidgetPart _framerate_window_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY, WID_FRW_CAPTION), SetDataTip(STR_FRAMERATE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_SHADEBOX, COLOUR_GREY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), + EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), + NWidget(NWID_VERTICAL), SetPadding(6), SetPIP(0, 3, 0), + NWidget(WWT_TEXT, COLOUR_GREY, WID_FRW_RATE_GAMELOOP), SetDataTip(STR_FRAMERATE_RATE_GAMELOOP, STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP), + NWidget(WWT_TEXT, COLOUR_GREY, WID_FRW_RATE_DRAWING), SetDataTip(STR_FRAMERATE_RATE_BLITTER, STR_FRAMERATE_RATE_BLITTER_TOOLTIP), + NWidget(WWT_TEXT, COLOUR_GREY, WID_FRW_RATE_FACTOR), SetDataTip(STR_FRAMERATE_SPEED_FACTOR, STR_FRAMERATE_SPEED_FACTOR_TOOLTIP), + EndContainer(), + EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), + NWidget(NWID_VERTICAL), SetPadding(6), SetPIP(0, 3, 0), + NWidget(NWID_HORIZONTAL), SetPIP(0, 6, 0), + NWidget(WWT_EMPTY, COLOUR_GREY, WID_FRW_TIMES_NAMES), + NWidget(WWT_EMPTY, COLOUR_GREY, WID_FRW_TIMES_CURRENT), + NWidget(WWT_EMPTY, COLOUR_GREY, WID_FRW_TIMES_AVERAGE), + EndContainer(), + NWidget(WWT_TEXT, COLOUR_GREY, WID_FRW_INFO_DATA_POINTS), SetDataTip(STR_FRAMERATE_DATA_POINTS, 0x0), + EndContainer(), + EndContainer(), +}; + +struct FramerateWindow : Window { + bool small; + GUITimer next_update; + + struct CachedDecimal { + StringID strid; + uint32 value; + + inline void SetRate(double value, double target) + { + const double threshold_good = target * 0.95; + const double threshold_bad = target * 2 / 3; + value = min(9999.99, value); + this->value = (uint32)(value * 100); + this->strid = (value > threshold_good) ? STR_FRAMERATE_FPS_GOOD : (value < threshold_bad) ? STR_FRAMERATE_FPS_BAD : STR_FRAMERATE_FPS_WARN; + } + + inline void SetTime(double value, double target) + { + const double threshold_good = target / 3; + const double threshold_bad = target; + value = min(9999.99, value); + this->value = (uint32)(value * 100); + this->strid = (value < threshold_good) ? STR_FRAMERATE_MS_GOOD : (value > threshold_bad) ? STR_FRAMERATE_MS_BAD : STR_FRAMERATE_MS_WARN; + } + + inline void InsertDParams(uint n) const + { + SetDParam(n, this->value); + SetDParam(n + 1, 2); + } + }; + + CachedDecimal rate_gameloop; ///< cached game loop tick rate + CachedDecimal rate_drawing; ///< cached drawing frame rate + CachedDecimal speed_gameloop; ///< cached game loop speed factor + CachedDecimal times_shortterm[PFE_MAX]; ///< cached short term average times + CachedDecimal times_longterm[PFE_MAX]; ///< cached long term average times + + static const int VSPACING = 3; ///< space between column heading and values + + FramerateWindow(WindowDesc *desc, WindowNumber number) : Window(desc) + { + this->InitNested(number); + this->small = this->IsShaded(); + this->UpdateData(); + this->next_update.SetInterval(100); + } + + virtual void OnRealtimeTick(uint delta_ms) + { + bool elapsed = this->next_update.Elapsed(delta_ms); + + /* Check if the shaded state has changed, switch caption text if it has */ + if (this->small != this->IsShaded()) { + this->small = this->IsShaded(); + this->GetWidget(WID_FRW_CAPTION)->SetDataTip(this->small ? STR_FRAMERATE_CAPTION_SMALL : STR_FRAMERATE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); + elapsed = true; + } + + if (elapsed) { + this->UpdateData(); + this->SetDirty(); + this->next_update.SetInterval(100); + } + } + + void UpdateData() + { + double gl_rate = _pf_data[PFE_GAMELOOP].GetRate(); + this->rate_gameloop.SetRate(gl_rate, _pf_data[PFE_GAMELOOP].expected_rate); + this->speed_gameloop.SetRate(gl_rate / _pf_data[PFE_GAMELOOP].expected_rate, 1.0); + if (this->small) return; // in small mode, this is everything needed + + this->rate_drawing.SetRate(_pf_data[PFE_DRAWING].GetRate(), _pf_data[PFE_DRAWING].expected_rate); + + for (PerformanceElement e = PFE_FIRST; e < PFE_MAX; e++) { + this->times_shortterm[e].SetTime(_pf_data[e].GetAverageDurationMilliseconds(8), MILLISECONDS_PER_TICK); + this->times_longterm[e].SetTime(_pf_data[e].GetAverageDurationMilliseconds(NUM_FRAMERATE_POINTS), MILLISECONDS_PER_TICK); + } + } + + virtual void SetStringParameters(int widget) const + { + switch (widget) { + case WID_FRW_CAPTION: + /* When the window is shaded, the caption shows game loop rate and speed factor */ + if (!this->small) break; + SetDParam(0, this->rate_gameloop.strid); + this->rate_gameloop.InsertDParams(1); + this->speed_gameloop.InsertDParams(3); + break; + + case WID_FRW_RATE_GAMELOOP: + SetDParam(0, this->rate_gameloop.strid); + this->rate_gameloop.InsertDParams(1); + break; + case WID_FRW_RATE_DRAWING: + SetDParam(0, this->rate_drawing.strid); + this->rate_drawing.InsertDParams(1); + break; + case WID_FRW_RATE_FACTOR: + this->speed_gameloop.InsertDParams(0); + break; + case WID_FRW_INFO_DATA_POINTS: + SetDParam(0, NUM_FRAMERATE_POINTS); + break; + } + } + + virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) + { + switch (widget) { + case WID_FRW_RATE_GAMELOOP: + SetDParam(0, STR_FRAMERATE_FPS_GOOD); + SetDParam(1, 999999); + SetDParam(2, 2); + *size = GetStringBoundingBox(STR_FRAMERATE_RATE_GAMELOOP); + break; + case WID_FRW_RATE_DRAWING: + SetDParam(0, STR_FRAMERATE_FPS_GOOD); + SetDParam(1, 999999); + SetDParam(2, 2); + *size = GetStringBoundingBox(STR_FRAMERATE_RATE_BLITTER); + break; + case WID_FRW_RATE_FACTOR: + SetDParam(0, 999999); + SetDParam(1, 2); + *size = GetStringBoundingBox(STR_FRAMERATE_SPEED_FACTOR); + break; + + case WID_FRW_TIMES_NAMES: { + int linecount = PFE_MAX - PFE_FIRST; + size->width = 0; + size->height = FONT_HEIGHT_NORMAL * (linecount + 1) + VSPACING; + for (int line = 0; line < linecount; line++) { + Dimension line_size = GetStringBoundingBox(STR_FRAMERATE_GAMELOOP + line); + size->width = max(size->width, line_size.width); + } + break; + } + + case WID_FRW_TIMES_CURRENT: + case WID_FRW_TIMES_AVERAGE: { + int linecount = PFE_MAX - PFE_FIRST; + *size = GetStringBoundingBox(STR_FRAMERATE_CURRENT + (widget - WID_FRW_TIMES_CURRENT)); + SetDParam(0, 999999); + SetDParam(1, 2); + Dimension item_size = GetStringBoundingBox(STR_FRAMERATE_MS_GOOD); + size->width = max(size->width, item_size.width); + size->height += FONT_HEIGHT_NORMAL * linecount + VSPACING; + break; + } + } + } + + /** Render a column of formatted average durations */ + void DrawElementTimesColumn(const Rect &r, StringID heading_str, const CachedDecimal *values) const + { + int y = r.top; + DrawString(r.left, r.right, y, heading_str, TC_FROMSTRING, SA_CENTER, true); + y += FONT_HEIGHT_NORMAL + VSPACING; + + for (PerformanceElement e = PFE_FIRST; e < PFE_MAX; e++) { + values[e].InsertDParams(0); + DrawString(r.left, r.right, y, values[e].strid, TC_FROMSTRING, SA_RIGHT); + y += FONT_HEIGHT_NORMAL; + } + } + + virtual void DrawWidget(const Rect &r, int widget) const + { + switch (widget) { + case WID_FRW_TIMES_NAMES: { + /* Render a column of titles for performance element names */ + int linecount = PFE_MAX - PFE_FIRST; + int y = r.top + FONT_HEIGHT_NORMAL + VSPACING; // first line contains headings in the value columns + for (int i = 0; i < linecount; i++) { + DrawString(r.left, r.right, y, STR_FRAMERATE_GAMELOOP + i, TC_FROMSTRING, SA_LEFT); + y += FONT_HEIGHT_NORMAL; + } + break; + } + case WID_FRW_TIMES_CURRENT: + /* Render short-term average values */ + DrawElementTimesColumn(r, STR_FRAMERATE_CURRENT, this->times_shortterm); + break; + case WID_FRW_TIMES_AVERAGE: + /* Render averages of all recorded values */ + DrawElementTimesColumn(r, STR_FRAMERATE_AVERAGE, this->times_longterm); + break; + } + } + + virtual void OnClick(Point pt, int widget, int click_count) + { + switch (widget) { + case WID_FRW_TIMES_NAMES: + case WID_FRW_TIMES_CURRENT: + case WID_FRW_TIMES_AVERAGE: { + /* Open time graph windows when clicking detail measurement lines */ + int line = this->GetRowFromWidget(pt.y, widget, VSPACING, FONT_HEIGHT_NORMAL); + if (line > 0) { + line -= 1; + ShowFrametimeGraphWindow((PerformanceElement)line); + } + break; + } + } + } +}; + +static WindowDesc _framerate_display_desc( + WDP_AUTO, "framerate_display", 60, 40, + WC_FRAMERATE_DISPLAY, WC_NONE, + 0, + _framerate_window_widgets, lengthof(_framerate_window_widgets) +); + + +/** @hideinitializer */ +static const NWidgetPart _frametime_graph_window_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY, WID_FGW_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_GREY), + EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), + NWidget(NWID_VERTICAL), SetPadding(6), + NWidget(WWT_EMPTY, COLOUR_GREY, WID_FGW_GRAPH), + EndContainer(), + EndContainer(), +}; + +struct FrametimeGraphWindow : Window { + int vertical_scale; ///< number of TIMESTAMP_PRECISION units vertically + int horizontal_scale; ///< number of half-second units horizontally + GUITimer next_scale_update; ///< interval for next scale update + + PerformanceElement element; ///< what element this window renders graph for + Dimension graph_size; ///< size of the main graph area (excluding axis labels) + + FrametimeGraphWindow(WindowDesc *desc, WindowNumber number) : Window(desc) + { + this->element = (PerformanceElement)number; + this->horizontal_scale = 4; + this->vertical_scale = TIMESTAMP_PRECISION / 10; + this->next_scale_update.SetInterval(1); + + this->InitNested(number); + } + + virtual void SetStringParameters(int widget) const + { + switch (widget) { + case WID_FGW_CAPTION: + SetDParam(0, STR_FRAMETIME_CAPTION_GAMELOOP + this->element); + break; + } + } + + virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) + { + if (widget == WID_FGW_GRAPH) { + SetDParam(0, 100); + Dimension size_ms_label = GetStringBoundingBox(STR_FRAMERATE_GRAPH_MILLISECONDS); + SetDParam(0, 100); + Dimension size_s_label = GetStringBoundingBox(STR_FRAMERATE_GRAPH_SECONDS); + + /* Size graph in height to fit at least 10 vertical labels with space between, or at least 100 pixels */ + graph_size.height = max(100, 10 * (size_ms_label.height + 1)); + /* Always 2:1 graph area */ + graph_size.width = 2 * graph_size.height; + *size = graph_size; + + size->width += size_ms_label.width + 2; + size->height += size_s_label.height + 2; + } + } + + void SelectHorizontalScale(TimingMeasurement range) + { + /* Determine horizontal scale based on period covered by 60 points + * (slightly less than 2 seconds at full game speed) */ + struct ScaleDef { TimingMeasurement range; int scale; }; + static const ScaleDef hscales[] = { + { 120, 60 }, + { 10, 20 }, + { 5, 10 }, + { 3, 4 }, + { 1, 2 }, + }; + for (const ScaleDef *sc = hscales; sc < hscales + lengthof(hscales); sc++) { + if (range < sc->range) this->horizontal_scale = sc->scale; + } + } + + void SelectVerticalScale(TimingMeasurement range) + { + /* Determine vertical scale based on peak value (within the horizontal scale + a bit) */ + static const TimingMeasurement vscales[] = { + TIMESTAMP_PRECISION * 100, + TIMESTAMP_PRECISION * 10, + TIMESTAMP_PRECISION * 5, + TIMESTAMP_PRECISION, + TIMESTAMP_PRECISION / 2, + TIMESTAMP_PRECISION / 5, + TIMESTAMP_PRECISION / 10, + TIMESTAMP_PRECISION / 50, + TIMESTAMP_PRECISION / 200, + }; + for (const TimingMeasurement *sc = vscales; sc < vscales + lengthof(vscales); sc++) { + if (range < *sc) this->vertical_scale = (int)*sc; + } + } + + /** Recalculate the graph scaling factors based on current recorded data */ + void UpdateScale() + { + const TimingMeasurement *durations = _pf_data[this->element].durations; + const TimingMeasurement *timestamps = _pf_data[this->element].timestamps; + int num_valid = _pf_data[this->element].num_valid; + int point = _pf_data[this->element].prev_index; + + TimingMeasurement lastts = timestamps[point]; + TimingMeasurement time_sum = 0; + TimingMeasurement peak_value = 0; + int count = 0; + + /* Sensible default for when too few measurements are available */ + this->horizontal_scale = 4; + + for (int i = 1; i < num_valid; i++) { + point--; + if (point < 0) point = NUM_FRAMERATE_POINTS - 1; + + TimingMeasurement value = durations[point]; + if (value == PerformanceData::INVALID_DURATION) { + /* Skip gaps in data by pretending time is continuous across them */ + lastts = timestamps[point]; + continue; + } + if (value > peak_value) peak_value = value; + count++; + + /* Accumulate period of time covered by data */ + time_sum += lastts - timestamps[point]; + lastts = timestamps[point]; + + /* Enough data to select a range and get decent data density */ + if (count == 60) this->SelectHorizontalScale(time_sum / TIMESTAMP_PRECISION); + + /* End when enough points have been collected and the horizontal scale has been exceeded */ + if (count >= 60 && time_sum >= (this->horizontal_scale + 2) * TIMESTAMP_PRECISION / 2) break; + } + + this->SelectVerticalScale(peak_value); + } + + virtual void OnRealtimeTick(uint delta_ms) + { + this->SetDirty(); + + if (this->next_scale_update.Elapsed(delta_ms)) { + this->next_scale_update.SetInterval(500); + this->UpdateScale(); + } + } + + /** Scale and interpolate a value from a source range into a destination range */ + template + static inline T Scinterlate(T dst_min, T dst_max, T src_min, T src_max, T value) + { + T dst_diff = dst_max - dst_min; + T src_diff = src_max - src_min; + return (value - src_min) * dst_diff / src_diff + dst_min; + } + + virtual void DrawWidget(const Rect &r, int widget) const + { + if (widget == WID_FGW_GRAPH) { + const TimingMeasurement *durations = _pf_data[this->element].durations; + const TimingMeasurement *timestamps = _pf_data[this->element].timestamps; + int point = _pf_data[this->element].prev_index; + + const int x_zero = r.right - (int)this->graph_size.width; + const int x_max = r.right; + const int y_zero = r.top + (int)this->graph_size.height; + const int y_max = r.top; + const int c_grid = PC_DARK_GREY; + const int c_lines = PC_BLACK; + const int c_peak = PC_DARK_RED; + + const TimingMeasurement draw_horz_scale = (TimingMeasurement)this->horizontal_scale * TIMESTAMP_PRECISION / 2; + const TimingMeasurement draw_vert_scale = (TimingMeasurement)this->vertical_scale; + + /* Number of \c horizontal_scale units in each horizontal division */ + const uint horz_div_scl = (this->horizontal_scale <= 20) ? 1 : 10; + /* Number of divisions of the horizontal axis */ + const uint horz_divisions = this->horizontal_scale / horz_div_scl; + /* Number of divisions of the vertical axis */ + const uint vert_divisions = 10; + + /* Draw division lines and labels for the vertical axis */ + for (uint division = 0; division < vert_divisions; division++) { + int y = Scinterlate(y_zero, y_max, 0, (int)vert_divisions, (int)division); + GfxDrawLine(x_zero, y, x_max, y, c_grid); + if (division % 2 == 0) { + if ((TimingMeasurement)this->vertical_scale > TIMESTAMP_PRECISION) { + SetDParam(0, this->vertical_scale * division / 10 / TIMESTAMP_PRECISION); + DrawString(r.left, x_zero - 2, y - FONT_HEIGHT_SMALL, STR_FRAMERATE_GRAPH_SECONDS, TC_GREY, SA_RIGHT | SA_FORCE, false, FS_SMALL); + } else { + SetDParam(0, this->vertical_scale * division / 10 * 1000 / TIMESTAMP_PRECISION); + DrawString(r.left, x_zero - 2, y - FONT_HEIGHT_SMALL, STR_FRAMERATE_GRAPH_MILLISECONDS, TC_GREY, SA_RIGHT | SA_FORCE, false, FS_SMALL); + } + } + } + /* Draw divison lines and labels for the horizontal axis */ + for (uint division = horz_divisions; division > 0; division--) { + int x = Scinterlate(x_zero, x_max, 0, (int)horz_divisions, (int)horz_divisions - (int)division); + GfxDrawLine(x, y_max, x, y_zero, c_grid); + if (division % 2 == 0) { + SetDParam(0, division * horz_div_scl / 2); + DrawString(x, x_max, y_zero + 2, STR_FRAMERATE_GRAPH_SECONDS, TC_GREY, SA_LEFT | SA_FORCE, false, FS_SMALL); + } + } + + /* Position of last rendered data point */ + Point lastpoint = { + x_max, + (int)Scinterlate(y_zero, y_max, 0, this->vertical_scale, durations[point]) + }; + /* Timestamp of last rendered data point */ + TimingMeasurement lastts = timestamps[point]; + + TimingMeasurement peak_value = 0; + Point peak_point = { 0, 0 }; + TimingMeasurement value_sum = 0; + TimingMeasurement time_sum = 0; + int points_drawn = 0; + + for (int i = 1; i < NUM_FRAMERATE_POINTS; i++) { + point--; + if (point < 0) point = NUM_FRAMERATE_POINTS - 1; + + TimingMeasurement value = durations[point]; + if (value == PerformanceData::INVALID_DURATION) { + /* Skip gaps in measurements, pretend the data points on each side are continuous */ + lastts = timestamps[point]; + continue; + } + + /* Use total time period covered for value along horizontal axis */ + time_sum += lastts - timestamps[point]; + lastts = timestamps[point]; + /* Stop if past the width of the graph */ + if (time_sum > draw_horz_scale) break; + + /* Draw line from previous point to new point */ + Point newpoint = { + (int)Scinterlate(x_zero, x_max, 0, (int64)draw_horz_scale, (int64)draw_horz_scale - (int64)time_sum), + (int)Scinterlate(y_zero, y_max, 0, (int64)draw_vert_scale, (int64)value) + }; + assert(newpoint.x <= lastpoint.x); + GfxDrawLine(lastpoint.x, lastpoint.y, newpoint.x, newpoint.y, c_lines); + lastpoint = newpoint; + + /* Record peak and average value across graphed data */ + value_sum += value; + points_drawn++; + if (value > peak_value) { + peak_value = value; + peak_point = newpoint; + } + } + + /* If the peak value is significantly larger than the average, mark and label it */ + if (points_drawn > 0 && peak_value > TIMESTAMP_PRECISION / 100 && 2 * peak_value > 3 * value_sum / points_drawn) { + TextColour tc_peak = (TextColour)(TC_IS_PALETTE_COLOUR | c_peak); + GfxFillRect(peak_point.x - 1, peak_point.y - 1, peak_point.x + 1, peak_point.y + 1, c_peak); + SetDParam(0, peak_value * 1000 / TIMESTAMP_PRECISION); + int label_y = max(y_max, peak_point.y - FONT_HEIGHT_SMALL); + if (peak_point.x - x_zero > (int)this->graph_size.width / 2) { + DrawString(x_zero, peak_point.x - 2, label_y, STR_FRAMERATE_GRAPH_MILLISECONDS, tc_peak, SA_RIGHT | SA_FORCE, false, FS_SMALL); + } else { + DrawString(peak_point.x + 2, x_max, label_y, STR_FRAMERATE_GRAPH_MILLISECONDS, tc_peak, SA_LEFT | SA_FORCE, false, FS_SMALL); + } + } + } + } +}; + +static WindowDesc _frametime_graph_window_desc( + WDP_AUTO, "frametime_graph", 140, 90, + WC_FRAMETIME_GRAPH, WC_NONE, + 0, + _frametime_graph_window_widgets, lengthof(_frametime_graph_window_widgets) +); + + + +/** Open the general framerate window */ +void ShowFramerateWindow() +{ + AllocateWindowDescFront(&_framerate_display_desc, 0); +} + +/** Open a graph window for a performance element */ +void ShowFrametimeGraphWindow(PerformanceElement elem) +{ + if (elem < PFE_FIRST || elem >= PFE_MAX) return; // maybe warn? + AllocateWindowDescFront(&_frametime_graph_window_desc, elem, true); +} + +/** Print performance statistics to game console */ +void ConPrintFramerate() +{ + const int count1 = NUM_FRAMERATE_POINTS / 8; + const int count2 = NUM_FRAMERATE_POINTS / 4; + const int count3 = NUM_FRAMERATE_POINTS / 1; + + IConsolePrintF(TC_SILVER, "Based on num. data points: %d %d %d", count1, count2, count3); + + static const char *MEASUREMENT_NAMES[PFE_MAX] = { + "Game loop", + " GL station ticks", + " GL train ticks", + " GL road vehicle ticks", + " GL ship ticks", + " GL aircraft ticks", + " GL landscape ticks", + " GL link graph delays", + "Drawing", + " Viewport drawing", + "Video output", + "Sound mixing", + }; + + static const PerformanceElement rate_elements[] = { PFE_GAMELOOP, PFE_DRAWING, PFE_VIDEO }; + + bool printed_anything = false; + + for (const PerformanceElement *e = rate_elements; e < rate_elements + lengthof(rate_elements); e++) { + auto &pf = _pf_data[*e]; + if (pf.num_valid == 0) continue; + IConsolePrintF(TC_GREEN, "%s rate: %.2ffps (expected: %.2ffps)", + MEASUREMENT_NAMES[*e], + pf.GetRate(), + pf.expected_rate); + printed_anything = true; + } + + for (PerformanceElement e = PFE_FIRST; e < PFE_MAX; e++) { + auto &pf = _pf_data[e]; + if (pf.num_valid == 0) continue; + IConsolePrintF(TC_LIGHT_BLUE, "%s times: %.2fms %.2fms %.2fms", + MEASUREMENT_NAMES[e], + pf.GetAverageDurationMilliseconds(count1), + pf.GetAverageDurationMilliseconds(count2), + pf.GetAverageDurationMilliseconds(count3)); + printed_anything = true; + } + + if (!printed_anything) { + IConsoleWarning("No performance measurements have been taken yet"); + } +} diff --git a/src/framerate_type.h b/src/framerate_type.h new file mode 100644 index 0000000000..8df9a279a1 --- /dev/null +++ b/src/framerate_type.h @@ -0,0 +1,109 @@ +/* $Id$ */ + +/* +* This file is part of OpenTTD. +* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . +*/ + +/** @file framerate_type.h + * Types for recording game performance data. + * + * @par Adding new measurements + * Adding a new measurement requires multiple steps, which are outlined here. + * The first thing to do is add a new member of the #PerformanceElement enum. + * It must be added before \c PFE_MAX and should be added in a logical place. + * For example, an element of the game loop would be added next to the other game loop elements, and a rendering element next to the other rendering elements. + * + * @par + * Second is adding a member to the \link anonymous_namespace{framerate_gui.cpp}::_pf_data _pf_data \endlink array, in the same position as the new #PerformanceElement member. + * + * @par + * Third is adding strings for the new element. There is an array in #ConPrintFramerate with strings used for the console command. + * Additionally, there are two sets of strings in \c english.txt for two GUI uses, also in the #PerformanceElement order. + * Search for \c STR_FRAMERATE_GAMELOOP and \c STR_FRAMETIME_CAPTION_GAMELOOP in \c english.txt to find those. + * + * @par + * Last is actually adding the measurements. There are two ways to measure, either one-shot (a single function/block handling all processing), + * or as an accumulated element (multiple functions/blocks that need to be summed across each frame/tick). + * Use either the PerformanceMeasurer or the PerformanceAccumulator class respectively for the two cases. + * Either class is used by instantiating an object of it at the beginning of the block to be measured, so it auto-destructs at the end of the block. + * For PerformanceAccumulator, make sure to also call PerformanceAccumulator::Reset once at the beginning of a new frame. Usually the StateGameLoop function is appropriate for this. + * + * @see framerate_gui.cpp for implementation + */ + +#ifndef FRAMERATE_TYPE_H +#define FRAMERATE_TYPE_H + +#include "stdafx.h" +#include "core/enum_type.hpp" + +/** + * Elements of game performance that can be measured. + * + * @note When adding new elements here, make sure to also update all other locations depending on the length and order of this enum. + * See Adding new measurements above. + */ +enum PerformanceElement { + PFE_FIRST = 0, + PFE_GAMELOOP = 0, ///< Speed of gameloop processing. + PFE_GL_ECONOMY, ///< Time spent processing cargo movement + PFE_GL_TRAINS, ///< Time spent processing trains + PFE_GL_ROADVEHS, ///< Time spend processing road vehicles + PFE_GL_SHIPS, ///< Time spent processing ships + PFE_GL_AIRCRAFT, ///< Time spent processing aircraft + PFE_GL_LANDSCAPE, ///< Time spent processing other world features + PFE_GL_LINKGRAPH, ///< Time spent waiting for link graph background jobs + PFE_DRAWING, ///< Speed of drawing world and GUI. + PFE_DRAWWORLD, ///< Time spent drawing world viewports in GUI + PFE_VIDEO, ///< Speed of painting drawn video buffer. + PFE_SOUND, ///< Speed of mixing audio samples + PFE_MAX, ///< End of enum, must be last. +}; +DECLARE_POSTFIX_INCREMENT(PerformanceElement) + +/** Type used to hold a performance timing measurement */ +typedef uint64 TimingMeasurement; + +/** + * RAII class for measuring simple elements of performance. + * Construct an object with the appropriate element parameter when processing begins, + * time is automatically taken when the object goes out of scope again. + * + * Call Paused at the start of a frame if the processing of this element is paused. + */ +class PerformanceMeasurer { + PerformanceElement elem; + TimingMeasurement start_time; +public: + PerformanceMeasurer(PerformanceElement elem); + ~PerformanceMeasurer(); + void SetExpectedRate(double rate); + static void Paused(PerformanceElement elem); +}; + +/** + * RAII class for measuring multi-step elements of performance. + * At the beginning of a frame, call Reset on the element, then construct an object in the scope where + * each processing cycle happens. The measurements are summed between resets. + * + * Usually StateGameLoop is an appropriate function to place Reset calls in, but for elements with + * more isolated scopes it can also be appropriate to Reset somewhere else. + * An example is the CallVehicleTicks function where all the vehicle type elements are reset. + * + * The PerformanceMeasurer::Paused function can also be used with elements otherwise measured with this class. + */ +class PerformanceAccumulator { + PerformanceElement elem; + TimingMeasurement start_time; +public: + PerformanceAccumulator(PerformanceElement elem); + ~PerformanceAccumulator(); + static void Reset(PerformanceElement elem); +}; + +void ShowFramerateWindow(); + +#endif /* FRAMERATE_TYPE_H */ diff --git a/src/game/game.hpp b/src/game/game.hpp index ff9c28cb0f..329ba5e500 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -1,4 +1,4 @@ -/* $Id: game.hpp 25114 2013-03-22 21:21:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -55,7 +55,7 @@ public: /** * Resume execution of the Game Script. This function will not actually execute - * the script, but set a flag so that the script is executed my the usual + * the script, but set a flag so that the script is executed by the usual * mechanism that executes the script. */ static void Unpause(); diff --git a/src/game/game_config.cpp b/src/game/game_config.cpp index 3fd1c68e65..50cd5da4e0 100644 --- a/src/game/game_config.cpp +++ b/src/game/game_config.cpp @@ -1,4 +1,4 @@ -/* $Id: game_config.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_config.hpp b/src/game/game_config.hpp index 4a0ec97fdd..e9ebdc38c1 100644 --- a/src/game/game_config.hpp +++ b/src/game/game_config.hpp @@ -1,4 +1,4 @@ -/* $Id: game_config.hpp 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp index d9b491bd78..2f95e26224 100644 --- a/src/game/game_core.cpp +++ b/src/game/game_core.cpp @@ -1,4 +1,4 @@ -/* $Id: game_core.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp index ff6f0cab8d..f8c04608b7 100644 --- a/src/game/game_info.cpp +++ b/src/game/game_info.cpp @@ -1,4 +1,4 @@ -/* $Id: game_info.cpp 27780 2017-03-11 20:50:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,12 +26,12 @@ static bool CheckAPIVersion(const char *api_version) { return strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 || strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0 || - strcmp(api_version, "1.8") == 0; + strcmp(api_version, "1.8") == 0 || strcmp(api_version, "1.9") == 0; } -#if defined(WIN32) +#if defined(_WIN32) #undef GetClassName -#endif /* WIN32 */ +#endif /* _WIN32 */ template <> const char *GetClassName() { return "GSInfo"; } /* static */ void GameInfo::RegisterAPI(Squirrel *engine) diff --git a/src/game/game_info.hpp b/src/game/game_info.hpp index 0ed26ab387..f4fc5ed86b 100644 --- a/src/game/game_info.hpp +++ b/src/game/game_info.hpp @@ -1,4 +1,4 @@ -/* $Id: game_info.hpp 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp index 1283490e3a..e2b3775110 100644 --- a/src/game/game_instance.cpp +++ b/src/game/game_instance.cpp @@ -1,4 +1,4 @@ -/* $Id: game_instance.cpp 26893 2014-09-21 16:20:48Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -34,6 +34,8 @@ #include "../script/api/game/game_cargo.hpp.sq" #include "../script/api/game/game_cargolist.hpp.sq" #include "../script/api/game/game_cargomonitor.hpp.sq" +#include "../script/api/game/game_client.hpp.sq" +#include "../script/api/game/game_clientlist.hpp.sq" #include "../script/api/game/game_company.hpp.sq" #include "../script/api/game/game_companymode.hpp.sq" #include "../script/api/game/game_controller.hpp.sq" @@ -122,6 +124,9 @@ void GameInstance::RegisterAPI() SQGSCargoList_IndustryProducing_Register(this->engine); SQGSCargoList_StationAccepting_Register(this->engine); SQGSCargoMonitor_Register(this->engine); + SQGSClient_Register(this->engine); + SQGSClientList_Register(this->engine); + SQGSClientList_Company_Register(this->engine); SQGSCompany_Register(this->engine); SQGSCompanyMode_Register(this->engine); SQGSDate_Register(this->engine); diff --git a/src/game/game_instance.hpp b/src/game/game_instance.hpp index 2a546502fa..08ce344247 100644 --- a/src/game/game_instance.hpp +++ b/src/game/game_instance.hpp @@ -1,4 +1,4 @@ -/* $Id: game_instance.hpp 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_scanner.cpp b/src/game/game_scanner.cpp index c4eae02a18..38afdd1357 100644 --- a/src/game/game_scanner.cpp +++ b/src/game/game_scanner.cpp @@ -1,4 +1,4 @@ -/* $Id: game_scanner.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_scanner.hpp b/src/game/game_scanner.hpp index 712eefce5e..071d19d38d 100644 --- a/src/game/game_scanner.hpp +++ b/src/game/game_scanner.hpp @@ -1,4 +1,4 @@ -/* $Id: game_scanner.hpp 26487 2014-04-23 21:16:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp index 13cb639f7a..a32e5b41d7 100644 --- a/src/game/game_text.cpp +++ b/src/game/game_text.cpp @@ -1,4 +1,4 @@ -/* $Id: game_text.cpp 26774 2014-09-06 17:46:56Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -142,7 +142,7 @@ struct StringListReader : StringReader { /** * Create the reader. * @param data The data to fill during reading. - * @param file The file we are reading. + * @param strings The language strings we are reading. * @param master Are we reading the master file? * @param translation Are we reading a translation? */ diff --git a/src/game/game_text.hpp b/src/game/game_text.hpp index 44c96fe1cf..14da7d9b2e 100644 --- a/src/game/game_text.hpp +++ b/src/game/game_text.hpp @@ -1,4 +1,4 @@ -/* $Id: game_text.hpp 27756 2017-02-26 19:40:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 8e1ff9bf11..29910d7ad1 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -1,4 +1,4 @@ -/* $Id: gamelog.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,13 +23,13 @@ #include "safeguards.h" -extern const uint16 SAVEGAME_VERSION; ///< current savegame version +extern const SaveLoadVersion SAVEGAME_VERSION; ///< current savegame version extern SavegameType _savegame_type; ///< type of savegame we are loading -extern uint32 _ttdp_version; ///< version of TTDP savegame (if applicable) -extern uint16 _sl_version; ///< the major savegame version identifier -extern byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! +extern uint32 _ttdp_version; ///< version of TTDP savegame (if applicable) +extern SaveLoadVersion _sl_version; ///< the major savegame version identifier +extern byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! static GamelogActionType _gamelog_action_type = GLAT_NONE; ///< action to record if anything changes @@ -39,6 +39,30 @@ uint _gamelog_actions = 0; ///< number of actions static LoggedAction *_current_action = NULL; ///< current action we are logging, NULL when there is no action active +/** + * Return the revision string for the current client version, for use in gamelog. + * The string returned is at most GAMELOG_REVISION_LENGTH bytes long. + */ +static const char * GetGamelogRevisionString() +{ + /* Allocate a buffer larger than necessary (git revision hash is 40 bytes) to avoid truncation later */ + static char gamelog_revision[48] = { 0 }; + assert_compile(lengthof(gamelog_revision) > GAMELOG_REVISION_LENGTH); + + if (IsReleasedVersion()) { + return _openttd_revision; + } else if (gamelog_revision[0] == 0) { + /* Prefix character indication revision status */ + assert(_openttd_revision_modified < 3); + gamelog_revision[0] = "gum"[_openttd_revision_modified]; // g = "git", u = "unknown", m = "modified" + /* Append the revision hash */ + strecat(gamelog_revision, _openttd_revision_hash, lastof(gamelog_revision)); + /* Truncate string to GAMELOG_REVISION_LENGTH bytes */ + gamelog_revision[GAMELOG_REVISION_LENGTH - 1] = '\0'; + } + return gamelog_revision; +} + /** * Stores information about new action, but doesn't allocate it * Action is allocated only when there is at least one change @@ -415,7 +439,7 @@ void GamelogRevision() if (lc == NULL) return; memset(lc->revision.text, 0, sizeof(lc->revision.text)); - strecpy(lc->revision.text, _openttd_revision, lastof(lc->revision.text)); + strecpy(lc->revision.text, GetGamelogRevisionString(), lastof(lc->revision.text)); lc->revision.slver = SAVEGAME_VERSION; lc->revision.modified = _openttd_revision_modified; lc->revision.newgrf = _openttd_newgrf_version; @@ -484,7 +508,7 @@ void GamelogTestRevision() } } - if (rev == NULL || strcmp(rev->revision.text, _openttd_revision) != 0 || + if (rev == NULL || strcmp(rev->revision.text, GetGamelogRevisionString()) != 0 || rev->revision.modified != _openttd_revision_modified || rev->revision.newgrf != _openttd_newgrf_version) { GamelogRevision(); @@ -771,9 +795,9 @@ void GamelogGRFUpdate(const GRFConfig *oldc, const GRFConfig *newc) * Get some basic information from the given gamelog. * @param gamelog_action Pointer to the gamelog to extract information from. * @param gamelog_actions Number of actions in the given gamelog. - * @param [out] last_ottd_rev OpenTTD NewGRF version from the binary that saved the savegame last. - * @param [out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame. - * @param [out] removed_newgrfs Set to true if any NewGRFs have been removed. + * @param[out] last_ottd_rev OpenTTD NewGRF version from the binary that saved the savegame last. + * @param[out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame. + * @param[out] removed_newgrfs Set to true if any NewGRFs have been removed. */ void GamelogInfo(LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs) { diff --git a/src/gamelog.h b/src/gamelog.h index 92fb4474cb..83694e3ea8 100644 --- a/src/gamelog.h +++ b/src/gamelog.h @@ -1,4 +1,4 @@ -/* $Id: gamelog.h 23901 2012-02-05 15:51:13Z smatz $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -38,7 +38,7 @@ void GamelogReset(); * @param s The string to print. */ typedef void GamelogPrintProc(const char *s); -void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log +void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 crash.log void GamelogPrintDebug(int level); void GamelogPrintConsole(); diff --git a/src/gamelog_internal.h b/src/gamelog_internal.h index 593a5bfd3b..261a8cd579 100644 --- a/src/gamelog_internal.h +++ b/src/gamelog_internal.h @@ -1,4 +1,4 @@ -/* $Id: gamelog_internal.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,7 +12,6 @@ #ifndef GAMELOG_INTERNAL_H #define GAMELOG_INTERNAL_H -#include "network/core/config.h" #include "gamelog.h" /** Type of logged change */ @@ -33,6 +32,8 @@ enum GamelogChangeType { }; +static const uint GAMELOG_REVISION_LENGTH = 15; + /** Contains information about one logged change */ struct LoggedChange { GamelogChangeType ct; ///< Type of change logged in this struct @@ -42,7 +43,7 @@ struct LoggedChange { byte landscape; ///< landscape (temperate, arctic, ...) } mode; struct { - char text[NETWORK_REVISION_LENGTH]; ///< revision string, _openttd_revision + char text[GAMELOG_REVISION_LENGTH]; ///< revision string, _openttd_revision uint32 newgrf; ///< _openttd_newgrf_version uint16 slver; ///< _sl_version byte modified; ///< _openttd_revision_modified diff --git a/src/genworld.cpp b/src/genworld.cpp index ff801a3804..25d6a7bd9d 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -1,4 +1,4 @@ -/* $Id: genworld.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -120,8 +120,8 @@ static void _GenerateWorld(void *) /* Make sure the tiles at the north border are void tiles if needed. */ if (_settings_game.construction.freeform_edges) { - for (uint row = 0; row < MapSizeY(); row++) MakeVoid(TileXY(0, row)); - for (uint col = 0; col < MapSizeX(); col++) MakeVoid(TileXY(col, 0)); + for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); } /* Make the map the height of the setting */ diff --git a/src/genworld.h b/src/genworld.h index a50164cea9..1b1c806e09 100644 --- a/src/genworld.h +++ b/src/genworld.h @@ -1,4 +1,4 @@ -/* $Id: genworld.h 27231 2015-04-11 18:45:18Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -22,7 +22,7 @@ enum LandscapeGenerator { LG_TERRAGENESIS = 1, ///< TerraGenesis Perlin landscape generator }; -static const uint GENERATE_NEW_SEED = UINT_MAX; ///< Create a new random seed +static const uint32 GENERATE_NEW_SEED = UINT32_MAX; ///< Create a new random seed /** Modes for GenerateWorld */ enum GenWorldMode { @@ -97,7 +97,7 @@ void SetGeneratingWorldProgress(GenWorldProgress cls, uint total); void IncreaseGeneratingWorldProgress(GenWorldProgress cls); void PrepareGenerateWorldProgress(); void ShowGenerateWorldProgress(); -void StartNewGameWithoutGUI(uint seed); +void StartNewGameWithoutGUI(uint32 seed); void ShowCreateScenario(); void StartScenarioEditor(); diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 6307b4e189..b22ba5287e 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: genworld_gui.cpp 27650 2016-09-04 12:57:43Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -288,7 +288,7 @@ static DropDownList *BuildMapsizeDropDown() for (uint i = MIN_MAP_SIZE_BITS; i <= MAX_MAP_SIZE_BITS; i++) { DropDownListParamStringItem *item = new DropDownListParamStringItem(STR_JUST_INT, i, false); - item->SetParam(0, 1 << i); + item->SetParam(0, 1LL << i); *list->Append() = item; } @@ -336,8 +336,8 @@ struct GenerateLandscapeWindow : public Window { { switch (widget) { case WID_GL_START_DATE_TEXT: SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1)); break; - case WID_GL_MAPSIZE_X_PULLDOWN: SetDParam(0, 1 << _settings_newgame.game_creation.map_x); break; - case WID_GL_MAPSIZE_Y_PULLDOWN: SetDParam(0, 1 << _settings_newgame.game_creation.map_y); break; + case WID_GL_MAPSIZE_X_PULLDOWN: SetDParam(0, 1LL << _settings_newgame.game_creation.map_x); break; + case WID_GL_MAPSIZE_Y_PULLDOWN: SetDParam(0, 1LL << _settings_newgame.game_creation.map_y); break; case WID_GL_MAX_HEIGHTLEVEL_TEXT: SetDParam(0, _settings_newgame.construction.max_heightlevel); break; case WID_GL_SNOW_LEVEL_TEXT: SetDParam(0, _settings_newgame.game_creation.snow_line_height); break; @@ -870,7 +870,7 @@ void StartScenarioEditor() * Start a normal game without the GUI. * @param seed The seed of the new game. */ -void StartNewGameWithoutGUI(uint seed) +void StartNewGameWithoutGUI(uint32 seed) { /* GenerateWorld takes care of the possible GENERATE_NEW_SEED value in 'seed' */ _settings_newgame.game_creation.generation_seed = seed; @@ -896,11 +896,11 @@ struct CreateScenarioWindow : public Window break; case WID_CS_MAPSIZE_X_PULLDOWN: - SetDParam(0, 1 << _settings_newgame.game_creation.map_x); + SetDParam(0, 1LL << _settings_newgame.game_creation.map_x); break; case WID_CS_MAPSIZE_Y_PULLDOWN: - SetDParam(0, 1 << _settings_newgame.game_creation.map_y); + SetDParam(0, 1LL << _settings_newgame.game_creation.map_y); break; case WID_CS_FLAT_LAND_HEIGHT_TEXT: diff --git a/src/gfx.cpp b/src/gfx.cpp index 002a296b0d..28ac97f292 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1,4 +1,4 @@ -/* $Id: gfx.cpp 27628 2016-08-15 18:33:08Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -704,8 +704,8 @@ Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize) } /** - * Get bounding box of a string. Uses parameters set by #DParam if needed. - * Has the same restrictions as #GetStringBoundingBox(const char *str). + * Get bounding box of a string. Uses parameters set by #SetDParam if needed. + * Has the same restrictions as #GetStringBoundingBox(const char *str, FontSize start_fontsize). * @param strid String to examine. * @return Width and height of the bounding box for the string in pixels. */ @@ -762,7 +762,7 @@ void DrawCharCentered(WChar c, int x, int y, TextColour colour) /** * Get the size of a sprite. * @param sprid Sprite to examine. - * @param [out] offset Optionally returns the sprite position offset. + * @param[out] offset Optionally returns the sprite position offset. * @return Sprite size in pixels. * @note The size assumes (0, 0) as top-left coordinate and ignores any part of the sprite drawn at the left or above that position. */ @@ -1112,16 +1112,17 @@ void DoPaletteAnimations() /** * Determine a contrasty text colour for a coloured background. * @param background Background colour. + * @param threshold Background colour brightness threshold below which the background is considered dark and TC_WHITE is returned, range: 0 - 255, default 128. * @return TC_BLACK or TC_WHITE depending on what gives a better contrast. */ -TextColour GetContrastColour(uint8 background) +TextColour GetContrastColour(uint8 background, uint8 threshold) { Colour c = _cur_palette.palette[background]; /* Compute brightness according to http://www.w3.org/TR/AERT#color-contrast. * The following formula computes 1000 * brightness^2, with brightness being in range 0 to 255. */ uint sq1000_brightness = c.r * c.r * 299 + c.g * c.g * 587 + c.b * c.b * 114; - /* Compare with threshold brightness 128 (50%) */ - return sq1000_brightness < 128 * 128 * 1000 ? TC_WHITE : TC_BLACK; + /* Compare with threshold brightness which defaults to 128 (50%) */ + return sq1000_brightness < ((uint) threshold) * ((uint) threshold) * 1000 ? TC_WHITE : TC_BLACK; } /** @@ -1170,8 +1171,8 @@ byte GetDigitWidth(FontSize size) /** * Determine the broadest digits for guessing the maximum width of a n-digit number. - * @param [out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.) - * @param [out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.) + * @param[out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.) + * @param[out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.) * @param size Font of the digit */ void GetBroadestDigit(uint *front, uint *next, FontSize size) @@ -1215,11 +1216,6 @@ void UndrawMouseCursor() void DrawMouseCursor() { -#if defined(WINCE) - /* Don't ever draw the mouse for WinCE, as we work with a stylus */ - return; -#endif - /* Don't draw the mouse cursor if the screen is not ready */ if (_screen.dst_ptr == NULL) return; @@ -1322,7 +1318,11 @@ void DrawDirtyBlocks() /* Wait a while and update _realtime_tick so we are given the rights */ if (!IsFirstModalProgressLoop()) CSleep(MODAL_PROGRESS_REDRAW_TIMEOUT); _realtime_tick += MODAL_PROGRESS_REDRAW_TIMEOUT; + + /* Modal progress thread may need blitter access while we are waiting for it. */ + VideoDriver::GetInstance()->ReleaseBlitterLock(); _modal_progress_paint_mutex->BeginCritical(); + VideoDriver::GetInstance()->AcquireBlitterLock(); _modal_progress_work_mutex->BeginCritical(); /* When we ended with the modal progress, do not draw the blocks. @@ -1640,8 +1640,8 @@ void SetAnimatedMouseCursor(const AnimCursor *table) * Update cursor position on mouse movement. * @param x New X position. * @param y New Y position. - * @param queued True, if the OS queues mouse warps after pending mouse movement events. - * False, if the warp applies instantaneous. + * @param queued_warp True, if the OS queues mouse warps after pending mouse movement events. + * False, if the warp applies instantaneous. * @return true, if the OS cursor position should be warped back to this->pos. */ bool CursorVars::UpdateCursorPosition(int x, int y, bool queued_warp) diff --git a/src/gfx_func.h b/src/gfx_func.h index 73a980ecf0..94a1aede57 100644 --- a/src/gfx_func.h +++ b/src/gfx_func.h @@ -1,4 +1,4 @@ -/* $Id: gfx_func.h 27829 2017-03-25 23:19:41Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -188,7 +188,7 @@ int GetCharacterHeight(FontSize size); extern DrawPixelInfo *_cur_dpi; -TextColour GetContrastColour(uint8 background); +TextColour GetContrastColour(uint8 background, uint8 threshold = 128); /** * All 16 colour gradients diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp index 5df42745e3..c65ead90e1 100644 --- a/src/gfx_layout.cpp +++ b/src/gfx_layout.cpp @@ -1,4 +1,4 @@ -/* $Id: gfx_layout.cpp 27367 2015-08-09 12:33:27Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,6 +21,14 @@ #include #endif /* WITH_ICU_LAYOUT */ +#ifdef WITH_UNISCRIBE +#include "os/windows/string_uniscribe.h" +#endif /* WITH_UNISCRIBE */ + +#ifdef WITH_COCOA +#include "os/macosx/string_osx.h" +#endif + #include "safeguards.h" @@ -113,32 +121,18 @@ le_bool Font::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &poin return FALSE; } -static size_t AppendToBuffer(UChar *buff, const UChar *buffer_last, WChar c) -{ - /* Transform from UTF-32 to internal ICU format of UTF-16. */ - int32 length = 0; - UErrorCode err = U_ZERO_ERROR; - u_strFromUTF32(buff, buffer_last - buff, &length, (UChar32*)&c, 1, &err); - return length; -} - /** * Wrapper for doing layouts with ICU. */ class ICUParagraphLayout : public AutoDeleteSmallVector, public ParagraphLayouter { - ParagraphLayout *p; ///< The actual ICU paragraph layout. + icu::ParagraphLayout *p; ///< The actual ICU paragraph layout. public: - /** Helper for GetLayouter, to get the right type. */ - typedef UChar CharType; - /** Helper for GetLayouter, to get whether the layouter supports RTL. */ - static const bool SUPPORTS_RTL = true; - /** Visual run contains data about the bit of text with the same font. */ class ICUVisualRun : public ParagraphLayouter::VisualRun { - const ParagraphLayout::VisualRun *vr; ///< The actual ICU vr. + const icu::ParagraphLayout::VisualRun *vr; ///< The actual ICU vr. public: - ICUVisualRun(const ParagraphLayout::VisualRun *vr) : vr(vr) { } + ICUVisualRun(const icu::ParagraphLayout::VisualRun *vr) : vr(vr) { } const Font *GetFont() const { return (const Font*)vr->getFont(); } int GetGlyphCount() const { return vr->getGlyphCount(); } @@ -150,10 +144,10 @@ public: /** A single line worth of VisualRuns. */ class ICULine : public AutoDeleteSmallVector, public ParagraphLayouter::Line { - ParagraphLayout::Line *l; ///< The actual ICU line. + icu::ParagraphLayout::Line *l; ///< The actual ICU line. public: - ICULine(ParagraphLayout::Line *l) : l(l) + ICULine(icu::ParagraphLayout::Line *l) : l(l) { for (int i = 0; i < l->countRuns(); i++) { *this->Append() = new ICUVisualRun(l->getVisualRun(i)); @@ -173,46 +167,65 @@ public: } }; - ICUParagraphLayout(ParagraphLayout *p) : p(p) { } + ICUParagraphLayout(icu::ParagraphLayout *p) : p(p) { } ~ICUParagraphLayout() { delete p; } void Reflow() { p->reflow(); } ParagraphLayouter::Line *NextLine(int max_width) { - ParagraphLayout::Line *l = p->nextLine(max_width); + icu::ParagraphLayout::Line *l = p->nextLine(max_width); return l == NULL ? NULL : new ICULine(l); } }; -static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontMap &fontMapping) -{ - int32 length = buff_end - buff; +/** + * Helper class to construct a new #ICUParagraphLayout. + */ +class ICUParagraphLayoutFactory { +public: + /** Helper for GetLayouter, to get the right type. */ + typedef UChar CharType; + /** Helper for GetLayouter, to get whether the layouter supports RTL. */ + static const bool SUPPORTS_RTL = true; - if (length == 0) { - /* ICU's ParagraphLayout cannot handle empty strings, so fake one. */ - buff[0] = ' '; - length = 1; - fontMapping.End()[-1].first++; + static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontMap &fontMapping) + { + int32 length = buff_end - buff; + + if (length == 0) { + /* ICU's ParagraphLayout cannot handle empty strings, so fake one. */ + buff[0] = ' '; + length = 1; + fontMapping.End()[-1].first++; + } + + /* Fill ICU's FontRuns with the right data. */ + icu::FontRuns runs(fontMapping.Length()); + for (FontMap::iterator iter = fontMapping.Begin(); iter != fontMapping.End(); iter++) { + runs.add(iter->second, iter->first); + } + + LEErrorCode status = LE_NO_ERROR; + /* ParagraphLayout does not copy "buff", so it must stay valid. + * "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */ + icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status); + if (status != LE_NO_ERROR) { + delete p; + return NULL; + } + + return new ICUParagraphLayout(p); } - /* Fill ICU's FontRuns with the right data. */ - FontRuns runs(fontMapping.Length()); - for (FontMap::iterator iter = fontMapping.Begin(); iter != fontMapping.End(); iter++) { - runs.add(iter->second, iter->first); + static size_t AppendToBuffer(UChar *buff, const UChar *buffer_last, WChar c) + { + /* Transform from UTF-32 to internal ICU format of UTF-16. */ + int32 length = 0; + UErrorCode err = U_ZERO_ERROR; + u_strFromUTF32(buff, buffer_last - buff, &length, (UChar32*)&c, 1, &err); + return length; } - - LEErrorCode status = LE_NO_ERROR; - /* ParagraphLayout does not copy "buff", so it must stay valid. - * "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */ - ParagraphLayout *p = new ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status); - if (status != LE_NO_ERROR) { - delete p; - return NULL; - } - - return new ICUParagraphLayout(p); -} - +}; #endif /* WITH_ICU_LAYOUT */ /*** Paragraph layout ***/ @@ -236,11 +249,6 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM */ class FallbackParagraphLayout : public ParagraphLayouter { public: - /** Helper for GetLayouter, to get the right type. */ - typedef WChar CharType; - /** Helper for GetLayouter, to get whether the layouter supports RTL. */ - static const bool SUPPORTS_RTL = false; - /** Visual run contains data about the bit of text with the same font. */ class FallbackVisualRun : public ParagraphLayouter::VisualRun { Font *font; ///< The font used to layout these. @@ -280,6 +288,42 @@ public: const ParagraphLayouter::Line *NextLine(int max_width); }; +/** + * Helper class to construct a new #FallbackParagraphLayout. + */ +class FallbackParagraphLayoutFactory { +public: + /** Helper for GetLayouter, to get the right type. */ + typedef WChar CharType; + /** Helper for GetLayouter, to get whether the layouter supports RTL. */ + static const bool SUPPORTS_RTL = false; + + /** + * Get the actual ParagraphLayout for the given buffer. + * @param buff The begin of the buffer. + * @param buff_end The location after the last element in the buffer. + * @param fontMapping THe mapping of the fonts. + * @return The ParagraphLayout instance. + */ + static ParagraphLayouter *GetParagraphLayout(WChar *buff, WChar *buff_end, FontMap &fontMapping) + { + return new FallbackParagraphLayout(buff, buff_end - buff, fontMapping); + } + + /** + * Append a wide character to the internal buffer. + * @param buff The buffer to append to. + * @param buffer_last The end of the buffer. + * @param c The character to add. + * @return The number of buffer spaces that were used. + */ + static size_t AppendToBuffer(WChar *buff, const WChar *buffer_last, WChar c) + { + *buff = c; + return 1; + } +}; + /** * Create the visual run. * @param font The font to use for this run. @@ -458,11 +502,6 @@ const ParagraphLayouter::Line *FallbackParagraphLayout::NextLine(int max_width) return l; } - const WChar *begin = this->buffer; - const WChar *last_space = NULL; - const WChar *last_char = begin; - int width = 0; - int offset = this->buffer - this->buffer_begin; FontMap::iterator iter = this->runs.Begin(); while (iter->first <= offset) { @@ -473,6 +512,10 @@ const ParagraphLayouter::Line *FallbackParagraphLayout::NextLine(int max_width) const FontCache *fc = iter->second->fc; const WChar *next_run = this->buffer_begin + iter->first; + const WChar *begin = this->buffer; + const WChar *last_space = NULL; + const WChar *last_char; + int width = 0; for (;;) { WChar c = *this->buffer; last_char = this->buffer; @@ -536,31 +579,6 @@ const ParagraphLayouter::Line *FallbackParagraphLayout::NextLine(int max_width) return l; } -/** - * Appand a wide character to the internal buffer. - * @param buff The buffer to append to. - * @param buffer_last The end of the buffer. - * @param c The character to add. - * @return The number of buffer spaces that were used. - */ -static size_t AppendToBuffer(WChar *buff, const WChar *buffer_last, WChar c) -{ - *buff = c; - return 1; -} - -/** - * Get the actual ParagraphLayout for the given buffer. - * @param buff The begin of the buffer. - * @param buff_end The location after the last element in the buffer. - * @param fontMapping THe mapping of the fonts. - * @return The ParagraphLayout instance. - */ -static FallbackParagraphLayout *GetParagraphLayout(WChar *buff, WChar *buff_end, FontMap &fontMapping) -{ - return new FallbackParagraphLayout(buff, buff_end - buff, fontMapping); -} - /** * Helper for getting a ParagraphLayouter of the given type. * @@ -582,6 +600,7 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str, Font *f = Layouter::GetFont(state.fontsize, state.cur_colour); line.buffer = buff_begin; + fontMapping.Clear(); /* * Go through the whole string while adding Font instances to the font map @@ -594,18 +613,18 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str, break; } else if (c >= SCC_BLUE && c <= SCC_BLACK) { state.SetColour((TextColour)(c - SCC_BLUE)); - } else if (c == SCC_PREVIOUS_COLOUR) { // Revert to the previous colour. - state.SetPreviousColour(); - } else if (c == SCC_TINYFONT) { - state.SetFontSize(FS_SMALL); - } else if (c == SCC_BIGFONT) { - state.SetFontSize(FS_LARGE); + } else if (c == SCC_PUSH_COLOUR) { + state.PushColour(); + } else if (c == SCC_POP_COLOUR) { + state.PopColour(); + } else if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) { + state.SetFontSize((FontSize)(c - SCC_FIRST_FONT)); } else { /* Filter out text direction characters that shouldn't be drawn, and * will not be handled in the fallback non ICU case because they are * mostly needed for RTL languages which need more ICU support. */ if (!T::SUPPORTS_RTL && IsTextDirectionChar(c)) continue; - buff += AppendToBuffer(buff, buffer_last, c); + buff += T::AppendToBuffer(buff, buffer_last, c); continue; } @@ -621,7 +640,7 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str, if (!fontMapping.Contains(buff - buff_begin)) { fontMapping.Insert(buff - buff_begin, f); } - line.layout = GetParagraphLayout(buff_begin, buff, fontMapping); + line.layout = T::GetParagraphLayout(buff_begin, buff, fontMapping); line.state_after = state; } @@ -654,11 +673,13 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi line.layout->Reflow(); } else { /* Line is new, layout it */ -#ifdef WITH_ICU_LAYOUT FontState old_state = state; +#if defined(WITH_ICU_LAYOUT) || defined(WITH_UNISCRIBE) || defined(WITH_COCOA) const char *old_str = str; +#endif - GetLayouter(line, str, state); +#ifdef WITH_ICU_LAYOUT + GetLayouter(line, str, state); if (line.layout == NULL) { static bool warned = false; if (!warned) { @@ -668,11 +689,32 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi state = old_state; str = old_str; - GetLayouter(line, str, state); } -#else - GetLayouter(line, str, state); #endif + +#ifdef WITH_UNISCRIBE + if (line.layout == NULL) { + GetLayouter(line, str, state); + if (line.layout == NULL) { + state = old_state; + str = old_str; + } + } +#endif + +#ifdef WITH_COCOA + if (line.layout == NULL) { + GetLayouter(line, str, state); + if (line.layout == NULL) { + state = old_state; + str = old_str; + } + } +#endif + + if (line.layout == NULL) { + GetLayouter(line, str, state); + } } /* Copy all lines into a local cache so we can reuse them later on more easily. */ @@ -809,6 +851,13 @@ void Layouter::ResetFontCache(FontSize size) /* We must reset the linecache since it references the just freed fonts */ ResetLineCache(); + +#if defined(WITH_UNISCRIBE) + UniscribeResetScriptCache(size); +#endif +#if defined(WITH_COCOA) + MacOSResetScriptCache(size); +#endif } /** diff --git a/src/gfx_layout.h b/src/gfx_layout.h index 63afe478bb..f6fc3b5c71 100644 --- a/src/gfx_layout.h +++ b/src/gfx_layout.h @@ -1,4 +1,4 @@ -/* $Id: gfx_layout.h 27367 2015-08-09 12:33:27Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,10 +18,11 @@ #include #include +#include #ifdef WITH_ICU_LAYOUT #include "layout/ParagraphLayout.h" -#define ICU_FONTINSTANCE : public LEFontInstance +#define ICU_FONTINSTANCE : public icu::LEFontInstance #else /* WITH_ICU_LAYOUT */ #define ICU_FONTINSTANCE #endif /* WITH_ICU_LAYOUT */ @@ -33,10 +34,11 @@ struct FontState { FontSize fontsize; ///< Current font size. TextColour cur_colour; ///< Current text colour. - TextColour prev_colour; ///< Text colour from before the last colour switch. - FontState() : fontsize(FS_END), cur_colour(TC_INVALID), prev_colour(TC_INVALID) {} - FontState(TextColour colour, FontSize fontsize) : fontsize(fontsize), cur_colour(colour), prev_colour(colour) {} + std::stack colour_stack; ///< Stack of colours to assist with colour switching. + + FontState() : fontsize(FS_END), cur_colour(TC_INVALID) {} + FontState(TextColour colour, FontSize fontsize) : fontsize(fontsize), cur_colour(colour) {} /** * Switch to new colour \a c. @@ -45,14 +47,25 @@ struct FontState { inline void SetColour(TextColour c) { assert(c >= TC_BLUE && c <= TC_BLACK); - this->prev_colour = this->cur_colour; this->cur_colour = c; } - /** Switch to previous colour. */ - inline void SetPreviousColour() + /** + * Switch to and pop the last saved colour on the stack. + */ + inline void PopColour() { - Swap(this->cur_colour, this->prev_colour); + if (colour_stack.empty()) return; + SetColour(colour_stack.top()); + colour_stack.pop(); + } + + /** + * Push the current colour on to the stack. + */ + inline void PushColour() + { + colour_stack.push(this->cur_colour); } /** @@ -149,7 +162,7 @@ class Layouter : public AutoDeleteSmallVectorstate_before.fontsize != other.state_before.fontsize) return this->state_before.fontsize < other.state_before.fontsize; if (this->state_before.cur_colour != other.state_before.cur_colour) return this->state_before.cur_colour < other.state_before.cur_colour; - if (this->state_before.prev_colour != other.state_before.prev_colour) return this->state_before.prev_colour < other.state_before.prev_colour; + if (this->state_before.colour_stack != other.state_before.colour_stack) return this->state_before.colour_stack < other.state_before.colour_stack; return this->str < other.str; } }; diff --git a/src/gfx_type.h b/src/gfx_type.h index f56b69df51..e84684ac07 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -1,4 +1,4 @@ -/* $Id: gfx_type.h 27628 2016-08-15 18:33:08Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -199,7 +199,7 @@ union Colour { /** * Create a new colour. - * @param The colour in the correct packed format. + * @param data The colour in the correct packed format. */ Colour(uint data = 0) : data(data) { @@ -251,7 +251,7 @@ enum Colours { COLOUR_END, INVALID_COLOUR = 0xFF, }; -template <> struct EnumPropsT : MakeEnumPropsT {}; +template <> struct EnumPropsT : MakeEnumPropsT {}; /** Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palette.png */ enum TextColour { diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 7de72ab00e..bd0f17a91b 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -1,4 +1,4 @@ -/* $Id: gfxinit.cpp 27775 2017-03-11 13:05:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -80,7 +80,7 @@ static uint LoadGrfFile(const char *filename, uint load_index, int file_index) /** * Load an old fashioned GRF file to replace already loaded sprites. * @param filename The name of the file to open. - * @param index_tlb The offsets of each of the sprites. + * @param index_tbl The offsets of each of the sprites. * @param file_index The Fio offset to load the file in. * @return The number of loaded sprites. */ @@ -139,7 +139,7 @@ void CheckExternalFiles() if (used_set->GetNumInvalid() != 0) { /* Not all files were loaded successfully, see which ones */ - add_pos += seprintf(add_pos, last, "Trying to load graphics set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of readme.txt.\n\nThe following files are corrupted or missing:\n", used_set->name); + add_pos += seprintf(add_pos, last, "Trying to load graphics set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of README.md.\n\nThe following files are corrupted or missing:\n", used_set->name); for (uint i = 0; i < GraphicsSet::NUM_FILES; i++) { MD5File::ChecksumResult res = GraphicsSet::CheckMD5(&used_set->files[i], BASESET_DIR); if (res != MD5File::CR_MATCH) add_pos += seprintf(add_pos, last, "\t%s is %s (%s)\n", used_set->files[i].filename, res == MD5File::CR_MISMATCH ? "corrupt" : "missing", used_set->files[i].missing_warning); @@ -149,7 +149,7 @@ void CheckExternalFiles() const SoundsSet *sounds_set = BaseSounds::GetUsedSet(); if (sounds_set->GetNumInvalid() != 0) { - add_pos += seprintf(add_pos, last, "Trying to load sound set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of readme.txt.\n\nThe following files are corrupted or missing:\n", sounds_set->name); + add_pos += seprintf(add_pos, last, "Trying to load sound set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of README.md.\n\nThe following files are corrupted or missing:\n", sounds_set->name); assert_compile(SoundsSet::NUM_FILES == 1); /* No need to loop each file, as long as there is only a single @@ -285,6 +285,9 @@ static bool SwitchNewGRFBlitter() #endif { "8bpp-optimized", 2, 8, 8, 8, 8 }, { "32bpp-optimized", 0, 8, 32, 8, 32 }, +#ifdef WITH_SSE + { "32bpp-sse2-anim", 1, 8, 32, 8, 32 }, +#endif { "32bpp-anim", 1, 8, 32, 8, 32 }, }; diff --git a/src/gfxinit.h b/src/gfxinit.h index 10b860b1c1..5bf0bff5ca 100644 --- a/src/gfxinit.h +++ b/src/gfxinit.h @@ -1,4 +1,4 @@ -/* $Id: gfxinit.h 18028 2009-11-09 10:40:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/goal.cpp b/src/goal.cpp index a6807260f9..f7aae350e5 100644 --- a/src/goal.cpp +++ b/src/goal.cpp @@ -1,4 +1,4 @@ -/* $Id: goal.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,6 +23,8 @@ #include "string_func.h" #include "gui.h" #include "network/network.h" +#include "network/network_base.h" +#include "network/network_func.h" #include "safeguards.h" @@ -234,7 +236,9 @@ CommandCost CmdSetGoalCompleted(TileIndex tile, DoCommandFlag flags, uint32 p1, * @param flags type of operation * @param p1 various bitstuffed elements * - p1 = (bit 0 - 15) - Unique ID to use for this question. - * - p1 = (bit 16 - 23) - Company for which this question is. + * - p1 = (bit 16 - 23) - Company or client for which this question is. + * - p1 = (bit 24 - 25) - Question type. + * - p1 = (bit 31) - Question target: 0 - company, 1 - client. * @param p2 Buttons of the question. * @param text Text of the question. * @return the cost of this operation or an error @@ -243,17 +247,37 @@ CommandCost CmdGoalQuestion(TileIndex tile, DoCommandFlag flags, uint32 p1, uint { uint16 uniqueid = (GoalType)GB(p1, 0, 16); CompanyID company = (CompanyID)GB(p1, 16, 8); - byte type = GB(p1, 24, 8); +#ifdef ENABLE_NETWORK + ClientIndex client = (ClientIndex)GB(p1, 16, 8); +#endif + byte type = GB(p1, 24, 2); + bool is_client = HasBit(p1, 31); if (_current_company != OWNER_DEITY) return CMD_ERROR; if (StrEmpty(text)) return CMD_ERROR; - if (company != INVALID_COMPANY && !Company::IsValidID(company)) return CMD_ERROR; + if (is_client) { +#ifdef ENABLE_NETWORK + if (!NetworkClientInfo::IsValidID(client)) return CMD_ERROR; +#else + return CMD_ERROR; +#endif + } else { + if (company != INVALID_COMPANY && !Company::IsValidID(company)) return CMD_ERROR; + } if (CountBits(p2) < 1 || CountBits(p2) > 3) return CMD_ERROR; if (p2 >= (1 << GOAL_QUESTION_BUTTON_COUNT)) return CMD_ERROR; if (type >= GOAL_QUESTION_TYPE_COUNT) return CMD_ERROR; if (flags & DC_EXEC) { - if ((company != INVALID_COMPANY && company == _local_company) || (company == INVALID_COMPANY && Company::IsValidID(_local_company))) ShowGoalQuestion(uniqueid, type, p2, text); + if (is_client) { +#ifdef ENABLE_NETWORK + if (NetworkClientInfo::Get(client)->client_id != _network_own_client_id) return CommandCost(); +#endif + } else { + if (company == INVALID_COMPANY && !Company::IsValidID(_local_company)) return CommandCost(); + if (company != INVALID_COMPANY && company != _local_company) return CommandCost(); + } + ShowGoalQuestion(uniqueid, type, p2, text); } return CommandCost(); diff --git a/src/goal_base.h b/src/goal_base.h index 98bc7a93a6..7453196c8e 100644 --- a/src/goal_base.h +++ b/src/goal_base.h @@ -1,4 +1,4 @@ -/* $Id: goal_base.h 25299 2013-05-27 21:59:11Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index 3bd408f48a..93a2795ba6 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: goal_gui.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -101,7 +101,7 @@ struct GoalListWindow : public Window { /** * Handle clicking at a goal. - * @param s @Goal clicked at. + * @param s #Goal clicked at. */ void HandleClick(const Goal *s) { @@ -201,7 +201,7 @@ struct GoalListWindow : public Window { /** * Draws either the global goals or the company goal section. * This is a helper method for #DrawWidget. - * @param pos [inout] Vertical line number to draw. + * @param[in,out] pos Vertical line number to draw. * @param cap Number of lines to draw in the window. * @param x Left edge of the text line to draw. * @param y Vertical position of the top edge of the window. @@ -258,8 +258,8 @@ struct GoalListWindow : public Window { /** * Draws a given column of the goal list. * @param column Which column to draw. - * @wid Pointer to the goal list widget. - * @progress_col_width Width of the progress column. + * @param wid Pointer to the goal list widget. + * @param progress_col_width Width of the progress column. * @return max width of drawn text */ void DrawListColumn(GoalColumn column, NWidgetBase *wid, uint progress_col_width) const diff --git a/src/goal_type.h b/src/goal_type.h index 6e7d978b9c..aa9dee349d 100644 --- a/src/goal_type.h +++ b/src/goal_type.h @@ -1,4 +1,4 @@ -/* $Id: goal_type.h 26012 2013-11-16 17:41:57Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index e9e0f7549f..66dc02329c 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: graph_gui.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -33,8 +33,8 @@ #include "safeguards.h" /* Bitmasks of company and cargo indices that shouldn't be drawn. */ -static uint _legend_excluded_companies; -static uint _legend_excluded_cargo; +static CompanyMask _legend_excluded_companies; +static CargoTypes _legend_excluded_cargo; /* Apparently these don't play well with enums. */ static const OverflowSafeInt64 INVALID_DATAPOINT(INT64_MAX); // Value used for a datapoint that shouldn't be drawn. @@ -103,23 +103,6 @@ struct GraphLegendWindow : Window { } }; - -/** Construct the row containing the digit keys. */ -static NWidgetBase *MakeCargoButtons(int *biggest_index) -{ - NWidgetVertical *ver = new NWidgetVertical; - - for (int i = 0; i < _sorted_standard_cargo_specs_size; i++) { - NWidgetBackground *leaf = new NWidgetBackground(WWT_PANEL, COLOUR_ORANGE, WID_CPR_CARGO_FIRST + i, NULL); - leaf->tool_tip = STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO; - leaf->SetFill(1, 0); - leaf->SetLowered(true); - ver->Add(leaf); - } - *biggest_index = WID_CPR_CARGO_FIRST + _sorted_standard_cargo_specs_size - 1; - return ver; -} - /** * Construct a vertical list of buttons, one for each company. * @param biggest_index Storage for collecting the biggest index used in the returned tree. @@ -183,14 +166,14 @@ struct ValuesInterval { struct BaseGraphWindow : Window { protected: - static const int GRAPH_MAX_DATASETS = 32; + static const int GRAPH_MAX_DATASETS = 64; static const int GRAPH_AXIS_LINE_COLOUR = PC_BLACK; static const int GRAPH_NUM_MONTHS = 24; ///< Number of months displayed in the graph. static const int MIN_GRAPH_NUM_LINES_Y = 9; ///< Minimal number of horizontal lines to draw. static const int MIN_GRID_PIXEL_SIZE = 20; ///< Minimum distance between graph lines. - uint excluded_data; ///< bitmask of the datasets that shouldn't be displayed. + uint64 excluded_data; ///< bitmask of the datasets that shouldn't be displayed. byte num_dataset; byte num_on_x_axis; byte num_vert_lines; @@ -610,7 +593,7 @@ public: } } - virtual void OnTick() + virtual void OnGameTick() { this->UpdateStatistics(false); } @@ -632,7 +615,7 @@ public: */ void UpdateStatistics(bool initialize) { - uint excluded_companies = _legend_excluded_companies; + CompanyMask excluded_companies = _legend_excluded_companies; /* Exclude the companies which aren't valid */ for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) { @@ -801,6 +784,8 @@ struct IncomeGraphWindow : BaseGraphWindow { } }; +static NWidgetBase *MakeCargoButtons(int *biggest_index); + static const NWidgetPart _nested_income_graph_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_GREY), @@ -1190,9 +1175,9 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { } } */ - virtual void OnTick() + virtual void OnGameTick() { - /* Override default OnTick */ + /* Override default OnGameTick */ } /** @@ -1223,6 +1208,23 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { } }; +/** Construct the row containing the digit keys. */ +static NWidgetBase *MakeCargoButtons(int *biggest_index) +{ + NWidgetVertical *ver = new NWidgetVertical; + + for (int i = 0; i < _sorted_standard_cargo_specs_size; i++) { + NWidgetBackground *leaf = new NWidgetBackground(WWT_PANEL, COLOUR_ORANGE, WID_CPR_CARGO_FIRST + i, NULL); + leaf->tool_tip = STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO; + leaf->SetFill(1, 0); + leaf->SetLowered(true); + ver->Add(leaf); + } + *biggest_index = WID_CPR_CARGO_FIRST + _sorted_standard_cargo_specs_size - 1; + return ver; +} + + static const NWidgetPart _nested_cargo_payment_rates_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_GREY), @@ -1414,7 +1416,7 @@ public: } - virtual void OnTick() + virtual void OnGameTick() { if (this->companies.NeedResort()) { this->SetDirty(); @@ -1577,9 +1579,9 @@ struct PerformanceRatingDetailWindow : Window { int colour_notdone = _colour_gradient[COLOUR_RED][4]; /* Draw all the score parts */ - int val = _score_part[company][score_type]; - int needed = _score_info[score_type].needed; - int score = _score_info[score_type].score; + int64 val = _score_part[company][score_type]; + int64 needed = _score_info[score_type].needed; + int score = _score_info[score_type].score; /* SCORE_TOTAL has his own rules ;) */ if (score_type == SCORE_TOTAL) { @@ -1597,7 +1599,7 @@ struct PerformanceRatingDetailWindow : Window { DrawString(this->score_info_left, this->score_info_right, text_top, STR_BLACK_COMMA, TC_FROMSTRING, SA_RIGHT); /* Calculate the %-bar */ - uint x = Clamp(val, 0, needed) * this->bar_width / needed; + uint x = Clamp(val, 0, needed) * this->bar_width / needed; bool rtl = _current_text_dir == TD_RTL; if (rtl) { x = this->bar_right - x; @@ -1610,7 +1612,7 @@ struct PerformanceRatingDetailWindow : Window { if (x != this->bar_right) GfxFillRect(x, bar_top, this->bar_right, bar_top + this->bar_height, rtl ? colour_done : colour_notdone); /* Draw it */ - SetDParam(0, Clamp(val, 0, needed) * 100 / needed); + SetDParam(0, Clamp(val, 0, needed) * 100 / needed); DrawString(this->bar_left, this->bar_right, text_top, STR_PERFORMANCE_DETAIL_PERCENT, TC_FROMSTRING, SA_HOR_CENTER); /* SCORE_LOAN is inversed */ @@ -1647,10 +1649,8 @@ struct PerformanceRatingDetailWindow : Window { } } - virtual void OnTick() + virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; - /* Update the company score every 5 days */ if (--this->timeout == 0) { this->UpdateCompanyStats(); @@ -1758,3 +1758,9 @@ void ShowPerformanceRatingDetail() AllocateWindowDescFront(&_performance_rating_detail_desc, 0); } +void InitializeGraphGui() +{ + _legend_excluded_companies = 0; + _legend_excluded_cargo = 0; +} + diff --git a/src/graph_gui.h b/src/graph_gui.h index 54bf47535d..acc23421f4 100644 --- a/src/graph_gui.h +++ b/src/graph_gui.h @@ -1,4 +1,4 @@ -/* $Id: graph_gui.h 21610 2010-12-23 16:54:41Z smatz $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp index ee11e4aa0f..6fd8d77106 100644 --- a/src/ground_vehicle.cpp +++ b/src/ground_vehicle.cpp @@ -1,4 +1,4 @@ -/* $Id: ground_vehicle.cpp 26702 2014-07-22 19:46:10Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -58,8 +58,8 @@ void GroundVehicle::PowerChanged() this->gcache.cached_air_drag = air_drag + 3 * air_drag * number_of_parts / 20; - max_te *= 10000; // Tractive effort in (tonnes * 1000 * 10 =) N. - max_te /= 256; // Tractive effort is a [0-255] coefficient. + max_te *= GROUND_ACCELERATION; // Tractive effort in (tonnes * 1000 * 9.8 =) N. + max_te /= 256; // Tractive effort is a [0-255] coefficient. if (this->gcache.cached_power != total_power || this->gcache.cached_max_te != max_te) { /* Stop the vehicle if it has no power. */ if (total_power == 0) this->vehstatus |= VS_STOPPED; diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp index dda2ddc8cf..56b97875fc 100644 --- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -1,4 +1,4 @@ -/* $Id: ground_vehicle.hpp 26888 2014-09-21 12:44:38Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/group.h b/src/group.h index af4c61d1a2..ea4f7e130e 100644 --- a/src/group.h +++ b/src/group.h @@ -1,4 +1,4 @@ -/* $Id: group.h 26450 2014-04-08 21:09:06Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,6 +17,7 @@ #include "company_type.h" #include "vehicle_type.h" #include "engine_type.h" +#include "livery.h" typedef Pool GroupPool; extern GroupPool _group_pool; ///< Pool of groups. @@ -69,6 +70,7 @@ struct Group : GroupPool::PoolItem<&_group_pool> { VehicleTypeByte vehicle_type; ///< Vehicle type of the group bool replace_protection; ///< If set to true, the global autoreplace have no effect on the group + Livery livery; ///< Custom colour scheme for vehicles in this group GroupStatistics statistics; ///< NOSAVE: Statistics and caches on the vehicles in the group. GroupID parent; ///< Parent group diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index f89f967dd1..29dc17edd9 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: group_cmd.cpp 27090 2014-12-24 16:49:57Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -98,7 +98,7 @@ void GroupStatistics::Clear() } /** - * Update all caches after loading a game, changing NewGRF etc.. + * Update all caches after loading a game, changing NewGRF, etc. */ /* static */ void GroupStatistics::UpdateAfterLoad() { @@ -232,7 +232,7 @@ void GroupStatistics::Clear() stats.autoreplace_defined = true; stats.autoreplace_finished = true; } - if (stats.num_engines[erl->from] > 0) stats.autoreplace_finished = false; + if (GetGroupNumEngines(company, erl->group_id, erl->from) > 0) stats.autoreplace_finished = false; } } @@ -255,6 +255,45 @@ static inline void UpdateNumEngineGroup(const Vehicle *v, GroupID old_g, GroupID } +const Livery *GetParentLivery(const Group *g) +{ + if (g->parent == INVALID_GROUP) { + const Company *c = Company::Get(g->owner); + return &c->livery[LS_DEFAULT]; + } + + const Group *pg = Group::Get(g->parent); + return &pg->livery; +} + + +/** + * Propagate a livery change to a group's children. + * @param g Group. + */ +void PropagateChildLivery(const Group *g) +{ + /* Company colour data is indirectly cached. */ + Vehicle *v; + FOR_ALL_VEHICLES(v) { + if (v->group_id == g->index && (!v->IsGroundVehicle() || v->IsFrontEngine())) { + for (Vehicle *u = v; u != NULL; u = u->Next()) { + u->colourmap = PAL_NONE; + u->InvalidateNewGRFCache(); + } + } + } + + Group *cg; + FOR_ALL_GROUPS(cg) { + if (cg->parent == g->index) { + if (!HasBit(cg->livery.in_use, 0)) cg->livery.colour1 = g->livery.colour1; + if (!HasBit(cg->livery.in_use, 1)) cg->livery.colour2 = g->livery.colour2; + PropagateChildLivery(cg); + } + } +} + Group::Group(Owner owner) { @@ -289,9 +328,14 @@ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 g->vehicle_type = vt; g->parent = INVALID_GROUP; + const Company *c = Company::Get(_current_company); + g->livery.colour1 = c->livery[LS_DEFAULT].colour1; + g->livery.colour2 = c->livery[LS_DEFAULT].colour2; + _new_group_id = g->index; InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack()); + InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type); } return CommandCost(); @@ -346,6 +390,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 delete g; InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack()); + InvalidateWindowData(WC_COMPANY_COLOUR, _current_company, vt); } return CommandCost(); @@ -409,12 +454,23 @@ CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if (flags & DC_EXEC) { g->parent = (pg == NULL) ? INVALID_GROUP : pg->index; + GroupStatistics::UpdateAutoreplace(g->owner); + + if (g->livery.in_use == 0) { + const Livery *livery = GetParentLivery(g); + g->livery.colour1 = livery->colour1; + g->livery.colour2 = livery->colour2; + + PropagateChildLivery(g); + MarkWholeScreenDirty(); + } } } if (flags & DC_EXEC) { - SetWindowDirty(WC_REPLACE_VEHICLE, g->vehicle_type); + InvalidateWindowData(WC_REPLACE_VEHICLE, g->vehicle_type, 1); InvalidateWindowData(GetWindowClassForVehicleType(g->vehicle_type), VehicleListIdentifier(VL_GROUP_LIST, g->vehicle_type, _current_company).Pack()); + InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type); } return CommandCost(); @@ -441,6 +497,11 @@ static void AddVehicleToGroup(Vehicle *v, GroupID new_g) case VEH_AIRCRAFT: if (v->IsEngineCountable()) UpdateNumEngineGroup(v, v->group_id, new_g); v->group_id = new_g; + for (Vehicle *u = v; u != NULL; u = u->Next()) { + u->colourmap = PAL_NONE; + u->InvalidateNewGRFCache(); + u->UpdateViewport(true); + } break; } @@ -495,6 +556,9 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u /* Update the Replace Vehicle Windows */ SetWindowDirty(WC_REPLACE_VEHICLE, v->type); + SetWindowDirty(WC_VEHICLE_DEPOT, v->tile); + SetWindowDirty(WC_VEHICLE_VIEW, v->index); + SetWindowDirty(WC_VEHICLE_DETAILS, v->index); InvalidateWindowData(GetWindowClassForVehicleType(v->type), VehicleListIdentifier(VL_GROUP_LIST, v->type, _current_company).Pack()); } @@ -576,6 +640,44 @@ CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint3 return CommandCost(); } +/** + * Set the livery for a vehicle group. + * @param tile Unused. + * @param flags Command flags. + * @param p1 + * - p1 bit 0-15 Group ID. + * @param p2 + * - p2 bit 8 Set secondary instead of primary colour + * - p2 bit 16-23 Colour. + */ +CommandCost CmdSetGroupLivery(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) +{ + Group *g = Group::GetIfValid(p1); + bool primary = !HasBit(p2, 8); + Colours colour = Extract(p2); + + if (g == NULL || g->owner != _current_company) return CMD_ERROR; + + if (colour >= COLOUR_END && colour != INVALID_COLOUR) return CMD_ERROR; + + if (flags & DC_EXEC) { + if (primary) { + SB(g->livery.in_use, 0, 1, colour != INVALID_COLOUR); + if (colour == INVALID_COLOUR) colour = (Colours)GetParentLivery(g)->colour1; + g->livery.colour1 = colour; + } else { + SB(g->livery.in_use, 1, 1, colour != INVALID_COLOUR); + if (colour == INVALID_COLOUR) colour = (Colours)GetParentLivery(g)->colour2; + g->livery.colour2 = colour; + } + + PropagateChildLivery(g); + MarkWholeScreenDirty(); + } + + return CommandCost(); +} + /** * Set replace protection for a group and its sub-groups. * @param g initial group. @@ -651,6 +753,9 @@ void SetTrainGroupID(Train *v, GroupID new_g) if (u->IsEngineCountable()) UpdateNumEngineGroup(u, u->group_id, new_g); u->group_id = new_g; + u->colourmap = PAL_NONE; + u->InvalidateNewGRFCache(); + u->UpdateViewport(true); } /* Update the Replace Vehicle Windows */ @@ -675,6 +780,8 @@ void UpdateTrainGroupID(Train *v) if (u->IsEngineCountable()) UpdateNumEngineGroup(u, u->group_id, new_g); u->group_id = new_g; + u->colourmap = PAL_NONE; + u->InvalidateNewGRFCache(); } /* Update the Replace Vehicle Windows */ diff --git a/src/group_gui.cpp b/src/group_gui.cpp index e1988f00f0..ce607c3264 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: group_gui.cpp 27822 2017-03-24 07:33:31Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -25,6 +25,7 @@ #include "vehicle_gui_base.h" #include "core/geometry_func.hpp" #include "company_base.h" +#include "company_gui.h" #include "widgets/group_widget.h" @@ -63,6 +64,8 @@ static const NWidgetPart _nested_group_widgets[] = { SetDataTip(SPR_GROUP_DELETE_TRAIN, STR_GROUP_DELETE_TOOLTIP), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_RENAME_GROUP), SetFill(0, 1), SetDataTip(SPR_GROUP_RENAME_TRAIN, STR_GROUP_RENAME_TOOLTIP), + NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_LIVERY_GROUP), SetFill(0, 1), + SetDataTip(SPR_GROUP_LIVERY_TRAIN, STR_GROUP_LIVERY_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_REPLACE_PROTECTION), SetFill(0, 1), SetDataTip(SPR_GROUP_REPLACE_OFF_TRAIN, STR_GROUP_REPLACE_PROTECTION_TOOLTIP), @@ -122,14 +125,13 @@ private: Dimension column_size[VGC_END]; ///< Size of the columns in the group list. - void AddParents(GUIGroupList *source, GroupID parent, int indent) + void AddChildren(GUIGroupList *source, GroupID parent, int indent) { for (const Group **g = source->Begin(); g != source->End(); g++) { - if ((*g)->parent == parent) { - *this->groups.Append() = *g; - *this->indents.Append() = indent; - AddParents(source, (*g)->index, indent + 1); - } + if ((*g)->parent != parent) continue; + *this->groups.Append() = *g; + *this->indents.Append() = indent; + AddChildren(source, (*g)->index, indent + 1); } } @@ -180,7 +182,7 @@ private: list.ForceResort(); list.Sort(&GroupNameSorter); - AddParents(&list, INVALID_GROUP, 0); + AddChildren(&list, INVALID_GROUP, 0); this->groups.Compact(); this->groups.RebuildDone(); @@ -260,7 +262,7 @@ private: str = STR_GROUP_NAME; } int x = rtl ? right - WD_FRAMERECT_RIGHT - 8 - this->column_size[VGC_NAME].width + 1 : left + WD_FRAMERECT_LEFT + 8; - DrawString(x + indent * LEVEL_WIDTH, x + this->column_size[VGC_NAME].width - 1, y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour); + DrawString(x + (rtl ? 0 : indent), x + this->column_size[VGC_NAME].width - 1 - (rtl ? indent : 0), y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour); /* draw autoreplace protection */ x = rtl ? x - 8 - this->column_size[VGC_PROTECT].width : x + 8 + this->column_size[VGC_NAME].width; @@ -345,6 +347,7 @@ public: this->GetWidget(WID_GL_CREATE_GROUP)->widget_data += this->vli.vtype; this->GetWidget(WID_GL_RENAME_GROUP)->widget_data += this->vli.vtype; this->GetWidget(WID_GL_DELETE_GROUP)->widget_data += this->vli.vtype; + this->GetWidget(WID_GL_LIVERY_GROUP)->widget_data += this->vli.vtype; this->GetWidget(WID_GL_REPLACE_PROTECTION)->widget_data += this->vli.vtype; this->FinishInitNested(window_number); @@ -500,6 +503,7 @@ public: this->SetWidgetsDisabledState(IsDefaultGroupID(this->vli.index) || IsAllGroupID(this->vli.index) || _local_company != this->vli.company, WID_GL_DELETE_GROUP, WID_GL_RENAME_GROUP, + WID_GL_LIVERY_GROUP, WID_GL_REPLACE_PROTECTION, WIDGET_LIST_END); @@ -582,7 +586,7 @@ public: assert(g->owner == this->owner); - DrawGroupInfo(y1, r.left, r.right, g->index, this->indents[i], g->replace_protection); + DrawGroupInfo(y1, r.left, r.right, g->index, this->indents[i] * LEVEL_WIDTH, g->replace_protection); y1 += this->tiny_step_height; } @@ -697,6 +701,10 @@ public: this->ShowRenameGroupWindow(this->vli.index, false); break; + case WID_GL_LIVERY_GROUP: // Set group livery + ShowCompanyLiveryWindow(this->owner, this->vli.index); + break; + case WID_GL_AVAILABLE_VEHICLES: ShowBuildVehicleWindow(INVALID_TILE, this->vli.vtype); break; @@ -858,9 +866,8 @@ public: this->SetDirty(); } - virtual void OnTick() + virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (this->groups.NeedResort() || this->vehicles.NeedResort()) { this->SetDirty(); } @@ -977,11 +984,11 @@ static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner o } /** - * Opens a 'Rename group' window for newly created group - * @param success did command succeed? - * @param tile unused - * @param p1 vehicle type - * @param p2 unused + * Opens a 'Rename group' window for newly created group. + * @param result Did command succeed? + * @param tile Unused. + * @param p1 Vehicle type. + * @param p2 Unused. * @see CmdCreateGroup */ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) @@ -995,7 +1002,7 @@ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 /** * Open rename window after adding a vehicle to a new group via drag and drop. - * @param success Did command succeed? + * @param result Did command succeed? * @param tile Unused. * @param p1 Unused. * @param p2 Bit 0-19: Vehicle ID. diff --git a/src/group_gui.h b/src/group_gui.h index 7526fa59c9..108d611e75 100644 --- a/src/group_gui.h +++ b/src/group_gui.h @@ -1,4 +1,4 @@ -/* $Id: group_gui.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/group_type.h b/src/group_type.h index 2ec5371a66..530f31f1ea 100644 --- a/src/group_type.h +++ b/src/group_type.h @@ -1,4 +1,4 @@ -/* $Id: group_type.h 24139 2012-04-17 19:44:16Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/gui.h b/src/gui.h index d7634aa8a4..8234e88bbd 100644 --- a/src/gui.h +++ b/src/gui.h @@ -1,4 +1,4 @@ -/* $Id: gui.h 25372 2013-06-09 13:23:03Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/guitimer_func.h b/src/guitimer_func.h new file mode 100644 index 0000000000..44ce042287 --- /dev/null +++ b/src/guitimer_func.h @@ -0,0 +1,65 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file guitimer_func.h GUI Timers. */ + +#ifndef GUITIMER_FUNC_H +#define GUITIMER_FUNC_H + +class GUITimer +{ +protected: + uint timer; + uint interval; + +public: + GUITimer() : timer(0), interval(0) { } + explicit GUITimer(uint interval) : timer(0), interval(interval) { } + + inline bool HasElapsed() const + { + return this->interval == 0; + } + + inline void SetInterval(uint interval) + { + this->timer = 0; + this->interval = interval; + } + + /** + * Count how many times the interval has elapsed. + * Use to ensure a specific amount of events happen within a timeframe, e.g. for animation. + * @param delta Time since last test. + * @return Number of times the interval has elapsed. + */ + inline uint CountElapsed(uint delta) + { + if (this->interval == 0) return 0; + uint count = delta / this->interval; + if (this->timer + (delta % this->interval) >= this->interval) count++; + this->timer = (this->timer + delta) % this->interval; + return count; + } + + /** + * Test if a timer has elapsed. + * Use to ensure an event happens only once within a timeframe, e.g. for window updates. + * @param delta Time since last test. + * @return True iff the timer has elapsed. + */ + inline bool Elapsed(uint delta) + { + if (this->CountElapsed(delta) == 0) return false; + this->SetInterval(0); + return true; + } +}; + +#endif /* GUITIMER_FUNC_H */ diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 78e9ac3db5..17bdbbf610 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -1,4 +1,4 @@ -/* $Id: heightmap.cpp 27650 2016-09-04 12:57:43Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -447,9 +447,9 @@ void FixSlopes() * Reads the heightmap with the correct file reader. * @param dft Type of image file. * @param filename Name of the file to load. - * @param [out] x Length of the image. - * @param [out] y Height of the image. - * @param [inout] map If not \c NULL, destination to store the loaded block of image data. + * @param[out] x Length of the image. + * @param[out] y Height of the image. + * @param[in,out] map If not \c NULL, destination to store the loaded block of image data. * @return Whether loading was successful. */ static bool ReadHeightMap(DetailedFileType dft, const char *filename, uint *x, uint *y, byte **map) diff --git a/src/heightmap.h b/src/heightmap.h index 35b71b9284..67349df483 100644 --- a/src/heightmap.h +++ b/src/heightmap.h @@ -1,4 +1,4 @@ -/* $Id: heightmap.h 27650 2016-09-04 12:57:43Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/highscore.cpp b/src/highscore.cpp index 3397653ba1..86e4f5ae88 100644 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -1,4 +1,4 @@ -/* $Id: highscore.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/highscore.h b/src/highscore.h index 1e8df6e5ec..5d4b919ee5 100644 --- a/src/highscore.h +++ b/src/highscore.h @@ -1,4 +1,4 @@ -/* $Id: highscore.h 25512 2013-06-29 12:07:40Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp index 018a20ea3a..c67aaa170b 100644 --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: highscore_gui.cpp 26871 2014-09-21 09:12:04Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp index fbcee3fb71..36ee26293e 100644 --- a/src/hotkeys.cpp +++ b/src/hotkeys.cpp @@ -1,4 +1,4 @@ -/* $Id: hotkeys.cpp 27816 2017-03-20 19:30:49Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -41,6 +41,7 @@ static const KeycodeNames _keycode_to_name[] = { {"GLOBAL", WKC_GLOBAL_HOTKEY}, {"ESC", WKC_ESC}, {"DEL", WKC_DELETE}, + {"BACKSPACE", WKC_BACKSPACE}, {"RETURN", WKC_RETURN}, {"BACKQUOTE", WKC_BACKQUOTE}, {"F1", WKC_F1}, diff --git a/src/hotkeys.h b/src/hotkeys.h index 3922a19309..25a489b3f3 100644 --- a/src/hotkeys.h +++ b/src/hotkeys.h @@ -1,4 +1,4 @@ -/* $Id: hotkeys.h 25669 2013-08-05 20:36:28Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/house.h b/src/house.h index 4c285b8d47..c1cfe61041 100644 --- a/src/house.h +++ b/src/house.h @@ -1,4 +1,4 @@ -/* $Id: house.h 25839 2013-10-12 16:34:04Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -31,6 +31,8 @@ static const HouseID NEW_HOUSE_OFFSET = 110; ///< Offset for new houses. static const HouseID NUM_HOUSES = 512; ///< Total number of houses. static const HouseID INVALID_HOUSE_ID = 0xFFFF; +static const uint HOUSE_NUM_ACCEPTS = 16; ///< Max number of cargoes accepted by a tile + /** * There can only be as many classes as there are new houses, plus one for * NO_CLASS, as the original houses don't have classes. @@ -97,30 +99,30 @@ DECLARE_ENUM_AS_BIT_SET(HouseExtraFlags) struct HouseSpec { /* Standard properties */ - Year min_year; ///< introduction year of the house - Year max_year; ///< last year it can be built - byte population; ///< population (Zero on other tiles in multi tile house.) - byte removal_cost; ///< cost multiplier for removing it - StringID building_name; ///< building name - uint16 remove_rating_decrease; ///< rating decrease if removed - byte mail_generation; ///< mail generation multiplier (tile based, as the acceptances below) - byte cargo_acceptance[3]; ///< acceptance level for the cargo slots - CargoID accepts_cargo[3]; ///< 3 input cargo slots - BuildingFlags building_flags; ///< some flags that describe the house (size, stadium etc...) - HouseZones building_availability; ///< where can it be built (climates, zones) - bool enabled; ///< the house is available to build (true by default, but can be disabled by newgrf) + Year min_year; ///< introduction year of the house + Year max_year; ///< last year it can be built + byte population; ///< population (Zero on other tiles in multi tile house.) + byte removal_cost; ///< cost multiplier for removing it + StringID building_name; ///< building name + uint16 remove_rating_decrease; ///< rating decrease if removed + byte mail_generation; ///< mail generation multiplier (tile based, as the acceptances below) + byte cargo_acceptance[HOUSE_NUM_ACCEPTS]; ///< acceptance level for the cargo slots + CargoID accepts_cargo[HOUSE_NUM_ACCEPTS]; ///< input cargo slots + BuildingFlags building_flags; ///< some flags that describe the house (size, stadium etc...) + HouseZones building_availability; ///< where can it be built (climates, zones) + bool enabled; ///< the house is available to build (true by default, but can be disabled by newgrf) /* NewHouses properties */ - GRFFileProps grf_prop; ///< Properties related the the grf file - uint16 callback_mask; ///< Bitmask of house callbacks that have to be called - byte random_colour[4]; ///< 4 "random" colours - byte probability; ///< Relative probability of appearing (16 is the standard value) - HouseExtraFlags extra_flags; ///< some more flags - HouseClassID class_id; ///< defines the class this house has (not grf file based) - AnimationInfo animation; ///< information about the animation. - byte processing_time; ///< Periodic refresh multiplier - byte minimum_life; ///< The minimum number of years this house will survive before the town rebuilds it - uint32 watched_cargoes; ///< Cargo types watched for acceptance. + GRFFileProps grf_prop; ///< Properties related the the grf file + uint16 callback_mask; ///< Bitmask of house callbacks that have to be called + byte random_colour[4]; ///< 4 "random" colours + byte probability; ///< Relative probability of appearing (16 is the standard value) + HouseExtraFlags extra_flags; ///< some more flags + HouseClassID class_id; ///< defines the class this house has (not grf file based) + AnimationInfo animation; ///< information about the animation. + byte processing_time; ///< Periodic refresh multiplier + byte minimum_life; ///< The minimum number of years this house will survive before the town rebuilds it + CargoTypes watched_cargoes; ///< Cargo types watched for acceptance. Money GetRemovalCost() const; diff --git a/src/house_type.h b/src/house_type.h index d1a2ec01b6..9c9c41702c 100644 --- a/src/house_type.h +++ b/src/house_type.h @@ -1,4 +1,4 @@ -/* $Id: house_type.h 22411 2011-05-02 17:42:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/industry.h b/src/industry.h index d41525de96..af0208b3cc 100644 --- a/src/industry.h +++ b/src/industry.h @@ -1,4 +1,4 @@ -/* $Id: industry.h 27929 2017-10-25 15:38:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,9 +12,11 @@ #ifndef INDUSTRY_H #define INDUSTRY_H +#include #include "newgrf_storage.h" #include "subsidy_type.h" #include "industry_map.h" +#include "industrytype.h" #include "tilearea_type.h" @@ -37,20 +39,20 @@ enum ProductionLevels { * Defines the internal data of a functional industry. */ struct Industry : IndustryPool::PoolItem<&_industry_pool> { - TileArea location; ///< Location of the industry - Town *town; ///< Nearest town - CargoID produced_cargo[2]; ///< 2 production cargo slots - uint16 produced_cargo_waiting[2]; ///< amount of cargo produced per cargo - uint16 incoming_cargo_waiting[3]; ///< incoming cargo waiting to be processed - byte production_rate[2]; ///< production rate for each cargo - byte prod_level; ///< general production level - CargoID accepts_cargo[3]; ///< 3 input cargo slots - uint16 this_month_production[2]; ///< stats of this month's production per cargo - uint16 this_month_transported[2]; ///< stats of this month's transport per cargo - byte last_month_pct_transported[2]; ///< percentage transported per cargo in the last full month - uint16 last_month_production[2]; ///< total units produced per cargo in the last full month - uint16 last_month_transported[2]; ///< total units transported per cargo in the last full month - uint16 counter; ///< used for animation and/or production (if available cargo) + TileArea location; ///< Location of the industry + Town *town; ///< Nearest town + CargoID produced_cargo[INDUSTRY_NUM_OUTPUTS]; ///< 16 production cargo slots + uint16 produced_cargo_waiting[INDUSTRY_NUM_OUTPUTS]; ///< amount of cargo produced per cargo + uint16 incoming_cargo_waiting[INDUSTRY_NUM_INPUTS]; ///< incoming cargo waiting to be processed + byte production_rate[INDUSTRY_NUM_OUTPUTS]; ///< production rate for each cargo + byte prod_level; ///< general production level + CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]; ///< 16 input cargo slots + uint16 this_month_production[INDUSTRY_NUM_OUTPUTS]; ///< stats of this month's production per cargo + uint16 this_month_transported[INDUSTRY_NUM_OUTPUTS]; ///< stats of this month's transport per cargo + byte last_month_pct_transported[INDUSTRY_NUM_OUTPUTS]; ///< percentage transported per cargo in the last full month + uint16 last_month_production[INDUSTRY_NUM_OUTPUTS]; ///< total units produced per cargo in the last full month + uint16 last_month_transported[INDUSTRY_NUM_OUTPUTS]; ///< total units transported per cargo in the last full month + uint16 counter; ///< used for animation and/or production (if available cargo) IndustryType type; ///< type of industry. OwnerByte owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE @@ -63,7 +65,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { OwnerByte founder; ///< Founder of the industry Date construction_date; ///< Date of the construction of the industry uint8 construction_type; ///< Way the industry was constructed (@see IndustryConstructionType) - Date last_cargo_accepted_at; ///< Last day cargo was accepted by this industry + Date last_cargo_accepted_at[INDUSTRY_NUM_INPUTS]; ///< Last day each cargo type was accepted by this industry byte selected_layout; ///< Which tile layout was used when creating the industry uint16 random; ///< Random value used for randomisation of all kinds of things @@ -85,6 +87,22 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { return IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == this->index; } + inline int GetCargoProducedIndex(CargoID cargo) const + { + if (cargo == CT_INVALID) return -1; + const CargoID *pos = std::find(this->produced_cargo, endof(this->produced_cargo), cargo); + if (pos == endof(this->produced_cargo)) return -1; + return pos - this->produced_cargo; + } + + inline int GetCargoAcceptedIndex(CargoID cargo) const + { + if (cargo == CT_INVALID) return -1; + const CargoID *pos = std::find(this->accepts_cargo, endof(this->accepts_cargo), cargo); + if (pos == endof(this->accepts_cargo)) return -1; + return pos - this->accepts_cargo; + } + /** * Get the industry of the given tile * @param tile the tile to get the industry from diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index aa42fd2cdd..a01156e4e2 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: industry_cmd.cpp 27932 2017-11-25 16:50:28Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -390,39 +390,53 @@ static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh) return FlatteningFoundation(tileh); } -static void AddAcceptedCargo_Industry(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted) +static void AddAcceptedCargo_Industry(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted) { IndustryGfx gfx = GetIndustryGfx(tile); const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx); + const Industry *ind = Industry::GetByTile(tile); - /* When we have to use a callback, we put our data in the next two variables */ - CargoID raw_accepts_cargo[lengthof(itspec->accepts_cargo)]; - uint8 raw_cargo_acceptance[lengthof(itspec->acceptance)]; + /* Starting point for acceptance */ + CargoID accepts_cargo[lengthof(itspec->accepts_cargo)]; + int8 cargo_acceptance[lengthof(itspec->acceptance)]; + MemCpyT(accepts_cargo, itspec->accepts_cargo, lengthof(accepts_cargo)); + MemCpyT(cargo_acceptance, itspec->acceptance, lengthof(cargo_acceptance)); - /* And then these will always point to a same sized array with the required data */ - const CargoID *accepts_cargo = itspec->accepts_cargo; - const uint8 *cargo_acceptance = itspec->acceptance; + if (itspec->special_flags & INDTILE_SPECIAL_ACCEPTS_ALL_CARGO) { + /* Copy all accepted cargoes from industry itself */ + for (uint i = 0; i < lengthof(ind->accepts_cargo); i++) { + CargoID *pos = std::find(accepts_cargo, endof(accepts_cargo), ind->accepts_cargo[i]); + if (pos == endof(accepts_cargo)) { + /* Not found, insert */ + pos = std::find(accepts_cargo, endof(accepts_cargo), CT_INVALID); + if (pos == endof(accepts_cargo)) continue; // nowhere to place, give up on this one + *pos = ind->accepts_cargo[i]; + } + cargo_acceptance[pos - accepts_cargo] += 8; + } + } if (HasBit(itspec->callback_mask, CBM_INDT_ACCEPT_CARGO)) { + /* Try callback for accepts list, if success override all existing accepts */ uint16 res = GetIndustryTileCallback(CBID_INDTILE_ACCEPT_CARGO, 0, 0, gfx, Industry::GetByTile(tile), tile); if (res != CALLBACK_FAILED) { - accepts_cargo = raw_accepts_cargo; - for (uint i = 0; i < lengthof(itspec->accepts_cargo); i++) raw_accepts_cargo[i] = GetCargoTranslation(GB(res, i * 5, 5), itspec->grf_prop.grffile); + MemSetT(accepts_cargo, CT_INVALID, lengthof(accepts_cargo)); + for (uint i = 0; i < 3; i++) accepts_cargo[i] = GetCargoTranslation(GB(res, i * 5, 5), itspec->grf_prop.grffile); } } if (HasBit(itspec->callback_mask, CBM_INDT_CARGO_ACCEPTANCE)) { + /* Try callback for acceptance list, if success override all existing acceptance */ uint16 res = GetIndustryTileCallback(CBID_INDTILE_CARGO_ACCEPTANCE, 0, 0, gfx, Industry::GetByTile(tile), tile); if (res != CALLBACK_FAILED) { - cargo_acceptance = raw_cargo_acceptance; - for (uint i = 0; i < lengthof(itspec->accepts_cargo); i++) raw_cargo_acceptance[i] = GB(res, i * 4, 4); + MemSetT(cargo_acceptance, 0, lengthof(cargo_acceptance)); + for (uint i = 0; i < 3; i++) cargo_acceptance[i] = GB(res, i * 4, 4); } } - const Industry *ind = Industry::GetByTile(tile); for (byte i = 0; i < lengthof(itspec->accepts_cargo); i++) { CargoID a = accepts_cargo[i]; - if (a == CT_INVALID || cargo_acceptance[i] == 0) continue; // work only with valid cargoes + if (a == CT_INVALID || cargo_acceptance[i] <= 0) continue; // work only with valid cargoes /* Add accepted cargo */ acceptance[a] += cargo_acceptance[i]; @@ -1118,8 +1132,9 @@ static void ProduceIndustryGoods(Industry *i) if (HasBit(indsp->callback_mask, CBM_IND_PRODUCTION_256_TICKS)) IndustryProductionCallback(i, 1); IndustryBehaviour indbehav = indsp->behaviour; - i->produced_cargo_waiting[0] = min(0xffff, i->produced_cargo_waiting[0] + i->production_rate[0]); - i->produced_cargo_waiting[1] = min(0xffff, i->produced_cargo_waiting[1] + i->production_rate[1]); + for (size_t j = 0; j < lengthof(i->produced_cargo_waiting); j++) { + i->produced_cargo_waiting[j] = min(0xffff, i->produced_cargo_waiting[j] + i->production_rate[j]); + } if ((indbehav & INDUSTRYBEH_PLANT_FIELDS) != 0) { uint16 cb_res = CALLBACK_FAILED; @@ -1323,7 +1338,7 @@ static CheckNewIndustryProc * const _check_new_industry_procs[CHECK_END] = { * Find a town for the industry, while checking for multiple industries in the same town. * @param tile Position of the industry to build. * @param type Industry type. - * @param [out] town Pointer to return town for the new industry, \c NULL is written if no good town can be found. + * @param[out] t Pointer to return town for the new industry, \c NULL is written if no good town can be found. * @return Succeeded or failed command. * * @pre \c *t != NULL @@ -1365,14 +1380,14 @@ bool IsSlopeRefused(Slope current, Slope refused) /** * Are the tiles of the industry free? - * @param tile Position to check. - * @param it Industry tiles table. - * @param itspec_index The index of the itsepc to build/fund - * @param type Type of the industry. - * @param initial_random_bits The random bits the industry is going to have after construction. - * @param founder Industry founder - * @param creation_type The circumstances the industry is created under. - * @param [out] custom_shape_check Perform custom check for the site. + * @param tile Position to check. + * @param it Industry tiles table. + * @param itspec_index The index of the itsepc to build/fund + * @param type Type of the industry. + * @param initial_random_bits The random bits the industry is going to have after construction. + * @param founder Industry founder + * @param creation_type The circumstances the industry is created under. + * @param[out] custom_shape_check Perform custom check for the site. * @return Failed or succeeded command. */ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable *it, uint itspec_index, int type, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type, bool *custom_shape_check = NULL) @@ -1648,18 +1663,23 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, i->type = type; Industry::IncIndustryTypeCount(type); - i->produced_cargo[0] = indspec->produced_cargo[0]; - i->produced_cargo[1] = indspec->produced_cargo[1]; - i->accepts_cargo[0] = indspec->accepts_cargo[0]; - i->accepts_cargo[1] = indspec->accepts_cargo[1]; - i->accepts_cargo[2] = indspec->accepts_cargo[2]; - i->production_rate[0] = indspec->production_rate[0]; - i->production_rate[1] = indspec->production_rate[1]; + MemCpyT(i->produced_cargo, indspec->produced_cargo, lengthof(i->produced_cargo)); + MemCpyT(i->production_rate, indspec->production_rate, lengthof(i->production_rate)); + MemCpyT(i->accepts_cargo, indspec->accepts_cargo, lengthof(i->accepts_cargo)); + + MemSetT(i->produced_cargo_waiting, 0, lengthof(i->produced_cargo_waiting)); + MemSetT(i->this_month_production, 0, lengthof(i->this_month_production)); + MemSetT(i->this_month_transported, 0, lengthof(i->this_month_transported)); + MemSetT(i->last_month_pct_transported, 0, lengthof(i->last_month_pct_transported)); + MemSetT(i->last_month_transported, 0, lengthof(i->last_month_transported)); + MemSetT(i->incoming_cargo_waiting, 0, lengthof(i->incoming_cargo_waiting)); + MemSetT(i->last_cargo_accepted_at, 0, lengthof(i->last_cargo_accepted_at)); /* don't use smooth economy for industries using production related callbacks */ if (indspec->UsesSmoothEconomy()) { - i->production_rate[0] = min((RandomRange(256) + 128) * i->production_rate[0] >> 8, 255); - i->production_rate[1] = min((RandomRange(256) + 128) * i->production_rate[1] >> 8, 255); + for (size_t ci = 0; ci < lengthof(i->production_rate); ci++) { + i->production_rate[ci] = min((RandomRange(256) + 128) * i->production_rate[ci] >> 8, 255); + } } i->town = t; @@ -1669,19 +1689,6 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, i->random_colour = GB(r, 0, 4); i->counter = GB(r, 4, 12); i->random = initial_random_bits; - i->produced_cargo_waiting[0] = 0; - i->produced_cargo_waiting[1] = 0; - i->incoming_cargo_waiting[0] = 0; - i->incoming_cargo_waiting[1] = 0; - i->incoming_cargo_waiting[2] = 0; - i->this_month_production[0] = 0; - i->this_month_production[1] = 0; - i->this_month_transported[0] = 0; - i->this_month_transported[1] = 0; - i->last_month_pct_transported[0] = 0; - i->last_month_pct_transported[1] = 0; - i->last_month_transported[0] = 0; - i->last_month_transported[1] = 0; i->was_cargo_delivered = false; i->last_prod_year = _cur_year; i->founder = founder; @@ -1712,10 +1719,9 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, } if (_generating_world) { - i->last_month_production[0] = i->production_rate[0] * 8; - i->last_month_production[1] = i->production_rate[1] * 8; - } else { - i->last_month_production[0] = i->last_month_production[1] = 0; + for (size_t ci = 0; ci < lengthof(i->last_month_production); ci++) { + i->last_month_production[ci] = i->production_rate[ci] * 8; + } } if (HasBit(indspec->callback_mask, CBM_IND_DECIDE_COLOUR)) { @@ -1727,28 +1733,56 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, } if (HasBit(indspec->callback_mask, CBM_IND_INPUT_CARGO_TYPES)) { + /* Clear all input cargo types */ for (uint j = 0; j < lengthof(i->accepts_cargo); j++) i->accepts_cargo[j] = CT_INVALID; - for (uint j = 0; j < lengthof(i->accepts_cargo); j++) { + /* Query actual types */ + uint maxcargoes = (indspec->behaviour & INDUSTRYBEH_CARGOTYPES_UNLIMITED) ? lengthof(i->accepts_cargo) : 3; + for (uint j = 0; j < maxcargoes; j++) { uint16 res = GetIndustryCallback(CBID_INDUSTRY_INPUT_CARGO_TYPES, j, 0, i, type, INVALID_TILE); if (res == CALLBACK_FAILED || GB(res, 0, 8) == CT_INVALID) break; if (indspec->grf_prop.grffile->grf_version >= 8 && res >= 0x100) { ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_INPUT_CARGO_TYPES, res); break; } - i->accepts_cargo[j] = GetCargoTranslation(GB(res, 0, 8), indspec->grf_prop.grffile); + CargoID cargo = GetCargoTranslation(GB(res, 0, 8), indspec->grf_prop.grffile); + if (std::find(indspec->accepts_cargo, endof(indspec->accepts_cargo), cargo) == endof(indspec->accepts_cargo)) { + /* Cargo not in spec, error in NewGRF */ + ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_INPUT_CARGO_TYPES, res); + break; + } + if (std::find(i->accepts_cargo, i->accepts_cargo + j, cargo) != i->accepts_cargo + j) { + /* Duplicate cargo */ + ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_INPUT_CARGO_TYPES, res); + break; + } + i->accepts_cargo[j] = cargo; } } if (HasBit(indspec->callback_mask, CBM_IND_OUTPUT_CARGO_TYPES)) { + /* Clear all output cargo types */ for (uint j = 0; j < lengthof(i->produced_cargo); j++) i->produced_cargo[j] = CT_INVALID; - for (uint j = 0; j < lengthof(i->produced_cargo); j++) { + /* Query actual types */ + uint maxcargoes = (indspec->behaviour & INDUSTRYBEH_CARGOTYPES_UNLIMITED) ? lengthof(i->produced_cargo) : 2; + for (uint j = 0; j < maxcargoes; j++) { uint16 res = GetIndustryCallback(CBID_INDUSTRY_OUTPUT_CARGO_TYPES, j, 0, i, type, INVALID_TILE); if (res == CALLBACK_FAILED || GB(res, 0, 8) == CT_INVALID) break; if (indspec->grf_prop.grffile->grf_version >= 8 && res >= 0x100) { ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_OUTPUT_CARGO_TYPES, res); break; } - i->produced_cargo[j] = GetCargoTranslation(GB(res, 0, 8), indspec->grf_prop.grffile); + CargoID cargo = GetCargoTranslation(GB(res, 0, 8), indspec->grf_prop.grffile); + if (std::find(indspec->produced_cargo, endof(indspec->produced_cargo), cargo) == endof(indspec->produced_cargo)) { + /* Cargo not in spec, error in NewGRF */ + ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_OUTPUT_CARGO_TYPES, res); + break; + } + if (std::find(i->produced_cargo, i->produced_cargo + j, cargo) != i->produced_cargo + j) { + /* Duplicate cargo */ + ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_OUTPUT_CARGO_TYPES, res); + break; + } + i->produced_cargo[j] = cargo; } } @@ -1793,11 +1827,11 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, * @param flags of operations to conduct * @param indspec pointer to industry specifications * @param itspec_index the index of the itsepc to build/fund - * @param seed random seed (possibly) used by industries - * @param initial_random_bits The random bits the industry is going to have after construction. + * @param random_var8f random seed (possibly) used by industries + * @param random_initial_bits The random bits the industry is going to have after construction. * @param founder Founder of the industry * @param creation_type The circumstances the industry is created under. - * @param [out] ip Pointer to store newly created industry. + * @param[out] ip Pointer to store newly created industry. * @return Succeeded or failed command. * * @post \c *ip contains the newly created industry if all checks are successful and the \a flags request actual creation, else it contains \c NULL afterwards. @@ -1995,7 +2029,7 @@ static Industry *CreateNewIndustry(TileIndex tile, IndustryType type, IndustryAv /** * Compute the appearance probability for an industry during map creation. * @param it Industry type to compute. - * @param [out] force_at_least_one Returns whether at least one instance should be forced on map creation. + * @param[out] force_at_least_one Returns whether at least one instance should be forced on map creation. * @return Relative probability for the industry to appear. */ static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *force_at_least_one) @@ -2020,7 +2054,7 @@ static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *forc /** * Compute the probability for constructing a new industry during game play. * @param it Industry type to compute. - * @param [out] min_number Minimal number of industries that should exist at the map. + * @param[out] min_number Minimal number of industries that should exist at the map. * @return Relative probability for the industry to appear. */ static uint16 GetIndustryGamePlayProbability(IndustryType it, byte *min_number) @@ -2228,8 +2262,9 @@ void Industry::RecomputeProductionMultipliers() assert(!indspec->UsesSmoothEconomy()); /* Rates are rounded up, so e.g. oilrig always produces some passengers */ - this->production_rate[0] = min(CeilDiv(indspec->production_rate[0] * this->prod_level, PRODLEVEL_DEFAULT), 0xFF); - this->production_rate[1] = min(CeilDiv(indspec->production_rate[1] * this->prod_level, PRODLEVEL_DEFAULT), 0xFF); + for (size_t i = 0; i < lengthof(this->production_rate); i++) { + this->production_rate[i] = min(CeilDiv(indspec->production_rate[i] * this->prod_level, PRODLEVEL_DEFAULT), 0xFF); + } } diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index ddaec879df..8a9536da60 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: industry_gui.cpp 27952 2017-12-27 21:54:52Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -76,12 +76,7 @@ static void ShowIndustryCargoesWindow(IndustryType id); /** * Gets the string to display after the cargo name (using callback 37) - * @param cargo the cargo for which the suffix is requested - * - 00 - first accepted cargo type - * - 01 - second accepted cargo type - * - 02 - third accepted cargo type - * - 03 - first produced cargo type - * - 04 - second produced cargo type + * @param cargo the cargo for which the suffix is requested, meaning depends on presence of flag 18 in prop 1A * @param cst the cargo suffix type (for which window is it requested). @see CargoSuffixType * @param ind the industry (NULL if in fund window) * @param ind_type the industry type @@ -136,9 +131,14 @@ static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind, } } +enum CargoSuffixInOut { + CARGOSUFFIX_OUT = 0, + CARGOSUFFIX_IN = 1, +}; + /** * Gets all strings to display after the cargoes of industries (using callback 37) - * @param cb_offset The offset for the cargo used in cb37, 0 for accepted cargoes, 3 for produced cargoes + * @param use_input get suffixes for output cargoes or input cargoes? * @param cst the cargo suffix type (for which window is it requested). @see CargoSuffixType * @param ind the industry (NULL if in fund window) * @param ind_type the industry type @@ -147,14 +147,40 @@ static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind, * @param suffixes is filled with the suffixes */ template -static inline void GetAllCargoSuffixes(uint cb_offset, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, const TC &cargoes, TS &suffixes) +static inline void GetAllCargoSuffixes(CargoSuffixInOut use_input, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, const TC &cargoes, TS &suffixes) { assert_compile(lengthof(cargoes) <= lengthof(suffixes)); - for (uint j = 0; j < lengthof(cargoes); j++) { - if (cargoes[j] != CT_INVALID) { - GetCargoSuffix(cb_offset + j, cst, ind, ind_type, indspec, suffixes[j]); - } else { + + if (indspec->behaviour & INDUSTRYBEH_CARGOTYPES_UNLIMITED) { + /* Reworked behaviour with new many-in-many-out scheme */ + for (uint j = 0; j < lengthof(suffixes); j++) { + if (cargoes[j] != CT_INVALID) { + byte local_id = indspec->grf_prop.grffile->cargo_map[cargoes[j]]; // should we check the value for valid? + uint cargotype = local_id << 16 | use_input; + GetCargoSuffix(cargotype, cst, ind, ind_type, indspec, suffixes[j]); + } else { + suffixes[j].text[0] = '\0'; + suffixes[j].display = CSD_CARGO; + } + } + } else { + /* Compatible behaviour with old 3-in-2-out scheme */ + for (uint j = 0; j < lengthof(suffixes); j++) { suffixes[j].text[0] = '\0'; + suffixes[j].display = CSD_CARGO; + } + switch (use_input) { + case CARGOSUFFIX_OUT: + if (cargoes[0] != CT_INVALID) GetCargoSuffix(3, cst, ind, ind_type, indspec, suffixes[0]); + if (cargoes[1] != CT_INVALID) GetCargoSuffix(4, cst, ind, ind_type, indspec, suffixes[1]); + break; + case CARGOSUFFIX_IN: + if (cargoes[0] != CT_INVALID) GetCargoSuffix(0, cst, ind, ind_type, indspec, suffixes[0]); + if (cargoes[1] != CT_INVALID) GetCargoSuffix(1, cst, ind, ind_type, indspec, suffixes[1]); + if (cargoes[2] != CT_INVALID) GetCargoSuffix(2, cst, ind, ind_type, indspec, suffixes[2]); + break; + default: + NOT_REACHED(); } } } @@ -264,6 +290,8 @@ class BuildIndustryWindow : public Window { /** The offset for the text in the matrix. */ static const int MATRIX_TEXT_OFFSET = 17; + /** The largest allowed minimum-width of the window, given in line heights */ + static const int MAX_MINWIDTH_LINEHEIGHTS = 20; void SetupArrays() { @@ -325,6 +353,53 @@ class BuildIndustryWindow : public Window { this->LowerWidget(_settings_client.gui.show_industry_forbidden_tiles + WID_DPI_FT_OFF); } + /** + * Build a string of cargo names with suffixes attached. + * This is distinct from the CARGO_LIST string formatting code in two ways: + * - This cargo list uses the order defined by the industry, rather than alphabetic. + * - NewGRF-supplied suffix strings can be attached to each cargo. + * + * @param cargolist Array of CargoID to display + * @param cargo_suffix Array of suffixes to attach to each cargo + * @param cargolistlen Length of arrays + * @param prefixstr String to use for the first item + * @return A formatted raw string + */ + std::string MakeCargoListString(const CargoID *cargolist, const CargoSuffix *cargo_suffix, int cargolistlen, StringID prefixstr) const + { + std::string cargostring; + char buf[1024]; + int numcargo = 0; + int firstcargo = -1; + + for (byte j = 0; j < cargolistlen; j++) { + if (cargolist[j] == CT_INVALID) continue; + numcargo++; + if (firstcargo < 0) { + firstcargo = j; + continue; + } + SetDParam(0, CargoSpec::Get(cargolist[j])->name); + SetDParamStr(1, cargo_suffix[j].text); + GetString(buf, STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION, lastof(buf)); + cargostring += buf; + } + + if (numcargo > 0) { + SetDParam(0, CargoSpec::Get(cargolist[firstcargo])->name); + SetDParamStr(1, cargo_suffix[firstcargo].text); + GetString(buf, prefixstr, lastof(buf)); + cargostring = std::string(buf) + cargostring; + } else { + SetDParam(0, STR_JUST_NOTHING); + SetDParamStr(1, ""); + GetString(buf, prefixstr, lastof(buf)); + cargostring = std::string(buf); + } + + return cargostring; + } + public: BuildIndustryWindow(WindowDesc *desc) : Window(desc) { @@ -372,42 +447,39 @@ public: case WID_DPI_INFOPANEL: { /* Extra line for cost outside of editor + extra lines for 'extra' information for NewGRFs. */ int height = 2 + (_game_mode == GM_EDITOR ? 0 : 1) + (_loaded_newgrf_features.has_newindustries ? 4 : 0); + uint extra_lines_req = 0; + uint extra_lines_prd = 0; + uint max_minwidth = FONT_HEIGHT_NORMAL * MAX_MINWIDTH_LINEHEIGHTS; Dimension d = {0, 0}; for (byte i = 0; i < this->count; i++) { if (this->index[i] == INVALID_INDUSTRYTYPE) continue; const IndustrySpec *indsp = GetIndustrySpec(this->index[i]); + CargoSuffix cargo_suffix[lengthof(indsp->accepts_cargo)]; - CargoSuffix cargo_suffix[3]; - GetAllCargoSuffixes(0, CST_FUND, NULL, this->index[i], indsp, indsp->accepts_cargo, cargo_suffix); - StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO; - byte p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->accepts_cargo); j++) { - if (indsp->accepts_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); + /* Measure the accepted cargoes, if any. */ + GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, NULL, this->index[i], indsp, indsp->accepts_cargo, cargo_suffix); + std::string cargostring = this->MakeCargoListString(indsp->accepts_cargo, cargo_suffix, lengthof(indsp->accepts_cargo), STR_INDUSTRY_VIEW_REQUIRES_N_CARGO); + Dimension strdim = GetStringBoundingBox(cargostring.c_str()); + if (strdim.width > max_minwidth) { + extra_lines_req = max(extra_lines_req, strdim.width / max_minwidth + 1); + strdim.width = max_minwidth; } - d = maxdim(d, GetStringBoundingBox(str)); + d = maxdim(d, strdim); - /* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */ - GetAllCargoSuffixes(3, CST_FUND, NULL, this->index[i], indsp, indsp->produced_cargo, cargo_suffix); - str = STR_INDUSTRY_VIEW_PRODUCES_CARGO; - p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->produced_cargo); j++) { - if (indsp->produced_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); + /* Measure the produced cargoes, if any. */ + GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, NULL, this->index[i], indsp, indsp->produced_cargo, cargo_suffix); + cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, lengthof(indsp->produced_cargo), STR_INDUSTRY_VIEW_PRODUCES_N_CARGO); + strdim = GetStringBoundingBox(cargostring.c_str()); + if (strdim.width > max_minwidth) { + extra_lines_prd = max(extra_lines_prd, strdim.width / max_minwidth + 1); + strdim.width = max_minwidth; } - d = maxdim(d, GetStringBoundingBox(str)); + d = maxdim(d, strdim); } /* Set it to something more sane :) */ + height += extra_lines_prd + extra_lines_req; size->height = height * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; size->width = d.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT; break; @@ -496,46 +568,26 @@ public: y += FONT_HEIGHT_NORMAL; } + CargoSuffix cargo_suffix[lengthof(indsp->accepts_cargo)]; + /* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */ - CargoSuffix cargo_suffix[3]; - GetAllCargoSuffixes(0, CST_FUND, NULL, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix); - StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO; - byte p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->accepts_cargo); j++) { - if (indsp->accepts_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); - } - DrawString(left, right, y, str); - y += FONT_HEIGHT_NORMAL; + GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, NULL, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix); + std::string cargostring = this->MakeCargoListString(indsp->accepts_cargo, cargo_suffix, lengthof(indsp->accepts_cargo), STR_INDUSTRY_VIEW_REQUIRES_N_CARGO); + y = DrawStringMultiLine(left, right, y, bottom, cargostring.c_str()); /* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */ - GetAllCargoSuffixes(3, CST_FUND, NULL, this->selected_type, indsp, indsp->produced_cargo, cargo_suffix); - str = STR_INDUSTRY_VIEW_PRODUCES_CARGO; - p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->produced_cargo); j++) { - if (indsp->produced_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); - } - DrawString(left, right, y, str); - y += FONT_HEIGHT_NORMAL; + GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, NULL, this->selected_type, indsp, indsp->produced_cargo, cargo_suffix); + cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, lengthof(indsp->produced_cargo), STR_INDUSTRY_VIEW_PRODUCES_N_CARGO); + y = DrawStringMultiLine(left, right, y, bottom, cargostring.c_str()); /* Get the additional purchase info text, if it has not already been queried. */ - str = STR_NULL; if (HasBit(indsp->callback_mask, CBM_IND_FUND_MORE_TEXT)) { uint16 callback_res = GetIndustryCallback(CBID_INDUSTRY_FUND_MORE_TEXT, 0, 0, NULL, this->selected_type, INVALID_TILE); if (callback_res != CALLBACK_FAILED && callback_res != 0x400) { if (callback_res > 0x400) { ErrorUnknownCallbackResult(indsp->grf_prop.grffile->grfid, CBID_INDUSTRY_FUND_MORE_TEXT, callback_res); } else { - str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string + StringID str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string if (str != STR_UNDEFINED) { StartTextRefStackUsage(indsp->grf_prop.grffile, 6); DrawStringMultiLine(left, right, y, bottom, str, TC_YELLOW); @@ -653,9 +705,8 @@ public: if (success && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace(); } - virtual void OnTick() + virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (!this->timer_enabled) return; if (--this->callback_timer == 0) { /* We have just passed another day. @@ -739,8 +790,15 @@ static void UpdateIndustryProduction(Industry *i); static inline bool IsProductionAlterable(const Industry *i) { const IndustrySpec *is = GetIndustrySpec(i->type); + bool has_prod = false; + for (size_t j = 0; j < lengthof(is->production_rate); j++) { + if (is->production_rate[j] != 0) { + has_prod = true; + break; + } + } return ((_game_mode == GM_EDITOR || _cheats.setup_prod.value) && - (is->production_rate[0] != 0 || is->production_rate[1] != 0 || is->IsRawIndustry()) && + (has_prod || is->IsRawIndustry()) && !_networking); } @@ -819,8 +877,8 @@ public: y += 2 * FONT_HEIGHT_NORMAL; } - CargoSuffix cargo_suffix[3]; - GetAllCargoSuffixes(0, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix); + CargoSuffix cargo_suffix[lengthof(i->accepts_cargo)]; + GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix); bool stockpiling = HasBit(ind->callback_mask, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_mask, CBM_IND_PRODUCTION_256_TICKS); uint left_side = left + WD_FRAMERECT_LEFT * 4; // Indent accepted cargoes. @@ -859,7 +917,7 @@ public: y += FONT_HEIGHT_NORMAL; } - GetAllCargoSuffixes(3, CST_VIEW, i, i->type, ind, i->produced_cargo, cargo_suffix); + GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_VIEW, i, i->type, ind, i->produced_cargo, cargo_suffix); first = true; for (byte j = 0; j < lengthof(i->produced_cargo); j++) { if (i->produced_cargo[j] == CT_INVALID) continue; @@ -1318,7 +1376,7 @@ protected: SetDParam(p++, i->index); static CargoSuffix cargo_suffix[lengthof(i->produced_cargo)]; - GetAllCargoSuffixes(3, CST_DIR, i, i->type, indsp, i->produced_cargo, cargo_suffix); + GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_DIR, i, i->type, indsp, i->produced_cargo, cargo_suffix); /* Industry productions */ for (byte j = 0; j < lengthof(i->produced_cargo); j++) { @@ -1625,7 +1683,7 @@ enum CargoesFieldType { CFT_HEADER, ///< Header text. }; -static const uint MAX_CARGOES = 3; ///< Maximum number of cargoes carried in a #CFT_CARGO field in #CargoesField. +static const uint MAX_CARGOES = 16; ///< Maximum number of cargoes carried in a #CFT_CARGO field in #CargoesField. /** Data about a single field in the #IndustryCargoesWindow panel. */ struct CargoesField { @@ -1633,7 +1691,6 @@ struct CargoesField { static const int HOR_CARGO_BORDER_SPACE; static const int CARGO_STUB_WIDTH; static const int HOR_CARGO_WIDTH, HOR_CARGO_SPACE; - static const int CARGO_FIELD_WIDTH; static const int VERT_CARGO_SPACE, VERT_CARGO_EDGE; static const int BLOB_DISTANCE, BLOB_WIDTH, BLOB_HEIGHT; @@ -1641,7 +1698,9 @@ struct CargoesField { static const int CARGO_LINE_COLOUR; static int small_height, normal_height; + static int cargo_field_width; static int industry_width; + static uint max_cargoes; CargoesFieldType type; ///< Type of field. union { @@ -1690,7 +1749,7 @@ struct CargoesField { /** * Connect a cargo from an industry to the #CFT_CARGO column. * @param cargo Cargo to connect. - * @param produced Cargo is produced (if \c false, cargo is assumed to be accepted). + * @param producer Cargo is produced (if \c false, cargo is assumed to be accepted). * @return Horizontal connection index, or \c -1 if not accepted at all. */ int ConnectCargo(CargoID cargo, bool producer) @@ -1794,20 +1853,19 @@ struct CargoesField { int GetCargoBase(int xpos) const { assert(this->type == CFT_CARGO); + int n = this->u.cargo.num_cargoes; - switch (this->u.cargo.num_cargoes) { - case 0: return xpos + CARGO_FIELD_WIDTH / 2; - case 1: return xpos + CARGO_FIELD_WIDTH / 2 - HOR_CARGO_WIDTH / 2; - case 2: return xpos + CARGO_FIELD_WIDTH / 2 - HOR_CARGO_WIDTH - HOR_CARGO_SPACE / 2; - case 3: return xpos + CARGO_FIELD_WIDTH / 2 - HOR_CARGO_WIDTH - HOR_CARGO_SPACE - HOR_CARGO_WIDTH / 2; - default: NOT_REACHED(); + if (n % 2 == 0) { + return xpos + cargo_field_width / 2 - (HOR_CARGO_WIDTH + HOR_CARGO_SPACE / 2) * (n / 2); + } else { + return xpos + cargo_field_width / 2 - HOR_CARGO_WIDTH / 2 - (HOR_CARGO_WIDTH + HOR_CARGO_SPACE) * (n / 2); } } /** * Draw the field. * @param xpos Position of the left edge. - * @param vpos Position of the top edge. + * @param ypos Position of the top edge. */ void Draw(int xpos, int ypos) const { @@ -1859,7 +1917,7 @@ struct CargoesField { other_left = this->u.industry.other_accepted; } ypos1 += VERT_CARGO_EDGE; - for (uint i = 0; i < MAX_CARGOES; i++) { + for (uint i = 0; i < CargoesField::max_cargoes; i++) { if (other_right[i] != INVALID_CARGO) { const CargoSpec *csp = CargoSpec::Get(other_right[i]); int xp = xpos + industry_width + CARGO_STUB_WIDTH; @@ -1924,7 +1982,7 @@ struct CargoesField { DrawHorConnection(lf + dx - 1, lf + HOR_CARGO_SPACE - 1, ypos, csp); dx = 1; } - DrawHorConnection(cargo_base + col * HOR_CARGO_SPACE + (col + 1) * HOR_CARGO_WIDTH - 1 + dx, xpos + CARGO_FIELD_WIDTH - 1, ypos, csp); + DrawHorConnection(cargo_base + col * HOR_CARGO_SPACE + (col + 1) * HOR_CARGO_WIDTH - 1 + dx, xpos + CargoesField::cargo_field_width - 1, ypos, csp); } ypos += FONT_HEIGHT_NORMAL + VERT_CARGO_SPACE; } @@ -2046,9 +2104,11 @@ private: assert_compile(MAX_CARGOES >= cpp_lengthof(IndustrySpec, produced_cargo)); assert_compile(MAX_CARGOES >= cpp_lengthof(IndustrySpec, accepts_cargo)); -int CargoesField::small_height; ///< Height of the header row. -int CargoesField::normal_height; ///< Height of the non-header rows. -int CargoesField::industry_width; ///< Width of an industry field. +int CargoesField::small_height; ///< Height of the header row. +int CargoesField::normal_height; ///< Height of the non-header rows. +int CargoesField::industry_width; ///< Width of an industry field. +int CargoesField::cargo_field_width; ///< Width of a cargo field. +uint CargoesField::max_cargoes; ///< Largest number of cargoes actually on any industry. const int CargoesField::VERT_INTER_INDUSTRY_SPACE = 6; ///< Amount of space between two industries in a column. const int CargoesField::HOR_CARGO_BORDER_SPACE = 15; ///< Amount of space between the left/right edge of a #CFT_CARGO field, and the left/right most vertical cargo. @@ -2062,9 +2122,6 @@ const int CargoesField::BLOB_DISTANCE = 5; ///< Distance of the industry legend const int CargoesField::BLOB_WIDTH = 12; ///< Width of the industry legend colour, including border. const int CargoesField::BLOB_HEIGHT = 9; ///< Height of the industry legend colour, including border -/** Width of a #CFT_CARGO field. */ -const int CargoesField::CARGO_FIELD_WIDTH = HOR_CARGO_BORDER_SPACE * 2 + HOR_CARGO_WIDTH * MAX_CARGOES + HOR_CARGO_SPACE * (MAX_CARGOES - 1); - const int CargoesField::INDUSTRY_LINE_COLOUR = PC_YELLOW; ///< Line colour of the industry type box. const int CargoesField::CARGO_LINE_COLOUR = PC_YELLOW; ///< Line colour around the cargo. @@ -2089,13 +2146,14 @@ struct CargoesRow { int other_count = 0; const IndustrySpec *indsp = GetIndustrySpec(ind_fld->u.industry.ind_type); - for (uint i = 0; i < lengthof(indsp->produced_cargo); i++) { + assert(CargoesField::max_cargoes <= lengthof(indsp->produced_cargo)); + for (uint i = 0; i < CargoesField::max_cargoes; i++) { int col = cargo_fld->ConnectCargo(indsp->produced_cargo[i], true); if (col < 0) others[other_count++] = indsp->produced_cargo[i]; } /* Allocate other cargoes in the empty holes of the horizontal cargo connections. */ - for (uint i = 0; i < MAX_CARGOES && other_count > 0; i++) { + for (uint i = 0; i < CargoesField::max_cargoes && other_count > 0; i++) { if (cargo_fld->u.cargo.supp_cargoes[i] == INVALID_CARGO) ind_fld->u.industry.other_produced[i] = others[--other_count]; } } else { @@ -2146,13 +2204,14 @@ struct CargoesRow { int other_count = 0; const IndustrySpec *indsp = GetIndustrySpec(ind_fld->u.industry.ind_type); - for (uint i = 0; i < lengthof(indsp->accepts_cargo); i++) { + assert(CargoesField::max_cargoes <= lengthof(indsp->accepts_cargo)); + for (uint i = 0; i < CargoesField::max_cargoes; i++) { int col = cargo_fld->ConnectCargo(indsp->accepts_cargo[i], false); if (col < 0) others[other_count++] = indsp->accepts_cargo[i]; } /* Allocate other cargoes in the empty holes of the horizontal cargo connections. */ - for (uint i = 0; i < MAX_CARGOES && other_count > 0; i++) { + for (uint i = 0; i < CargoesField::max_cargoes && other_count > 0; i++) { if (cargo_fld->u.cargo.cust_cargoes[i] == INVALID_CARGO) ind_fld->u.industry.other_accepted[i] = others[--other_count]; } } else { @@ -2235,10 +2294,13 @@ struct IndustryCargoesWindow : public Window { /* Decide about the size of the box holding the text of an industry type. */ this->ind_textsize.width = 0; this->ind_textsize.height = 0; + CargoesField::max_cargoes = 0; for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) { const IndustrySpec *indsp = GetIndustrySpec(it); if (!indsp->enabled) continue; this->ind_textsize = maxdim(this->ind_textsize, GetStringBoundingBox(indsp->name)); + CargoesField::max_cargoes = max(CargoesField::max_cargoes, std::count_if(indsp->accepts_cargo, endof(indsp->accepts_cargo), IsCargoIDValid)); + CargoesField::max_cargoes = max(CargoesField::max_cargoes, std::count_if(indsp->produced_cargo, endof(indsp->produced_cargo), IsCargoIDValid)); } d.width = max(d.width, this->ind_textsize.width); d.height = this->ind_textsize.height; @@ -2257,18 +2319,21 @@ struct IndustryCargoesWindow : public Window { d.width += 2 * HOR_TEXT_PADDING; /* Ensure the height is enough for the industry type text, for the horizontal connections, and for the cargo labels. */ - uint min_ind_height = CargoesField::VERT_CARGO_EDGE * 2 + MAX_CARGOES * FONT_HEIGHT_NORMAL + (MAX_CARGOES - 1) * CargoesField::VERT_CARGO_SPACE; + uint min_ind_height = CargoesField::VERT_CARGO_EDGE * 2 + CargoesField::max_cargoes * FONT_HEIGHT_NORMAL + (CargoesField::max_cargoes - 1) * CargoesField::VERT_CARGO_SPACE; d.height = max(d.height + 2 * VERT_TEXT_PADDING, min_ind_height); CargoesField::industry_width = d.width; CargoesField::normal_height = d.height + CargoesField::VERT_INTER_INDUSTRY_SPACE; + + /* Width of a #CFT_CARGO field. */ + CargoesField::cargo_field_width = CargoesField::HOR_CARGO_BORDER_SPACE * 2 + CargoesField::HOR_CARGO_WIDTH * CargoesField::max_cargoes + CargoesField::HOR_CARGO_SPACE * (CargoesField::max_cargoes - 1); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) { switch (widget) { case WID_IC_PANEL: - size->width = WD_FRAMETEXT_LEFT + CargoesField::industry_width * 3 + CargoesField::CARGO_FIELD_WIDTH * 2 + WD_FRAMETEXT_RIGHT; + size->width = WD_FRAMETEXT_LEFT + CargoesField::industry_width * 3 + CargoesField::cargo_field_width * 2 + WD_FRAMETEXT_RIGHT; break; case WID_IC_IND_DROPDOWN: @@ -2629,7 +2694,7 @@ struct IndustryCargoesWindow : public Window { _cur_dpi = &tmp_dpi; int left_pos = WD_FRAMERECT_LEFT; - if (this->ind_cargo >= NUM_INDUSTRYTYPES) left_pos += (CargoesField::industry_width + CargoesField::CARGO_FIELD_WIDTH) / 2; + if (this->ind_cargo >= NUM_INDUSTRYTYPES) left_pos += (CargoesField::industry_width + CargoesField::cargo_field_width) / 2; int last_column = (this->ind_cargo < NUM_INDUSTRYTYPES) ? 4 : 2; const NWidgetBase *nwp = this->GetWidget(WID_IC_PANEL); @@ -2648,7 +2713,7 @@ struct IndustryCargoesWindow : public Window { } while (col >= 0 && col <= last_column) { this->fields[i].columns[col].Draw(xpos, vpos); - xpos += (col & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width; + xpos += (col & 1) ? CargoesField::cargo_field_width : CargoesField::industry_width; col += dir; } } @@ -2680,11 +2745,11 @@ struct IndustryCargoesWindow : public Window { vpos = pt.y - vpos - row * CargoesField::normal_height; // Position in the row + 1 field row++; // rebase row to match index of this->fields. - int xpos = 2 * WD_FRAMERECT_LEFT + ((this->ind_cargo < NUM_INDUSTRYTYPES) ? 0 : (CargoesField::industry_width + CargoesField::CARGO_FIELD_WIDTH) / 2); + int xpos = 2 * WD_FRAMERECT_LEFT + ((this->ind_cargo < NUM_INDUSTRYTYPES) ? 0 : (CargoesField::industry_width + CargoesField::cargo_field_width) / 2); if (pt.x < xpos) return false; int column; for (column = 0; column <= 5; column++) { - int width = (column & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width; + int width = (column & 1) ? CargoesField::cargo_field_width : CargoesField::industry_width; if (pt.x < xpos + width) break; xpos += width; } @@ -2697,7 +2762,7 @@ struct IndustryCargoesWindow : public Window { xy->y = vpos; if (_current_text_dir == TD_RTL) { fieldxy->x = num_columns - column; - xy->x = ((column & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width) - xpos; + xy->x = ((column & 1) ? CargoesField::cargo_field_width : CargoesField::industry_width) - xpos; } else { fieldxy->x = column; xy->x = xpos; diff --git a/src/industry_map.h b/src/industry_map.h index 1df2ecb37c..9d2e3de211 100644 --- a/src/industry_map.h +++ b/src/industry_map.h @@ -1,4 +1,4 @@ -/* $Id: industry_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/industry_type.h b/src/industry_type.h index 946bed0a6b..2b329ad2a2 100644 --- a/src/industry_type.h +++ b/src/industry_type.h @@ -1,4 +1,4 @@ -/* $Id: industry_type.h 27279 2015-05-09 10:21:55Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -39,6 +39,10 @@ static const IndustryGfx INVALID_INDUSTRYTILE = NUM_INDUSTRYTILES; ///< one a static const int INDUSTRY_COMPLETED = 3; ///< final stage of industry construction. +static const int INDUSTRY_NUM_INPUTS = 16; ///< Number of cargo types an industry can accept +static const int INDUSTRY_NUM_OUTPUTS = 16; ///< Number of cargo types an industry can produce + + void CheckIndustries(); bool CanBuildIndustryOnTile(IndustryType type, TileIndex tile); diff --git a/src/industrytype.h b/src/industrytype.h index c556219379..cd451fa777 100644 --- a/src/industrytype.h +++ b/src/industrytype.h @@ -1,4 +1,4 @@ -/* $Id: industrytype.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -80,6 +80,7 @@ enum IndustryBehaviour { INDUSTRYBEH_PRODCALLBACK_RANDOM = 1 << 15, ///< Production callback needs random bits in var 10 INDUSTRYBEH_NOBUILT_MAPCREATION = 1 << 16, ///< Do not force one instance of this type to appear on map generation INDUSTRYBEH_CANCLOSE_LASTINSTANCE = 1 << 17, ///< Allow closing down the last instance of this type + INDUSTRYBEH_CARGOTYPES_UNLIMITED = 1 << 18, ///< Allow produced/accepted cargoes callbacks to supply more than 2 and 3 types }; DECLARE_ENUM_AS_BIT_SET(IndustryBehaviour) @@ -87,6 +88,7 @@ DECLARE_ENUM_AS_BIT_SET(IndustryBehaviour) enum IndustryTileSpecialFlags { INDTILE_SPECIAL_NONE = 0, INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS = 1 << 0, ///< Callback 0x26 needs random bits + INDTILE_SPECIAL_ACCEPTS_ALL_CARGO = 1 << 1, ///< Tile always accepts all cargoes the associated industry accepts }; DECLARE_ENUM_AS_BIT_SET(IndustryTileSpecialFlags) @@ -99,41 +101,41 @@ struct IndustryTileTable { * Defines the data structure for constructing industry. */ struct IndustrySpec { - const IndustryTileTable * const *table;///< List of the tiles composing the industry - byte num_table; ///< Number of elements in the table - uint8 cost_multiplier; ///< Base construction cost multiplier. - uint32 removal_cost_multiplier; ///< Base removal cost multiplier. - uint32 prospecting_chance; ///< Chance prospecting succeeds - IndustryType conflicting[3]; ///< Industries this industry cannot be close to - byte check_proc; ///< Index to a procedure to check for conflicting circumstances - CargoID produced_cargo[2]; - byte production_rate[2]; + const IndustryTileTable * const *table; ///< List of the tiles composing the industry + byte num_table; ///< Number of elements in the table + uint8 cost_multiplier; ///< Base construction cost multiplier. + uint32 removal_cost_multiplier; ///< Base removal cost multiplier. + uint32 prospecting_chance; ///< Chance prospecting succeeds + IndustryType conflicting[3]; ///< Industries this industry cannot be close to + byte check_proc; ///< Index to a procedure to check for conflicting circumstances + CargoID produced_cargo[INDUSTRY_NUM_OUTPUTS]; + byte production_rate[INDUSTRY_NUM_OUTPUTS]; /** * minimum amount of cargo transported to the stations. * If the waiting cargo is less than this number, no cargo is moved to it. */ byte minimal_cargo; - CargoID accepts_cargo[3]; ///< 3 accepted cargoes. - uint16 input_cargo_multiplier[3][2]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes) - IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs - byte climate_availability; ///< Bitmask, giving landscape enums as bit position - IndustryBehaviour behaviour; ///< How this industry will behave, and how others entities can use it - byte map_colour; ///< colour used for the small map - StringID name; ///< Displayed name of the industry - StringID new_industry_text; ///< Message appearing when the industry is built - StringID closure_text; ///< Message appearing when the industry closes - StringID production_up_text; ///< Message appearing when the industry's production is increasing - StringID production_down_text; ///< Message appearing when the industry's production is decreasing - StringID station_name; ///< Default name for nearby station - byte appear_ingame[NUM_LANDSCAPE]; ///< Probability of appearance in game - byte appear_creation[NUM_LANDSCAPE]; ///< Probability of appearance during map creation - uint8 number_of_sounds; ///< Number of sounds available in the sounds array - const uint8 *random_sounds; ///< array of random sounds. + CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]; ///< 16 accepted cargoes. + uint16 input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes) + IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs + byte climate_availability; ///< Bitmask, giving landscape enums as bit position + IndustryBehaviour behaviour; ///< How this industry will behave, and how others entities can use it + byte map_colour; ///< colour used for the small map + StringID name; ///< Displayed name of the industry + StringID new_industry_text; ///< Message appearing when the industry is built + StringID closure_text; ///< Message appearing when the industry closes + StringID production_up_text; ///< Message appearing when the industry's production is increasing + StringID production_down_text; ///< Message appearing when the industry's production is decreasing + StringID station_name; ///< Default name for nearby station + byte appear_ingame[NUM_LANDSCAPE]; ///< Probability of appearance in game + byte appear_creation[NUM_LANDSCAPE]; ///< Probability of appearance during map creation + uint8 number_of_sounds; ///< Number of sounds available in the sounds array + const uint8 *random_sounds; ///< array of random sounds. /* Newgrf data */ - uint16 callback_mask; ///< Bitmask of industry callbacks that have to be called - uint8 cleanup_flag; ///< flags indicating which data should be freed upon cleaning up - bool enabled; ///< entity still available (by default true).newgrf can disable it, though - GRFFileProps grf_prop; ///< properties related to the grf file + uint16 callback_mask; ///< Bitmask of industry callbacks that have to be called + uint8 cleanup_flag; ///< flags indicating which data should be freed upon cleaning up + bool enabled; ///< entity still available (by default true).newgrf can disable it, though + GRFFileProps grf_prop; ///< properties related to the grf file bool IsRawIndustry() const; bool IsProcessingIndustry() const; @@ -144,10 +146,11 @@ struct IndustrySpec { /** * Defines the data structure of each individual tile of an industry. + * @note A tile can at most accept 3 types of cargo, even if an industry as a whole can accept more types. */ struct IndustryTileSpec { - CargoID accepts_cargo[3]; ///< Cargo accepted by this tile - uint8 acceptance[3]; ///< Level of acceptance per cargo type + CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]; ///< Cargo accepted by this tile + int8 acceptance[INDUSTRY_NUM_INPUTS]; ///< Level of acceptance per cargo type (signed, may be negative!) Slope slopes_refused; ///< slope pattern on which this tile cannot be built byte anim_production; ///< Animation frame to start when goods are produced byte anim_next; ///< Next frame in an animation diff --git a/src/ini.cpp b/src/ini.cpp index f42ebedd05..6767d8525d 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -1,4 +1,4 @@ -/* $Id: ini.cpp 27389 2015-08-20 20:47:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,7 +19,7 @@ # include #endif -#ifdef WIN32 +#ifdef _WIN32 # include # include # include "core/mem_func.hpp" @@ -87,7 +87,7 @@ bool IniFile::SaveToDisk(const char *filename) fclose(f); #endif -#if defined(WIN32) || defined(WIN64) +#if defined(_WIN32) /* _tcsncpy = strcpy is TCHAR is char, but isn't when TCHAR is wchar. */ #undef strncpy /* Allocate space for one more \0 character. */ diff --git a/src/ini_load.cpp b/src/ini_load.cpp index b081cd0133..389dcab031 100644 --- a/src/ini_load.cpp +++ b/src/ini_load.cpp @@ -1,4 +1,4 @@ -/* $Id: ini_load.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/ini_type.h b/src/ini_type.h index e808892526..9bd47fd4e5 100644 --- a/src/ini_type.h +++ b/src/ini_type.h @@ -1,4 +1,4 @@ -/* $Id: ini_type.h 26499 2014-04-24 18:37:39Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -70,7 +70,7 @@ struct IniLoadFile { * Open the INI file. * @param filename Name of the INI file. * @param subdir The subdir to load the file from. - * @param size [out] Size of the opened file. + * @param[out] size Size of the opened file. * @return File handle of the opened file, or \c NULL. */ virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size) = 0; diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 9d99228c28..3659b033cf 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: intro_gui.cpp 27732 2017-01-14 18:30:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/landscape.cpp b/src/landscape.cpp index c2b2b4998c..b173709f37 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -1,4 +1,4 @@ -/* $Id: landscape.cpp 27650 2016-09-04 12:57:43Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,6 +32,7 @@ #include "company_func.h" #include "pathfinder/npf/aystar.h" #include "saveload/saveload.h" +#include "framerate_type.h" #include #include @@ -88,6 +89,70 @@ extern const byte _slope_to_sprite_offset[32] = { */ static SnowLine *_snow_line = NULL; +/** + * Map 2D viewport or smallmap coordinate to 3D world or tile coordinate. + * Function takes into account height of tiles and foundations. + * + * @param x X viewport 2D coordinate. + * @param y Y viewport 2D coordinate. + * @param clamp_to_map Clamp the coordinate outside of the map to the closest, non-void tile within the map. + * @param[out] clamped Whether coordinates were clamped. + * @return 3D world coordinate of point visible at the given screen coordinate (3D perspective). + * + * @note Inverse of #RemapCoords2 function. Smaller values may get rounded. + * @see InverseRemapCoords + */ +Point InverseRemapCoords2(int x, int y, bool clamp_to_map, bool *clamped) +{ + if (clamped != NULL) *clamped = false; // Not clamping yet. + + /* Initial x/y world coordinate is like if the landscape + * was completely flat on height 0. */ + Point pt = InverseRemapCoords(x, y); + + const uint min_coord = _settings_game.construction.freeform_edges ? TILE_SIZE : 0; + const uint max_x = MapMaxX() * TILE_SIZE - 1; + const uint max_y = MapMaxY() * TILE_SIZE - 1; + + if (clamp_to_map) { + /* Bring the coordinates near to a valid range. At the top we allow a number + * of extra tiles. This is mostly due to the tiles on the north side of + * the map possibly being drawn higher due to the extra height levels. */ + int extra_tiles = CeilDiv(_settings_game.construction.max_heightlevel * TILE_HEIGHT, TILE_PIXELS); + Point old_pt = pt; + pt.x = Clamp(pt.x, -extra_tiles * TILE_SIZE, max_x); + pt.y = Clamp(pt.y, -extra_tiles * TILE_SIZE, max_y); + if (clamped != NULL) *clamped = (pt.x != old_pt.x) || (pt.y != old_pt.y); + } + + /* Now find the Z-world coordinate by fix point iteration. + * This is a bit tricky because the tile height is non-continuous at foundations. + * The clicked point should be approached from the back, otherwise there are regions that are not clickable. + * (FOUNDATION_HALFTILE_LOWER on SLOPE_STEEP_S hides north halftile completely) + * So give it a z-malus of 4 in the first iterations. */ + int z = 0; + if (clamp_to_map) { + for (int i = 0; i < 5; i++) z = GetSlopePixelZ(Clamp(pt.x + max(z, 4) - 4, min_coord, max_x), Clamp(pt.y + max(z, 4) - 4, min_coord, max_y)) / 2; + for (int m = 3; m > 0; m--) z = GetSlopePixelZ(Clamp(pt.x + max(z, m) - m, min_coord, max_x), Clamp(pt.y + max(z, m) - m, min_coord, max_y)) / 2; + for (int i = 0; i < 5; i++) z = GetSlopePixelZ(Clamp(pt.x + z, min_coord, max_x), Clamp(pt.y + z, min_coord, max_y)) / 2; + } else { + for (int i = 0; i < 5; i++) z = GetSlopePixelZOutsideMap(pt.x + max(z, 4) - 4, pt.y + max(z, 4) - 4) / 2; + for (int m = 3; m > 0; m--) z = GetSlopePixelZOutsideMap(pt.x + max(z, m) - m, pt.y + max(z, m) - m) / 2; + for (int i = 0; i < 5; i++) z = GetSlopePixelZOutsideMap(pt.x + z, pt.y + z ) / 2; + } + + pt.x += z; + pt.y += z; + if (clamp_to_map) { + Point old_pt = pt; + pt.x = Clamp(pt.x, min_coord, max_x); + pt.y = Clamp(pt.y, min_coord, max_y); + if (clamped != NULL) *clamped = *clamped || (pt.x != old_pt.x) || (pt.y != old_pt.y); + } + + return pt; +} + /** * Applies a foundation to a slope. * @@ -283,6 +348,23 @@ int GetSlopePixelZ(int x, int y) return _tile_type_procs[GetTileType(tile)]->get_slope_z_proc(tile, x, y); } +/** + * Return world \c z coordinate of a given point of a tile, + * also for tiles outside the map (virtual "black" tiles). + * + * @param x World X coordinate in tile "units", may be ouside the map. + * @param y World Y coordinate in tile "units", may be ouside the map. + * @return World Z coordinate at tile ground level, including slopes and foundations. + */ +int GetSlopePixelZOutsideMap(int x, int y) +{ + if (IsInsideBS(x, 0, MapSizeX() * TILE_SIZE) && IsInsideBS(y, 0, MapSizeY() * TILE_SIZE)) { + return GetSlopePixelZ(x, y); + } else { + return _tile_type_procs[MP_VOID]->get_slope_z_proc(INVALID_TILE, x, y); + } +} + /** * Determine the Z height of a corner relative to TileZ. * @@ -720,6 +802,8 @@ TileIndex _cur_tileloop_tile; */ void RunTileLoop() { + PerformanceAccumulator framerate(PFE_GL_LANDSCAPE); + /* The pseudorandom sequence of tiles is generated using a Galois linear feedback * shift register (LFSR). This allows a deterministic pseudorandom ordering, but * still with minimal state and fast iteration. */ @@ -757,22 +841,17 @@ void RunTileLoop() void InitializeLandscape() { - uint maxx = MapMaxX(); - uint maxy = MapMaxY(); - uint sizex = MapSizeX(); - - uint y; - for (y = _settings_game.construction.freeform_edges ? 1 : 0; y < maxy; y++) { - uint x; - for (x = _settings_game.construction.freeform_edges ? 1 : 0; x < maxx; x++) { - MakeClear(sizex * y + x, CLEAR_GRASS, 3); - SetTileHeight(sizex * y + x, 0); - SetTropicZone(sizex * y + x, TROPICZONE_NORMAL); - ClearBridgeMiddle(sizex * y + x); + for (uint y = _settings_game.construction.freeform_edges ? 1 : 0; y < MapMaxY(); y++) { + for (uint x = _settings_game.construction.freeform_edges ? 1 : 0; x < MapMaxX(); x++) { + MakeClear(TileXY(x, y), CLEAR_GRASS, 3); + SetTileHeight(TileXY(x, y), 0); + SetTropicZone(TileXY(x, y), TROPICZONE_NORMAL); + ClearBridgeMiddle(TileXY(x, y)); } - MakeVoid(sizex * y + x); } - for (uint x = 0; x < sizex; x++) MakeVoid(sizex * y + x); + + for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, MapMaxY())); + for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(MapMaxX(), y)); } static const byte _genterrain_tbl_1[5] = { 10, 22, 33, 37, 4 }; @@ -1014,7 +1093,7 @@ static bool FlowsDown(TileIndex begin, TileIndex end) } /* AyStar callback for checking whether we reached our destination. */ -static int32 River_EndNodeCheck(AyStar *aystar, OpenListNode *current) +static int32 River_EndNodeCheck(const AyStar *aystar, const OpenListNode *current) { return current->path.node.tile == *(TileIndex*)aystar->user_target ? AYSTAR_FOUND_END_NODE : AYSTAR_DONE; } @@ -1080,8 +1159,7 @@ static uint River_Hash(uint tile, uint dir) */ static void BuildRiver(TileIndex begin, TileIndex end) { - AyStar finder; - MemSetT(&finder, 0); + AyStar finder = {}; finder.CalculateG = River_CalculateG; finder.CalculateH = River_CalculateH; finder.GetNeighbours = River_GetNeighbours; @@ -1304,10 +1382,14 @@ void OnTick_LinkGraph(); void CallLandscapeTick() { - OnTick_Town(); - OnTick_Trees(); - OnTick_Station(); - OnTick_Industry(); + { + PerformanceAccumulator framerate(PFE_GL_LANDSCAPE); + + OnTick_Town(); + OnTick_Trees(); + OnTick_Station(); + OnTick_Industry(); + } OnTick_Companies(); OnTick_LinkGraph(); diff --git a/src/landscape.h b/src/landscape.h index c3c5d91eee..43d9e5f2e6 100644 --- a/src/landscape.h +++ b/src/landscape.h @@ -1,4 +1,4 @@ -/* $Id: landscape.h 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -40,6 +40,7 @@ Slope GetFoundationSlope(TileIndex tile, int *z = NULL); uint GetPartialPixelZ(int x, int y, Slope corners); int GetSlopePixelZ(int x, int y); +int GetSlopePixelZOutsideMap(int x, int y); void GetSlopePixelZOnEdge(Slope tileh, DiagDirection edge, int *z1, int *z2); /** @@ -108,6 +109,7 @@ static inline Point RemapCoords2(int x, int y) * @param y Y coordinate of the 2D coordinate. * @return X and Y components of equivalent world or tile coordinate. * @note Inverse of #RemapCoords function. Smaller values may get rounded. + * @see InverseRemapCoords2 */ static inline Point InverseRemapCoords(int x, int y) { @@ -115,6 +117,8 @@ static inline Point InverseRemapCoords(int x, int y) return pt; } +Point InverseRemapCoords2(int x, int y, bool clamp_to_map = false, bool *clamped = NULL); + uint ApplyFoundationToSlope(Foundation f, Slope *s); /** * Applies a foundation to a slope. diff --git a/src/landscape_type.h b/src/landscape_type.h index a237a534d3..0742a32bbf 100644 --- a/src/landscape_type.h +++ b/src/landscape_type.h @@ -1,4 +1,4 @@ -/* $Id: landscape_type.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index aa5a31ea0b..28234123f7 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -11,7 +11,7 @@ ##gender male -# $Id: afrikaans.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -670,10 +670,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Kies 'Be STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Skakel musiek lys skommel aan/af STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Vertoon musiek snit keuse venster -STR_ERROR_NO_SONGS :{WHITE}'n Musiek stel is gekies wat geen liedere bevat nie. Geen liedere sal gespeel word nie - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musiek Program Keuse STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Liedjie Indeks STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1255,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Verander STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktuur onderhoud: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :As dit geaktiveer is sal dit veroorsaak dat infrastruktuur onderhoudskoste verhoog. Die koste groei oor-proporsioneel met die netwerk grootte, wat groter maatskappye meer as kleiner maatskappye benadeel + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lughawes verval nooit nie: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Wanner hierdie stelling geaktiveer is, maak dit dat alle lughawens ewig beskikbaar bly, na hul bekendstelling datum @@ -1338,8 +1336,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Kleur van die t STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Groen STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Donkergroen STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Agteruit rol rigting: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :As dit geaktiveer is, skuif die muis die kaart, andersins skuif die muis die kamera. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Maak kykpoort beweegings glad: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Beheer hoe die hoofvertoonvenster skuif na 'n spesifieke posisie - as dit geaktiveer is, dan skuif die venster glad na die posisie toe, andersins skuif die venster direk na die posisie toe. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Toon 'n meting wanneer jy verskeie bou-gereedskap gebruik: {STRING} @@ -1371,8 +1367,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Af -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Links-klik vir skermrol: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Maak dit moontlik om die kaart te skuif deur met die die linker-muisknoppie te sleep. Hier opsie werk baie goed vir toestelle met raakskerms. STR_CONFIG_SETTING_AUTOSAVE :Outostoor: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Tyd tussen outomatiese spelstore @@ -1807,7 +1801,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Verander STR_CHEAT_SETUP_PROD :{LTBLUE}Aktiveer modifisering van produksie waardes: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nuwe Kleur Skema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Toon algemene kleurskemas STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Wys trein kleur skemas @@ -2688,7 +2681,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Maatskappy-besi STR_ABOUT_OPENTTD :{WHITE}Oor OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Oorspronklike kopiereg {COPYRIGHT} 1995 Chris Sawyer, Alle regte voorbehou STR_ABOUT_VERSION :{BLACK}OpenTTD uitgawe {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Die OpenTTD span +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Die OpenTTD span + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spaar Spel @@ -2981,8 +2981,6 @@ STR_TOWN_POPULATION :{BLACK}Wêreldb STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Bevolking: {ORANGE}{COMMA}{BLACK} Huise: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passasiers verlede maand: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Pos verlede maand: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Vrag nodig om dorp te laat groei: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} vereis STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} vereis in winter @@ -3287,18 +3285,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Skuif sk STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksie vlak: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Die nywerheid het aangekondig dat dit binnekort gaan sluit! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produseer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produseer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Verander produksie (veelvoude van 8, tot en met 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Verander produksie vlakke (persentasie, tot 800%) @@ -4206,7 +4194,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Te veel STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Te veel treinstasie deele STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Te veel bushalte STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Te veel vragmotor stasies -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Te naby aan 'n ander stasie/laai area STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Te naby aan 'n ander werf STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Te naby aan 'n ander lughawe STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Stasie kan nie hernoem word nie... diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index 51932b50dc..7a2685b3ce 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -10,7 +10,7 @@ ##grflangid 0x14 -# $Id: arabic_egypt.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -644,10 +644,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}اختي STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}تشغيل / ايقاف العشوائي STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}اظهار اطار اختيار الموسيقى -STR_ERROR_NO_SONGS :{WHITE}لا تحتوى قاعده الموسيقى المُختاره على اى اغانى. لن تُعزَف اى اغانى - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}برنامج اختيار الموسيقى STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}قائمة المعزوفات STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}برنامج - '{STRING}' @@ -1122,6 +1119,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :السماح ب STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}تغير هذا الخيار غير متاح عندما يكون هناك عربات STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :صيانة البنية التحتية: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :المطارات لا تنتهي صلاحيتها {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :حذر إذا فقدت المركبة {STRING} @@ -1177,7 +1175,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR :لون الار STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :اخضر STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :اخضر غامق STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :بنفسجي -STR_CONFIG_SETTING_REVERSE_SCROLLING :عكس تحريك الشاشة : {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :تحريك سلس في نوافذ المشاهدة: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP :عرض المقاسات عند استخدام ادوات البناء المختلفة: {STRING} STR_CONFIG_SETTING_LIVERIES :عرض لون و شعار الشركة: {STRING} @@ -1196,7 +1193,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :الأوامر STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :للتحكم STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :عدم استخدام -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :تصفح بالزر الايسر: {STRING} STR_CONFIG_SETTING_AUTOSAVE :حفظ تلقائي : {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :اختر الوقت بين كل عملية حفظ اتوماتيكية @@ -1475,7 +1471,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}غير STR_CHEAT_SETUP_PROD :{LTBLUE}تفعيل تغيير قيمة الانتاج: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}الوان جديدة STR_LIVERY_GENERAL_TOOLTIP :{BLACK}اظهر اللون العام STR_LIVERY_TRAIN_TOOLTIP :{BLACK}اظهر لون القطائرات @@ -2320,7 +2315,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :ارض مملو STR_ABOUT_OPENTTD :{WHITE}حول النسخة المفتوحة STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}الحقوق الاصلية {COPYRIGHT} كريس سوير 1995 , جميع الحقوق محفوظة STR_ABOUT_VERSION :{BLACK}النسخة المفتوحة رقم {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2018 فريق النسخة المفتوحة +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2019 فريق النسخة المفتوحة + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}حفظ اللعبة @@ -2594,8 +2596,6 @@ STR_TOWN_POPULATION :{BLACK}سكان STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} - مدينة - STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}السكان: {ORANGE}{COMMA}{BLACK} المنازل: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}الركاب الشهر الماضي: {ORANGE}{COMMA}{BLACK} الأقصى: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}طرود البريد الشهر الماضي: {ORANGE}{COMMA}{BLACK} الأقصى: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK} نمو المدينة يتطلب بضائع STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} مطلوب STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK}مطلوب في الشتاء @@ -2812,18 +2812,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}وسط الشاشة على المصنع STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}نسبة الانتاج: {YELLOW}{COMMA}% -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}يحتاج: {YELLOW}{STRING} {STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}، {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}, {STRING}{STRING} , {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}ينتج: {YELLOW}{STRING} {STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}ينتج: {YELLOW}{STRING} {STRING}, {STRING} {STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}تغيير الانتاج مضاعف من 8 الى 2040 STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}غير مستوى الانتاج{}نسبة مئوية حتى 800%. @@ -3667,7 +3657,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}يوجد STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}يوجد الكثير من قطاعات محطه السكه الحديديه STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}يوجد الكثير من محطات الحافلات STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}يوجد الكثير من محطات الشاحنات -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}قريب للغايه من محطه اخرى STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}قريب للغايه من مَرسَى اخر STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}قريب للغايه من مطار اخر STR_ERROR_CAN_T_RENAME_STATION :{WHITE}تعذر إعاده تسميه المحطه... diff --git a/src/lang/basque.txt b/src/lang/basque.txt index a9f94057cb..94bacd7880 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -10,7 +10,7 @@ ##grflangid 0x21 -# $Id: basque.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -663,10 +663,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}'Pertson STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Programa zorizko moduan jarri/kendu STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Erakutsi kanten selekzio leihoa -STR_ERROR_NO_SONGS :{WHITE}Kantarik gabeko musika paketea aukeratua. Ez dago kantarik entzuteko - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musika Programen Selekzioa STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Pistaren Indizea STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programatu - '{STRING}' @@ -872,7 +869,7 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Leihoa {COMMA} STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Leihora kopiatu STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK} Leiho nagusian ikusten dena leiho honetara kopiatu -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Leihotik kpiatutakoa itsatsi +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Aldatu ikuspen nagusia STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Leiho honetan ikusten dena leiho nagusian itsasi # Game options window @@ -1228,6 +1225,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Hau ezin STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Azpiegituren mantentze-lana: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Gaitua dagoenean, azpiegiturek mantentze kostuak eragiten dituzte. Kostuak garraio sarearekin proportzionalki hazten dira, hau da, kostu handiagoak izango dituzten konpainia handiagoek + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aireportuei inoiz ez zaie epea amaitzen: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Gaitua badago, aireportu mota ezberdinak betirako egongo dira aukeran @@ -1301,8 +1299,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Mapa txikiaren STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Berdea STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Berde iluna STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Bioleta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Leihoa mapan zehar mugitzeko sagua mugitzeko era aldrebes jarri: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Mapan zehar saguaren eskuineko botoiarekin mugitzerakoan izango duen portaera. Desgaitua badago, saguak kamera mugituko du. Gaitua dagoenean, saguak mapa mugituko du STR_CONFIG_SETTING_SMOOTH_SCROLLING :Mapan zehar mugitzerakoan, abiadura moteltzea: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Kontrolatu nola mugituko den ikuspegia lehio nagusitik zehar, puntu jakin batera joateko mapa txikian sakatzen denean edo objektu zehatz batera joateko agintzen denean STR_CONFIG_SETTING_MEASURE_TOOLTIP :Eraikitze tresna ezberdinak erabiltzerakoan neurtresna erakutsi: {STRING} @@ -1334,8 +1330,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Komandoa+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Itzalita -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Saguaren ezkerreko botoiarekin mapan zehar mugitzea: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Gaitu mapatik zehar mugitzea saguaren ezkerreko botoia mapan arrastratzerakoan. Oso erabilgarria da ukipen pantailak erabiltzerakoan STR_CONFIG_SETTING_AUTOSAVE :Auto-gordea: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Partida gordetze automatikoaren bitartea aukeratu @@ -1717,7 +1711,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Aurtengo STR_CHEAT_SETUP_PROD :{LTBLUE}Ekoizpen balioak aldatzea baimendu: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Kolore eskema berria STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Erakutsi kolore eskema orokorrak STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Erakutsi trenen kolore eskemak @@ -2592,7 +2585,16 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Konpainia jabe STR_ABOUT_OPENTTD :{WHITE}OpenTTD-ri buruz STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD bertsioa {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +STR_FRAMERATE_GL_TRAINS :{WHITE} Trenen tick-ak: +STR_FRAMERATE_GL_SHIPS :{WHITE} Itsasontzien tick-ak: +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Gordetako jokoa @@ -2870,8 +2872,6 @@ STR_TOWN_POPULATION :{BLACK}Munduko STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Hiria) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Biztanleria: {ORANGE}{COMMA}{BLACK} Etxe kopurua: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Bidaiari kopurua aurreko hilabetean: {ORANGE}{COMMA}{BLACK} gehienez: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Posta kopurua aurreko hilabetean: {ORANGE}{COMMA}{BLACK} gehienez: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Beharrezko zama herri hazkunderako: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} beharrezkoa STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} Neguan beharrezkoa @@ -3011,6 +3011,7 @@ STR_STATION_VIEW_CARGO_SUPPLY_RATING :{WHITE}{STRING} STR_STATION_VIEW_GROUP :{BLACK}Taldekatu STR_STATION_VIEW_WAITING_STATION :Geltokia: Itxaroten STR_STATION_VIEW_WAITING_AMOUNT :Kopurua: Itxoiten +STR_STATION_VIEW_PLANNED_STATION :Geltokia: Antolatua STR_STATION_VIEW_FROM :{YELLOW}{CARGO_SHORT} {STATION}-tik STR_STATION_VIEW_VIA :{YELLOW}{CARGO_SHORT}{STATION}-tik STR_STATION_VIEW_TO :{YELLOW}{CARGO_SHORT}{STATION}-ra @@ -3172,18 +3173,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Ikuspegi STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ekoizpen kopurua: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industriak berehalako itxiera iragarri du! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Ekoizpena: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Ekoizpena: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ekoizpena aldatu (8 eta 2040 arteko multiploa) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ekoizpen ehunekoa aldatu (ehunekoa, %800 arte) @@ -4075,7 +4066,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Geltoki STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Tren geltoki zati gehiegi STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Autobus geltoki gehiegi STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Kamioi geltoki gehiegi -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Geltoki batetik hurbilegi STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Kai batetik hurbilegi STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Aireportu batetik hurbilegi STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Ezinda geltokia berrizendatu... diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index 7b6a90f076..e610acc119 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -12,7 +12,7 @@ ##case m f n p nom gen dat acc abl pre -# $Id: belarusian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -598,7 +598,7 @@ STR_SORT_BY_TYPE :Тып STR_SORT_BY_TRANSPORTED :Вывезена STR_SORT_BY_NUMBER :Нумар STR_SORT_BY_PROFIT_LAST_YEAR :Прыбытак летась -STR_SORT_BY_PROFIT_THIS_YEAR :Прыбытак у бягучым годзе +STR_SORT_BY_PROFIT_THIS_YEAR :Прыбытак сёлета STR_SORT_BY_AGE :Узрост STR_SORT_BY_RELIABILITY :Надзейнасьць STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE :Умяшчальнасьць грузу @@ -963,6 +963,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Музычнае афармленне недаступна STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}«{STRING}» STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Трэк STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Назва @@ -982,15 +983,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Выбр STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Уключыць/выключыць выпадковы выбар трэкаў STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Паказаць вакно выбару трэкаў -STR_ERROR_NO_SONGS :{WHITE}У выбранай праґраме адсутнічае музыка - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Выбар музычнай праґрамы +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Музычная праграма - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} «{STRING}» STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Сьпіс трэкаў STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programme — «{STRING}» STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Ачысьціць +STR_PLAYLIST_CHANGE_SET :{BLACK}Зьмяніць набор STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Ачысьціць сьпіс уласнай праґрамы +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Змяніць выбар музычнага афармлення на іншы ўсталяваны набор STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Клікніце па назьве трэка, каб дадаць яго ва ўласную праґраму STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Клікніце па назьве трэка, каб выдаліць яго з уласнай праґрамы @@ -1195,7 +1196,7 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Вакно прагляду {COMMA} STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Капіяваць у вакно прагляду STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Скапіяваць бягучую пазыцыю ў вакно прагляду -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Уставіць з вакна прагляду +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}У асноўнае акно STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Перайсьці да гэтага месца ў асноўным вакне # Game options window @@ -1567,6 +1568,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Зьме STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Утрыманьне iнфраструктуры: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Калі ўключана, інфраструктура патрабуе выдаткаў на ўтрыманьне. Кошт расьце прапарцыянальна памерам сеткі, таму гэта больш датычыць вялікіх кампаніяў, ніж малых. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Малыя аэрапорты ніколі не састарэюць: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Уключэньне гэтай наладкі робіць усе віды аэрапортаў даступнымі назаўжды. @@ -1650,8 +1652,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Колер ля STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :зялёны STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :цёмна-зялёны STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :фіялетавы -STR_CONFIG_SETTING_REVERSE_SCROLLING :Перавярнуць напрамак зрушэньня прагляду мышшу: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Паводзіны пры пракручваньні мапы правай кнопкай мышы. Калі адключана, мыш перамяшчае кропку позірку. Калі ўключана, мыш перамяшчае мапу. +STR_CONFIG_SETTING_SCROLLMODE :Перамяшчэнне агляду: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Спосаб перамяшчэння па гульнёваму полю +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Перамяшчаць з дапамогай ПКМ, зафіксаваўшы курсор +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Перамяшчаць з дапамогай ПКМ, зафіксаваўшы курсор +STR_CONFIG_SETTING_SCROLLMODE_RMB :Перамяшчаць з дапамогай ПКМ +STR_CONFIG_SETTING_SCROLLMODE_LMB :Перамяшчаць з дапамогай ЛКМ STR_CONFIG_SETTING_SMOOTH_SCROLLING :Павольная пракрутка ў вакне прагляду: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Кантралюе, што адбудзецца ў галоўным вакне, калі пстрыкнуць у малым вакне прагляду па нейкай кропцы. Калі ўключана, позірк будзе павольна перамяшчацца па мапе ў галоўным вакне. Калі выключана — экран адразу прыгне ў вызначанае месца. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Паказваць замеры пры будаўніцтве: {STRING} @@ -1683,8 +1689,8 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :каманда+ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+клік STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :выключана -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Скролінг па кліку левай кнопкай мышы: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Уключыць пракручваньне мапы цягненьнем з націснутай левай кнопкай мышы. Гэта асабліва зручна пры выкарыстоўваньні сэнсарнага экрана. +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Зачыняць вокны пстрычкай ПКМ: {STRING} +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Зачыняць акно пстрычкай правай кнопкай мышы ў яго межах. Пры гэтым адключаецца з'яўленне падказак па правай кнопцы. STR_CONFIG_SETTING_AUTOSAVE :Аўтазахаваньні: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Азначце інтэрвал паміж аўтаматычнымі захаваньнямі @@ -2074,6 +2080,7 @@ STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Прав STR_INTRO_TOOLTIP_SCRIPT_SETTINGS :{BLACK}Зьмяніць наладкі ШІ ды гульнёвага скрыпту STR_INTRO_TOOLTIP_QUIT :{BLACK}Выйсьці з OpenTTD +STR_INTRO_BASESET :{BLACK}У абраным наборы базавай графікі адсутнічае {NUM} спрайт{P "" а аў}. Калі ласка, абнавіце набор графікі. STR_INTRO_TRANSLATION :{BLACK}На гэту мову не перакладзен{P 0 ы ы а} {NUM} рад{P ок кі коў}. Вы можаце дапамагчы праекту, калi зарэґіструецеся як перакладчык. Інструкцыі ў файле readme.txt. # Quit window @@ -2119,7 +2126,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Зьмя STR_CHEAT_SETUP_PROD :{LTBLUE}Дазволіць зьмяненьне прадукцыйнасьці: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Новая каляровая схэма STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Паказаць асноўныя каляровыя схэмы STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Паказаць каляровыя схэмы цягнікоў @@ -2611,6 +2617,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Схем STR_LINKGRAPH_LEGEND_ALL :{BLACK}Усе STR_LINKGRAPH_LEGEND_NONE :{BLACK}Няма STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Выберыце кампаніі для адлюстраваньня +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}нявыкарыст. @@ -2922,6 +2929,7 @@ STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Зона STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Прымае: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) +STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Тып чыгуначнага палатна: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Макс. хуткасьць чыгункi: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Макс. хуткасьць аўтамабіляў: {LTBLUE}{VELOCITY} @@ -2934,29 +2942,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Палi STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Засьнежаная зямля STR_LAI_CLEAR_DESCRIPTION_DESERT :Пустэльня -STR_LAI_RAIL_DESCRIPTION_TRACK :Чыгунка рэйкi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Чыгунка рэйкi са звычайнымі сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Чыгунка рэйкi з уваходнымі прэсыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Чыгунка рэйкi з выхаднымi сыґналамi (прэсыґналамі) -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Чыгунка рэйкi з камбiнаванымi сыґналамi (прэсыґналамі) -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Чыгунка рэйкi з маршрутнымi (PMS) сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Чыгунка рэйкi з аднабаковымi маршрутнымi (PMS) сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Чыгунка рэйкi са звычайнымi й уваходнымі прэсыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Чыгунка рэйкi са звычайнымi й выхаднымi сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Чыгунка рэйкi са звычайнымi й камбiнаванымi сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Чыгунка рэйкi са звычайнымi й маршрутнымi (PMS) сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Чыгунка рэйкi са звычайнымi й аднабаковымi маршрутнымi (PMS) сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Чыгунка рэйкi з уваходнымi (прэcыгналамi) ды выхаднымi сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Чыгунка рэйкi з уваходнымi (прэсыґналамi) ды камбiнаванымi сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Чыгунка рэйкi з уваходнымi (прэсыґналамi) ды маршрутнымi (PMS) сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Чыгунка рэйкi з уваходнымi (прэсыґналамi) ды аднабаковымi маршрутнымi (PMS) сыґналамi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Чыгунка рэйкi з выхаднымi й камбінаванымі прэсыґналамі -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Чыгунка рэйкі з выхаднымі (прэсыґналамі) ды маршрутнымі (PMS) сыґналамі -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Чыгунка рэйкі з выхаднымі (прэсыґналамі) ды аднабаковымі маршрутнымі (PMS) сыґналамі -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Чыгунка рэйкі з камбінаванымі (прэсыґналамі) ды маршрутнымі (PMS) сыґналамі -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Чыгунка рэйкі з камбінаванымі (прэсыґналамі) ды аднабаковымі маршрутнымі (PMS) сыґналамі -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Чыгунка рэйкі з маршрутнымі (PMS) ды аднабаковымі маршрутнымі сыґналамі -STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Чыгунка чыгуначнае дэпо +STR_LAI_RAIL_DESCRIPTION_TRACK :Чыгуначны пуць +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Чыгуначны пуць з сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Чыгуначны пуць з уваходнымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Чыгуначны пуць з выходнымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Чыгуначны пуць з камбінаванымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Чыгуначны пуць з маршрутнымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Чыгуначны пуць з аднабаковымі маршрутнымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Чыгуначны пуць са звычайным і ўваходным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Чыгуначны пуць са звычайным і выходным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Чыгуначны пуць са звычайнымі й камбінаванымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Чыгуначны пуць са звычайнымі і маршрутнымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Чыгуначны пуць са звычайным і аднабаковым маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Чыгуначны пуць з уваходным і выходным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Чыгуначны пуць з уваходным і камбінаваным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Чыгуначны пуць з выходным і маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Чыгуначны пуць з уваходным і аднабаковым маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Чыгуначны пуць з выходнымі й камбінаванымі сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Чыгуначны пуць з выходным і маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Чыгуначны пуць з выходным і аднабаковым маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Чыгуначны пуць з камбінаваным і маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Чыгуначны пуць з камбінаваным і аднабаковым маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Чыгуначны пуць з маршрутным і аднабаковым маршрутным сігналамі +STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Чыгуначнае дэпо STR_LAI_ROAD_DESCRIPTION_ROAD :Дарога STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Дарога з вулічным асьвятленьнем @@ -3020,7 +3028,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Зямля на STR_ABOUT_OPENTTD :{WHITE}Аб OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Арыґінальныя аўтарскія правы {COPYRIGHT} 1995 Chris Sawyer. Усе правы абароненыя. STR_ABOUT_VERSION :{BLACK}OpenTTD вэрсія {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002–2018 Каманда распрацоўнікаў OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002–2019 Каманда распрацоўнікаў OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Захаваць гульню @@ -3306,6 +3321,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Увяд STR_TOWN_DIRECTORY_CAPTION :{WHITE}Гарады STR_TOWN_DIRECTORY_NONE :{ORANGE}- Няма - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Мегаполіс){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Сьпіс гарадоў: клiк па назьве паказвае горад у асноўным вакне. Ctrl+клiк паказвае ў дадатковым вакне. STR_TOWN_POPULATION :{BLACK}Насельніцтва: {COMMA} @@ -3313,8 +3329,7 @@ STR_TOWN_POPULATION :{BLACK}Насе STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Мэґаполіс) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Насельніцтва: {ORANGE}{COMMA}{BLACK} Будынкаў: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Пасажыраў за мінулы месяц: {ORANGE}{COMMA}{BLACK} Макс.: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Пошты за мінулы месяц: {ORANGE}{COMMA}{BLACK} Макс.: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} у мінулым месяцы: {ORANGE}{COMMA}{BLACK} Макс.: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Груз, неабходны для росту горада: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} патрабу{G 0 е e e ю}цца STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} патрабу{G 0 е e e ю}цца ўзімку @@ -3619,17 +3634,10 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Пака STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Прадукцыйнасьць: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Прадпрыемства хутка закрываецца! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends - -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Вырабляе: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Вырабляе: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends +STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Патрабуецца: +STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} +STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} чакае{STRING} STR_CONFIG_GAME_PRODUCTION :{WHITE}Зьмяніць прадукцыйнасьць (кратна 8, да 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Зьмяніць прадукцыйнасьць (у адсотках, да 800%) @@ -3645,7 +3653,7 @@ STR_VEHICLE_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Аўта STR_VEHICLE_LIST_SHIP_TOOLTIP :{BLACK}Караблi: клікніце для атрыманьня даведкі STR_VEHICLE_LIST_AIRCRAFT_TOOLTIP :{BLACK}Самалёты: клікніце для атрыманьня даведкі -STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR :{TINY_FONT}{BLACK}Прыбытак у гэтым годзе: {CURRENCY_LONG} (летась: {CURRENCY_LONG}) +STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR :{TINY_FONT}{BLACK}Прыбытак сёлета: {CURRENCY_LONG} (летась: {CURRENCY_LONG}) STR_VEHICLE_LIST_AVAILABLE_TRAINS :Даступныя цягнiкi STR_VEHICLE_LIST_AVAILABLE_ROAD_VEHICLES :Даступныя аўтамабiлi @@ -3693,6 +3701,10 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Выдаліц STR_GROUP_RENAME_CAPTION :{BLACK}Перайменаваць групу +STR_GROUP_PROFIT_THIS_YEAR :Прыбытак сёлета: +STR_GROUP_PROFIT_LAST_YEAR :Прыбытак летась: +STR_GROUP_OCCUPANCY :Сярэдняя загрузка ТС: +STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Новы цягнік @@ -3725,6 +3737,7 @@ STR_PURCHASE_INFO_ALL_TYPES :Усе тыпы STR_PURCHASE_INFO_ALL_BUT :Усё, акрамя {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Макс. цягавае намаганьне: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Далёкасьць: {GOLD}{COMMA} клет{P ка кi ак} +STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK}Тып паветр. судна: {GOLD}{STRING} STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Сьпіс лакаматываў і вагонаў - пстрыкніце для атрыманьня інфармацыі. Ctrl+пстрычка схавае/пакажа ТС. STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Сьпіс аўтатранспарту - пстрыкніце для атрыманьня інфармацыі. Ctrl+пстрычка схавае/пакажа выбраны аўтамабіль. @@ -3871,6 +3884,10 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE.acc :магніта STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Кошт: {CURRENCY_LONG} Вага: {WEIGHT_SHORT}{}Хуткасьць: {VELOCITY} Магутнасьць: {POWER}{}Кошт абслуг.: {CURRENCY_LONG}/год{}Ёмістасьць: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Кошт: {CURRENCY_LONG} Вага: {WEIGHT_SHORT}{}Хуткасьць: {VELOCITY} Магутнасьць: {POWER} Макс. ЦН: {6:FORCE}{}Кошт абслуг.: {4:CURRENCY_LONG}/год{}Ёмістасьць: {5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Кошт: {CURRENCY_LONG} Макс. хуткасьць: {VELOCITY}{}Ёмістасьць: {CARGO_LONG}{}Кошт абслуг.: {CURRENCY_LONG}/год +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :{BLACK}Кошт: {CURRENCY_LONG} Макс. хуткасць: {VELOCITY}{}Тып: {STRING}{}Ёмістасць: {CARGO_LONG}, {CARGO_LONG}{}Кошт абслуг.: {CURRENCY_LONG}/год +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Кошт: {CURRENCY_LONG} Макс. хуткасць: {VELOCITY}{}Тып: {STRING}{}Ёмістасць: {CARGO_LONG}{}Кошт абслуг.: {CURRENCY_LONG}/год +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}Кошт: {CURRENCY_LONG} Макс. хуткасць: {VELOCITY}{}Тып: {STRING} Далёкасць: {COMMA} клетак{}Ёмістасць: {CARGO_LONG}, {CARGO_LONG}{}Кошт абслуг.: {CURRENCY_LONG}/год +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Кошт: {CURRENCY_LONG} Макс. хуткасць: {VELOCITY}{}Тып: {STRING} Далёкасць: {COMMA} клетак{}Ёмістасць: {CARGO_LONG}{}Кошт абслуг.: {CURRENCY_LONG}/год # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Замена {STRING.gen} — {STRING} @@ -3908,6 +3925,7 @@ STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Спын STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Пераключэньне паміж вокнамі замены лякаматываў і ваґонаў STR_REPLACE_ENGINES :Лякаматывы STR_REPLACE_WAGONS :Ваґоны +STR_REPLACE_ALL_RAILTYPE :Увесь чыгуначны транспарт STR_REPLACE_HELP_RAILTYPE :{BLACK}Выберыце тып чыгуначнага транспарту, цягнікі якога жадаеце замяніць STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}На які транспарт адбываецца замена @@ -4000,10 +4018,12 @@ STR_VEHICLE_INFO_AGE :{COMMA} г{P о STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} г{P од ады адоў} ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Макс. хуткасьць: {LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Макс. хуткасць: {LTBLUE}{VELOCITY} {BLACK}Тып паветр. судна: {LTBLUE}{STRING} +STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE :{BLACK}Макс. хуткасць: {LTBLUE}{VELOCITY} {BLACK}Тып: {LTBLUE}{STRING} {BLACK}Далёкасць: {LTBLUE}{COMMA} клетак STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Вага: {LTBLUE}{WEIGHT_SHORT} {BLACK}Магутнасьць: {LTBLUE}{POWER}{BLACK} Макс. хуткасьць: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Вага: {LTBLUE}{WEIGHT_SHORT} {BLACK}Магутнасьць: {LTBLUE}{POWER}{BLACK} Макс. хуткасьць: {LTBLUE}{VELOCITY} {BLACK}Макс. ЦН: {LTBLUE}{FORCE} -STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Прыбытак ў гэтым годзе: {LTBLUE}{CURRENCY_LONG} (летась: {CURRENCY_LONG}) +STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Прыбытак сёлета: {LTBLUE}{CURRENCY_LONG} (летась: {CURRENCY_LONG}) STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Надзейнасьць: {LTBLUE}{COMMA}% {BLACK}Паломак з апошняга агляду: {LTBLUE}{COMMA} STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Пабудаваны ў: {LTBLUE}{NUM} г.{BLACK} Кошт: {LTBLUE}{CURRENCY_LONG} @@ -4558,7 +4578,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Зана STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Занадта вялікая чыгуначная станцыя STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Занадта шмат аўтобусных прыпынкаў STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Занадта шмат грузавых тэрмiналаў -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Занадта блізка да іншай станцыі STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Занадта блізка да іншай прыстані STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Занадта блізка да іншага аэрапорта STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Немагчыма перайменаваць станцыю... @@ -4566,6 +4585,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... гэ STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... няправільны кірунак дарогі STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... на прахадных прыпынках нельга рабіць павароты STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... на прахадных прыпынках нельга рабіць скрыжаваньнi +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... дарога аднабаковая ці заблакавана # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Немагчыма выдаліць частку станцыi... @@ -4817,6 +4837,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Арыґіна STR_BASESOUNDS_WIN_DESCRIPTION :Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows. STR_BASESOUNDS_NONE_DESCRIPTION :"Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў. STR_BASEMUSIC_WIN_DESCRIPTION :Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Набор музычнага афармленьня з гульні Transport Tycoon Deluxe для DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Набор музычнага афармлення з гульні Transport Tycoon (Original/World Editor) для DOS. STR_BASEMUSIC_NONE_DESCRIPTION :"Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі. ##id 0x2000 diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index 0f9bb81197..31aa357626 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -11,7 +11,7 @@ ##gender m f -# $Id: brazilian_portuguese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -33,7 +33,7 @@ STR_CARGO_PLURAL_COAL :{G=m}Carvão STR_CARGO_PLURAL_MAIL :{G=f}Correspondências STR_CARGO_PLURAL_OIL :{G=m}Petróleo STR_CARGO_PLURAL_LIVESTOCK :{G=m}Gado -STR_CARGO_PLURAL_GOODS :{G=f}Bens +STR_CARGO_PLURAL_GOODS :{G=m}Bens STR_CARGO_PLURAL_GRAIN :{G=m}Cereais STR_CARGO_PLURAL_WOOD :{G=f}Madeira STR_CARGO_PLURAL_IRON_ORE :{G=m}Minério de Ferro @@ -147,7 +147,7 @@ STR_ABBREV_MAIZE :{TINY_FONT}MI STR_ABBREV_FRUIT :{TINY_FONT}FT STR_ABBREV_DIAMONDS :{TINY_FONT}DM STR_ABBREV_FOOD :{TINY_FONT}AL -STR_ABBREV_PAPER :{TINY_FONT}PL +STR_ABBREV_PAPER :{TINY_FONT}PP STR_ABBREV_GOLD :{TINY_FONT}OU STR_ABBREV_WATER :{TINY_FONT}AG STR_ABBREV_WHEAT :{TINY_FONT}TG @@ -220,7 +220,7 @@ STR_UNITS_FORCE_IMPERIAL :{COMMA}{NBSP}lb STR_UNITS_FORCE_METRIC :{COMMA}{NBSP}kgf STR_UNITS_FORCE_SI :{COMMA}{NBSP}kN -STR_UNITS_HEIGHT_IMPERIAL :{COMMA}{NBSP}pés +STR_UNITS_HEIGHT_IMPERIAL :{COMMA}{NBSP}pé{P "" s} STR_UNITS_HEIGHT_METRIC :{COMMA}{NBSP}m STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}m @@ -476,6 +476,7 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de tela STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Ampliado em captura de tela STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Captura de tela em ampliação padrão STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de tela do mapa inteiro +STR_ABOUT_MENU_SHOW_FRAMERATE :Exibir taxa de quadros STR_ABOUT_MENU_ABOUT_OPENTTD :Sobre 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Alinhador de "sprites" STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Alternar caixas limítrofes @@ -651,6 +652,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Nenhuma música disponível STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Faixa STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Título @@ -670,15 +672,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Selecion STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Alternar programa misturado em ligado/desligado STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Exibir janela de seleção de faixas de música -STR_ERROR_NO_SONGS :{WHITE}Um conjunto de músicas sem canções foi selecionado. Nenhuma música será tocada - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Seleção de Programa de Música +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programação Musical - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} '{STRING}' STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Índice de faixas STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Limpar +STR_PLAYLIST_CHANGE_SET :{BLACK}Alterar set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Limpar programa atual (apenas Personalizado 1 ou Personalizado 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Altera a seleção de músicas para outro set instalado STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Clique na faixa de música para a adicionar ao programa atual (apenas Personalizado 1 ou Personalizado 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Clique na faixa de música para remover do programa atual (apenas Personalizado 1 ou Personalizado 2) @@ -814,6 +816,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Gerente) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} patrocinou a construção da nova cidade {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Uma nova cidade, {TOWN}, foi construída! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Nov{G o a} {STRING} em construção próximo a {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nov{G o a} {STRING} sendo plantada próximo a {TOWN}! @@ -881,10 +884,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Janela {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copiar para janela +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Alterar visualização STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copiar o local da tela principal para esta janela -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Colar da janela -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Colar a localização desta janela para a tela principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Colar da visualização principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Colar a localização desta janela para a visualização principal # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opções do Jogo @@ -926,6 +929,7 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand Sul-Africa STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personalizado... STR_GAME_OPTIONS_CURRENCY_GEL :Lari da Georgia STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iraniano +STR_GAME_OPTIONS_CURRENCY_RUB :Novo Rublo Russo (RUB) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Automóveis @@ -1255,6 +1259,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Impossí STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manutenção de Infraestrutura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Quando ativado, infraestrutura gera custos de manutenção. O custo aumenta proporcionalmente à malha de transportes, afetando companhias maiores mais do que as menores + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroportos nunca saem de linha: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ativando essa config. mantém todos os tipos de aeroportos disponíveis à construção após sua introdução @@ -1338,10 +1343,14 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Cor do terreno STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde escuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violeta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Rolar a tela no sentido oposto ao movimento do mouse: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Comportamento quando rolar o mapa com o botão direito. Quando desativado, o mouse move a câmera. Ativado, o mouse move o mapa. +STR_CONFIG_SETTING_SCROLLMODE :Comportamento de rolamento da janela: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportamento ao rolar o mapa +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Mover vista com BDM, posição do mouse travada +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Mover mapa com BDM, posição do mouse travada +STR_CONFIG_SETTING_SCROLLMODE_RMB :Mover mapa com BDM +STR_CONFIG_SETTING_SCROLLMODE_LMB :Move o mapa com BEM STR_CONFIG_SETTING_SMOOTH_SCROLLING :Suavizar rolamento da janela: {STRING} -STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla como a janela principal rola para uma posição específica quando clicado no minimapa ou após localizar um objeto. Ativado torna o rolamento suave. Desativado torna o rolamento instanâneo +STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla como a janela principal rola para uma posição específica quando clicado no minimapa ou após localizar um objeto. Ativado torna o rolamento suave. Desativado torna o rolamento instantâneo STR_CONFIG_SETTING_MEASURE_TOOLTIP :Exibe distâncias quando usar ferramentas de construção: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Exibe distâncias e diferenças de altitude quando clicando e arrastando enquanto constrói STR_CONFIG_SETTING_LIVERIES :Exibir cores avançadas: {STRING} @@ -1371,8 +1380,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Clique de coman STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Clique de controle STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Desligado -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Mover a tela com o botão esquerdo: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Ativa rolamento do mapa por clique e arraste com o botão esquerdo. Especialmente útil ao usar um touchscreen para o rolamento STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Fechar janela com botão direito do mouse: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Fecha uma janela ao clicar com o botão direito do mouse nela. Desativa o tooltip com o botão direito! @@ -1810,7 +1817,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Mudar an STR_CHEAT_SETUP_PROD :{LTBLUE}Ativar modificação de valores de produção: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Novo Esquema de Cores STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Exibir esquemas de cor gerais STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Exibe esquemas de cor de trens @@ -2286,6 +2292,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Todas STR_LINKGRAPH_LEGEND_NONE :{BLACK}Nenhuma STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Selecione companhias a serem exibidas +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}não utilizado @@ -2692,7 +2699,53 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :O terreno é pr STR_ABOUT_OPENTTD :{WHITE}Sobre o OpenTTD... STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright original {COPYRIGHT} 1995 Chris Sawyer, Todos os direitos reservados STR_ABOUT_VERSION :{BLACK}OpenTTD versão {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 A equipe do OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 A equipe do OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Taxa de quadros +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Taxa de simulação: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Número de tiques simulados por segundo +STR_FRAMERATE_RATE_BLITTER :{WHITE}Taxa de quadros: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Número de quadros renderizados por segundo. +STR_FRAMERATE_SPEED_FACTOR :{WHITE}Fator de velocidade do jogo atual: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Quão rápido o jogo está sendo executado, comparado com a velocidade esperada na simulação normal +STR_FRAMERATE_CURRENT :{WHITE}Atual +STR_FRAMERATE_AVERAGE :{WHITE}Médio +STR_FRAMERATE_DATA_POINTS :{WHITE}Dados baseados em {COMMA} medidas +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL}{WHITE} quadros/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE} quadros/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE} quadros/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GL_ECONOMY :{WHITE} Manuseio de carga: +STR_FRAMERATE_GL_TRAINS :{WHITE} Tiques de trem: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} Tiques de automóveis: +STR_FRAMERATE_GL_SHIPS :{WHITE} Tiques de embarcação: +STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Tiques de aeronave: +STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Tiques do mundo: +STR_FRAMERATE_DRAWING :{WHITE}Renderizações de gráficos: +STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Visualizações do mundo: +STR_FRAMERATE_VIDEO :{WHITE}Saída de vídeo: +STR_FRAMERATE_SOUND :{WHITE}Mixagem de áudio: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_ECONOMY :Manuseio de carga +STR_FRAMETIME_CAPTION_GL_TRAINS :Tiques de trem +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Tiques de automóveis +STR_FRAMETIME_CAPTION_GL_SHIPS :Tiques de embarcação +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Tiques de aeronave: +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Tiques do mundo +STR_FRAMETIME_CAPTION_DRAWING :Renderizações de gráficos +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderização da janela principal +STR_FRAMETIME_CAPTION_VIDEO :Saída de vídeo +STR_FRAMETIME_CAPTION_SOUND :Mixagem de áudio +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Salvar Jogo @@ -2978,6 +3031,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Coloque STR_TOWN_DIRECTORY_CAPTION :{WHITE}Cidades STR_TOWN_DIRECTORY_NONE :{ORANGE}- Nenhum - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Cidade){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nomes das cidades - clique no nome para centralizar a visualização principal na cidade. Ctrl+Clique abre uma nova janela na localização da cidade STR_TOWN_POPULATION :{BLACK}População mundial: {COMMA} @@ -2985,8 +3039,7 @@ STR_TOWN_POPULATION :{BLACK}Populaç STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Cidade) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}População: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passageiros no mês passado: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Cartas no mês passado: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} últ. mês: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Carga necessária para prover o crescimento: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} necessário(a) STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} necessário no inverno @@ -3291,21 +3344,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou fechamento iminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Necessita: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} aguardando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Modificar produção (múltiplo de 8, até 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mudar nível de produção (porcentagem, até 800%) @@ -4225,7 +4268,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Estaçõ STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}A estação já tem muitas partes STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Estações de ônibus demais STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Áreas de carga demais -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Muito perto de outra estação/local de carga STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Muito perto de outra doca STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Muito perto de outro aeroporto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Impossível renomear a estação... @@ -4233,6 +4275,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... é u STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... rua na direção errada STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... paradas "drive-thru" não podem ter esquinas STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... paradas "drive-thru" não podem ter junções +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... rua é mão única ou está bloqueada # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Impossível remover parte da estação... @@ -4301,7 +4344,7 @@ STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION :{WHITE}Impossí STR_ERROR_MUST_REMOVE_SIGNALS_FIRST :{WHITE}Remova os semáforos antes STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Tipo de linha não apropriado STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Remova a ferrovia antes -STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Rua é mão única ou está bloqueado +STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Rua é mão única ou está bloqueada STR_ERROR_CROSSING_DISALLOWED :{WHITE}Cruzamentos de nível não são permitidos para esse tipo de trilho STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Impossível construir sinais aqui... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Impossível construir ferrovia aqui... @@ -4484,6 +4527,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sons Originais STR_BASESOUNDS_WIN_DESCRIPTION :Sons Originais do Transport Tycoon Deluxe, Edição Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Um pacote de sons sem sons. STR_BASEMUSIC_WIN_DESCRIPTION :Música Original do Transport Tycoon Deluxe, Edição Windows +STR_BASEMUSIC_DOS_DESCRIPTION :Música Original do Transport Tycoon Deluxe DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Música Original do Transport Tycoon DOS STR_BASEMUSIC_NONE_DESCRIPTION :Um pacote de músicas sem músicas. ##id 0x2000 diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index 4038a713ad..16d9038acb 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -12,7 +12,7 @@ ##case m f n p -# $Id: bulgarian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -473,9 +473,9 @@ STR_ABOUT_MENU_SCREENSHOT :Screenshot STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Напълно увеличен в кадъра. STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Увеличение по подразбиране STR_ABOUT_MENU_GIANT_SCREENSHOT :Огромен Screenshot -STR_ABOUT_MENU_ABOUT_OPENTTD :За 'OpenTTD' +STR_ABOUT_MENU_ABOUT_OPENTTD :Относно 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Подравнител на спрайтове -STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Превключва слепване на прозците +STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Активиране слепване на прозорците STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Превключва оцветяване на замърсените блокове ############ range ends here @@ -667,10 +667,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Избе STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Активирай/деактивирай разместване на парчетата STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Покажи прозореца за избор на музикални парчета -STR_ERROR_NO_SONGS :{WHITE}Музикален пакет без песни е избран. Няма да се пускат песни. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Избор на музикалната програма STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Номер на песен STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Програма - '{STRING}' @@ -755,6 +752,7 @@ STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Пока STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Показване/скриване на височинна карта STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES :{BLACK}Скриване на собствеността на компанията от картата STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Показване на цялата собственост на компанията на картата +STR_SMALLMAP_TOOLTIP_ENABLE_ALL_CARGOS :{BLACK}Покажи всички товари на картата # Status bar messages STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Покажи последното съобщение или отчет на новините @@ -1248,6 +1246,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Пром STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Поддръжка на инфраструктурата: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Когато е разрешено, съществуват разходи за поддръжка на инфраструктурата. Разходите се увеличават пропорционално на размера на пътната мрежа, влияейки повече на големите компании отколкото на по-малките + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Летишата не губят валидност: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Разрешавайки тази настройка, всеки вид летище остава завинаги достъпно след неговото представяне @@ -1282,6 +1281,7 @@ STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Показва STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Дебелина на линиите в графиките: {STRING} STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Дебелина на линиите в графиките. Тънките линии са по-лесни за разчитане, но по-дебелите се забелязват и разграничават по-лесно. +STR_CONFIG_SETTING_LANDSCAPE :Пейзаж: {STRING} STR_CONFIG_SETTING_LAND_GENERATOR :Генератор на земя: {STRING} STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL :оригинален STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :тера-генезис @@ -1293,6 +1293,7 @@ STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :много по STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :полегат STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH :стръмен STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_ROUGH :много стръмен +STR_CONFIG_SETTING_RIVER_AMOUNT :Количество на реките: {STRING} STR_CONFIG_SETTING_TREE_PLACER :Алгоритъм за поставяне на дървета: {STRING} STR_CONFIG_SETTING_TREE_PLACER_NONE :без дървета STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :оригинален @@ -1317,8 +1318,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Цвят на STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Зелен STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Тъмно зелен STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Виолетов -STR_CONFIG_SETTING_REVERSE_SCROLLING :Обърната посока на преместване: {STRING.n} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Когато опцията бъде активирана, когато "скролвате" картата с десния бутон на мишката ще местите картата, когато опцията не е активирана, мишката ще мести камерата STR_CONFIG_SETTING_SMOOTH_SCROLLING :Плавно местене на камера: {STRING.n} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Ако опцията е активирана, когато натиснете на малката карта камерата ще се придвижи до там плавно, ако не е активирана камерата ще отиде там директно STR_CONFIG_SETTING_MEASURE_TOOLTIP :Подсказка за разстояние при строене: {STRING.f} @@ -1350,8 +1349,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Команда- STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Контрол-щракане STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Изключен -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Скролиране с ляв бутон: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Позволява да "скролнете" картата, чрез влачене на левия бутон на мишката. Това и изключително полезно ако ползвате тъч-скрийн STR_CONFIG_SETTING_AUTOSAVE :Автоматично запазване: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Изберете интервал между автоматично запаметяване на играта @@ -1584,6 +1581,7 @@ STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :Без STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Множител за големината на града: {STRING} STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Относителен размер на мегаполисите в сравнение с градовете в началото на играта +STR_CONFIG_SETTING_DEMAND_SIZE :Количество на връщания товар при симетричнен режим: {STRING} STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY :Единици за скорост: {STRING} STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Всеки път при показване на скорости, да бъдат изписвани в избраните мерни единици @@ -1624,9 +1622,11 @@ STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :SI (m) STR_CONFIG_SETTING_LOCALISATION :{ORANGE}Позициониране STR_CONFIG_SETTING_SOUND :{ORANGE}Звукови ефекти STR_CONFIG_SETTING_INTERFACE :{ORANGE}Интерфейс +STR_CONFIG_SETTING_INTERFACE_GENERAL :{ORANGE}Основни STR_CONFIG_SETTING_INTERFACE_CONSTRUCTION :{ORANGE}Строене STR_CONFIG_SETTING_VEHICLES :{ORANGE}Автомобили STR_CONFIG_SETTING_VEHICLES_ROUTING :{ORANGE}Маршрутизация +STR_CONFIG_SETTING_ENVIRONMENT_AUTHORITIES :{ORANGE}Права STR_CONFIG_SETTING_ENVIRONMENT_TOWNS :{ORANGE}Градове STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :{ORANGE}Индустрии STR_CONFIG_SETTING_AI :{ORANGE}Съперници @@ -1749,7 +1749,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Пром STR_CHEAT_SETUP_PROD :{LTBLUE}Промяна на производствените стойности: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Нова цветове STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Показване на общи цветови схеми STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Показване цветовите схеми на влаковете @@ -2530,6 +2529,7 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Приет товар: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Ограничение на скоростта на линията: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Макс. скорост на пътя: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Скали @@ -2626,7 +2626,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Земя, пр STR_ABOUT_OPENTTD :{WHITE}Относно OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Авторски права {COPYRIGHT} 1995 Крис Сойер (Chris Sawyer), Всички права са запазени STR_ABOUT_VERSION :{BLACK}OpenTTD версия {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Запази играта @@ -2911,8 +2918,6 @@ STR_TOWN_POPULATION :{BLACK}Обща STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Град) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Население: {ORANGE}{COMMA}{BLACK} Жилища: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Пътници през последния месец: {ORANGE}{COMMA}{BLACK} максимум: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Поща през последния месец: {ORANGE}{COMMA}{BLACK} максимум: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Товар нужен за растеж на града: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} необходим STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} необходим през зимата @@ -3010,6 +3015,7 @@ STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Натисни върху услугата за да се фокусира върху индустрията/града. Ctrl отваря нов изглед към индустрията/града # Story book window +STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Прескочи до определена страница чрез избирането й в дроп-даун листата. STR_STORY_BOOK_NEXT_PAGE :{BLACK}Следваща STR_STORY_BOOK_NEXT_PAGE_TOOLTIP :{BLACK}Отиди на следващата страница STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Невалидна цел @@ -3208,17 +3214,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Фоку STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ниво на производство: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Индустрията обяви незабавна ликвидация! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Нуждае се от: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Нуждае се от: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Нуждае се от: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends - -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Произвежда: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Произвежда: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends +STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} чакащ{STRING} STR_CONFIG_GAME_PRODUCTION :{WHITE}Промени производството STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Промени нивото на производство(процент, до 800%) @@ -3274,12 +3271,16 @@ STR_GROUP_DELETE_TOOLTIP :{BLACK}Изтр STR_GROUP_RENAME_TOOLTIP :{BLACK}Преименувай избраната група STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Щракни да защитиш тази група от глобална автоматична замяна +STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Изтрий група +STR_GROUP_DELETE_QUERY_TEXT :{WHITE}Сигурен ли си, че искаш да изтриеш тази група и нейните производни? STR_GROUP_ADD_SHARED_VEHICLE :Добави споделени превозни средства STR_GROUP_REMOVE_ALL_VEHICLES :Премахни всички превозни средсва STR_GROUP_RENAME_CAPTION :{BLACK}Преименовай група +STR_GROUP_OCCUPANCY :Използва се за: +STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Нови Машини за Двурелсов път @@ -3446,6 +3447,7 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :локомот STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Цена: {CURRENCY_LONG} Тегло: {WEIGHT_SHORT}{}Скорост: {VELOCITY} Мощност: {POWER}{}Разход: {CURRENCY_LONG}/г.{}Капацитет: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Цена: {CURRENCY_LONG} Тегло: {WEIGHT_SHORT}{}Скорост: {VELOCITY} Мощност: {POWER} Макс. Т.С.: {6:FORCE}{}Експлоатационни разходи: {4:CURRENCY_LONG}/год.{}Вместимост: {5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Цена: {CURRENCY_LONG} Макс. Скорост: {VELOCITY}{}Вместимост: {CARGO_LONG}{}Експлоатационни разходи: {CURRENCY_LONG}/год. +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Цена: {CURRENCY_LONG} Макс.скорост: {VELOCITY}{}Тип самолет: {STRING}{}Вместимост: {CARGO_LONG}{}Оперативни разходи: {CURRENCY_LONG}/yr # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Замяна {STRING} - {STRING} @@ -3475,6 +3477,7 @@ STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Нати STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Превключване между замяна на локомотиви и вагони STR_REPLACE_ENGINES :Двигатели STR_REPLACE_WAGONS :Вагони +STR_REPLACE_ALL_RAILTYPE :Всички ЖП композиции STR_REPLACE_HELP_RAILTYPE :{BLACK}Избор на ЖП линия с която да се заменят локомотивите STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Показване с кой двигател се заменя ляво избрания, ако има @@ -4120,7 +4123,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Твър STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Твърде много части на гара STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Твърде много автобусни спирки STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Твърде много гари за камиони -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Твърде близо до друга гара/товарна платформа STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Прекалено близо до друг док STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Прекалено близо до друго летище STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Станцията не може да бъде преименувана... @@ -4268,6 +4270,7 @@ STR_ERROR_YOU_ALREADY_OWN_IT :{WHITE}... ви STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}Групата неможе да бъде създадена... STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}Тази група неможе да бъде изтрита... STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}Групата неможе да бъде преименована... +STR_ERROR_GROUP_CAN_T_SET_PARENT :{WHITE}Не може да избере горна група.... STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}Всички превозни средства немогат да бъдат премахнати от тази група... STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}Превозното средство неможе да се добави към тази група... STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Поделени превозни средсва немогат да бъдат добавени към групата... diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index 8942f19919..d20684b036 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -11,7 +11,7 @@ ##gender Masculin Femenin -# $Id: catalan.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -476,6 +476,7 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de pant STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Captura de pantalla amb el zoom màxim STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Captura de pantalla amb el zoom predeterminat STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de pantalla de tot el mapa +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostra els fotogrames per segon STR_ABOUT_MENU_ABOUT_OPENTTD :Quant a l'OpenTTD STR_ABOUT_MENU_SPRITE_ALIGNER :Alineador de sprites STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Commuta les caixes delimitadores @@ -651,6 +652,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}No hi ha peces musicals disponibles STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}«{STRING}» STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Pista STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Títol @@ -670,15 +672,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Seleccio STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Habilita/deshabilita la reproducció en ordre aleatori STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Mostra la finestra de selecció de pistes -STR_ERROR_NO_SONGS :{WHITE}S'ha seleccionat un conjunt de música sense peces. No es reproduirà res. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Selecció de les peces de la llista +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programació de pistes - «{STRING}» STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} «{STRING}» STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Índex de pistes STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Llista «{STRING}» STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Esborra +STR_PLAYLIST_CHANGE_SET :{BLACK}Canvia conjunt STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Esborra la llista actual (només les llistes personalitzables) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Canvia la selecció musical a un altre conjunt instal·lat. STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Clica la pista de música per afegir-la a la llista actual (només en les llistes personalitzables) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Clica la pista de música per treure-la de la llista actual (només en llistes personalitzables) @@ -881,10 +883,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Vista {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copia a la vista +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Canvia la vista extra STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Mou aquesta vista on està la vista principal -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Vés a la vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Mou la vista principal on està aquesta vista +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Canvia vista principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copia el lloc d'aquesta vista extra a la vista principal. # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opcions de la partida @@ -1255,6 +1257,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}No es po STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manteniment de la infraestructura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Quan està activat, la infraestructura provoca costos de manteniment. El cost creix proporcionalment al tamany de la xarxa de transport, afectant en conseqüència més a les companyies grosses que a les petites + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Els aeroports mai caduquen: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activant aquesta opció fa que cada tipus d'aeroport estigui disponible per sempre després de la seva introducció @@ -1338,8 +1341,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Color del terre STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verd STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verd fosc STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violat -STR_CONFIG_SETTING_REVERSE_SCROLLING :En desplaçar la pantalla amb el ratolí mou la vista en la direcció contrària: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Comportament quan es desplaci el mapa amb el botó dret del ratolí. Quan està desactivat, el ratolí mou la càmera. Quan està activat, el ratolí mou el mapa +STR_CONFIG_SETTING_SCROLLMODE :Desplaçament del mapa: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportament quan es desplaça el mapa. +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Mou la vista amb el botó dret del ratolí amb la posició del ratolí fixada +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Mou el mapa amb el botó dret del ratolí amb la posició del ratolí fixada +STR_CONFIG_SETTING_SCROLLMODE_RMB :Mou el mapa amb el botó dret del ratolí +STR_CONFIG_SETTING_SCROLLMODE_LMB :Mou el mapa amb el botó esquerre del ratolí STR_CONFIG_SETTING_SMOOTH_SCROLLING :Desplaçament suau de la vista: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla com la vista principal es desplaça a una posició específica quan es clica al mapa petit o quan s'envia una ordre de desplaçar-se a un objecte específic al mapa. Si està activat, la vista es desplaça suaument; si està desactivat, salta directament al punt assenyalat STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostra un cartell de mesura quan estiguis utilitzant vàries eines de construcció: {STRING} @@ -1371,8 +1378,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command-clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control-clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Desactivat -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Desplaçament amb el botó esquerre: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Activa el desplaçament del mapa arrossegant-lo amb el botó esquerre del ratolí. Això és especialment útil quan s'utilitzen pantalles tàctils STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Tanca la finestra amb un clic dret del ratolí: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Tanca una finestra fent-hi un clic amb el botó dret del ratolí. Aquesta opció desactiva els indicadors de funció amb el mateix botó. @@ -1810,7 +1815,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Canvia l STR_CHEAT_SETUP_PROD :{LTBLUE}Activa la modificació dels valors de producció: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nou esquema de colors STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Mostra esquemes de colors generals STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Mostra els esquemes de colors dels trens @@ -2286,6 +2290,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Llegenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Tot STR_LINKGRAPH_LEGEND_NONE :{BLACK}Cap STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Selecciona les companyies que seran mostrades +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{G=Masculin}{TINY_FONT}{BLACK}no utilitzat @@ -2692,7 +2697,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :terreny propiet STR_ABOUT_OPENTTD :{WHITE}Quant a l'OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright original {COPYRIGHT} 1995 Chris Sawyer. Tots els drets reservats. STR_ABOUT_VERSION :{BLACK}Versió {REV} de l'OpenTTD -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 L'equip de l'OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 L'equip de l'OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Fotogrames per segon +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} (x{DECIMAL}) +STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Velocitat de simulació: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Nombre de tics del joc per segon. +STR_FRAMERATE_RATE_BLITTER :{WHITE}Fotogrames per segon: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Nombre de fotogrames renderitzats per segon. +STR_FRAMERATE_SPEED_FACTOR :{WHITE}Factor de velocitat actual: x{DECIMAL} +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Quant ràpid va la partida actual, comparant-ho amb l'estimació de la velocitat normal. +STR_FRAMERATE_CURRENT :{WHITE}Actual +STR_FRAMERATE_AVERAGE :{WHITE}Mitjana +STR_FRAMERATE_DATA_POINTS :{WHITE}Dades basades en {COMMA} mesures. +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE}{NBSP}ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE}{NBSP}ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE}{NBSP}ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL}{WHITE}{NBSP}fps +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE}{NBSP}fps +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE}{NBSP}fps +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA}{NBSP}ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA}{NBSP}s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{WHITE}Total del bucle: +STR_FRAMERATE_GL_ECONOMY :{WHITE} Tractament de la càrrega: +STR_FRAMERATE_GL_TRAINS :{WHITE} Tics de tren: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} Tics de vehicles de carretera: +STR_FRAMERATE_GL_SHIPS :{WHITE} Tics de vaixell: +STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Tics d'aeronau: +STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Tics del mapa: +STR_FRAMERATE_GL_LINKGRAPH :{WHITE} Retard del graf de distribució: +STR_FRAMERATE_DRAWING :{WHITE}Renderitzat de gràfics: +STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Vistes del mapa: +STR_FRAMERATE_VIDEO :{WHITE}Sortida de vídeo: +STR_FRAMERATE_SOUND :{WHITE}Mescla de so: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Bucle +STR_FRAMETIME_CAPTION_GL_ECONOMY :Tractament de la càrrega +STR_FRAMETIME_CAPTION_GL_TRAINS :Tics de tren +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Tics de vehicle de carretera +STR_FRAMETIME_CAPTION_GL_SHIPS :Tics de vaixell +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Tics d'aeronau +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Tics del mapa +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Retard del graf de distribució +STR_FRAMETIME_CAPTION_DRAWING :Renderitzat de gràfics +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderitzat de la vista del mapa +STR_FRAMETIME_CAPTION_VIDEO :Sortida de vídeo +STR_FRAMETIME_CAPTION_SOUND :Mescla de so +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Desa la Partida @@ -2978,6 +3033,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Posa un STR_TOWN_DIRECTORY_CAPTION :{WHITE}Poblacions STR_TOWN_DIRECTORY_NONE :{ORANGE}- Cap - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{BLACK} ({COMMA} -{YELLOW} ciutat{BLACK}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Noms de Població - clica al nom per centrar la vista principal a la població. Ctrl+Clic obre una nova vista al lloc de la població STR_TOWN_POPULATION :{BLACK}Població mundial: {COMMA} @@ -2985,8 +3041,7 @@ STR_TOWN_POPULATION :{BLACK}Poblaci STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Ciutat) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Població: {ORANGE}{COMMA}{BLACK} Cases: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passatgers el darrer mes: {ORANGE}{COMMA}{BLACK} màx: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Correu el darrer mes: {ORANGE}{COMMA}{BLACK} màx: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} l'últim mes: {ORANGE}{COMMA}{BLACK} (màx. {ORANGE}{COMMA}{BLACK}) STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Càrrega requerida per tal que la població creixi: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} requerides STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} requerit a l'hivern @@ -3291,21 +3346,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra l STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivell de producció: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La indústria ha anunciat la seva clausura imminent! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Necessita: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necessita: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Necessita: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Necessita: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} esperant{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produeix: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produeix: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Canvia la producció (múltiple de 8, fins a 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Canvia el nivell de producció (en percentatge, fins a 800%) @@ -4225,7 +4270,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Massa es STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Hi ha massa parts d'estacions de tren STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Massa parades d'autobús STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Masses estacions de càrrega -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Massa prop d'una altra estació/àrea de càrrega STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Massa prop d'un altre moll STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Massa prop d'un altre aeroport STR_ERROR_CAN_T_RENAME_STATION :{WHITE}No es pot canviar el nom de l'estació... @@ -4233,6 +4277,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... aque STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... sentit de la carretera en la direcció incorrecta STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... les estacions d'autobús de pas no poden tenir cantonades STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... les estacions d'autobús de pas no poden tenir interseccions +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la carretera és d'un sol sentit o està blocada. # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}No es pot treure part de la estació... @@ -4484,6 +4529,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sons originals STR_BASESOUNDS_WIN_DESCRIPTION :Sons originals del Transport Tycoon Deluxe pel Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Una llista de sons buida. STR_BASEMUSIC_WIN_DESCRIPTION :Música original del Transport Tycoon Deluxe pel Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Música original del Transport Tycoon Deluxe pel DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Música original del Transport Tycoon Deluxe (original/editor d'escenaris) pel DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Una llista de música sense cap peça. ##id 0x2000 diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index 688156a3fa..2d8ecc8f9f 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -12,7 +12,7 @@ ##case nom gen dat aku vok lok ins -# $Id: croatian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -285,6 +285,8 @@ STR_COLOUR_ORANGE :Narančasta STR_COLOUR_BROWN :Smeđa STR_COLOUR_GREY :Siva STR_COLOUR_WHITE :Bijela +STR_COLOUR_RANDOM :Nasumično +STR_COLOUR_DEFAULT :Osnovna postavka # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -571,6 +573,7 @@ STR_ABOUT_MENU_SCREENSHOT :Slika zaslona STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Zumirano do kraja na slici zaslona STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Standardno zumiranje slike zaslona STR_ABOUT_MENU_GIANT_SCREENSHOT :Slika zaslona cijele karte +STR_ABOUT_MENU_SHOW_FRAMERATE :Prikaži broj sličica u sekundi STR_ABOUT_MENU_ABOUT_OPENTTD :O 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Poravnanje spritea STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Odaberi granične okvire @@ -746,6 +749,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Nema dostupne muzike STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Traka STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Naslov @@ -765,15 +769,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Odaberi STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Uključi/isključi miješanje programa STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Pokaži prozor za izbor glazbenih traka -STR_ERROR_NO_SONGS :{WHITE}Odabran je set glazbe bez pjesama. Ne će se puštati nikakve pjesme - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Izbor glazbenog programa +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Program muzike - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Popis traka STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program- '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Obriši +STR_PLAYLIST_CHANGE_SET :{BLACK}Promijeni set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Obriši aktivni program (samo Proizvoljno 1 ili Proizvoljno 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Promijeni odabir muzike na neki drugi instalirani set STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klikni na glazbenu traku za dodavanje u aktivni program (samo Proizvoljno 1 ili Proizvoljno 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klikni na glazbenu traku kako bi ju uklonio iz trenutnog programa (samo Proizvoljno 1 ili Proizvoljno 2) @@ -909,6 +913,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Direktor) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}Tvrtka {STRING} sponzorira izgradnju novoga grada {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Sagrađen je novi grad {TOWN}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Započela je izgradnja nove {STRING.gen} u blizini grada {TOWN}a! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nova {STRING} trenutno se sadi blizu grada {TOWN}a! @@ -976,10 +981,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Mini pogled {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Kopiraj u mini pogled +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Promijeni pogled STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Kopiraj lokaciju globalnog pogleda u ovaj mini pogled -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Zalijepi iz mini pogleda -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Zalijepi lokaciju ovog mini pogleda u globalni pogled +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Promijeni glavni pogled +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Kopiraj lokaciju ovog mini pogleda u glavni pogled # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Postavke igre @@ -1021,6 +1026,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Južnoafrički STR_GAME_OPTIONS_CURRENCY_CUSTOM :Proizvoljno... STR_GAME_OPTIONS_CURRENCY_GEL :Gruzijski Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranski Rial (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nove ruske rublje (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Meksički Pesos (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Cestovna vozila @@ -1350,6 +1357,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Mijenjan STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Održavanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Kada je omogućeno, infrastruktura uzrokuje troškove održavanja. Cijena raste više nego proporcionalno s veličinom mreže, čime utječe veće tvrtke više od manjih +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Početna boja za kompaniju: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Odaberi početnu boju za kompaniju + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Zračne luke nikad ne ističu: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Uključivanjem ove postavke čini svaku vrstu zračne luke dostupnom zauvijek nakon uvođenja @@ -1433,8 +1443,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Boja terena na STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :{G=female}Zelena STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :{G=female}Tamno zelena STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :{G=female}Ljubičasta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Promijeni smjer klizanja: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Ponašanje kod pomicanja karte desnim gumbom miša. Kada je isključeno, miš pomiče kameru. Kada je uključeno, miš pomiče kartu +STR_CONFIG_SETTING_SCROLLMODE :Ponašanje klizanja kroz mini pogled: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Ponašanje kod klizanja kroz mapu +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Pomiči mini pogled sa desnom tipkom miša, pozicija miša zaključana +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Pomiči mapu sa desnom tipkom miša, pozicija miša zaključana +STR_CONFIG_SETTING_SCROLLMODE_RMB :Pomiči mapu sa desnom tipkom miša +STR_CONFIG_SETTING_SCROLLMODE_LMB :Pomiči mapu sa lijevom tipkom miša STR_CONFIG_SETTING_SMOOTH_SCROLLING :Glatko klizanje kroz mini pogled: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Odredi kako se glavni prikaz pomiče na određeno mjesto kada se klikne na malu kartu ili kada se izda naredba za pomicanje na određeni objekt na karti. Ako je uključeno, prikaz se pomiče glatko, ako je isključeno, prikaz izravno skače na ciljnu lokaciju STR_CONFIG_SETTING_MEASURE_TOOLTIP :Pokaži mjerni naputak prilikom korištenja raznih alata za izgradnju: {STRING} @@ -1466,8 +1480,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control+klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Isključeno -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Skrolanje lijevim klikom: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Uključi pomicanje karte povlačenjem pomoću lijevog gumba miša. Ovo je posebno korisno kada se koristi zaslon osjetljiv na dodir STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Zatvori prozor nakon desnog klika: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Zatvara prozor nakon desnog klika unutar prozora. S desnim klikom zatvaraju se i upute alata! @@ -1905,7 +1917,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Promijen STR_CHEAT_SETUP_PROD :{LTBLUE}Omogući izmjeni produkcijskih vrijednosti: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nova boja +STR_LIVERY_CAPTION :{WHITE}{COMPANY} -Boja STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Pokaži generalne sheme boja STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Pokaži sheme boja za vlak @@ -2381,6 +2393,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Kazalo p STR_LINKGRAPH_LEGEND_ALL :{BLACK}Sve STR_LINKGRAPH_LEGEND_NONE :{BLACK}Ništa STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Odaberi tvrtke koje će se prikazati +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}nekorišten @@ -2465,9 +2478,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Kombo si STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Putni signal (električni){}Putni signal omogućava da više od jednog vlaka uđe istovremeno u signalni blok, ako vlak može rezervirati putanju do sigurnog zaustavnog mjesta. Standardne putne signale moguće je proći iz suprotnog smjera STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Jednosmjerni putni signal (električni){}Putni znak omogućava da više od jednog vlaka uđe istovremeno u signalni blok, ako vlak može rezervirati putanju do sigurnog zaustavnog mjesta. Jednosmjerne putne signale nije moguće proći iz suprotnog smjera. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Pretvaranje signala{}Kada je odabrano, klikanjem na postojeći signal pretvara taj signal u odabranu vrstu i varijantu, Ctrl+Klik mijenja postojeću varijantu. Shift+Klik prikazuje procjenu troška pretvorbe -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Gustoća signala prilikom izgradnje -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Smanji gustoću signala prilikom izgradnje -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povećaj gustoću signala prilikom izgradnje +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Razmak između signala prilikom izgradnje +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Smanji razmak između signala prilikom izgradnje +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povećaj razmak između signala prilikom izgradnje # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Odaberi željeznički most @@ -2787,7 +2800,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Zemlja u posjed STR_ABOUT_OPENTTD :{WHITE}O OpenTTD-u STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Izvorno autorsko pravo {COPYRIGHT} 1995 Chris Sawyer, sva prava pridržana STR_ABOUT_VERSION :{BLACK}OpenTTD verzija {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD tim +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD tim + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Broj sličica +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Stopa simulacije: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Broj otkucaja igre simuliranih u sekundi. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Broj sličica u sekundi: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Broj sličica videa prikayanih u sekundi. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Trenutni faktor brzine igre: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Koliko brzo se igra izvodi trenutno u usporedbi sa očekivanom brzinom u uobičajenoj simulaciji. +STR_FRAMERATE_CURRENT :{WHITE}Trenutno +STR_FRAMERATE_AVERAGE :{WHITE}Prosječno +STR_FRAMERATE_DATA_POINTS :{BLACK}Podaci bazirani na {COMMA} mjerama +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} sličica/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} sličica/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} sličica/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Zbroj petlji igre: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Korištenje tereta: +STR_FRAMERATE_GL_TRAINS :{BLACK} Otkucaji vlakova: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Otkucaji cestovnih vozila: +STR_FRAMERATE_GL_SHIPS :{BLACK} Otkucaji brodova: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Otkucaji aviona: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Otkucaji svijeta: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Odmak linka grafikona: +STR_FRAMERATE_DRAWING :{BLACK}Prikaz grafike: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Prikazi svijeta: +STR_FRAMERATE_VIDEO :{BLACK}Video izlaz: +STR_FRAMERATE_SOUND :{BLACK}Miksanje zvukova: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Petlja igre +STR_FRAMETIME_CAPTION_GL_ECONOMY :Korištenje tereta +STR_FRAMETIME_CAPTION_GL_TRAINS :Otkucaji vlakova +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Otkucaji cestovnih vozila +STR_FRAMETIME_CAPTION_GL_SHIPS :Otkucaji brodova +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Otkucaji aviona +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Otkucaji svijeta +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Odmak linka grafikona +STR_FRAMETIME_CAPTION_DRAWING :Prikaz grafike +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Prikazi svijeta +STR_FRAMETIME_CAPTION_VIDEO :Video izlaz +STR_FRAMETIME_CAPTION_SOUND :Miksanje zvukova +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spremi igru @@ -2811,6 +2874,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Detalji STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Nema dostupnih informacija. STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtriraj niz: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Presnimi datoteku +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Jeste li sigurano da želite presnimiti postojeću datoteku? STR_SAVELOAD_OSKTITLE :{BLACK}Upiši ime za spremanje igre @@ -2928,7 +2994,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Verzija: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Min. kompatibilna verzija: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5 suma: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Osnovna postavka (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Osnovna postavka (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Legacy (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Legacy (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parametri: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Ništa STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Nema dostupnih informacija STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Nije pronađena odgovarajuća datoteka @@ -3009,6 +3080,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Pročitaj nakon STR_NEWGRF_ERROR_GRM_FAILED :Zatraženi GRF resursi nisu dostupni (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} je isključen od strane {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Pogrešan/nepoznat format raspored sprite-a (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Previše elemenata na listi postavki varijabli (sprite {3:NUM}, postavka {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Pogrešna callback funkcija za industrijsku proizvodnju (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Oprez! @@ -3073,6 +3146,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Unesi im STR_TOWN_DIRECTORY_CAPTION :{WHITE}Gradovi STR_TOWN_DIRECTORY_NONE :{ORANGE}- Ništa - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Grad){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Imena gradova - klikni na ime kako bi centrirao pogled na grad. Ctrl+klik otvara novi prozor sa lokacijom grada STR_TOWN_POPULATION :{BLACK}Svjetsko stanovništvo: {COMMA} @@ -3080,8 +3154,7 @@ STR_TOWN_POPULATION :{BLACK}Svjetsko STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Metropola) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Stanovništvo: {ORANGE}{COMMA}{BLACK} Kuće: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Putnika prošli mjesec: {ORANGE}{COMMA}{BLACK} najviše: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Pošte prošli mjesec: {ORANGE}{COMMA}{BLACK} najviše: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} prošli mjesec: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Potrebno tereta za rast grada: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} potrebno STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} potrebno zimi @@ -3386,21 +3459,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrira STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Razina proizvodnje: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrija je najavila uskoro zatvaranje! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Treba: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} čeka{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Promijeni proizvodnju (višekratnik broja 8, do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Promijeni razinu proizvodnje (postotak, do najviše 800%) @@ -3453,6 +3519,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupe - STR_GROUP_CREATE_TOOLTIP :{BLACK}Klikni za kreiranje grupe STR_GROUP_DELETE_TOOLTIP :{BLACK}Obriši odabranu grupu STR_GROUP_RENAME_TOOLTIP :{BLACK}Preimenuj odabranu grupu +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Promijeni livreju odabrane grupe STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Klikni kako bi zaštitio ovu grupu od globalne automatske zamjene STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Izbriši grupu @@ -3496,6 +3563,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Nosivost STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK} Pokretni vagoni:.{GOLD}+{POWER}{BLACK} Težina: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Prenamjenjivo u: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Sve vrste tereta +STR_PURCHASE_INFO_NONE :Ništa STR_PURCHASE_INFO_ALL_BUT :Sve osim {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK} Najveća vučna sila: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Domet: {GOLD}{COMMA} polja @@ -3895,6 +3963,7 @@ STR_ORDER_CONDITIONAL_AGE :Starost vozila STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Treba servis STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Uvijek STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Preostali životni vijek (godina) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maksimalna pouzdanost STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Kako usporediti podatke vozila sa zadanom vrijednošću STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :je jednako @@ -4320,7 +4389,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Previše STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Previše dijelova željezničke postaje STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Previše autobusnih postaja STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Previše kamionskih postaja -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Preblizu drugoj postaji/terminalu STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Preblizu drugom pristaništu STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Preblizu drugoj zračnoj luci STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nije moguće preimenovati postaju... @@ -4328,6 +4396,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ovo STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... cesta je orijentirana u krivom smjeru STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... prolazne postaje ne mogu imati zavoje STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... prolazne postaje ne mogu imati raskrižja +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... cesta je jednosmjerna ili je blokirana # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nije moguće ukloniti dio postaje... @@ -4579,6 +4648,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Originalni zvuk STR_BASESOUNDS_WIN_DESCRIPTION :Originalni zvukovi za Transport Tycoon Deluxe Windows izdanje. STR_BASESOUNDS_NONE_DESCRIPTION :Zvučni paket bez ikakvih zvukova. STR_BASEMUSIC_WIN_DESCRIPTION :Originalna glazba za Transport Tycoon Deluxe Windows izdanje. +STR_BASEMUSIC_DOS_DESCRIPTION :Originalna glazba za Transport Tycoon Deluxe DOS izdanje. +STR_BASEMUSIC_TTO_DESCRIPTION :Originalna glazba za Transport Tycoon (original/editor svijeta) DOS izdanje. STR_BASEMUSIC_NONE_DESCRIPTION :Glazbeni paket bez ikakve glazbe. ##id 0x2000 diff --git a/src/lang/czech.txt b/src/lang/czech.txt index 582d67f0cc..e26dd9963d 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -12,7 +12,7 @@ ##case nom gen dat acc voc loc ins big small -# $Id: czech.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -550,6 +550,7 @@ STR_ABOUT_MENU_SCREENSHOT :Screenshot STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Screenshot v plném přiblížení STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Screenshot ve výchozím přiblížení STR_ABOUT_MENU_GIANT_SCREENSHOT :Screenshot celé mapy +STR_ABOUT_MENU_SHOW_FRAMERATE :Zobrazit počet snímků za sekundu STR_ABOUT_MENU_ABOUT_OPENTTD :O 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Zarovnávání spritů STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Přepnout ohraničení @@ -737,6 +738,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Hudba nedostupná STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Skladba STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Název @@ -756,15 +758,13 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Zvolit p STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Zapnout/vypnout náhodné opakování skladeb STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Ukaž skladbu ve výběrovém okně -STR_ERROR_NO_SONGS :{WHITE}Byl vybrán hudební set bez písní. Nebudou přehrány žádné písně - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Volba programu hudby STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Index skladeb STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Vymazat STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Vyprázdnit současný program (jen u Voleb 1 a 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Změnit výběr hudby na jinou nainstalovanou sadu. STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Skladba se přidá do zvoleného programu (Volba 1 nebo 2) klepnutím na její název STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Hudební stopu odstraníš ze současného programu (pouze u vlastního) kliknutím na ni @@ -900,6 +900,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Prezident) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}Společnost {STRING} zaplatila výstavbu nového města {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Nové město {TOWN} bylo vystavěno! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Nov{G ý á é í é é á} {STRING.small} se staví poblíž města {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nov{G ý á é í é é á} {STRING.small} se vysazuj{G 0 e e e í í í í} poblíž města {TOWN}! @@ -969,7 +970,7 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Pohled {COMMA} STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Nastavit jako pohled STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Nastavit současné zorné pole jako pohled -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Přejít na pohled +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Změnit hlavní pohled STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Nastavit pohled do zorného pole # Game options window @@ -1012,6 +1013,7 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Jihoafrický ra STR_GAME_OPTIONS_CURRENCY_CUSTOM :Vlastní... STR_GAME_OPTIONS_CURRENCY_GEL :Georgijské Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Íránský Riál (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Ruský rubl (RUB) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Silniční vozidla jezdí @@ -1341,6 +1343,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Toto nas STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Udržování infrastruktury: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Pokud je zapnuto, je třeba platit za údržbu infrastruktury. Náklady vzrůstají společně s velikostí dopravní sítě, takže velké společnosti platí více než malé. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Žádný druh letiště nezastará: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Povolení této možnosti způsobí, že všechny druhy letišť zůstanou po uvedení dostupné napořád. (nezastarají). @@ -1424,8 +1427,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Barva terénu n STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :zelená STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :tmavě zelená STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :fialová -STR_CONFIG_SETTING_REVERSE_SCROLLING :Posouvat pohled opačným směrem: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Chování při posouvání mapy pomocí stisku pravého tlačítka myši. Pokud vypnuto, myš pohybuje kamerou. Pokud zapnuto, myš pohybuje mapou STR_CONFIG_SETTING_SMOOTH_SCROLLING :Plynulé posouvání po mapě: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Ovládá jak se hlavní pohled posouvá na specifické místo na mapě, kliknutím na minimapu nebo spuštěním příkazu na posun na specifický objekt na mapě. Pokud zapnuto, pohled se posouvá plynule, pokud vypnuto, skáče pohled přímo na cílové místo STR_CONFIG_SETTING_MEASURE_TOOLTIP :Ukázat rozměry při použití stavebních nástrojů: {STRING} @@ -1457,8 +1458,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command + klikn STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control + kliknutí STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :vypnutá -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Posouvání levým tlačítkem: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Povolit posouvání mapy chycením pomocí levého tlačítka myši. Toto je velmi užitečné hlavně při použití s dotykovou obrazovkou. STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Zavírat okno kliknutím pravým tlačítkem myši: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Zavírat okno kliknutím pravým tlačítkem na něj. Znemožňuje využívat nápovědu zobrazující se při stisknutí pravého tlačítka myši! @@ -1896,7 +1895,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Změnit STR_CHEAT_SETUP_PROD :{LTBLUE}Povolit změnu produkce průmyslu: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nové barevné schéma STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Zobrazit všeobecná barevná schémata STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Zobrazit barevná schémata pro vlaky @@ -2372,6 +2370,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Všechny STR_LINKGRAPH_LEGEND_NONE :{BLACK}Žádný STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Vybrat firmy, které mají být zobrazeny +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}nepoužívaný @@ -2784,7 +2783,29 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Půda vlastněn STR_ABOUT_OPENTTD :{WHITE}O OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Původní copyright: {COPYRIGHT} 1995 Chris Sawyer, všechna práva vyhrazena STR_ABOUT_VERSION :{BLACK}OpenTTD verze {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Tým OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Tým OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Počet snímků za sekundu +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Počet snímků videa vykreslovaných za sekundu. +STR_FRAMERATE_SPEED_FACTOR :{WHITE}Aktuální činitel rychlosti hry: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Rychlost, kterou hra právě běží, v porovnání s očekávanou rychlostí při běžné rychlosti simulace. +STR_FRAMERATE_AVERAGE :{WHITE}Průměr +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE} sním{P "ek" "ky" "ků"}/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE} sním{P "ek" "ky" "ků"}/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GL_ECONOMY :{WHITE} Manipulace s nákladem: +STR_FRAMERATE_DRAWING :{WHITE}Vykreslování grafiky: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_ECONOMY :Manipulace s nákladem +STR_FRAMETIME_CAPTION_DRAWING :Vykreslování grafiky +STR_FRAMETIME_CAPTION_SOUND :Míchání zvuků +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Uložit hru @@ -3070,6 +3091,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Zadej n STR_TOWN_DIRECTORY_CAPTION :{WHITE}Města STR_TOWN_DIRECTORY_NONE :{ORANGE}- Nic - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (velkoměsto){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Jména měst - pohled na město zaměříš kliknutím na jeho jméno. Při stisknutém Ctrl otevřeš nový pohled STR_TOWN_POPULATION :{BLACK}Populace světa: {COMMA} @@ -3077,8 +3099,7 @@ STR_TOWN_POPULATION :{BLACK}Populace STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (velkoměsto) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Populace: {ORANGE}{COMMA}{BLACK} Domů: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Cestujících minulý měsíc: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Pošta za minulý měsíc: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} minulý měsíc: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Množství doručeného nákladu potřebného pro rozvoj města: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED}Je potřeba {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} vyžadováno v zimě @@ -3383,21 +3404,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vystřed STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produkce: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Průmysl oznámila blížící se uzavření! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vyžaduje: {YELLOW}{STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vyžaduje: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vyžaduje: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING}, {STRING.acc}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Vyžaduje: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} ček{P á ají á}{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Změnit produkci (násobky 8, až do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Změna velikosti produkce (procentuelně, do 800%) @@ -4320,7 +4331,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Příli STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Příliš mnoho staničních částí STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Příliš mnoho autobusových zastávek STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Příliš mnoho zastávek nákladních automobilů -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Příliš blízko k jinému nádraží nebo nákladové rampě STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Příliš blízko k jinému doku STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Příliš blízko k jinému letišti STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nelze přejmenovat stanici... @@ -4328,6 +4338,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... tato STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... silnice je otočena jiným směrem STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... průjezdné zastávky nemohou být v zatáčce STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... průjezdné zastávky nemohou být na křižovatce +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... silnice je jednosměrná nebo uzavřená. # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nelze odstranit část stanice... @@ -4586,6 +4597,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Původní sada STR_BASESOUNDS_WIN_DESCRIPTION :Původní sada zvuků Transport Tycoon Deluxe (verze pro Windows). STR_BASESOUNDS_NONE_DESCRIPTION :Prázdná sada zvuků. STR_BASEMUSIC_WIN_DESCRIPTION :Původní hudba Transport Tycoon Deluxe (verze pro Windows). +STR_BASEMUSIC_DOS_DESCRIPTION :Původní hudba Transport Tycoon Deluxe (verze pro DOS). +STR_BASEMUSIC_TTO_DESCRIPTION :Původní hudba Transport Tycoon (verze pro DOS). STR_BASEMUSIC_NONE_DESCRIPTION :Prázná hudební sada. ##id 0x2000 diff --git a/src/lang/danish.txt b/src/lang/danish.txt index e24a78355f..906e5ff1d5 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -10,7 +10,7 @@ ##grflangid 0x2d -# $Id: danish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -189,6 +189,8 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Brun STR_COLOUR_GREY :Grå STR_COLOUR_WHITE :Hvid +STR_COLOUR_RANDOM :Tilfældig +STR_COLOUR_DEFAULT :Standard # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA} miles/t @@ -475,8 +477,9 @@ STR_ABOUT_MENU_SCREENSHOT :Skærmbillede ( STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Fuldt zoomet skærmbillede STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Standard zoom skærmbillede STR_ABOUT_MENU_GIANT_SCREENSHOT :Kæmpe skærmbillede (Ctrl-G) +STR_ABOUT_MENU_SHOW_FRAMERATE :Vis spilhastighed STR_ABOUT_MENU_ABOUT_OPENTTD :Om 'OpenTTD' -STR_ABOUT_MENU_SPRITE_ALIGNER :Tilpas grafikelement +STR_ABOUT_MENU_SPRITE_ALIGNER :Spritejustering STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Slå afgrænsningsrammerne til/fra STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Slå farvning af beskidte blokke til/fra ############ range ends here @@ -650,6 +653,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Ingen musik tilgængelig STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Nummer STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titel @@ -659,7 +663,7 @@ STR_MUSIC_TOOLTIP_SKIP_TO_PREVIOUS_TRACK :{BLACK}Hop til STR_MUSIC_TOOLTIP_SKIP_TO_NEXT_TRACK_IN_SELECTION :{BLACK}Hop til næste nummer STR_MUSIC_TOOLTIP_STOP_PLAYING_MUSIC :{BLACK}Stop musikken STR_MUSIC_TOOLTIP_START_PLAYING_MUSIC :{BLACK}Start musikken -STR_MUSIC_TOOLTIP_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Flyt slideren for at justere musik- og effektlydstyrken +STR_MUSIC_TOOLTIP_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Flyt skyderen for at justere musik- og effektlydstyrken STR_MUSIC_TOOLTIP_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Vælg 'Alle numre' programmet STR_MUSIC_TOOLTIP_SELECT_OLD_STYLE_MUSIC :{BLACK}Vælg 'Old style musik' programmet STR_MUSIC_TOOLTIP_SELECT_NEW_STYLE_MUSIC :{BLACK}Vælg 'New style musik' programmet @@ -669,15 +673,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Select ' STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Tilfældig afspilning til/fra STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Vis vinduet med musiknummervalg -STR_ERROR_NO_SONGS :{WHITE}Det valgte musik sæt er uden sange. Der kan ikke afspilles musik. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musikprogram Valg +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Music Program - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Nummerliste STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Ryd +STR_PLAYLIST_CHANGE_SET :{BLACK}Skift sæt STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Ryd det valgte program (Gælder kun Custom1/Custom2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Ændre musik listen til et anden installeret sæt STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klik på et musiknummer for at tilføje det til programlisten (kun for Custom1/Custom2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klik på et musiknummer for at fjerne det fra programlisten (kun for Custom1/Custom2) @@ -813,6 +817,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Direktør) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} har sponsoreret stiftelsen af en ny by, {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}En by ved navn {TOWN} er blevet stiftet! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Ny {STRING} under opførelse tæt på {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Ny {STRING} bliver plantet tæt på {TOWN}! @@ -880,10 +885,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Lokalitetsvindue {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Hent global -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Hent lokalitet fra global visning til dette vindue -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Sæt global -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Sæt den globale lokalitet til det samme som dette vindue +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Hent hovedvisning +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Bevæg denne visning til samme sted som hovedvisningen +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Flyt hovedvisning +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Bevæg hovedvisningen til samme sted som dette vindue # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Spilvalg @@ -925,6 +930,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Sydafrikansk Ra STR_GAME_OPTIONS_CURRENCY_CUSTOM :Brugerdefineret... STR_GAME_OPTIONS_CURRENCY_GEL :Georgiske Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranske Rialer (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Ny Russisk Rubel (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Meksikansk Peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vejkøretøjer @@ -1254,6 +1261,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Denne in STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktur vedligeholdelse: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Når aktiveret, infrastruktur forårsager vedligeholdelsesomkostninger. Omkostningerne vokser over-proportional med nettets størrelse, hvilket påvirker større virksomheder mere end de små +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Foretrukken selskabsfarve: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Vælg den foretrukne farve egne selskaber skal starte med + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lufthavnenes levealder udløber aldrig: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktiveres denne indstilling gøres at hver lufthavnstype forbliver tilgængelig for evigt efter dens indførelse @@ -1337,8 +1347,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Land farve brug STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grøn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Mørkegrøn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Flyt i modsat retning ved scroll med musen: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Adfærd når kortet rulles med højre museknap. Hvis deaktiveret, bevæger musen kameraet. Når funktionen er aktiveret, flytter musen kortet +STR_CONFIG_SETTING_SCROLLMODE :Visningsport bevægelse: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Virkemåde for bevægelse af kortet +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Bevæg syns vinduet med højre mussetast, musse position låst +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Bevæg kortet med højre mussetast, musse position låst +STR_CONFIG_SETTING_SCROLLMODE_RMB :Bevæg kortet med højre musseknap +STR_CONFIG_SETTING_SCROLLMODE_LMB :Bevæg kortet med venstre musseknap STR_CONFIG_SETTING_SMOOTH_SCROLLING :Jævn scrolling af udsnit: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Kontroller hvordan de vigtigste visning ruller til en bestemt position, når du klikker på det lille kort eller når de udsteder en kommando til at rulle til en bestemt genstand på kortet. Hvis aktiveret, ruller udsigtspunktet jævnt, hvis deaktiveret springer den direkte til det valgte punkt STR_CONFIG_SETTING_MEASURE_TOOLTIP :Vis måleværktøjstip ved brug af div. bygge-værktøjer: {STRING} @@ -1370,8 +1384,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Kommandoklik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Kontrolklik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Fra -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Venstreklik-scrolling: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Aktiver rulle kortet ved at trække den med venstre museknap. Dette er især nyttigt, når du bruger en touch-screen til at rulle STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Luk vindue ved højre-klik: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Lukker vinduet ved at højreklikke inde i det. Deaktiverer værktøjstip ved at højreklikke! @@ -1538,11 +1550,11 @@ STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE :Signaltype der STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Standard signaltype STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Normal STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBS :Avanceret -STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBSOWAY :Ensrettet avanceret +STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBSOWAY :Ensrettet togvejssignal STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Bladr gennem signaltyper: {STRING} STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Vælg hvilke signaltyper et vælge imellem, når der Ctrl+klikkes på byg signal med signalværktøjet STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Kun normal -STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Kun avanceret +STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Kun togvejssignaler STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :Alle STR_CONFIG_SETTING_TOWN_LAYOUT :Vej-layout for nye byer: {STRING} @@ -1809,7 +1821,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Skift å STR_CHEAT_SETUP_PROD :{LTBLUE}Aktiver modifikation af produktion: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nyt farvetema +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Farvetema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Vis generelle farveskemaer STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Vis farveskemaer for tog @@ -1971,7 +1983,7 @@ STR_NETWORK_START_SERVER_ADVERTISED :Ja STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} klient{P "" er} STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Maksimalt antal tilladte klienter: STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Vælg det maksimale antal klienter. Det er ikke nødvendigt at fylde dem alle -STR_NETWORK_START_SERVER_COMPANIES_SELECT :{BLACK}{NUM} firma{P "" er} +STR_NETWORK_START_SERVER_COMPANIES_SELECT :{BLACK}{NUM} selskab{P "" er} STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES :{BLACK}Maks. selskaber: STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES_TOOLTIP :{BLACK}Begræns serveren til et bestemt antal selskaber STR_NETWORK_START_SERVER_SPECTATORS_SELECT :{BLACK}{NUM} tilskuer{P "" e} @@ -2165,7 +2177,7 @@ STR_NETWORK_ERROR_CLIENT_TIMEOUT_JOIN :det tog for lan ############ End of leave-in-this-order STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION_CAPTION :{WHITE}Mulig forbindelses tab -STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION :{WHITE}De sidste {NUM} sekunder{P "" s} er der ikke ankommet data fra serveren +STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION :{WHITE}De{P 0 t ""} sidste {NUM} sekund{P "" er} er der ikke ankommet data fra serveren # Network related errors STR_NETWORK_SERVER_MESSAGE :*** {1:STRING} @@ -2174,7 +2186,7 @@ STR_NETWORK_SERVER_MESSAGE_GAME_PAUSED :Spillet er paus STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_1 :Spillet er stadig pauset ({STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_2 :Spillet er stadig pauset. ({STRING}, {STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_3 :Spillet er stadig pauset. ({STRING}, {STRING}, {STRING}) -STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_4 :Spillet er stadig på pause ({STRING}, {STRING}, {STRING}, {STRING}) +STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_4 :Spillet er stadig pauset ({STRING}, {STRING}, {STRING}, {STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_UNPAUSED :Spillet er sat igang ({STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_REASON_NOT_ENOUGH_PLAYERS :antal spillere spillere STR_NETWORK_SERVER_MESSAGE_GAME_REASON_CONNECTING_CLIENTS :forbinder klienter @@ -2184,12 +2196,12 @@ STR_NETWORK_SERVER_MESSAGE_GAME_REASON_GAME_SCRIPT :spil script STR_NETWORK_MESSAGE_CLIENT_LEAVING :forlader STR_NETWORK_MESSAGE_CLIENT_JOINED :*** {STRING} har tilsluttet sig spillet STR_NETWORK_MESSAGE_CLIENT_JOINED_ID :*** {STRING} har tilsluttet sig spillet (Klient #{2:NUM}) -STR_NETWORK_MESSAGE_CLIENT_COMPANY_JOIN :*** {STRING} har tilsluttet sig firmaet #{2:NUM} +STR_NETWORK_MESSAGE_CLIENT_COMPANY_JOIN :*** {STRING} har tilsluttet sig selskabet #{2:NUM} STR_NETWORK_MESSAGE_CLIENT_COMPANY_SPECTATE :*** {STRING} har tilsluttet sig som tilskuer -STR_NETWORK_MESSAGE_CLIENT_COMPANY_NEW :*** {STRING} har startet et nyt firma (#{2:NUM}) +STR_NETWORK_MESSAGE_CLIENT_COMPANY_NEW :*** {STRING} har startet et nyt selskab (#{2:NUM}) STR_NETWORK_MESSAGE_CLIENT_LEFT :*** {STRING} har forladt spillet ({2:STRING}) STR_NETWORK_MESSAGE_NAME_CHANGE :*** {STRING} har ændret sit navn til {STRING} -STR_NETWORK_MESSAGE_GIVE_MONEY :*** {STRING} gav dit firma {2:CURRENCY_LONG} +STR_NETWORK_MESSAGE_GIVE_MONEY :*** {STRING} gav dit selskab {2:CURRENCY_LONG} STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** Du gav {1:STRING} {2:CURRENCY_LONG} STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}Serveren har lukket ned for dette spil STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}Serveren genstarter...{}Vent venligst... @@ -2285,6 +2297,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Laststr STR_LINKGRAPH_LEGEND_ALL :{BLACK}Alle STR_LINKGRAPH_LEGEND_NONE :{BLACK}Ingen STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Vælg firmaer at vise +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}ubrugt @@ -2298,7 +2311,7 @@ STR_STATION_BUILD_COVERAGE_ON :{BLACK}Til STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP :{BLACK}Marker ikke dækningsområdet af den foreslåede placering STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP :{BLACK}Marker dækningsområdet af den foreslåede placering STR_STATION_BUILD_ACCEPTS_CARGO :{BLACK}Accepterer: {GOLD}{CARGO_LIST} -STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Forsyninger: {GOLD}{CARGO_LIST} +STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Forsyner: {GOLD}{CARGO_LIST} # Join station window STR_JOIN_STATION_CAPTION :{WHITE}Sammenkæd station @@ -2360,18 +2373,18 @@ STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Standard STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Indgangssignal (semafor){}Grønt så længe der er et eller flere grønne udgangssignaler fra den efterfølgende sporsektion. Ellers vises rødt. STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Udgangssignal (semafor){}Fungerer som et normalt signal men er nødvendigt for at vise den korrekte farve ved indgangs- og kombisignaler. STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Kombisignal (semafor){}Kombisignalet fungerer både som indgangs- og udgangssignal. Dette muliggør opbygning af store forgreninger af signaler. -STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Avanceret signal (semafor){}Et avanceret signal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en rute til et sikkert sted at stoppe. Avancerede signaler kan passeres fra bagsiden. -STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Ensrettet avanceret signal (semafor){}Et avanceret signal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en rute til et sikkert sted at stoppe. Ensrettede avancerede signaler kan ikke passeres fra bagsiden. -STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Standardsignal (electrisk){}Dette er den mest almindelige type signal, og tillader kun et tog ad gangen på den samme signalblok +STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Togvejssignal (semafor){}Et togvejssignal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en togvej til et sikkert sted at stoppe. Togvejssignaler kan passeres fra bagsiden. +STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Ensrettet togvejssignal (semafor){}Et togvejssignal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en togvej til et sikkert sted at stoppe. Ensrettede togvejssignal kan ikke passeres fra bagsiden. +STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Standardsignal (elektrisk){}Dette er den mest almindelige type signal, og tillader kun et tog ad gangen på den samme signalblok STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Indgangssignal (elektrisk){}Grønt så længe der er et eller flere grønne udgangssignaler fra den efterfølgende sporsektion. Ellers vises rødt. STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Udgangssignal (elektrisk){}Fungerer som et normalt signal, men er nødvendigt for at vise den korrekte farve ved indgangs- og kombisignaler. STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Kombisignal (elektrisk){}Kombisignalet fungerer både som indgangs- og udgangssignal. Dette muliggør opbygning af store forgreninger af signaler. -STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Avanceret signal (elektrisk){}Et avanceret signal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en rute til et sikkert sted at stoppe. Avancerede signaler kan passeres fra bagsiden. -STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Ensrettet avanceret signal (elektrisk){}Et avanceret signal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en rute til et sikkert sted at stoppe. Ensrettede avancerede signaler kan ikke passeres fra bagsiden. +STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Togvejssignal (elektrisk){}Et togvejssignal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en togvej til et sikkert sted at stoppe. Togvejssignaler kan passeres fra bagsiden. +STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Ensrettet togvejssignal (elektrisk){}Et togvejssignal tillader, at mere en et tog ad gangen kan køre inden for en signalblok, hvis toget kan reservere en togvej til et sikkert sted at stoppe. Ensrettede togvejssignaler kan ikke passeres fra bagsiden. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signalombygning{}Når denne er valgt, vil klik på et eksisterende signal ombygge det til den valgte signaltype og -variant. Ctrl vil skifte den eksisterende signalvariant. Shift skifter mellem at bygge og vise prisoverslag. -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Træk-og-slip signaltæthed -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Formindsk træk-og-slip signaltæthed -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Forøg træk-og-slip signaltæthed +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Træk-og-slip signalafstand +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Formindsk træk-og-slip signalafstand +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Forøg træk-og-slip signalafstand # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Vælg togbro @@ -2452,7 +2465,7 @@ STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Byg en l # Airport construction window STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Valg af lufthavn STR_STATION_BUILD_AIRPORT_TOOLTIP :{BLACK}Vælg lufthavnens størrelse/type -STR_STATION_BUILD_AIRPORT_CLASS_LABEL :{BLACK}Airport klasse +STR_STATION_BUILD_AIRPORT_CLASS_LABEL :{BLACK}Lufthavnsklasse STR_STATION_BUILD_AIRPORT_LAYOUT_NAME :{BLACK}Layout {NUM} STR_AIRPORT_SMALL :Lille @@ -2586,7 +2599,7 @@ STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Koordina STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Produceret: {LTBLUE}{DATE_LONG} STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Stationsklasse: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Stationstype: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Lufthavns klasse: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Lufthavnsklasse: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Lufthavns navn: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Lufthavn brik navn: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} @@ -2605,28 +2618,28 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Marker STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Snedækket land STR_LAI_CLEAR_DESCRIPTION_DESERT :Ørken -STR_LAI_RAIL_DESCRIPTION_TRACK :Jernbane spor -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Jernbane spor med bloksignaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Jernbane spor med with pre-signaler +STR_LAI_RAIL_DESCRIPTION_TRACK :Jernbanespor +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Jernbanespor med bloksignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Jernbanespor med with pre-signaler STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Jernbane spor med udgangs-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Jernbane spor med kombinerede signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Jernbane spor med rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Jernbane spor med en-vejs-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Jernbane spor med blok- og pre-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Jernbane spor med blok- og udgangs-signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Jernbanespor med kombinerede signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Jernbanespor med togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Jernbanespor med en-vejs togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Jernbanespor med blok- og pre-signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Jernbanespor med blok- og udgangs-signaler STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Jernbane spor med blok- og kombinerede signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Jernbane spor med blok- og rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Jernbane spor med blok og en-vejs rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Jernbane spor med pre- og udgangs-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Jernbane spor med pre- og kombinerede signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Jernbane spor med pre- og rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Jernbane spor med pre- og en-vejs rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Jernbane spor med udgangs- og kombinerede signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Jernbane spor med udgangs- og rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Jernbane spor med udgangs- og en-vejs rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Jernbane spor med kombinerede og rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Jernbane spor med kombinationede- og en-vejs rute-signaler -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Jernbane spor med rute- og en-vejs rute-signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Jernbanespor med blok- og togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Jernbanespor med blok- og en-vejs togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Jernbanespor med pre- og udgangs-signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Jernbanespor med pre- og kombinerede signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Jernbanespor med for- og togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Jernbanespor med pre- og en-vejs togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Jernbanespor med udgangs- og kombinerede signaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Jernbanespor med udgangs- og togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Jernbanespor med udgangs- og en-vejs togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Jernbanespor med kombinerede- og togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Jernbanespor med kombinerede- og en-vejs togvejssignaler +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Jernbanespor med togvejs- og en-vejs togvejssignaler STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Jernbane togdepot STR_LAI_ROAD_DESCRIPTION_ROAD :Vej @@ -2691,7 +2704,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Land ejet af se STR_ABOUT_OPENTTD :{WHITE}Om OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, Alle rettigheder reserveret STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD teamet +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD teamet + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Spilhastighed +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Simulationshastighed: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Antal spil-trin simuleret i sekundet. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Grafik hastighed: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Antal billeder tegnet i sekundet. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Aktuel spilhastighedsfaktor: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Hvor hurtigt spillet aktuelt kører, i forhold til det forventede ved normal simulationshastighed. +STR_FRAMERATE_CURRENT :{WHITE}Aktuel +STR_FRAMERATE_AVERAGE :{WHITE}Gennemsnit +STR_FRAMERATE_DATA_POINTS :{BLACK}Data baseret på {COMMA} målinger +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} billeder/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} billeder/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} billeder/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Spillogik total: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Fragthåndtering: +STR_FRAMERATE_GL_TRAINS :{BLACK} Togtrin: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Køretøjstrin: +STR_FRAMERATE_GL_SHIPS :{BLACK} Skibstrin: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Flytrin: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Verdenstrin: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Forbindelsesgraf forsinkelser: +STR_FRAMERATE_DRAWING :{BLACK}Grafik-tegning: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Landskabsvisninger: +STR_FRAMERATE_VIDEO :{BLACK}Grafik-output: +STR_FRAMERATE_SOUND :{BLACK}Lydmiksning: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Spillogik +STR_FRAMETIME_CAPTION_GL_ECONOMY :Fragthåndtering +STR_FRAMETIME_CAPTION_GL_TRAINS :Togtrin +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Køretøjstrin +STR_FRAMETIME_CAPTION_GL_SHIPS :Skibstrin +STR_FRAMETIME_CAPTION_GL_AIRCRAFT : Flytrin +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Verdenstrin +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Forbindelsesgraf forsinkelser +STR_FRAMETIME_CAPTION_DRAWING :Grafik-tegning +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Tegning af landskabsvisninger +STR_FRAMETIME_CAPTION_VIDEO :Grafik-output +STR_FRAMETIME_CAPTION_SOUND :Lydmiksning +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Gem spil @@ -2715,6 +2778,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Spil Det STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Ingen information til rådighed STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter-udtryk: STR_SAVELOAD_OSKTITLE :{BLACK}Skriv et navn til det gemte spil @@ -2832,7 +2896,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Version: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Min. kompatible version: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palette: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Standard (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Standard (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Traditionel (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Traditionel (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parameter: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Ingen STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Ingen information tilgængelig STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Tilsvarende fil blev ikke fundet @@ -2870,23 +2939,23 @@ STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE :Jernbanetype STR_NEWGRF_INSPECT_QUERY_CAPTION :{WHITE}NewGRF variabel 60+x parameter (hexadecimal) # Sprite aligner window -STR_SPRITE_ALIGNER_CAPTION :{WHITE}Tilpasser grafikelement {COMMA} ({STRING}) -STR_SPRITE_ALIGNER_NEXT_BUTTON :{BLACK}Næste grafikelement -STR_SPRITE_ALIGNER_NEXT_TOOLTIP :{BLACK}Fortsæt til næste normale grafikelement, spring pseudo/genfarvede/skrift-grafikelementer over og omsvøb til sidst -STR_SPRITE_ALIGNER_GOTO_BUTTON :{BLACK}Gå til grafikelement -STR_SPRITE_ALIGNER_GOTO_TOOLTIP :{BLACK}Gå til det givne grafikelement. Hvis den ikke er et normalt grafikelement, fortsæt til næste normale element -STR_SPRITE_ALIGNER_PREVIOUS_BUTTON :{BLACK}Tidligere grafikelement -STR_SPRITE_ALIGNER_PREVIOUS_TOOLTIP :{BLACK}Fortsæt til den forrige normal sprite, springe over nogen pseudo / recolour / FONT sprites og indpakning rundt fra den første sprite til det sidste +STR_SPRITE_ALIGNER_CAPTION :{WHITE}Justerer sprite {COMMA} ({STRING}) +STR_SPRITE_ALIGNER_NEXT_BUTTON :{BLACK}Næste sprite +STR_SPRITE_ALIGNER_NEXT_TOOLTIP :{BLACK}Fortsæt til næste normale sprite, spring pseudo/omfarvning/font-sprites over og med omløb fra enden til starten +STR_SPRITE_ALIGNER_GOTO_BUTTON :{BLACK}Gå til sprite +STR_SPRITE_ALIGNER_GOTO_TOOLTIP :{BLACK}Gå til den givne sprite. Hvis den ikke er en normalt sprite, fortsæt til næste normale sprite +STR_SPRITE_ALIGNER_PREVIOUS_BUTTON :{BLACK}Forrige sprite +STR_SPRITE_ALIGNER_PREVIOUS_TOOLTIP :{BLACK}Fortsæt til den forrige normal sprite, spring pseudo/omfarvning/font-sprites over og omløb fra starten til slutningen STR_SPRITE_ALIGNER_SPRITE_TOOLTIP :{BLACK}Repræsentation af den markerede sprite. Justeringen ignoreres når denne sprite tegnes. STR_SPRITE_ALIGNER_MOVE_TOOLTIP :{BLACK}Flyt spriten rundt for at ændre X- og Y-forskydningen. Ctrl+Klik for at flytte spriten otte enheder af gangen STR_SPRITE_ALIGNER_RESET_BUTTON :{BLACK}Nulstil relativ STR_SPRITE_ALIGNER_RESET_TOOLTIP :{BLACK}Nulstil den nuværende relative forskydning STR_SPRITE_ALIGNER_OFFSETS_ABS :{BLACK}X-forskydning: {NUM}, Y-forskydning: {NUM} (Absolut) STR_SPRITE_ALIGNER_OFFSETS_REL :{BLACK}X-forskydning: {NUM}, Y-forskydning: {NUM} (Relativt) -STR_SPRITE_ALIGNER_PICKER_BUTTON :{BLACK}Vælg grafikelement +STR_SPRITE_ALIGNER_PICKER_BUTTON :{BLACK}Vælg sprite STR_SPRITE_ALIGNER_PICKER_TOOLTIP :{BLACK}Vælg en sprite fra et vilkårligt sted på skærmen -STR_SPRITE_ALIGNER_GOTO_CAPTION :{WHITE}Gå til grafikelement +STR_SPRITE_ALIGNER_GOTO_CAPTION :{WHITE}Gå til sprite # NewGRF (self) generated warnings/errors STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{STRING} @@ -2904,15 +2973,17 @@ STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{1:STRING} kræ STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF filen, som den er lavet til at oversætte, STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :For mange NewGRF sæt er indlæst. STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Indlæsning af {1:STRING} som statisk NewGRF med {STRING} kan forårsage de-sykronisering. -STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Uventet grafikelement (grafikelement {3:NUM}) -STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Ukendt handling 0 egenskab {4:HEX} (grafikelement {3:NUM}) -STR_NEWGRF_ERROR_INVALID_ID :Forsøg på at bruge ugyldigt ID (grafikelement {3:NUM}) +STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Uventet sprite (sprite {3:NUM}) +STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Ukendt handling 0 egenskab {4:HEX} (sprite {3:NUM}) +STR_NEWGRF_ERROR_INVALID_ID :Forsøg på at bruge ugyldigt ID (sprite {3:NUM}) STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} indeholder en ødelagt sprite. Alle ødelagte sprites vil blive vist som et rødt spørgsmålstegn (?). -STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Indeholder adskillige handling 8 indgange (grafikelement {3:NUM}) -STR_NEWGRF_ERROR_READ_BOUNDS :Læs forbi slutningen af pseudo-grafikelement (grafikelement {3:NUM}) -STR_NEWGRF_ERROR_GRM_FAILED :De ønskede GRF ressourcer er ikke tilgængelige (grafikelement {3:NUM}) +STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Indeholder adskillige handling 8 indgange (sprite {3:NUM}) +STR_NEWGRF_ERROR_READ_BOUNDS :Læste ud over slutningen af pseudo-sprite (sprite {3:NUM}) +STR_NEWGRF_ERROR_GRM_FAILED :De ønskede GRF ressourcer er ikke tilgængelige (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} blev deaktiveret af {2:STRING} -STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Ugyldigt / ukendt grafikelement layoutformat (grafikelement {3:NUM}) +STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Ugyldigt/ukendt sprite layoutformat (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :For mange elementer i værdiliste for egenskab (sprite {3:NUM}, egenskab {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Ugyldig produktion-callback for industri (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Advarsel! @@ -2938,7 +3009,7 @@ STR_NEWGRF_BROKEN :{WHITE}Denne Ne STR_NEWGRF_BROKEN_POWERED_WAGON :{WHITE}Den ændrer status for '{1:ENGINE}' når den ikke er i depot STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Den ændrer toglængden for '{1:ENGINE}' mens den ikke er i depot STR_NEWGRF_BROKEN_CAPACITY :{WHITE}Det ændrede køretøj kapacitet til '{1:ENGINE}' når det ikke er inde i et depot eller genmontering -STR_BROKEN_VEHICLE_LENGTH :{WHITE}Toget '{VEHICLE}' fra firmaet '{COMPANY}' har ugyldig længde. Det skyldes sandsynligvis at problem med en NewGRF. Spillet går muligvis ned. +STR_BROKEN_VEHICLE_LENGTH :{WHITE}Toget '{VEHICLE}' fra selskabet '{COMPANY}' har ugyldig længde. Det skyldes sandsynligvis at problem med en NewGRF. Risiko for at spillet mister synkronisering eller går ned. STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' indeholder forkert information STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Fragt-/ombygningsinformation for '{1:ENGINE}' afviger fra indkøbslisten efter konstruktion. Dette kan medføre, at autofornyelse ikke fungerer korrekt. @@ -2977,15 +3048,15 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Indtast STR_TOWN_DIRECTORY_CAPTION :{WHITE}Byer STR_TOWN_DIRECTORY_NONE :{ORANGE}- Ingen - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (storby){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Bynavne - klik på et navn for at centrere skærmen over byen. Ctrl+Klik åbner et nyt vindue ved byens lokalitet. STR_TOWN_POPULATION :{BLACK}Verdens befolkning: {COMMA} # Town view window STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} -STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (by) +STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (storby) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Indbyggere: {ORANGE}{COMMA}{BLACK} Huse: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passagerer sidste måned: {ORANGE}{COMMA}{BLACK} maks.: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post sidste måned: {ORANGE}{COMMA}{BLACK} maks.: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} sidste måned: {ORANGE}{COMMA}{BLACK} mulig: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Nødvendig godsmængde for at byen kan vokse: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} krævet STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} kræves om vinteren @@ -3015,7 +3086,7 @@ STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPAN STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Handlinger til rådighed: STR_LOCAL_AUTHORITY_ACTIONS_TOOLTIP :{BLACK}Liste af ting der kan gøres i denne by - klik på en ting for yderligere detaljer STR_LOCAL_AUTHORITY_DO_IT_BUTTON :{BLACK}Gør det -STR_LOCAL_AUTHORITY_DO_IT_TOOLTIP :{BLACK}Udfør den markerede ting i listen herover +STR_LOCAL_AUTHORITY_DO_IT_TOOLTIP :{BLACK}Udfør den valgte handling i listen herover STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN :Lille reklamekampagne STR_LOCAL_AUTHORITY_ACTION_MEDIUM_ADVERTISING_CAMPAIGN :Mellem reklamekampagne @@ -3290,21 +3361,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktions niveauet: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrien har rapporteret øjeblikkelig nedlukning! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Producerer: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Kræver: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} venter{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Producerer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Producerer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Skift produktion (multipla af 8, op til 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ændre produktions niveauet (Op til 800%) @@ -3357,6 +3421,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupper STR_GROUP_CREATE_TOOLTIP :{BLACK}Klik for at oprette en gruppe STR_GROUP_DELETE_TOOLTIP :{BLACK}Slet den valgte gruppe STR_GROUP_RENAME_TOOLTIP :{BLACK}Omdøb den valgte gruppe +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Skift farvetema for den valgte gruppe STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Klik for at beskytte denne gruppe mod global auto-udskiftning STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Slet gruppe @@ -3400,6 +3465,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Kapacite STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Motoriserede Vogne: {GOLD}+{POWER}{BLACK} Vægt: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Kan ombygges til: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Alle lasttyper +STR_PURCHASE_INFO_NONE :Ingen STR_PURCHASE_INFO_ALL_BUT :Alle undtagen {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Maks. trækkraft: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Rækkevidde: {GOLD}{COMMA} felter @@ -3799,6 +3865,7 @@ STR_ORDER_CONDITIONAL_AGE :Alder (år) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Kræver service STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Altid STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Resterende levetid (år) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maksimal pålidelighed STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Hvordan data sammenlignes med den givne værdi STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :er lig med @@ -4224,7 +4291,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}For mang STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Banegården er i for mange dele STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}For mange busterminaler STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}For mange fragtcentraler -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}For tæt på en anden station/fragtcentral STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}For tæt på en anden havn STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}For tæt på en anden lufthavn STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kan ikke omdøbe stationen... @@ -4232,6 +4298,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... denn STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... vejen peger i den forkerte retning STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive-through stops kan ikke have hjørner STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive-through stops kan ikke have kryds +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}vejen er ensrettet eller blokeret # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan ikke fjerne en del af en station... @@ -4483,6 +4550,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Originallyd fra STR_BASESOUNDS_WIN_DESCRIPTION :Originallyd fra Transport Tycoon Deluxe Windows-version. STR_BASESOUNDS_NONE_DESCRIPTION :En lydpakke uden lyde. STR_BASEMUSIC_WIN_DESCRIPTION :Originalmusik fra Transport Tycoon Deluxe Windows-version. +STR_BASEMUSIC_DOS_DESCRIPTION :Originalmusik fra Transport Tycoon Deluxe DOS-version. +STR_BASEMUSIC_TTO_DESCRIPTION :Originalmusik fra Transport Tycoon (Original/World Editor) DOS-version. STR_BASEMUSIC_NONE_DESCRIPTION :En musikpakke uden musik. ##id 0x2000 diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index a9f366522e..f6382d8700 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -10,7 +10,7 @@ ##grflangid 0x1f -# $Id: dutch.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -98,7 +98,7 @@ STR_QUANTITY_NOTHING : STR_QUANTITY_PASSENGERS :{COMMA}{NBSP}passagier{P "" s} STR_QUANTITY_COAL :{WEIGHT_LONG} kolen STR_QUANTITY_MAIL :{COMMA}{NBSP}zak{P "" ken} post -STR_QUANTITY_OIL :{VOLUME_LONG} Vaten Olie +STR_QUANTITY_OIL :{VOLUME_LONG} Vaten olie STR_QUANTITY_LIVESTOCK :{COMMA}{NBSP}stuk{P "" s} vee STR_QUANTITY_GOODS :{COMMA}{NBSP}krat{P "" ten} goederen STR_QUANTITY_GRAIN :{WEIGHT_LONG} graan @@ -107,7 +107,7 @@ STR_QUANTITY_IRON_ORE :{WEIGHT_LONG} i STR_QUANTITY_STEEL :{WEIGHT_LONG} staal STR_QUANTITY_VALUABLES :{COMMA}{NBSP}zak{P "" ken} kostbaarheden STR_QUANTITY_COPPER_ORE :{WEIGHT_LONG} kopererts -STR_QUANTITY_MAIZE :{WEIGHT_LONG} mais +STR_QUANTITY_MAIZE :{WEIGHT_LONG} maïs STR_QUANTITY_FRUIT :{WEIGHT_LONG} fruit STR_QUANTITY_DIAMONDS :{COMMA}{NBSP}zak{P "" ken} diamanten STR_QUANTITY_FOOD :{WEIGHT_LONG} voedsel @@ -149,14 +149,14 @@ STR_ABBREV_FOOD :{TINY_FONT}VD STR_ABBREV_PAPER :{TINY_FONT}PR STR_ABBREV_GOLD :{TINY_FONT}GO STR_ABBREV_WATER :{TINY_FONT}WA -STR_ABBREV_WHEAT :{TINY_FONT}TW +STR_ABBREV_WHEAT :{TINY_FONT}GN STR_ABBREV_RUBBER :{TINY_FONT}RB STR_ABBREV_SUGAR :{TINY_FONT}SU STR_ABBREV_TOYS :{TINY_FONT}SP STR_ABBREV_SWEETS :{TINY_FONT}SN STR_ABBREV_COLA :{TINY_FONT}CL STR_ABBREV_CANDYFLOSS :{TINY_FONT}SS -STR_ABBREV_BUBBLES :{TINY_FONT}BE +STR_ABBREV_BUBBLES :{TINY_FONT}BU STR_ABBREV_TOFFEE :{TINY_FONT}TF STR_ABBREV_BATTERIES :{TINY_FONT}BA STR_ABBREV_PLASTIC :{TINY_FONT}PL @@ -189,6 +189,8 @@ STR_COLOUR_ORANGE :Oranje STR_COLOUR_BROWN :Bruin STR_COLOUR_GREY :Grijs STR_COLOUR_WHITE :Wit +STR_COLOUR_RANDOM :Willekeurig +STR_COLOUR_DEFAULT :Standaard # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -224,7 +226,7 @@ STR_UNITS_HEIGHT_METRIC :{COMMA}{NBSP}m STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}m # Common window strings -STR_LIST_FILTER_TITLE :{BLACK}Filter tekst: +STR_LIST_FILTER_TITLE :{BLACK}Filtertekst: STR_LIST_FILTER_OSKTITLE :{BLACK}Voer filtertekst in STR_LIST_FILTER_TOOLTIP :{BLACK}Geef een woord waarop gefilterd kan worden in de lijst @@ -232,14 +234,14 @@ STR_TOOLTIP_GROUP_ORDER :{BLACK}Kies gro STR_TOOLTIP_SORT_ORDER :{BLACK}Selecteer sorteerrichting (aflopend/oplopend) STR_TOOLTIP_SORT_CRITERIA :{BLACK}Selecteer sorteercriteria STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Kies filtercriteria -STR_BUTTON_SORT_BY :{BLACK}Sorteer op +STR_BUTTON_SORT_BY :{BLACK}Sorteren op STR_BUTTON_LOCATION :{BLACK}Locatie -STR_BUTTON_RENAME :{BLACK}Hernoem +STR_BUTTON_RENAME :{BLACK}Hernoemen STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Sluit venster STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Vensternaam - sleep om venster te verplaatsen -STR_TOOLTIP_SHADE :{BLACK}Klap venster in - toon alleen de titelbalk -STR_TOOLTIP_DEBUG :{BLACK}Toon NewGRF debug informatie +STR_TOOLTIP_SHADE :{BLACK}Venster inklappen - alleen titelbalk weergeven +STR_TOOLTIP_DEBUG :{BLACK}Probleemgegevens voor NewGRF weergeven STR_TOOLTIP_DEFSIZE :{BLACK}wijzig venster naar standaardgrootte. Ctrl+Klik om de huidige grootte als standaard op te slaan STR_TOOLTIP_STICKY :{BLACK}Markeer dit venster als niet-sluitbaar door de 'Sluit alle vensters'-knop. Ctrl+Klik om status als default op te slaan STR_TOOLTIP_RESIZE :{BLACK}Klik en sleep om de grootte van dit venster te veranderen @@ -249,10 +251,10 @@ STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Schuifba STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Sloop gebouwen etc. op een stuk land. Ctrl selecteert het gebied diagonaal. Shift schakelt tussen bouwen/inschatting van de kosten # Show engines button -STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN :{BLACK}Toon verborgen -STR_SHOW_HIDDEN_ENGINES_VEHICLE_ROAD_VEHICLE :{BLACK}Toon verborgen -STR_SHOW_HIDDEN_ENGINES_VEHICLE_SHIP :{BLACK}Toon verborgen -STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT :{BLACK}Toon verborgen +STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN :{BLACK}Verborgen weergeven +STR_SHOW_HIDDEN_ENGINES_VEHICLE_ROAD_VEHICLE :{BLACK}Verborgen weergeven +STR_SHOW_HIDDEN_ENGINES_VEHICLE_SHIP :{BLACK}Verborgen weergeven +STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT :{BLACK}Verborgen weergeven STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP :{BLACK}Door het inschakelen van deze knop, worden de verborgen treinen ook weergegeven STR_SHOW_HIDDEN_ENGINES_VEHICLE_ROAD_VEHICLE_TOOLTIP :{BLACK}Door het inschakelen van deze knop, worden de verborgen wegvoertuigen ook weergegeven @@ -262,7 +264,7 @@ STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT_TOOLTIP :{BLACK}Door het # Query window STR_BUTTON_DEFAULT :{BLACK}Standaard STR_BUTTON_CANCEL :{BLACK}Annuleren -STR_BUTTON_OK :{BLACK}Oké +STR_BUTTON_OK :{BLACK}OK # On screen keyboard window STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ . @@ -317,21 +319,21 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pauzeer STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Verhoog de spelsnelheid STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Opties STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Spel opslaan, spel stoppen, afsluiten -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Toon kaart, extra kijkvenster of bordenlijst -STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Toon stedenlijst -STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Toon subsidies -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Toon lijst met stations van het bedrijf -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Toon financiële informatie over het bedrijf -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Toon algemene informatie over het bedrijf -STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Toon verhaallijn -STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Geven doellijst -STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Toon grafieken -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Toon bedrijfscompetitietabel -STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Betaal de bouw van nieuwe industrie of toon lijst van alle industrieën -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Toon lijst met treinen van het bedrijf. Ctrl+klik schakelt tussen lijst van groepen/voertuigen -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Toon lijst met wegvoertuigen van het bedrijf. Ctrl+klik schakelt tussen lijst van groepen/voertuigen -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Toon lijst met schepen van het bedrijf. Ctrl+klik schakelt tussen lijst van groepen/voertuigen -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Toon lijst met vliegtuigen van het bedrijf. Ctrl+klik schakelt tussen lijst van groepen/voertuigen +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Kaart, extra kijkvenster of lijst met bordjes weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Stedenlijst weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Subsidies weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Lijst met stations van het bedrijf weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Financiële informatie over het bedrijf weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Algemene informatie over het bedrijf weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Verhaal weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Geef doellijst weer +STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Grafieken weergeven +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Bedrijfsscoretabel weergeven +STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Financier de bouw van nieuwe industrie of geef lijst van alle industrieën weer +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Lijst met treinen van het bedrijf weergeven. Ctrl+klik schakelt tussen lijst van groepen/voertuigen. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Lijst met wegvoertuigen van het bedrijf weergeven. Ctrl+klik schakelt tussen lijst van groepen/voertuigen. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Lijst met schepen van het bedrijf weergeven. Ctrl+klik schakelt tussen lijst van groepen/voertuigen. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Lijst met vliegtuigen van het bedrijf weergeven. Ctrl+klik schakelt tussen lijst van groepen/voertuigen. STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Inzoomen STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Uitzoomen STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Bouw spoorwegen @@ -339,9 +341,9 @@ STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Bouw weg STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Bouw havens STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Bouw vliegvelden STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open de landschapsbalk om land te verhogen/verlagen, bomen te planten, etc. -STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Toon geluid/muziekscherm -STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Toon laatste (nieuws)bericht, toon berichtinstellingen -STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Landinformatie, console, script-debug, screenshots, over OpenTTD +STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Geluid-/muziekvenster weergeven +STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Laatste (nieuws-)bericht weergeven, berichtinstellingen weergeven +STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Landinformatie, console, scriptdebug, screenshots, over OpenTTD STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Verwissel knoppenbalk # Extra tooltips for the scenario editor toolbar @@ -351,10 +353,10 @@ STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Scenari STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Zet startdatum 1 jaar terug STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Zet startdatum 1 jaar vooruit STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Klik om het startjaar op te geven -STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Toon kaart, stedenlijst +STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Kaart, stedenlijst weergeven STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Landschapsontwikkeling STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Stadsontwikkeling -STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industrie-ontwikkeling +STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industrieontwikkeling STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Wegenbouw STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant bomen. Shift schakelt tussen bouwen/inschatting van de kosten STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Plaats bord @@ -365,7 +367,7 @@ STR_SCENEDIT_FILE_MENU_SAVE_SCENARIO :Scenario opslaa STR_SCENEDIT_FILE_MENU_LOAD_SCENARIO :Scenario openen STR_SCENEDIT_FILE_MENU_SAVE_HEIGHTMAP :Hoogtekaart opslaan STR_SCENEDIT_FILE_MENU_LOAD_HEIGHTMAP :Laad hoogtekaart -STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Sluit scenario editor +STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Sluit scenario-editor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Afsluiten ############ range for SE file menu starts @@ -373,14 +375,14 @@ STR_SCENEDIT_FILE_MENU_QUIT :Afsluiten ############ range for settings menu starts STR_SETTINGS_MENU_GAME_OPTIONS :Spelopties STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE :Instellingen -STR_SETTINGS_MENU_SCRIPT_SETTINGS :AI/Game script instellingen -STR_SETTINGS_MENU_NEWGRF_SETTINGS :NewGRF instellingen +STR_SETTINGS_MENU_SCRIPT_SETTINGS :AI/Spelscriptinstellingen +STR_SETTINGS_MENU_NEWGRF_SETTINGS :NewGRF-instellingen STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS :Doorzichtigheidsopties -STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Toon plaatsnamen -STR_SETTINGS_MENU_STATION_NAMES_DISPLAYED :Toon stationsnamen -STR_SETTINGS_MENU_WAYPOINTS_DISPLAYED :Toon controlepostnamen -STR_SETTINGS_MENU_SIGNS_DISPLAYED :Toon borden -STR_SETTINGS_MENU_SHOW_COMPETITOR_SIGNS :Toon tegenstander's borden en namen +STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Plaatsnamen weergeven +STR_SETTINGS_MENU_STATION_NAMES_DISPLAYED :Stationsnamen weergeven +STR_SETTINGS_MENU_WAYPOINTS_DISPLAYED :Namen van routepunten weergeven +STR_SETTINGS_MENU_SIGNS_DISPLAYED :Bordjes weergeven +STR_SETTINGS_MENU_SHOW_COMPETITOR_SIGNS :Bordjes en namen van tegenstanders weergeven STR_SETTINGS_MENU_FULL_ANIMATION :Alle animaties STR_SETTINGS_MENU_FULL_DETAIL :Alle details STR_SETTINGS_MENU_TRANSPARENT_BUILDINGS :Transparante gebouwen @@ -398,7 +400,7 @@ STR_FILE_MENU_EXIT :Afsluiten # map menu STR_MAP_MENU_MAP_OF_WORLD :Kaart STR_MAP_MENU_EXTRA_VIEW_PORT :Extra kijkvenster -STR_MAP_MENU_LINGRAPH_LEGEND :Vracht Stroom Legenda +STR_MAP_MENU_LINGRAPH_LEGEND :Vrachtstroomlegende STR_MAP_MENU_SIGN_LIST :Bordenlijst ############ range for town menu starts @@ -422,7 +424,7 @@ STR_GRAPH_MENU_CARGO_PAYMENT_RATES :Vrachtprijzen ############ range for company league menu starts STR_GRAPH_MENU_COMPANY_LEAGUE_TABLE :Bedrijfscompetitietabel STR_GRAPH_MENU_DETAILED_PERFORMANCE_RATING :Gedetailleerde prestatiescore -STR_GRAPH_MENU_HIGHSCORE :Score tabel +STR_GRAPH_MENU_HIGHSCORE :Scoretabel ############ range ends here ############ range for industry menu starts @@ -434,13 +436,13 @@ STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY :Betaal nieuwe i ############ range for railway construction menu starts STR_RAIL_MENU_RAILROAD_CONSTRUCTION :Bouw spoorwegen STR_RAIL_MENU_ELRAIL_CONSTRUCTION :Bouw geëlektrificeerde spoorwegen -STR_RAIL_MENU_MONORAIL_CONSTRUCTION :Bouw monorail-spoorwegen -STR_RAIL_MENU_MAGLEV_CONSTRUCTION :Bouw magneetzweeftrein-spoorwegen +STR_RAIL_MENU_MONORAIL_CONSTRUCTION :Bouw monorailspoorwegen +STR_RAIL_MENU_MAGLEV_CONSTRUCTION :Bouw magneetzweeftreinspoorwegen ############ range ends here ############ range for road construction menu starts STR_ROAD_MENU_ROAD_CONSTRUCTION :Bouw wegen -STR_ROAD_MENU_TRAM_CONSTRUCTION :Bouw tramwegen +STR_ROAD_MENU_TRAM_CONSTRUCTION :Bouw tramsporen ############ range ends here ############ range for waterways construction menu starts @@ -448,7 +450,7 @@ STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Bouw waterwegen ############ range ends here ############ range for airport construction menu starts -STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Bouw vliegvelden +STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Vliegvelden bouwen ############ range ends here ############ range for landscaping menu starts @@ -462,23 +464,24 @@ STR_TOOLBAR_SOUND_MUSIC :Geluid/muziek ############ range ends here ############ range for message menu starts -STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :Laatste (nieuws)bericht +STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :Laatst (nieuws)bericht STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Berichtengeschiedenis ############ range ends here ############ range for about menu starts STR_ABOUT_MENU_LAND_BLOCK_INFO :Landinformatie STR_ABOUT_MENU_SEPARATOR : -STR_ABOUT_MENU_TOGGLE_CONSOLE :Schakel console aan/uit -STR_ABOUT_MENU_AI_DEBUG :AI/Game Script debug -STR_ABOUT_MENU_SCREENSHOT :Screenshot -STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Ingezoomd screenshot -STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Screenshot met standaard zoom -STR_ABOUT_MENU_GIANT_SCREENSHOT :Screenshot van hele kaart +STR_ABOUT_MENU_TOGGLE_CONSOLE :Console in-uitschakelen +STR_ABOUT_MENU_AI_DEBUG :Probleemoplossing AI/spelscript +STR_ABOUT_MENU_SCREENSHOT :Schermafbeelding +STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Ingezoomde schermafbeelding +STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Schermafbeelding met standaardzoom +STR_ABOUT_MENU_GIANT_SCREENSHOT :Schermafbeelding van de hele kaart +STR_ABOUT_MENU_SHOW_FRAMERATE :Framesnelheid weergeven STR_ABOUT_MENU_ABOUT_OPENTTD :Over 'OpenTTD' -STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite uitlijner -STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Schakel selectiekaders -STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Schakel kleuren van braakliggende grond aan/uit +STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite-uitlijner +STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Selectiekaders in-uitschakelen +STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Kleuren van vuile blokken in-uitschakelen ############ range ends here ############ range for ordinal numbers used for the place in the highscore window @@ -563,7 +566,7 @@ STR_MONTH_DEC :December # Graph window STR_GRAPH_KEY_BUTTON :{BLACK}Legenda -STR_GRAPH_KEY_TOOLTIP :{BLACK}Toon legenda bij deze grafiek +STR_GRAPH_KEY_TOOLTIP :{BLACK}Legenda bij deze grafiek weergeven STR_GRAPH_X_LABEL_MONTH :{TINY_FONT}{STRING}{} {STRING} STR_GRAPH_X_LABEL_MONTH_YEAR :{TINY_FONT}{STRING}{} {STRING}{}{NUM} STR_GRAPH_Y_LABEL :{TINY_FONT}{STRING} @@ -580,12 +583,12 @@ STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLA STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betaling voor het leveren van 10 eenheden (of 10,000 liter) aan vracht over een afstand van 20 vakjes STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Alles aan STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Alles uit -STR_GRAPH_CARGO_TOOLTIP_ENABLE_ALL :{BLACK}Toon alle vrachtsoorten op de grafiek van vrachtprijzen -STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Toon geen vrachtsoorten op de grafiek van vrachtprijzen -STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Schakel grafiek voor vrachttype aan/uit +STR_GRAPH_CARGO_TOOLTIP_ENABLE_ALL :{BLACK}Alle vrachtsoorten weergeven op de grafiek van vrachtprijzen +STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Geen vrachtsoorten weergeven op de grafiek van vrachtprijzen +STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Grafiek voor vrachttype aan-uit STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING} -STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Toon gedetailleerde prestatiescores +STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Gedetailleerde prestatiescores weergeven # Graph key window STR_GRAPH_KEY_CAPTION :{WHITE}Legenda voor bedrijfsgrafieken @@ -610,7 +613,7 @@ STR_PERFORMANCE_DETAIL_KEY :{BLACK}Detail STR_PERFORMANCE_DETAIL_AMOUNT_CURRENCY :{BLACK}({CURRENCY_SHORT}/{CURRENCY_SHORT}) STR_PERFORMANCE_DETAIL_AMOUNT_INT :{BLACK}({COMMA}/{COMMA}) STR_PERFORMANCE_DETAIL_PERCENT :{WHITE}{NUM}% -STR_PERFORMANCE_DETAIL_SELECT_COMPANY_TOOLTIP :{BLACK}Toon details van dit bedrijf +STR_PERFORMANCE_DETAIL_SELECT_COMPANY_TOOLTIP :{BLACK}Details voor dit bedrijf weergeven ############ Those following lines need to be in this order!! STR_PERFORMANCE_DETAIL_VEHICLES :{BLACK}Voertuigen: STR_PERFORMANCE_DETAIL_STATIONS :{BLACK}Stations: @@ -632,10 +635,10 @@ STR_PERFORMANCE_DETAIL_DELIVERED_TOOLTIP :{BLACK}Het aant STR_PERFORMANCE_DETAIL_CARGO_TOOLTIP :{BLACK}Aantal soorten vracht die in het laatste kwartaal zijn afgeleverd STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP :{BLACK}Hoeveelheid geld op de bank STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP :{BLACK}De hoeveelheid geld die dit bedrijf leent -STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP :{BLACK}Totaal aantal punten uit de mogelijke punten +STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP :{BLACK}Totaal aantal punten van de mogelijke punten # Music window -STR_MUSIC_JAZZ_JUKEBOX_CAPTION :{WHITE}Jazz-jukebox +STR_MUSIC_JAZZ_JUKEBOX_CAPTION :{WHITE}Jazzjukebox STR_MUSIC_PLAYLIST_ALL :{TINY_FONT}{BLACK}Alle STR_MUSIC_PLAYLIST_OLD_STYLE :{TINY_FONT}{BLACK}Oude Stijl STR_MUSIC_PLAYLIST_NEW_STYLE :{TINY_FONT}{BLACK}Nieuwe Stijl @@ -650,6 +653,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Geen muziek beschikbaar STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Nummer STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titel @@ -663,21 +667,21 @@ STR_MUSIC_TOOLTIP_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Gebruik STR_MUSIC_TOOLTIP_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Selecteer 'alle nummers'-programma STR_MUSIC_TOOLTIP_SELECT_OLD_STYLE_MUSIC :{BLACK}Selecteer 'oude stijl-muziek'-programma STR_MUSIC_TOOLTIP_SELECT_NEW_STYLE_MUSIC :{BLACK}Selecteer 'nieuwe stijl-muziek'-programma -STR_MUSIC_TOOLTIP_SELECT_EZY_STREET_STYLE :{BLACK}Kies 'Ezy Street-stijl-muziek'-programma +STR_MUSIC_TOOLTIP_SELECT_EZY_STREET_STYLE :{BLACK}Kies 'Ezy Street stylemuziek'-programma STR_MUSIC_TOOLTIP_SELECT_CUSTOM_1_USER_DEFINED :{BLACK}Selecteer 'Aangepast1'-programma STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Selecteer 'Aangepast2'-programma -STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Programmashuffle aan/uit -STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Toon nummerkeuzescherm - -STR_ERROR_NO_SONGS :{WHITE}Er is een muziek set zonder liedjes gekozen. Er zal geen muziek worden gespeeld +STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Willekeurige volgorde aan-uit +STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Venster voor muzieknummers weergeven # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Muziekprogrammakeuze +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Muziekprogramma - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Nummerindex STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programma - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Maak leeg +STR_PLAYLIST_CHANGE_SET :{BLACK}Verander set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Maak huidig programma leeg (alleen Aangepast1 en Aangepast2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Verander muziekselectie naar een andere geïnstalleerde set STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klik op het nummer om deze aan het programma toe te voegen (alleen Aangepast1 en Aangepast2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klik op het nummer om deze uit het programma te verwijderen (alleen Aangepast1 en Aangepast2) @@ -705,15 +709,15 @@ STR_SMALLMAP_TYPE_VEHICLES :Voertuigen STR_SMALLMAP_TYPE_INDUSTRIES :Industrieën STR_SMALLMAP_TYPE_ROUTEMAP :Vrachtstroom STR_SMALLMAP_TYPE_ROUTES :Routes -STR_SMALLMAP_TYPE_VEGETATION :Begroeiïng +STR_SMALLMAP_TYPE_VEGETATION :Begroeiing STR_SMALLMAP_TYPE_OWNERS :Eigenaren -STR_SMALLMAP_TOOLTIP_SHOW_LAND_CONTOURS_ON_MAP :{BLACK}Toon landcontouren op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_VEHICLES_ON_MAP :{BLACK}Toon voertuigen op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP :{BLACK}Toon industrieën op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Toon vrachtstroom op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Toon transportroutes op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Toon begroeiïng op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Toon landeigenaren op de kaart +STR_SMALLMAP_TOOLTIP_SHOW_LAND_CONTOURS_ON_MAP :{BLACK}Landcontouren op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_VEHICLES_ON_MAP :{BLACK}Voertuigen op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP :{BLACK}Industrieën op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Vrachtstroom op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Transportroutes op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Begroeiing op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Landeigenaren op de kaart weergeven STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Klik op een industriesoort om deze weer te geven. Ctrl+klik verbergt alle andere industriesoorten behalve de geselecteerde. Nogmaals Ctrl+klik geeft opnieuw alle industriesoorten weer. STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Klik op een bedrijf om de bedrijfseigendommen weer te geven. Ctrl+klik verbergt alle andere bedrijven behalve de geselecteerde. Nogmaals Ctrl+klik geeft opnieuw alle bedrijven weer. STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Klik op een vrachtsoort om de eigenschappen weer te geven. Ctrl+Klik verbergt alle vrachtsoorten behalve de geselecteerde. Ctrl+Klik opnieuw om alle vrachttypes te activeren @@ -737,7 +741,7 @@ STR_SMALLMAP_LEGENDA_DOCK :{TINY_FONT}{BLA STR_SMALLMAP_LEGENDA_ROUGH_LAND :{TINY_FONT}{BLACK}Ruw land STR_SMALLMAP_LEGENDA_GRASS_LAND :{TINY_FONT}{BLACK}Grasland STR_SMALLMAP_LEGENDA_BARE_LAND :{TINY_FONT}{BLACK}Braakliggend land -STR_SMALLMAP_LEGENDA_FIELDS :{TINY_FONT}{BLACK}Velden +STR_SMALLMAP_LEGENDA_FIELDS :{TINY_FONT}{BLACK}Akkers STR_SMALLMAP_LEGENDA_TREES :{TINY_FONT}{BLACK}Bomen STR_SMALLMAP_LEGENDA_ROCKS :{TINY_FONT}{BLACK}Rotsen STR_SMALLMAP_LEGENDA_WATER :{TINY_FONT}{BLACK}Water @@ -747,7 +751,7 @@ STR_SMALLMAP_LEGENDA_INDUSTRIES :{TINY_FONT}{BLA STR_SMALLMAP_LEGENDA_DESERT :{TINY_FONT}{BLACK}Woestijn STR_SMALLMAP_LEGENDA_SNOW :{TINY_FONT}{BLACK}Sneeuw -STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF :{BLACK}Plaatsnamen op de kaart aan/uit +STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF :{BLACK}Plaatsnamen op de kaart weergeven-verbergen. STR_SMALLMAP_CENTER :{BLACK}Centreer de kaart op huidige positie STR_SMALLMAP_INDUSTRY :{TINY_FONT}{STRING} ({NUM}) STR_SMALLMAP_LINKSTATS :{TINY_FONT}{STRING} @@ -755,17 +759,17 @@ STR_SMALLMAP_COMPANY :{TINY_FONT}{COM STR_SMALLMAP_TOWN :{TINY_FONT}{WHITE}{TOWN} STR_SMALLMAP_DISABLE_ALL :{BLACK}Alles uitschakelen STR_SMALLMAP_ENABLE_ALL :{BLACK}Alles inschakelen -STR_SMALLMAP_SHOW_HEIGHT :{BLACK}Toon hoogte -STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}Toon geen industrieën op de kaart -STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Toon alle industrieën op de kaart -STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Schakel tonen van hoogte aan/uit +STR_SMALLMAP_SHOW_HEIGHT :{BLACK}Hoogte weergeven +STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}Geen industrieën op de kaart weergeven +STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Alle industrieën op de kaart weergeven +STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Hoogtekaart weergeven-verbergen STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES :{BLACK}Verberg bedrijfseigendommen op de kaart -STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Toon alle bedrijfseigendommen op de kaart -STR_SMALLMAP_TOOLTIP_DISABLE_ALL_CARGOS :{BLACK}Toon geen vrachtsoorten op de kaart -STR_SMALLMAP_TOOLTIP_ENABLE_ALL_CARGOS :{BLACK}Toon alle vrachtsoorten op de kaart +STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Alle bedrijfseigendommen op de kaart weergeven +STR_SMALLMAP_TOOLTIP_DISABLE_ALL_CARGOS :{BLACK}Geen vrachtsoorten op de kaart weergeven +STR_SMALLMAP_TOOLTIP_ENABLE_ALL_CARGOS :{BLACK}Alle vrachtsoorten op de kaart weergeven # Status bar messages -STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Toon laatste (nieuws)bericht +STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Laatste (nieuws-)bericht weergeven STR_STATUSBAR_COMPANY_NAME :{SILVER}- - {COMPANY} - - STR_STATUSBAR_PAUSED :{YELLOW}* * GEPAUZEERD * * STR_STATUSBAR_AUTOSAVE :{RED}AUTOMATISCH OPSLAAN @@ -779,13 +783,13 @@ STR_MESSAGE_NEWS_FORMAT :{STRING} - {S STR_NEWS_MESSAGE_CAPTION :{WHITE}Bericht STR_NEWS_CUSTOM_ITEM :{BIG_FONT}{BLACK}{STRING} -STR_NEWS_FIRST_TRAIN_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste trein arriveert in {STATION}! -STR_NEWS_FIRST_BUS_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste bus arriveert in {STATION}! -STR_NEWS_FIRST_TRUCK_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste vrachtwagen arriveert in {STATION}! -STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste passagierstram arriveert in {STATION}! -STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste vrachttram arriveert in {STATION}! -STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste schip arriveert in {STATION}! -STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Inwoners feesten . . .{}Eerste vliegtuig arriveert in {STATION}! +STR_NEWS_FIRST_TRAIN_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest. . .{}Eerste trein arriveert bij {STATION}! +STR_NEWS_FIRST_BUS_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest. . .{}Eerste bus arriveert bij {STATION}! +STR_NEWS_FIRST_TRUCK_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest. . .{}Eerste vrachtwagen arriveert bij {STATION}! +STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest. . .{}Eerste passagierstram arriveert bij {STATION}! +STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest. . .{}Eerste vrachttram arriveert bij {STATION}! +STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest. . .{}Eerste schip arriveert in {STATION}! +STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Inwoners vieren feest . . .{}Eerste vliegtuig arriveert op {STATION}! STR_NEWS_TRAIN_CRASH :{BIG_FONT}{BLACK}Treinongeluk!{}{COMMA} komen om in explosie na de botsing STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER :{BIG_FONT}{BLACK}Wegvoertuig verongelukt!{}Bestuurder komt om in explosie na botsing met trein @@ -795,10 +799,10 @@ STR_NEWS_PLANE_CRASH_OUT_OF_FUEL :{BIG_FONT}{BLAC STR_NEWS_DISASTER_ZEPPELIN :{BIG_FONT}{BLACK}Zeppelinongeluk bij {STATION}! STR_NEWS_DISASTER_SMALL_UFO :{BIG_FONT}{BLACK}Wegvoertuig vernietigd in botsing met 'UFO' -STR_NEWS_DISASTER_AIRPLANE_OIL_REFINERY :{BIG_FONT}{BLACK}Olieraffinaderij in de buurt van {TOWN} is geëxplodeerd! +STR_NEWS_DISASTER_AIRPLANE_OIL_REFINERY :{BIG_FONT}{BLACK}Olieraffinaderij bij {TOWN} is ontploft! STR_NEWS_DISASTER_HELICOPTER_FACTORY :{BIG_FONT}{BLACK}Fabriek in de buurt van {TOWN} is vernietigd onder verdachte omstandigheden! STR_NEWS_DISASTER_BIG_UFO :{BIG_FONT}{BLACK}'UFO' landt in de buurt van {TOWN}! -STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE :{BIG_FONT}{BLACK}Instorting van kolenmijn laat spoor van vernietiging achter in de buurt van {TOWN}! +STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE :{BIG_FONT}{BLACK}Instorting van kolenmijn laat spoor van vernieling achter bij {TOWN}! STR_NEWS_DISASTER_FLOOD_VEHICLE :{BIG_FONT}{BLACK}Overstromingen!{}Minstens {COMMA} zijn vermist of dood na overstromingen! STR_NEWS_COMPANY_IN_TROUBLE_TITLE :{BIG_FONT}{BLACK}Transportbedrijf in de problemen! @@ -813,6 +817,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Directeur) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} betaalt bouw van nieuwe stad {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Er is een nieuwe stad gebouwd met de naam {TOWN}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Nieuwe {STRING} in aanbouw bij {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nieuw {STRING} in aanplant bij {TOWN}! @@ -834,7 +839,7 @@ STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_GENERAL :{BIG_FONT}{BLAC STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_FARM :{BIG_FONT}{BLACK}Insectenplaag zorgt voor ravage bij {INDUSTRY}!{}Productie gezakt met 50% STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_SMOOTH :{BIG_FONT}{BLACK}{STRING} productie van {INDUSTRY} daalt met {COMMA}%! -STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} wacht in treindepot +STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} wacht in remise STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE} wacht in garage STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} wacht in dok STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} wacht in hangar @@ -844,7 +849,7 @@ STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}{VEHICLE STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} heeft een lege order STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} heeft dubbele orders STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} heeft een ongeldig station in de orders -STR_NEWS_PLANE_USES_TOO_SHORT_RUNWAY :{WHITE}{VEHICLE} heeft in de opdrachten een luchthaven waarvan de start-en landingsbaan is te kort +STR_NEWS_PLANE_USES_TOO_SHORT_RUNWAY :{WHITE}{VEHICLE} heeft in de opdrachten een luchthaven waarvan de start-en landingsbaan te kort is STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} is oud aan het worden STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} is erg oud aan het worden @@ -869,21 +874,21 @@ STR_NEWS_STATION_NOW_ACCEPTS_CARGO_AND_CARGO :{WHITE}{STATION STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Subsidieaanbod is verlopen:{}{}{STRING} van {STRING} naar {STRING} wordt nu niet meer gesubsidieerd STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidie ingetrokken:{}{}{STRING}route van {STRING} naar {STRING} wordt nu niet meer gesubsidieerd STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Subsidie aangeboden:{}{}Eerste {STRING}route van {STRING} naar {STRING} krijgt een jaar lang subsidie van de gemeente! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Subsidie uitgereikt aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar 50% extra betaald! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Subsidie uitgereikt aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar dubbel betaald! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Subsidie uitgereikt aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar driedubbel betaald! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Subsidie uitgereikt aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar vierdubbel betaald! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Subsidie toegekend aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar 50% extra betaald! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Subsidie toegekend aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar dubbel betaald! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Subsidie toegekend aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar driedubbel betaald! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Subsidie toegekend aan {STRING}!{}{}{STRING}route van {STRING} naar {STRING} krijgt volgend jaar vierdubbel betaald! -STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Verkeerschaos in {TOWN}!{}{}Wegreparatie betaald door {STRING} zorgt voor 6 maanden van irritatie bij weggebruikers! -STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Transport monopoly! -STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}Lokale overheid van {TOWN} tekend contract met {STRING} voor een jaar exclusieve transportrechten! +STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Verkeerschaos in {TOWN}!{}{}Wegherstelling betaald door {STRING} zorgt voor 6 maanden van miserie bij weggebruikers! +STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Transportmonopolie! +STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}Gemeentebestuur van {TOWN} tekent contract met {STRING} voor een jaar exclusieve transportrechten! # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Kijkvenster {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Kopieer naar kijkvenster +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Verander kijkvenster STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Kopieer de locatie van het algemene scherm naar dit kijkvenster -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Plak van kijkvenster -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Plak de locatie van dit kijkvenster naar het algemene scherm +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Verander algemeen scherm +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Kopieer de locatie van dit kijkvenster naar het algemene scherm # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Spelopties @@ -925,6 +930,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Zuid-Afrikaanse STR_GAME_OPTIONS_CURRENCY_CUSTOM :Aangepast... STR_GAME_OPTIONS_CURRENCY_GEL :Georgische Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iraanse Rial (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nieuwe Russische Roebel (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Mexicaanse peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Wegvoertuigen @@ -960,7 +967,7 @@ STR_GAME_OPTIONS_TOWN_NAME_CATALAN :Catalaans ############ end of townname region STR_GAME_OPTIONS_AUTOSAVE_FRAME :{BLACK}Automatisch opslaan -STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP :{BLACK}Kies interval tussen automatisch opgeslagen spellen +STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP :{BLACK}Kies tijdsduur tussen automatisch opgeslagen spellen ############ start of autosave dropdown STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_OFF :Uit @@ -1049,11 +1056,11 @@ STR_VARIETY_MEDIUM :Gemiddeld STR_VARIETY_HIGH :Hoog STR_VARIETY_VERY_HIGH :Zeer Hoog -STR_AI_SPEED_VERY_SLOW :Zeer Langzaam +STR_AI_SPEED_VERY_SLOW :Zeer langzaam STR_AI_SPEED_SLOW :Langzaam STR_AI_SPEED_MEDIUM :Gemiddeld STR_AI_SPEED_FAST :Snel -STR_AI_SPEED_VERY_FAST :Zeer Snel +STR_AI_SPEED_VERY_FAST :Zeer snel STR_SEA_LEVEL_VERY_LOW :Zeer Laag STR_SEA_LEVEL_LOW :Laag @@ -1094,7 +1101,7 @@ STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filterte STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Alles uitvouwen STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Alles inklappen STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT :(geen uitleg beschikbaar) -STR_CONFIG_SETTING_DEFAULT_VALUE :{LTBLUE}Standaard waarde: {ORANGE}{STRING} +STR_CONFIG_SETTING_DEFAULT_VALUE :{LTBLUE}Standaardwaarde: {ORANGE}{STRING} STR_CONFIG_SETTING_TYPE :{LTBLUE}Instellingstype: {ORANGE}{STRING} STR_CONFIG_SETTING_TYPE_CLIENT :Gebruiker instellingen (niet opgeslagen in bestand; heeft invloed op alle spellen) STR_CONFIG_SETTING_TYPE_GAME_MENU :Spelinstellingen (opgeslagen in bestand; hebben alleen invloed op nieuw spel) @@ -1105,9 +1112,9 @@ STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Bedrijfsinstell STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Categorie: STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Type: STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Beperkt de onderstaande lijst met vooraf gedefinieerde filters -STR_CONFIG_SETTING_RESTRICT_BASIC :Basis (toon alleen belangrijke instellingen) -STR_CONFIG_SETTING_RESTRICT_ADVANCED :Geavanceerd (toon de meeste instellingen) -STR_CONFIG_SETTING_RESTRICT_ALL :Expert (toon alle instellingen, inclusief vreemde) +STR_CONFIG_SETTING_RESTRICT_BASIC :Basis (alleen belangrijke instellingen weergeven) +STR_CONFIG_SETTING_RESTRICT_ADVANCED :Geavanceerd (meeste instellingen weergeven) +STR_CONFIG_SETTING_RESTRICT_ALL :Expert (alle instellingen weergeven, inclusief vreemde) STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_DEFAULT :Instellingen met een andere waarde dan de standaard STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_NEW :Instellingen met een andere waarde dan je 'nieuw spel' instellingen @@ -1118,9 +1125,9 @@ STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_MENU :Spelinstellinge STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_INGAME :Spelinstellingen (Opgeslagen in bestand; hebben alleen betrekking op huidig spel) STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_MENU :Bedrijfsinstellingen (Opgeslagen in bestand; heeft alleen betrekking op nieuwe spellen) STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Bedrijfsinstellingen (Opgeslagen in bestand; hebben alleen betrekking op huidig bedrijf) -STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Toon alle zoekresultaten per instelling{}{SILVER}Categorie {BLACK}naar {WHITE}{STRING} -STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Toon alle zoekresultaten per instelling{}{SILVER}Type {BLACK}naar {WHITE}Alle instellingstypen -STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Toon alle zoekresultaten per instelling{}{SILVER}Categorie {BLACK}to {WHITE}{STRING} {BLACK}and {SILVER}Type {BLACK}naar {WHITE}Alle instellingstypen +STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Alle zoekresultaten per instelling weergeven{}{SILVER}Categorie {BLACK}naar {WHITE}{STRING} +STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Alle zoekresultaten per instelling weergeven{}{SILVER}Type {BLACK}naar {WHITE}alle instellingstypen +STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Alle zoekresultaten per instelling weergeven{}{SILVER}Categorie {BLACK}naar {WHITE}{STRING} {BLACK}en {SILVER}type {BLACK}naar {WHITE}Alle instellingstypen STR_CONFIG_SETTINGS_NONE :{WHITE}- Geen - STR_CONFIG_SETTING_OFF :Uit @@ -1147,36 +1154,36 @@ STR_CONFIG_SETTING_RUNNING_COSTS :Onderhoudskoste 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_HELPTEXT :Beperk de hoeveelheid bouwactiviteiten voor computerspeler -STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :Voertuig storingen: {STRING} +STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :Voertuigstoringen: {STRING} STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS_HELPTEXT :Controle hoe vaak onvoldoende onderhouden voertuigen kapot kunnen gaan STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER :Subsidie indicator: {STRING} STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER_HELPTEXT :Instellen hoeveel wordt betaald voor gesubsidieerde verbindingen STR_CONFIG_SETTING_CONSTRUCTION_COSTS :Bouwkosten: {STRING} -STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Het niveau van bouw- en aankoopkosten +STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Het niveau van bouw- en aankoopkosten instellen STR_CONFIG_SETTING_RECESSIONS :Recessies: {STRING} STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Wanneer ingeschakeld kunnen recessies om de paar jaar optreden. Tijdens een recessie is alle productie aanzienlijk lager (deze keert terug naar het vorige niveau als de recessie voorbij is) STR_CONFIG_SETTING_TRAIN_REVERSING :Niet toestaan dat treinen keren in stations: {STRING} STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT :Indien ingeschakeld zullen treinen niet omkeren in niet-eind stations, zelfs als er een kortere weg naar hun volgende bestemming is bij omkeren STR_CONFIG_SETTING_DISASTERS :Rampen: {STRING} STR_CONFIG_SETTING_DISASTERS_HELPTEXT :Schakel rampen die af en toe voertuigen of infrastructuur kunnen blokkeren of vernietigen in/uit -STR_CONFIG_SETTING_CITY_APPROVAL :De houding van de gemeenteraad ten opzichte van herstructurering gebied: {STRING} -STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Kies hoeveel lawaai en schade aan het milieu door bedrijven de stadswaardering en hun acties beïnvloeden in hun bouwgebied +STR_CONFIG_SETTING_CITY_APPROVAL :Houding van gemeentebestuur ten opzichte van herstructurering omgeving: {STRING} +STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Bepaalt in hoeverre lawaai en schade aan het milieu door bedrijven de stadswaardering en verdere bouwacties beïnvloeden in hun omgeving -STR_CONFIG_SETTING_MAX_HEIGHTLEVEL :Maximum kaarthoogte: {STRING} +STR_CONFIG_SETTING_MAX_HEIGHTLEVEL :Maximale kaarthoogte: {STRING} STR_CONFIG_SETTING_MAX_HEIGHTLEVEL_HELPTEXT :Stel de maximum toegestane hoogte voor bergen op de kaart in -STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN :{WHITE}Je kunt de maximum kaarthoogte niet in deze waarde wijzigen. Minstens één berg op de kaart is hoger +STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN :{WHITE}Je kunt de maximale kaarthoogte niet in deze waarde wijzigen. Minstens één berg op de kaart is hoger. STR_CONFIG_SETTING_AUTOSLOPE :Omgeving aanpassen onder gebouwen, spoorwegen, enz. toestaan: {STRING} STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Staat het aanpassen van funderingen onder gebouwen en sporen toe zonder deze te verwijderen -STR_CONFIG_SETTING_CATCHMENT :Gebruik meer realistische handelsgebieden: {STRING} -STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Heb verschillende grootte verzorgingsgebied voor verschillende typen stations en luchthavens -STR_CONFIG_SETTING_EXTRADYNAMITE :Sta verwijderen van meer stedelijke wegen, bruggen en tunnels toe: {STRING} +STR_CONFIG_SETTING_CATCHMENT :Meer realistische verzorgingsgebieden toestaan: {STRING} +STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Verzorgingsgebieden met verschillende groottes voor verschillende typen stations en luchthavens +STR_CONFIG_SETTING_EXTRADYNAMITE :Verwijderen van meer stedelijke wegen, bruggen en tunnels toestaan: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Maakt het gemakkelijker om door de stad beheerde infrastructuur en gebouwen te verwijderen. -STR_CONFIG_SETTING_TRAIN_LENGTH :Maximum lengte van treinen: {STRING} -STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT :Stel de maximum lengte van treinen in +STR_CONFIG_SETTING_TRAIN_LENGTH :Maximale lengte van treinen: {STRING} +STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT :Stel de maximale lengte van treinen in STR_CONFIG_SETTING_TILE_LENGTH :{COMMA} tegel{P 0 "" s} STR_CONFIG_SETTING_SMOKE_AMOUNT :Hoeveelheid rook/vonken: {STRING} STR_CONFIG_SETTING_SMOKE_AMOUNT_HELPTEXT :Bepaal hoeveel rook of hoeveel vonken door de voertuigen worden uitgestoten. -STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL :Trein acceleratie model: {STRING} +STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL :Treinacceleratiemodel: {STRING} STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_HELPTEXT :Selecteer de physics model voor de trein acceleratie. Het "originele" model straft hellingen gelijk voor alle voertuigen. Het "realistische" model bestraft hellingen en bochten, afhankelijk van de verschillende eigenschappen van de inhoud, zoals lengte en trekkracht STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL :Wegvoertuig acceleratie model: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL_HELPTEXT :Selecteer de physics model voor wegvoertuigacceleratie. Het "originele" model straft hellingen gelijk voor alle voertuigen. Het "realistische" model bestraft hellingen, afhankelijk van verschillende eigenschappen van het voertuig, bijvoorbeeld 'trekkracht' @@ -1185,28 +1192,28 @@ STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Steilheid van e STR_CONFIG_SETTING_PERCENTAGE :{COMMA}% STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS :Hellingsterkte voor wegvoertuigen: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Steilheid van een schuine tegel voor een wegvoertuig. Hogere waarden maken het moeilijker om een heuvel te beklimmen -STR_CONFIG_SETTING_FORBID_90_DEG :Verbied treinen en schepen om 90° te draaien: {STRING} +STR_CONFIG_SETTING_FORBID_90_DEG :Treinen en schepen mogen niet 90° draaien: {STRING} STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Draaiingen met 90° treden op wanneer een horizontale baan direct gevolgd wordt door een verticaal baanstuk op de aangrenzende tegel, waardoor de trein daarna 90 graden draait wanneer de tegelrand wordt overgestoken in plaats van de gebruikelijke 45 graden voor andere spoorcombinaties. Dit geldt ook voor de draaicirkel van schepen STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Sta het samenvoegen van indirect aansluitende stations toe: {STRING} STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Sta toe dat er aanvullende onderdelen aan een station worden geplaatst zonder dat reeds bestaande onderdelen beïnvloed worden. Ctrl+klik is vereist tijdens het plaatsen van nieuwe onderdelen. STR_CONFIG_SETTING_INFLATION :Inflatie: {STRING} STR_CONFIG_SETTING_INFLATION_HELPTEXT :Schakel inflatie in de economie in, waardoor de kosten iets sneller stijgen dan de betalingen STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH :Maximum bruglengte: {STRING} -STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH_HELPTEXT :Maximum lengte voor te bouwen bruggen -STR_CONFIG_SETTING_MAX_BRIDGE_HEIGHT :Maximum brughoogte: {STRING} +STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH_HELPTEXT :Maximale lengte voor te bouwen bruggen +STR_CONFIG_SETTING_MAX_BRIDGE_HEIGHT :Maximale brughoogte: {STRING} STR_CONFIG_SETTING_MAX_BRIDGE_HEIGHT_HELPTEXT :Maximum hoogte om bruggen te bouwen STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH :Maximum tunnellengte: {STRING} -STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH_HELPTEXT :Maximum lengte voor te bouwen tunnels +STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH_HELPTEXT :Maximale lengte voor te bouwen tunnels STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD :Handmatige bouwmethode voor primaire industrieën: {STRING} STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_HELPTEXT :Wijze van financiering van een primaire industrie. 'geen' betekent dat het niet mogelijk is om te financieren, 'prospectie' betekent dat financiering mogelijk is, maar de bouw vindt plaats in een willekeurige plek op de kaart en kan mislukken ook, "als andere bedrijfstakken": ruwe industrieën kan worden geconstrueerd door bedrijven als verwerkende industrie in elke positie zij willen STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE :Geen STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NORMAL :Zoals andere industrieën STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_PROSPECTING :Proberen -STR_CONFIG_SETTING_INDUSTRY_PLATFORM :Plat gebied rond industrieën: {STRING} +STR_CONFIG_SETTING_INDUSTRY_PLATFORM :Vlak gebied rond industrieën: {STRING} STR_CONFIG_SETTING_INDUSTRY_PLATFORM_HELPTEXT :Hoeveelheid ruimte rond een industrie. Dit zorgt ervoor dat lege ruimte rond een industrie beschikbaar blijft voor sporen, stations, wegen enz. STR_CONFIG_SETTING_MULTIPINDTOWN :Meerdere vergelijkbare industrieën per stad toestaan: {STRING} STR_CONFIG_SETTING_MULTIPINDTOWN_HELPTEXT :Normaal zal een stad niet meer dan één industrie van ieder type toestaan. Door deze optie in te schakelen zullen steden meerdere industrieën van één soort accepteren. -STR_CONFIG_SETTING_SIGNALSIDE :Toon seinen: {STRING} +STR_CONFIG_SETTING_SIGNALSIDE :Seinen weergeven: {STRING} STR_CONFIG_SETTING_SIGNALSIDE_HELPTEXT :Kies aan welke kans van het sppor de seinen worden geplaatst STR_CONFIG_SETTING_SIGNALSIDE_LEFT :Aan de linker kant STR_CONFIG_SETTING_SIGNALSIDE_DRIVING_SIDE :Aan de rij zijde @@ -1220,24 +1227,24 @@ STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Plaats waar een STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :aan het begin STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :in het midden STR_CONFIG_SETTING_STOP_LOCATION_FAR_END :aan het einde -STR_CONFIG_SETTING_AUTOSCROLL :Verschuif scherm als muis aan de rand is: {STRING} -STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT :Wanneer aan, start een subvenster met scrollen wanneer de muis vlak bij de rand van het venster komt +STR_CONFIG_SETTING_AUTOSCROLL :Scherm verplaatsen als muis de rand raakt: {STRING} +STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT :Als dit is ingeschakeld, wordt een subvenster verplaatst wanneer de muis vlak bij de rand van het venster komt STR_CONFIG_SETTING_AUTOSCROLL_DISABLED :Uitgeschakeld STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT_FULLSCREEN :Hoofdkijkvenster, alleen volledig scherm STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT :Hoofdkijkvenster STR_CONFIG_SETTING_AUTOSCROLL_EVERY_VIEWPORT :Elk kijkvenster -STR_CONFIG_SETTING_BRIBE :Omkopen van de gemeente toestaan: {STRING} +STR_CONFIG_SETTING_BRIBE :Omkopen van gemeentebestuur toestaan: {STRING} STR_CONFIG_SETTING_BRIBE_HELPTEXT :Toestaan dat bedrijven mogen proberen de plaatselijke autoriteiten om te kopen. Als de omkoping wordt opgemerkt door een inspecteur, zal de onderneming niet in staat zijn om in de stad actie te ondernemen voor zes maanden STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :Kopen van exclusieve transportrechten toestaan: {STRING} STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT :Wanneer een bedrijf de exclusieve transportrechten van een stad koopt, ontvangen de stations (zowel passagiers als vracht) van de tegenstanders geen vracht voor één heel jaar. STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS :Financiering van gebouwen toestaan: {STRING} -STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT :Deze optie staat bedrijven toe meer geld te geven aan steden voor de financiering van nieuwe huizen. -STR_CONFIG_SETTING_ALLOW_FUND_ROAD :Financieren van lokale wegherbouwing toestaan: {STRING} -STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT :Deze optie staat bedrijven toe geld te geven aan steden voor het herbouwen van wegen, zodat op wegbedrijven gesaboteerd worden. +STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT :Staat bedrijven toe geld te geven aan steden voor de financiering van nieuwe huizen. +STR_CONFIG_SETTING_ALLOW_FUND_ROAD :Financieren van lokale wegreconstructie toestaan: {STRING} +STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT :Staat bedrijven toe geld te geven aan steden voor wegreconstructies zodat wegbedrijven gesaboteerd worden. STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :Geld geven aan andere bedrijven toestaan: {STRING} STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT :Sta toe dat bedrijven geld naar elkaar overmaken in een multiplayerspel. STR_CONFIG_SETTING_FREIGHT_TRAINS :Gewichtsfactor voor vracht om zware treinen te simuleren: {STRING} -STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT :Stel de impact van het vervoer van vracht bij treinen. Een hogere waarde maakt het vervoer van vracht veeleisender voor treinen, met name in heuvels +STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT :Stelt in hoe vracht treinen beïnvloedt. Een hogere waarde maakt het vervoer van vracht veeleisender voor treinen, met name in heuvels. STR_CONFIG_SETTING_PLANE_SPEED :Vliegtuig snelheidsfactor: {STRING} STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Stel de relatieve snelheid van de vliegtuigen in vergelijking met andere typen voertuigen, om de hoogte van het inkomen van het vervoer door vliegtuigen te verminderen STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA} @@ -1246,7 +1253,7 @@ STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Kies de kans op STR_CONFIG_SETTING_PLANE_CRASHES_NONE :Geen STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :Verminderd STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :Normaal -STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Sta toe dat doorrijwegstops worden geplaatst op door stad beheerde wegen: {STRING} +STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Haltes plaatsen op door stad beheerde wegen toestaan: {STRING} STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD_HELPTEXT :Laat het bouwen van doorrijhaltes toe op stedelijke wegen STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :Sta doorrijhaltes op wegen van tegenstanders toe: {STRING} STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Laat het bouwen van doorrijhaltes toe op wegen van andere bedrijven @@ -1254,6 +1261,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Deze ins STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Onderhoud infrastructuur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Wanneer dit is ingeschakeld, veroorzaakt de infrastructuur onderhoudskosten. De kosten groeien boven-proportioneel met de grootte van het netwerk, waardoor grotere bedrijven hierdoor meer worden beïnvloed dan kleinere +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Beginkleur voor bedrijf: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Kies de beginkleur voor het bedrijf + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Vliegvelden verlopen niet: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Het inschakelen van deze instelling zorgt ervoor dat elke luchthaven soort altijd beschikbaar blijft na de introductie @@ -1268,23 +1278,23 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Waarschuw als i STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Wanneer ingeschakeld, wordt een nieuws-bericht verstuurd wanneer een voertuig geen winst heeft gemaakt in een kalenderjaar STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Voertuigen verlopen nooit: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Wanneer ingeschakeld, alle voertuig modellen blijven voor altijd beschikbaar na hun introductie -STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Vernieuw voertuig automatisch wanneer deze oud wordt: {STRING} -STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Wanneer ingeschakeld, wordt een voertuig die het einde van zijn levensduur nadert automatisch vervangen als aan de vernieuw voorwaarden worden voldaan -STR_CONFIG_SETTING_AUTORENEW_MONTHS :Vernieuw voertuigen automatisch na {STRING} maximum leeftijd -STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Relatieve leeftijd van een voertuig wanneer deze in aanmerking komt voor automatisch vervangen +STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Voertuig automatisch vernieuwen wanneer dit oud wordt: {STRING} +STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Wanneer ingeschakeld, wordt een voertuig dat het einde van zijn levensduur nadert automatisch vervangen als aan de voorwaarden voor vernieuwing wordt voldaan +STR_CONFIG_SETTING_AUTORENEW_MONTHS :Vernieuw voertuigen automatisch na {STRING} maximumleeftijd +STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Relatieve leeftijd van een voertuig wanneer dit in aanmerking komt voor automatisch vervangen STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE :{COMMA} maand{P 0 "" en} voor STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER :{COMMA} maand{P 0 "" en} na -STR_CONFIG_SETTING_AUTORENEW_MONEY :Minimum benodigd geld voor automatisch vernieuwen: {STRING} -STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Minimale hoeveelheid geld die op de bank moet blijven alvorens automatisch vernieuwen voertuigen te starten +STR_CONFIG_SETTING_AUTORENEW_MONEY :Minimumbedrag dat nodig is voor automatisch vernieuwen: {STRING} +STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Minimumbedrag dat de bank moet blijven voordat automatisch vernieuwen van voertuigen mogelijk is STR_CONFIG_SETTING_ERRMSG_DURATION :Duur van foutbericht: {STRING} STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT :Duur voor het weergeven van foutberichten in een rood venster. Merk op dat sommige (kritische) foutmeldingen niet automatisch worden gesloten na deze tijd, deze moeten handmatig worden gesloten STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE :{COMMA} seconde{P 0 "" n} -STR_CONFIG_SETTING_HOVER_DELAY :Toon tooltips: {STRING} +STR_CONFIG_SETTING_HOVER_DELAY :Knopinfo weergeven: {STRING} STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Vertraging voordat tooltips worden weergegeven wanneer de muis over een interface-element. Als alternatief kunnen tooltips worden gebonden aan de rechtermuisknop wanneer de waarde 0 is. -STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Wijs aan voor {COMMA} seconde{P 0 "" n} +STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Muis stilhouden gedurende {COMMA} seconde{P 0 "" n} STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :Rechtsklik STR_CONFIG_SETTING_POPULATION_IN_LABEL :Geef het inwoneraantal bij een stad weer: {STRING} -STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Toon de populatie van een stad in hun tekst op de kaart +STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Aantal inwoners van een stad weergeven bij naam op de kaart STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Dikte van de lijnen in grafieken: {STRING} STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Breedte van de lijnen in de grafiek. Een dunne lijn is preciezer leesbaar, een dikke lijn is makkelijker te zien en kleuren zijn makkelijker om te onderscheiden @@ -1297,8 +1307,8 @@ STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :TerraGenesis STR_CONFIG_SETTING_TERRAIN_TYPE :Terrein type: {STRING} STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(Alleen TerraGenesis) Heuvelachtigheid van het landschap STR_CONFIG_SETTING_INDUSTRY_DENSITY :Industriedichtheid: {STRING} -STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Stel in hoeveel industrieën moeten worden gegenereerd en welk niveau tijdens het spel moet worden gehandhaafd -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maximum afstand van de rand voor Olierafinaderijen: {STRING} +STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Stelt in hoeveel industrieën worden gegenereerd en welk niveau tijdens het spel moet worden gehandhaafd +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maximumafstand van de rand voor Olierafinaderijen: {STRING} STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Olieraffinaderijen worden alleen gebouwd nabij de kaart grens, dat is aan de kust van eiland kaarten STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Sneeuwhoogte: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Instellen op welke hoogte de sneeuw begint in sub-arctische landschap. Sneeuw heeft ook invloed op de industrie generatie en stadsgroei eisen @@ -1327,9 +1337,9 @@ STR_CONFIG_SETTING_EDGES_NOT_EMPTY :{WHITE}Eén of STR_CONFIG_SETTING_EDGES_NOT_WATER :{WHITE}Eén of meer vakjes aan de rand zijn geen water STR_CONFIG_SETTING_STATION_SPREAD :Maximale stationsgrootte: {STRING} -STR_CONFIG_SETTING_STATION_SPREAD_HELPTEXT :Maximum gebied waar onderdelen van één station op verspreid mogen zijn. Grotere gebieden vertragen het spel! +STR_CONFIG_SETTING_STATION_SPREAD_HELPTEXT :Maximaal oppervlak waarover onderdelen van één station verspreid mogen zijn. Grotere oppervlakken vertragen het spel! STR_CONFIG_SETTING_SERVICEATHELIPAD :Helikopters automatisch repareren op helipads: {STRING} -STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT :Pleeg onderhoud aan elke helikopter na een landing, ook wanneer er geen depot aanwezig is op de luchthaven. +STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT :Helikopteronderhoud na landing, ook als er geen hangar is op de luchthaven. STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR :Verbind de knoppenbalk voor terreinvorming met die voor spoor/weg/water/vliegveld: {STRING} STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR_HELPTEXT :Bij het openen van een werkbalk voor constructie van transport ook een werkbalk openen voor landschapsvorming. STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR :Gebruiker land kleur op de kleine kaart: {STRING} @@ -1337,11 +1347,15 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Kleur van het t STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Groen STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Donker groen STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Omgekeerde scrollrichting: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Gedrag wanneer gescrolld wordt door de map met de rechter muisknop. Indien uitgeschakeld bestuurd de muis de camera. Indien ingeschakeld bestuurd de muis de kaart. -STR_CONFIG_SETTING_SMOOTH_SCROLLING :Vloeiend scrollen kijkvenster: {STRING} -STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Bepalen hoe de hoofdweergave schuift naar een specifieke positie bij het klikken op de minikaart of bij de afgifte van een opdracht om naar een specifiek object op de kaart. Indien ingeschakeld, de viewport scrollt soepel, als deze uitgeschakeld gaat u rechtstreeks naar de beoogde plek -STR_CONFIG_SETTING_MEASURE_TOOLTIP :Toon dimensie-informatie bij het gebruik van diverse bouwgereedschappen: {STRING} +STR_CONFIG_SETTING_SCROLLMODE :Verplaatsingsgedrag voor kijkvensters: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Gedrag tijdens het verplaatsen van de kaart +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Verplaats kijkvenster met RMB, muispositie staat vast +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Verplaats kaart met RMB, muispositie staat vast +STR_CONFIG_SETTING_SCROLLMODE_RMB :Verplaats kaart met RMB +STR_CONFIG_SETTING_SCROLLMODE_LMB :Verplaats kaart met LMB +STR_CONFIG_SETTING_SMOOTH_SCROLLING :Kijkvenster vloeiend verplaatsen: {STRING} +STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Bepalen hoe de hoofdweergave naar een specifieke positie schuift bij het klikken op de minikaart of bij het uitvoeren van een commando om naar een specifiek object op de kaart te scrollen. Indien ingeschakeld, dan scrollt het kijkvenster soepel, als deze uitgeschakeld gaat u rechtstreeks naar de beoogde plek +STR_CONFIG_SETTING_MEASURE_TOOLTIP :Maten weergeven bij het gebruik van diverse bouwgereedschappen: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Geef tegelafstanden en hoogteverschillen weer bij het slepen tijdens het bouwen STR_CONFIG_SETTING_LIVERIES :Laat alle voertuigkleuren zien: {STRING} STR_CONFIG_SETTING_LIVERIES_HELPTEXT :Beheer het gebruik van voertuigspecifieke levering voor voertuigen (in tegenstelling tot bedrijfsspecifieke leveringen). @@ -1351,12 +1365,12 @@ STR_CONFIG_SETTING_LIVERIES_ALL :Alle bedrijven STR_CONFIG_SETTING_PREFER_TEAMCHAT :Voorkeur voor team chat met : {STRING} STR_CONFIG_SETTING_PREFER_TEAMCHAT_HELPTEXT :Schakel de binding van bedrijfs-interne en publieke chat om resp. STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING :Functie van muiswiel: {STRING} -STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT :Scrollen inschakelen met twee-dimensioneel muis-wielen +STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT :Verplaatsen inschakelen met tweedimensionale muiswieltjes STR_CONFIG_SETTING_SCROLLWHEEL_ZOOM :Zoom kaart -STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL :Scroll kaart +STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL :Kaart verplaatsen STR_CONFIG_SETTING_SCROLLWHEEL_OFF :Uit STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER :Muiswielsnelheid: {STRING} -STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT :Regel de gevoeligheid van het muis-wiel scrollen +STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT :Gevoeligheid van verplaatsen met de instellen STR_CONFIG_SETTING_OSK_ACTIVATION :Toetsenbord op scherm: {STRING} STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Selecteer de methode om het toetsenbord op het scherm te openen voor tekst invoeren in editboxes alleen met behulp van het aanwijsapparaat. Dit is bedoeld voor kleine apparaten zonder toetsenbord STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED :Uitgeschakeld @@ -1370,17 +1384,15 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Uit -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Scrollen met linkermuisknop: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Schakel scrollen met de linkermuisknop in door te slepen. Dit is vooral handig bij het gebruik van een touchscreen voor scrollen STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Sluit window met rechts-klik: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Sluit een venster door met de rechtermuisknop erin te klikken. Schakelt de tooltip uit met de rechtermuisknop! STR_CONFIG_SETTING_AUTOSAVE :Automatisch opslaan: {STRING} -STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Kies interval tussen automatische spelopslag +STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Kies tijdsduur voor automatische spelopslag -STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Gebruik {STRING} datumformaat voor naamgeving van opgeslagen spellen +STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Datumindeling {STRING} gebruiken voor naamgeving van opgeslagen spellen STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_HELPTEXT :Formaat van de datum in savegamebestandsnamen -STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_LONG :lang (31e dec 2008) +STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_LONG :lang (31 dec 2008) STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_SHORT :kort (31-12-2008) STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_ISO :ISO (2008-12-31) @@ -1392,13 +1404,13 @@ STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_NO_ACTIONS :Geen mogelijkhe STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_CONSTRUCTION :Alle niet-constructiemogelijkheden STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_LANDSCAPING :Alles behalve landschapsaanpassingen STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_ACTIONS :Alle mogelijkheden -STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :Gebruik groepen voor voertuigenlijst: {STRING} -STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Schakel het gebruik van de geavanceerde voertuigenlijsten in voor het groeperen van voertuigen -STR_CONFIG_SETTING_LOADING_INDICATORS :Gebruik laadindicatoren: {STRING} +STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :Groepen gebruiken in voertuigenlijst: {STRING} +STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Schakelt het gebruik van de geavanceerde voertuigenlijsten in voor het groeperen van voertuigen +STR_CONFIG_SETTING_LOADING_INDICATORS :Laadpercentages gebruiken: {STRING} STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Geef aan of laadindicatoren worden weergegeven boven ladende of lossende voertuigen -STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Toon dienstregeling in tikken ipv in dagen: {STRING} -STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Toon reistijden in tijdtabellen in het spelticks in plaats van dagen -STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Toon aankomst- en vertrektijden in dienstregeling: {STRING} +STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Dienstregeling in tikken weergeven i.p.v. in dagen: {STRING} +STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Reistijden in tijdtabellen in speltikken weergeven in plaats van dagen +STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Aankomst- en vertrektijden in dienstregeling weergeven: {STRING} STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Geef de verwachte aankomst-en vertrektijden in de dienstregeling STR_CONFIG_SETTING_QUICKGOTO :Snel voertuigorders maken: {STRING} STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT :Pre-selecteer de 'Ga naar cursor' bij het openen van de orders venster @@ -1407,19 +1419,19 @@ STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_HELPTEXT :Spoortype om te STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST :Eerst beschikbare STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_LAST :Laatst beschikbare STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_MOST_USED :Meest gebruikte -STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Toon gereserveerd spoor: {STRING} +STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Gereserveerd spoor weergeven: {STRING} STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT :Geef gereserveerde tracks een andere kleur om te helpen met de problemen met treinen te weigeren een route op basis van blokken in te gaan STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :Hou bouwgereedschappen actief na gebruik: {STRING} STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT :Houd de bouwhulpmiddelen voor bruggen, tunnels, enz. open na gebruik -STR_CONFIG_SETTING_EXPENSES_LAYOUT :Groepeer uitgaven in bedrijfsfinanciënscherm: {STRING} +STR_CONFIG_SETTING_EXPENSES_LAYOUT :Uitgaven in bedrijfsfinanciënvenster groeperen: {STRING} STR_CONFIG_SETTING_EXPENSES_LAYOUT_HELPTEXT :Definieer de lay-out voor het bedrijfsuitgavenvenster STR_CONFIG_SETTING_SOUND_TICKER :Nieuwsticker: {STRING} -STR_CONFIG_SETTING_SOUND_TICKER_HELPTEXT :Speel geluidseffect voor samenvatting nieuwsberichten +STR_CONFIG_SETTING_SOUND_TICKER_HELPTEXT :Geluidseffect afspelen bij korte nieuwsberichten STR_CONFIG_SETTING_SOUND_NEWS :Krant: {STRING} -STR_CONFIG_SETTING_SOUND_NEWS_HELPTEXT :Speel geluidseffect bij het tonen van de krant +STR_CONFIG_SETTING_SOUND_NEWS_HELPTEXT :Geluidseffect weergeven bij nieuwsbericht STR_CONFIG_SETTING_SOUND_NEW_YEAR :Einde jaar: {STRING} -STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT :Speel geluidseffecten bij de samenvatting van resultaten gedurende het jaar ten opzichte van het jaar ervoor aan het einde van het jaar +STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT :Geluidseffect afspelen bij jaaroverzicht van bedrijf t.o.v. vorig jaar STR_CONFIG_SETTING_SOUND_CONFIRM :Bouw: {STRING} STR_CONFIG_SETTING_SOUND_CONFIRM_HELPTEXT :Speel geluidseffecten bij succesvolle constructies of andere acties STR_CONFIG_SETTING_SOUND_CLICK :Knop kliks: {STRING} @@ -1433,14 +1445,14 @@ STR_CONFIG_SETTING_SOUND_AMBIENT_HELPTEXT :Speel omgevings STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :Bouwen van infrastructuur uitschakelen wanneer geen geschikt voertuig beschikbaar is: {STRING} STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING_HELPTEXT :Wanneer je dit inschakelt, is de infrastructuur alleen beschikbaar als er ook voertuigen beschikbaar zijn. Dit voorkomt verspilling van tijd en geld aan onbruikbare infrastructuur -STR_CONFIG_SETTING_MAX_TRAINS :Maximum aantal treinen per bedrijf: {STRING} -STR_CONFIG_SETTING_MAX_TRAINS_HELPTEXT :Maximum aantal treinen dat een bedrijf kan hebben -STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :Maximum aantal wegvoertuigen per bedrijf: {STRING} +STR_CONFIG_SETTING_MAX_TRAINS :Maximumaantal treinen per bedrijf: {STRING} +STR_CONFIG_SETTING_MAX_TRAINS_HELPTEXT :Maximumaantal treinen dat een bedrijf kan hebben +STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :Maximumaantal wegvoertuigen per bedrijf: {STRING} STR_CONFIG_SETTING_MAX_ROAD_VEHICLES_HELPTEXT :Maximum aantal wegvoertuigen dat een bedrijf kan hebben -STR_CONFIG_SETTING_MAX_AIRCRAFT :Maximum aantal vliegtuigen per bedrijf: {STRING} -STR_CONFIG_SETTING_MAX_AIRCRAFT_HELPTEXT :Maximum aantal vliegtuigen dat een bedrijf kan hebben -STR_CONFIG_SETTING_MAX_SHIPS :Maximum aantal schepen per bedrijf: {STRING} -STR_CONFIG_SETTING_MAX_SHIPS_HELPTEXT :Maximum aantal schepen dat een bedrijf kan hebben +STR_CONFIG_SETTING_MAX_AIRCRAFT :Maximumaantal vliegtuigen per bedrijf: {STRING} +STR_CONFIG_SETTING_MAX_AIRCRAFT_HELPTEXT :Maximumaantal vliegtuigen dat een bedrijf kan hebben +STR_CONFIG_SETTING_MAX_SHIPS :Maximumaantal schepen per bedrijf: {STRING} +STR_CONFIG_SETTING_MAX_SHIPS_HELPTEXT :Maximumaantal schepen dat een bedrijf kan hebben STR_CONFIG_SETTING_AI_BUILDS_TRAINS :Treinen voor de computer uitschakelen: {STRING} STR_CONFIG_SETTING_AI_BUILDS_TRAINS_HELPTEXT :Het inschakelen van deze instelling maakt het bouwen van treinen onmogelijk voor een computerspeler @@ -1457,60 +1469,60 @@ STR_CONFIG_SETTING_AI_PROFILE_EASY :Makkelijk STR_CONFIG_SETTING_AI_PROFILE_MEDIUM :Gemiddeld STR_CONFIG_SETTING_AI_PROFILE_HARD :Moeilijk -STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Laat computerspelers toe in netwerkspel: {STRING} +STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Computerspelers toestaan in netwerkspelen: {STRING} STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Sta door computer gegenereerde speler toe deel te nemen in multiplayerspellen STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes voordat scripts worden gestopt: {STRING} -STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Maximum aantal berekeningsstappen die een script kan maken in een beurt +STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Maximumaantal berekeningsstappen die een script kan maken in een beurt -STR_CONFIG_SETTING_SERVINT_ISPERCENT :Interval tussen onderhoud is een percentage: {STRING} +STR_CONFIG_SETTING_SERVINT_ISPERCENT :Onderhoudstermijnen in procenten: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Kies of onderhoud van de voertuigen wordt geactiveerd door verstreken tijd sinds het laatste onderhoud of door het zakken van de betrouwbaarheid met een bepaald percentage van de maximale betrouwbaarheid -STR_CONFIG_SETTING_SERVINT_TRAINS :Standaard onderhoudsinterval voor treinen: {STRING} -STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT :Stel de standaard service-interval voor nieuwe railvoertuigen, als er geen expliciete service-interval is ingesteld voor het voertuig +STR_CONFIG_SETTING_SERVINT_TRAINS :Standaardonderhoudstermijn voor treinen: {STRING} +STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT :Standaardonderhoudstermijn instellen voor nieuwe treinen als er geen expliciete onderhoudstermijn is ingesteld voor het voertuig STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA}{NBSP}dag{P 0 "" en}/% STR_CONFIG_SETTING_SERVINT_DISABLED :Uitgeschakeld -STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES :Standaard onderhoudsinterval voor wegvoertuigen: {STRING} -STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT :Stel de standaard service-interval voor nieuwe wegvoertuigen, als er geen expliciete service-interval is ingesteld voor het voertuig -STR_CONFIG_SETTING_SERVINT_AIRCRAFT :Standaard onderhoudsinterval voor vliegtuigen: {STRING} -STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Stel de standaard service-interval voor nieuwe vliegtuigen, als er geen expliciete service-interval is ingesteld voor het voertuig -STR_CONFIG_SETTING_SERVINT_SHIPS :Standaard onderhoudsinterval voor schepen: {STRING} -STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Stel de standaard service-interval voor nieuwe schepen, als er geen expliciete service-interval is ingesteld voor het voertuig -STR_CONFIG_SETTING_NOSERVICE :Schakel onderhoud uit wanneer defecten uit staan: {STRING} -STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Als deze optie is ingeschakeld zullen voertuigen niet onderhouden worden als niet kapot kunnen gaan. +STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES :Standaardonderhoudstermijn voor wegvoertuigen: {STRING} +STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT :Standaardonderhoudstermijn voor nieuwe wegvoertuigen als er geen expliciete onderhoudstermijn is ingesteld voor het voertuig +STR_CONFIG_SETTING_SERVINT_AIRCRAFT :Standaardonderhoudstermijn voor vliegtuigen: {STRING} +STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Standaardonderhoudsterrmijn voor nieuwe vliegtuigen als er geen expliciete onderhoudstermijn is ingesteld voor het voertuig +STR_CONFIG_SETTING_SERVINT_SHIPS :Standaardonderhoudstermijn voor schepen: {STRING} +STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Standaardonderhoudstermijn voor nieuwe schepen als er geen expliciete onderhoudstermijn is ingesteld voor het voertuig +STR_CONFIG_SETTING_NOSERVICE :Onderhoud uitschakelen wanneer defecten uit staan: {STRING} +STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Als deze optie is ingeschakeld worden voertuigen niet onderhouden als ze niet kapot kunnen gaan. STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Schakel snelheidslimieten voor wagons aan: {STRING} STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Wanneer ingeschakeld, ook gebruik maken van snelheidsbeperkingen van wagons voor het bepalen van de maximale snelheid van een trein -STR_CONFIG_SETTING_DISABLE_ELRAILS :Schakel elektrische sporen uit: {STRING} -STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Het inschakelen van deze instelling schakelt de verplichting voor spoorelektrificatie voor elektrische treinen uit +STR_CONFIG_SETTING_DISABLE_ELRAILS :Elektrische sporen uitschakelen: {STRING} +STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Wanneer dit is ingeschakeld, hoeven sporen niet te zijn geëlektrificeerd voor elektrische treinen STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OWN :Eerste voertuig bij eigen station: {STRING} -STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OWN_HELPTEXT :Toon een krant als het eerste voertuig arriveert op een station van de speler +STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OWN_HELPTEXT :Nieuwsbericht weergeven als het eerste voertuig arriveert op een station van de speler STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OTHER :Eerste voertuig bij station van een concurrent: {STRING} -STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OTHER_HELPTEXT :Toon een krant als het eerste voertuig arriveert op een nieuw station van een concurrent +STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OTHER_HELPTEXT :Nieuwsbericht weergeven als het eerste voertuig arriveert op een nieuw station van een concurrent STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS :Ongelukken / rampen: {STRING} -STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS_HELPTEXT :Toon een krant bij ongevallen of rampen +STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS_HELPTEXT :Nieuwsbericht weergeven bij ongevallen of rampen STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION :Bedrijfsinformatie: {STRING} -STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION_HELPTEXT :Toon een krant als een nieuw bedrijf start, of wanneer een bedrijf het risico loopt om falliet te gaan +STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION_HELPTEXT :Nieuwsbericht weergeven als een nieuw bedrijf start en wanneer een bedrijf bijna falliet gaat STR_CONFIG_SETTING_NEWS_INDUSTRY_OPEN :Openen van industrieën: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_OPEN_HELPTEXT :Toon een krant als nieuwe industrieën worden geopend +STR_CONFIG_SETTING_NEWS_INDUSTRY_OPEN_HELPTEXT :Nieuwsbericht weergeven als een nieuwe industrie worden opgericht STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE :Sluiten van industrieën: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE_HELPTEXT :Toon een krant als industrieën sluiten +STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE_HELPTEXT :Nieuwsbericht weergeven als een industrie sluit STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES :Veranderingen in de economie: {STRING} -STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES_HELPTEXT :Toon een krant over wereldwijde wijzigingen in de economie +STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES_HELPTEXT :Nieuwsbericht weergeven over wereldwijde wijzigingen in de economie STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY :Productieveranderingen van industrieën bediend door het bedrijf: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY_HELPTEXT :Toon een krant als het productieniveau van een industrie verandert, die worden bediend door het bedrijf +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY_HELPTEXT :Nieuwsbericht weergeven als het productieniveau van een industrie verandert die wordt bediend door het bedrijf STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER :Productieveranderingen van industrieën bediend door concurrent(en): {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Toon een krant als het productieniveau van een industrie verandert, die worden bediend door concurrenten +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Nieuwsbericht weergeven als het productieniveau van een industrie verandert die wordt bediend door een concurrent STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED :Andere productieveranderingen van industrieën: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED_HELPTEXT :Toon een krant als het productieniveau van de industrie verandert, die niet worden bediend door het bedrijf of de concurrenten +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED_HELPTEXT :Nieuwsbericht weergeven als het productieniveau van een industrie verandert die niet wordt bediend door het bedrijf of een concurrent STR_CONFIG_SETTING_NEWS_ADVICE :Advies / informatie over voertuigen van het bedrijf: {STRING} -STR_CONFIG_SETTING_NEWS_ADVICE_HELPTEXT :Toon berichten over voertuigen die aandacht nodig hebben +STR_CONFIG_SETTING_NEWS_ADVICE_HELPTEXT :Berichten weergeven over voertuigen die aandacht nodig hebben STR_CONFIG_SETTING_NEWS_NEW_VEHICLES :Nieuwe voertuigen: {STRING} -STR_CONFIG_SETTING_NEWS_NEW_VEHICLES_HELPTEXT :Toon een krant als een nieuw type voertuig beschikbaar komt +STR_CONFIG_SETTING_NEWS_NEW_VEHICLES_HELPTEXT :Nieuwsbericht weergeven als een nieuw type voertuig beschikbaar komt STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE :Verandering van geaccepteerde vrachtsoorten: {STRING} -STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE_HELPTEXT :Toon een bericht over gewijzigde acceptatie van goederen van stations +STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE_HELPTEXT :Bericht weergeven over gewijzigde acceptatie van goederen van stations STR_CONFIG_SETTING_NEWS_SUBSIDIES :Subsidies: {STRING} -STR_CONFIG_SETTING_NEWS_SUBSIDIES_HELPTEXT :Toon een krant over subsidie gerelateerde gebeurtenissen +STR_CONFIG_SETTING_NEWS_SUBSIDIES_HELPTEXT :Nieuwsbericht weergeven over gebeurtenissen met subsidies STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION :Algemene informatie: {STRING} -STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION_HELPTEXT :Weergave krant over algemene gebeurtenissen, zoals de aankoop van exclusieve rechten of financiering van weg-reconstructie +STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION_HELPTEXT :Geef krant weer over algemene gebeurtenissen, zoals de aankoop van exclusieve rechten of financiering van wegherstelling STR_CONFIG_SETTING_NEWS_MESSAGES_OFF :Uit STR_CONFIG_SETTING_NEWS_MESSAGES_SUMMARY :Samengevat @@ -1518,22 +1530,22 @@ STR_CONFIG_SETTING_NEWS_MESSAGES_FULL :Volledig STR_CONFIG_SETTING_COLOURED_NEWS_YEAR :Kleurenfoto's komen in: {STRING} STR_CONFIG_SETTING_COLOURED_NEWS_YEAR_HELPTEXT :Jaar dat de krant aankondigt in kleur te gaan afdrukken. Voor dit jaar wordt zwart-wit gebruikt -STR_CONFIG_SETTING_STARTING_YEAR :Beginjaar: {STRING} +STR_CONFIG_SETTING_STARTING_YEAR :Startjaar: {STRING} STR_CONFIG_SETTING_SMOOTH_ECONOMY :Vloeiende economie inschakelen (meer, kleinere veranderingen): {STRING} STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Wanneer ingeschakeld, industrie produktie verandert vaker en in kleinere stappen. Deze instelling heeft meestal geen effect, als de industrie soorten worden geleverd door een NewGRF -STR_CONFIG_SETTING_ALLOW_SHARES :Sta het kopen van aandelen van andere bedrijven toe: {STRING} +STR_CONFIG_SETTING_ALLOW_SHARES :Kopen van aandelen in andere bedrijven toestaan: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Wanneer ingeschakeld is het toegestaan om bedrijfsaandelen te kopen en te verkopen. Aandelen zullen alleen beschikbaar zijn voor bedrijven die een bepaalde leeftijd hebben bereikt STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Percentage van routeopbrengst in overdrachtssysteem: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Percentage van het inkomen besteed aan de intermediaire delen in feedersystemen waardoor er meer controle over de inkomsten is -STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Bij slepen, plaats seinen elke: {STRING} +STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Bij slepen, seinen plaatsen om de: {STRING} STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT :Stel de afstand waarop signalen worden gebouwd op een spoor in totaan de volgende hindernis (signaal, kruising) als signalen worden gesleept STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_VALUE :{COMMA} tegel{P 0 "" s} -STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE :Bij slepen, hou vaste afstand tussen seinen: {STRING} +STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE :Bij slepen vaste afstand tussen seinen aanhouden: {STRING} STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE_HELPTEXT :Selecteer het gedrag van seinplaatsing wanneer je met Ctrl+slepen seinen plaatst. Indien dit uitgeschakeld is, dan worden seinen rondom tunnels of bruggen geplaatst om lange stukken te vermijden zonder seinen. Indien dit ingeschakeld is, dan worden seinen om de N tegels geplaatst, waardoor de uitlijning van de seinen op parallelle sporen makkelijker is STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :Plaats automatisch armseinen voor: {STRING} STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Stel het jaar waarin elektrische seinen zal worden gebruikt voor sporen. Voor dit jaar zal niet-elektrische seinen worden gebruikt (die exact dezelfde functie hebben, maar verschillend uiterlijk) STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :Activeer de seininterface: {STRING} -STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI_HELPTEXT :Toon een venster waar je de soorten seinen kunt kiezen om te bouwen in plaats van alleen vensterloze seintyperotatie met Ctrl+klikken op gebouwde seinen +STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI_HELPTEXT :Een venster weergeven waar je de soorten seinen kunt kiezen om te bouwen in plaats van alleen bladeren door seintypes met Ctrl+klikken op gebouwde seinen STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE :Seintype dat standaard moet worden gebouwd: {STRING} STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Standaard te gebruiken sein. STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Normale seinen @@ -1553,7 +1565,7 @@ STR_CONFIG_SETTING_TOWN_LAYOUT_2X2_GRID :2x2 raster STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :3x3 raster STR_CONFIG_SETTING_TOWN_LAYOUT_RANDOM :Willekeurig STR_CONFIG_SETTING_ALLOW_TOWN_ROADS :Steden mogen wegen bouwen: {STRING} -STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Sta steden toe om wegen te bouwen ten behoeve van groei. Schakel deze optie uit om gemeentebesturen ervan te weerhouden zelf wegen te bouwen. +STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Steden toestaan om wegen te bouwen ten behoeve van groei. Schakel deze optie uit als je niet wilt dat gemeenten zelf wegen bouwen. STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS :Steden mogen gelijkvloerse kruisingen bouwen: {STRING} STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS_HELPTEXT :Door deze optie in te schakelen, kunnen steden gelijkvloerse kruisingen bouwen. STR_CONFIG_SETTING_NOISE_LEVEL :Geluidsniveaucontrole door steden voor vliegvelden toestaan: {STRING} @@ -1565,8 +1577,8 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :Toestaan STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :Toestaan, eigen wegpatroon STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :Plaatsing van bomen in het spel: {STRING} -STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :Beheer willekeurig verschijnen van bomen tijdens het spel. Dit kan gevolgen hebben voor industrietakken die afhankelijk zijn van groei van bomen, bijvoorbeeld houtzagerijen -STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NONE :Geen {RED}(houtzagerij werkt niet) +STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :Beheert het willekeurig verschijnen van bomen tijdens het spel. Dit kan gevolgen hebben voor industrietakken die afhankelijk zijn van groei van bomen, bijvoorbeeld houtzagerijen. +STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NONE :Geen {RED}(houtzagerijen werken niet) STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_RAINFOREST :Alleen in regenwouden STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_ALL :Overal @@ -1578,7 +1590,7 @@ STR_CONFIG_SETTING_SNAP_RADIUS :Windowssnap rad STR_CONFIG_SETTING_SNAP_RADIUS_HELPTEXT :Afstand tussen vensters voordat het venster wordt verplaatst wordt automatisch uitgelijnd naar de nabijgelegen vensters STR_CONFIG_SETTING_SNAP_RADIUS_VALUE :{COMMA} pixel{P 0 "" s} STR_CONFIG_SETTING_SNAP_RADIUS_DISABLED :Uitgeschakeld -STR_CONFIG_SETTING_SOFT_LIMIT :Maximum aantal (niet-sticky) vensters: {STRING} +STR_CONFIG_SETTING_SOFT_LIMIT :Maximumaantal (niet-blijvende) vensters: {STRING} STR_CONFIG_SETTING_SOFT_LIMIT_HELPTEXT :Aantal niet-klevende open vensters voor oude vensters automatisch worden gesloten om ruimte voor nieuwe vensters te maken STR_CONFIG_SETTING_SOFT_LIMIT_VALUE :{COMMA} STR_CONFIG_SETTING_SOFT_LIMIT_DISABLED :uitgeschakeld @@ -1599,7 +1611,7 @@ STR_CONFIG_SETTING_TOWN_GROWTH_SLOW :Langzaam STR_CONFIG_SETTING_TOWN_GROWTH_NORMAL :Normaal STR_CONFIG_SETTING_TOWN_GROWTH_FAST :Snel STR_CONFIG_SETTING_TOWN_GROWTH_VERY_FAST :Heel snel -STR_CONFIG_SETTING_LARGER_TOWNS :Verhouding van gemeenten die steden zullen worden: {STRING} +STR_CONFIG_SETTING_LARGER_TOWNS :Verhouding van gemeenten die uitgroeien tot steden: {STRING} STR_CONFIG_SETTING_LARGER_TOWNS_HELPTEXT :Aantal steden die een stad worden, dus een stad die groter begint en sneller groeit STR_CONFIG_SETTING_LARGER_TOWNS_VALUE :1 op {COMMA} STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :Geen @@ -1614,7 +1626,7 @@ STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :handmatig STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asymmetrisch STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :symmetrisch STR_CONFIG_SETTING_DISTRIBUTION_PAX :Distributiemodus voor passagiers: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"symmetrisch" betekent dat ongeveer hetzelfde aantal passagiers gaan van een station A naar station B als een van B naar A. "asymmetrische" betekent dat willekeurig aantal passagiers kunnen gaan in beide richtingen. "handmatig" betekent dat er geen automatische distributie zal plaatsvinden voor passagiers. +STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :'Symmetrisch' betekent dat ongeveer hetzelfde aantal passagiers van station A naar station B gaat als van B naar A. 'Asymmetrisch' betekent dat willekeurige aantallen passagiers reizen in beide richtingen. 'Handmatig' betekent dat er geen automatische distributie plaatsvindt voor passagiers. STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Distributiemodus voor post: {STRING} STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"symmetrisch" betekent dat ongeveer dezelfde hoeveelheid post zal worden verzonden van een station A naar een station B als B naar A. "asymmetrisch" betekent dat willekeurige hoeveelheden post in beide richtingen worden verzonden. "handmatig" betekent dat er geen automatische distributie zal plaatsvinden voor post. STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Distributiemodus voor de GEPANTSERDE ladingsklasse: {STRING} @@ -1625,31 +1637,31 @@ STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Verdeelnauwkeur STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Hoe hoger de instelling, des te meer CPU-tijd de berekening van de linkgrafiek zal gebruiken. Als het te lang duurt, kan dan dat lag opleveren. Als je dit echter op een lage waarde instelt, zal de verdeling onnauwkeurig zijn, en kan het zijn dat vracht niet wordt gestuurd naar de plekken waar het naartoe moet gaan. STR_CONFIG_SETTING_DEMAND_DISTANCE :Effect van afstand op de vraag: {STRING} STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :Als je dit op een waarde hoger dan 0 zet, dan zal de afstand tussen het station van herkomst A met enige vracht en een mogelijke bestemming B effect hebben op de hoeveelheid lading verzonden van A naar B. Hoe verder weg B is van A, des te minder lading wordt verzonden. Hoe hoger je deze instelt, hoe minder lading wordt verzonden naar verder geleden stations en meer lading zal worden verzonden naar dichtbij gelegen stations. -STR_CONFIG_SETTING_DEMAND_SIZE :Hoeveelheid van de kerende vracht voor symmetrische modus: {STRING} +STR_CONFIG_SETTING_DEMAND_SIZE :Hoeveelheid terugkerende vracht voor symmetrische modus: {STRING} STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Door dit op minder dan 100% te zetten lijkt de symmetrische verdeling meer op de asymmetrische verdeling. Minder vracht zal geforceerd worden om zich terug te sturen als er een bepaalde hoeveelheid wordt verzonden naar een station. Op 0% van de symmetrische verdeling gedraagt deze zicht als de asymmetrische verdeling. STR_CONFIG_SETTING_SHORT_PATH_SATURATION :Verzadiging van korte routes voor het gebruik van ruime routes: {STRING} STR_CONFIG_SETTING_SHORT_PATH_SATURATION_HELPTEXT :Vaak zijn er meerdere routes mogelijk tussen twee stations. Cargodist zal de kortste route eerst verzadigen, gebruik dan de tweede kortste route tot die verzadigd is en ga zo maar door. Verzadiging wordt bepaald door een schatting van de capaciteit en het geplande gebruik. Zodra alle routes verzadigd zijn, maar er is meer vraag, zal alle wegen overbelast worden, die met hoge capaciteit eerst. In veel gevallen zat het algoritme niet nauwkeurig de capaciteit inschatten, helaas. Met deze instelling kunt u aangeven tot welk percentage een korter pad moet worden verzadigd eer de eerst volgende langere route wordt gekozen. Zet deze op minder dan 100% om overvolle stations in geval van overschat capaciteit te voorkomen. STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY :Snelheidseenheden: {STRING} -STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Wanneer een snelheid wordt weergegeven in de gebruikersinterface, dan moet het worden getoond in de geselecteerde eenheden +STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Wanneer een snelheid wordt weergegeven in het gebruikersscherm, gebruik dan de geselecteerde eenheden STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL :Imperiaal (mph) STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_METRIC :Metrisch (km/h) STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_SI :SI (m/s) STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER :Voertuigkrachteenheden: {STRING} -STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_HELPTEXT :Als het verbruik van een voertuig wordt weergegeven in de gebruikersinterface, dan moet het worden getoond in de geselecteerde eenheden +STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_HELPTEXT :Als het verbruik van een voertuig wordt weergegeven in het gebruikersscherm, gebruik dan de geselecteerde eenheden STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL :Imperiaal (hp) STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_METRIC :Metrisch (hp) STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_SI :SI (kW) STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT :Gewichtseenheden: {STRING} -STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_HELPTEXT :Wanneer er gewichten worden weergegeven in de gebruikersinterface, dan moeten ze worden getoond in de geselecteerde eenheden +STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_HELPTEXT :Wanneer gewichten worden weergegeven in het gebruikersscherm, gebruik dan de geselecteerde eenheden STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_IMPERIAL :Imperiaal (short t/ton) STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_METRIC :Metrisch (t/ton) STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_SI :SI (kg) STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME :Volume-eenheden: {STRING} -STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_HELPTEXT :Wanneer volumes worden getoond in de gebruikersinterface, dan moeten ze worden getoond in de geselecteerde eenheden +STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_HELPTEXT :Wanneer volumes worden weergeven in het gebruikersscherm, gebruik dan de geselecteerde eenheden STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL :Imperiaal (gal) STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_METRIC :Metrisch (l) STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_SI :SI (m³) @@ -1661,26 +1673,26 @@ STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_METRIC :Metrisch (kgf) STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_SI :SI (kN) STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT :Hoogte-eenheden: {STRING} -STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT :Wanneer hoogtes worden weergegeven in de gebruikersinterface, moet het worden getoond in de geselecteerde eenheden +STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT :Wanneer hoogtes worden weergegeven in het gebruikersscherm, gebruik dan de geselecteerde eenheden STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL :Imperiaal (ft) STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_METRIC :Metrisch (m) STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :SI (m) STR_CONFIG_SETTING_LOCALISATION :{ORANGE}Lokalisatie -STR_CONFIG_SETTING_GRAPHICS :{ORANGE}Graphics +STR_CONFIG_SETTING_GRAPHICS :{ORANGE}Grafische elementen STR_CONFIG_SETTING_SOUND :{ORANGE}Geluid -STR_CONFIG_SETTING_INTERFACE :{ORANGE}Interface +STR_CONFIG_SETTING_INTERFACE :{ORANGE}Gebruikersscherm STR_CONFIG_SETTING_INTERFACE_GENERAL :{ORANGE}Algemeen STR_CONFIG_SETTING_INTERFACE_VIEWPORTS :{ORANGE}Kijkvensters STR_CONFIG_SETTING_INTERFACE_CONSTRUCTION :{ORANGE}Constructie -STR_CONFIG_SETTING_ADVISORS :{ORANGE}Nieuws / Adviseurs +STR_CONFIG_SETTING_ADVISORS :{ORANGE}Nieuws/adviseurs STR_CONFIG_SETTING_COMPANY :{ORANGE}Bedrijf STR_CONFIG_SETTING_ACCOUNTING :{ORANGE}Boekhouding STR_CONFIG_SETTING_VEHICLES :{ORANGE}Voertuigen STR_CONFIG_SETTING_VEHICLES_PHYSICS :{ORANGE}Physics STR_CONFIG_SETTING_VEHICLES_ROUTING :{ORANGE}Routebepaling STR_CONFIG_SETTING_LIMITATIONS :{ORANGE}Beperkingen -STR_CONFIG_SETTING_ACCIDENTS :{ORANGE}Rampen / Ongelukken +STR_CONFIG_SETTING_ACCIDENTS :{ORANGE}Rampen/ongelukken STR_CONFIG_SETTING_GENWORLD :{ORANGE}Wereldgeneratie STR_CONFIG_SETTING_ENVIRONMENT :{ORANGE}Omgeving STR_CONFIG_SETTING_ENVIRONMENT_AUTHORITIES :{ORANGE}Autoriteiten @@ -1701,7 +1713,7 @@ STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES_HELPTEXT :Routezoeker voo STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS :Routezoeker voor schepen: {STRING} STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT :Routezoeker voor schepen STR_CONFIG_SETTING_REVERSE_AT_SIGNALS :Automatisch omdraaien bij seinen: {STRING} -STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Staat toe dat treinen omdraaien bij een sein als ze hier lang hebben staan wachten. +STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Treinen mogen keren bij een sein als ze hier lang staan wachten STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Verander waarde @@ -1709,12 +1721,12 @@ STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Verander STR_CONFIG_ERROR :{WHITE}Fout in het configuratiebestand... STR_CONFIG_ERROR_ARRAY :{WHITE}... fout in array '{STRING}' STR_CONFIG_ERROR_INVALID_VALUE :{WHITE}... ongeldige waarde '{STRING}' voor '{STRING}' -STR_CONFIG_ERROR_TRAILING_CHARACTERS :{WHITE}... karakters gevonden aan het einde van instellingen '{STRING}' -STR_CONFIG_ERROR_DUPLICATE_GRFID :{WHITE}... negeer NewGRF '{STRING}': dubbel GRF ID met '{STRING}' +STR_CONFIG_ERROR_TRAILING_CHARACTERS :{WHITE}... tekens gevonden aan het einde van instellingen '{STRING}' +STR_CONFIG_ERROR_DUPLICATE_GRFID :{WHITE}... NewGRF '{STRING}' wordt genegeerd: dubbele GRF-id met '{STRING}' STR_CONFIG_ERROR_INVALID_GRF :{WHITE}... negeer ongeldige NewGRF '{STRING}': {STRING} STR_CONFIG_ERROR_INVALID_GRF_NOT_FOUND :niet gevonden STR_CONFIG_ERROR_INVALID_GRF_UNSAFE :onveilig voor statisch gebruik -STR_CONFIG_ERROR_INVALID_GRF_SYSTEM :systeem NewGRF +STR_CONFIG_ERROR_INVALID_GRF_SYSTEM :systeem-NewGRF STR_CONFIG_ERROR_INVALID_GRF_INCOMPATIBLE :niet compatibel met deze versie van OpenTTD STR_CONFIG_ERROR_INVALID_GRF_UNKNOWN :onbekend STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_LEVEL :{WHITE}... compressieniveau '{STRING}' is niet geldig @@ -1723,7 +1735,7 @@ STR_CONFIG_ERROR_INVALID_BASE_GRAPHICS_NOT_FOUND :{WHITE}... nege STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND :{WHITE}... negeert standaard geluidsset '{STRING}': niet gevonden STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND :{WHITE}... negeert standaard muziekset '{STRING}': niet gevonden STR_CONFIG_ERROR_OUT_OF_MEMORY :{WHITE}Geen geheugen meer -STR_CONFIG_ERROR_SPRITECACHE_TOO_BIG :{WHITE}Toewijzen van {BYTES} van spritecache mislukt. De spritecache werd teruggebracht tot {BYTES}. Dit zal de prestaties van OpenTTD verlagen. Om het geheugen te verminderen kunt u proberen om 32bpp graphics en / of zoom-in levels uit te schakelen +STR_CONFIG_ERROR_SPRITECACHE_TOO_BIG :{WHITE}Toewijzen van {BYTES} van spritecache mislukt. De spritecache werd teruggebracht tot {BYTES}. Dit verlaagt de prestaties van OpenTTD. Om het benodigde geheugen te verminderen, kunt u proberen om 32bpp-beeldelementen en/of inzoomniveaus uit te schakelen # Intro window STR_INTRO_CAPTION :{WHITE}OpenTTD {REV} @@ -1736,11 +1748,11 @@ STR_INTRO_SCENARIO_EDITOR :{BLACK}Scenario STR_INTRO_MULTIPLAYER :{BLACK}Multiplayer STR_INTRO_GAME_OPTIONS :{BLACK}Spelopties -STR_INTRO_HIGHSCORE :{BLACK}Score tabel +STR_INTRO_HIGHSCORE :{BLACK}Scoretabel STR_INTRO_CONFIG_SETTINGS_TREE :{BLACK}Instellingen STR_INTRO_NEWGRF_SETTINGS :{BLACK}NewGRF-instellingen STR_INTRO_ONLINE_CONTENT :{BLACK}Online inhoud zoeken -STR_INTRO_SCRIPT_SETTINGS :{BLACK}AI/Spel script Instellingen +STR_INTRO_SCRIPT_SETTINGS :{BLACK}AI-/spelscriptinstellingen STR_INTRO_QUIT :{BLACK}Afsluiten STR_INTRO_TOOLTIP_NEW_GAME :{BLACK}Start een nieuw spel. Ctrl+klik slaat de kaartconfiguratie over @@ -1748,19 +1760,19 @@ STR_INTRO_TOOLTIP_LOAD_GAME :{BLACK}Laad een STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP :{BLACK}Start een nieuw spel, gebruik een hoogtekaart als landschap STR_INTRO_TOOLTIP_PLAY_SCENARIO :{BLACK}Start een nieuw spel, gebaseerd op een scenario STR_INTRO_TOOLTIP_SCENARIO_EDITOR :{BLACK}Maak een eigen spelwereld/scenario -STR_INTRO_TOOLTIP_MULTIPLAYER :{BLACK}Start een multiplayer spel +STR_INTRO_TOOLTIP_MULTIPLAYER :{BLACK}Start een multiplayerspel STR_INTRO_TOOLTIP_TEMPERATE :{BLACK}Kies gematigd klimaat STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Kies subarctisch klimaat STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Kies subtropisch klimaat STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Kies speelgoedlandschap -STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Toon spelopties -STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Toon score tabel +STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Spelopties weergeven +STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Scoretabel weergeven STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Scherminstellingen -STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Toon NewGRF-instellingen +STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}NewGRF-instellingen weergeven STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Zoeken naar nieuwe en aangepaste inhoud om te downloaden -STR_INTRO_TOOLTIP_SCRIPT_SETTINGS :{BLACK}Toon AI/Game script instellingen +STR_INTRO_TOOLTIP_SCRIPT_SETTINGS :{BLACK}AI-/spelscriptinstellingen weergeven STR_INTRO_TOOLTIP_QUIT :{BLACK}Verlaat 'OpenTTD' STR_INTRO_BASESET :{BLACK}De huidige gekozen graphics set mist {NUM} afbeelding{P "" en}. Controleer of er updates zijn voor deze basisset. @@ -1785,47 +1797,47 @@ STR_OSNAME_OS2 :OS/2 STR_OSNAME_SUNOS :SunOS # Abandon game -STR_ABANDON_GAME_CAPTION :{WHITE}Verlaat spel -STR_ABANDON_GAME_QUERY :{YELLOW}Weet je zeker dat je dit spel wilt afsluiten? +STR_ABANDON_GAME_CAPTION :{WHITE}Spel sluiten +STR_ABANDON_GAME_QUERY :{YELLOW}Weet je zeker dat je dit spel wilt sluiten? STR_ABANDON_SCENARIO_QUERY :{YELLOW}Weet je zeker dat je dit scenario wilt sluiten? # Cheat window -STR_CHEATS :{WHITE}Cheats -STR_CHEATS_TOOLTIP :{BLACK}Keuzevakjes geven aan of je deze cheat eerder hebt gebruikt +STR_CHEATS :{WHITE}Valsspelen +STR_CHEATS_TOOLTIP :{BLACK}Keuzevakjes geven aan of je deze manier van valsspelen eerder hebt gebruikt STR_CHEATS_WARNING :{BLACK}Waarschuwing! Je staat op het punt je medespelers te verraden. Onthoud dat zo'n schande eeuwig wordt onthouden -STR_CHEAT_MONEY :{LTBLUE}Verhoog geld met {CURRENCY_LONG} +STR_CHEAT_MONEY :{LTBLUE}Kapitaal vergroten met {CURRENCY_LONG} STR_CHEAT_CHANGE_COMPANY :{LTBLUE}Spelen als bedrijf: {ORANGE}{COMMA} STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Magische bulldozer (industrieën en andere onverplaatsbare objecten verwijderen): {ORANGE}{STRING} STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Tunnels mogen elkaar kruisen: {ORANGE}{STRING} STR_CHEAT_NO_JETCRASH :{LTBLUE}Straalvliegtuigen storten niet (vaak) neer op kleine vliegvelden: {ORANGE} {STRING} -STR_CHEAT_EDIT_MAX_HL :{LTBLUE}Wijzig de maximum kaarthoogte: {ORANGE}{NUM} -STR_CHEAT_EDIT_MAX_HL_QUERY_CAPT :{WHITE}Wijzig de maximum hoogte van bergen op de kaart +STR_CHEAT_EDIT_MAX_HL :{LTBLUE}Wijzig de maximale kaarthoogte: {ORANGE}{NUM} +STR_CHEAT_EDIT_MAX_HL_QUERY_CAPT :{WHITE}Wijzig de maximale hoogte van bergen op de kaart STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE :Gematigd landschap STR_CHEAT_SWITCH_CLIMATE_SUB_ARCTIC_LANDSCAPE :Subarctisch landschap STR_CHEAT_SWITCH_CLIMATE_SUB_TROPICAL_LANDSCAPE :Subtropisch landschap STR_CHEAT_SWITCH_CLIMATE_TOYLAND_LANDSCAPE :Speelgoedlandschap -STR_CHEAT_CHANGE_DATE :{LTBLUE}Verander datum: {ORANGE}{DATE_SHORT} -STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Wijzig huidig jaar -STR_CHEAT_SETUP_PROD :{LTBLUE}Sta aanpassen productiewaarden toe: {ORANGE}{STRING} +STR_CHEAT_CHANGE_DATE :{LTBLUE}Datum wijzigen: {ORANGE}{DATE_SHORT} +STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Huidig jaar wijzigen +STR_CHEAT_SETUP_PROD :{LTBLUE}Productiewaarden aanpassen toestaan: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nieuw kleurenschema +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - kleurenschema -STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Toon algemene kleurenschema's -STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Toon kleurenschema's voor treinen -STR_LIVERY_ROAD_VEHICLE_TOOLTIP :{BLACK}Toon kleurenschema's voor wegvoertuigen -STR_LIVERY_SHIP_TOOLTIP :{BLACK}Toon kleurenschema's voor schepen -STR_LIVERY_AIRCRAFT_TOOLTIP :{BLACK}Toon kleurenschema's voor vliegtuigen -STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Kies de hoofdkleur voor het geselecteerde schema. Ctrl+klik deze kleu bij alle schema's gebruiken +STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Algemene kleurenschema's weergeven +STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Kleurenschema's voor treinen weergeven +STR_LIVERY_ROAD_VEHICLE_TOOLTIP :{BLACK}Kleurenschema's voor wegvoertuigen weergeven +STR_LIVERY_SHIP_TOOLTIP :{BLACK}Kleurenschema's voor schepen weergeven +STR_LIVERY_AIRCRAFT_TOOLTIP :{BLACK}Kleurenschema's voor vliegtuigen weergeven +STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Kies de hoofdkleur voor het geselecteerde schema. Ctrl+klik zal deze kleur instellen voor elk schema STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Kies de tweede kleur voor het geselecteerde schema. Ctrl+klik om deze kleur in alle schema's te gebruiken -STR_LIVERY_PANEL_TOOLTIP :{BLACK}Kies een kleurenschema om te wijzigen, of meerdere schema's met Ctrl+klik. Vink de keuzevakjes aan/uit om het gebruik van het schema aan/uit te zetten +STR_LIVERY_PANEL_TOOLTIP :{BLACK}Kies een kleurenschema om te wijzigen of meerdere schema's met Ctrl+klik. Vink de keuzevakjes aan-uit om het schema aan-uit te zetten STR_LIVERY_DEFAULT :Standaard kleurenschema STR_LIVERY_STEAM :Stoomlocomotief STR_LIVERY_DIESEL :Diesellocomotief STR_LIVERY_ELECTRIC :Elektrische locomotief -STR_LIVERY_MONORAIL :Monorail-locomotief -STR_LIVERY_MAGLEV :Zweeftrein-locomotief +STR_LIVERY_MONORAIL :Monoraillocomotief +STR_LIVERY_MAGLEV :Zweeftreinlocomotief STR_LIVERY_DMU :Dieseltreinstel STR_LIVERY_EMU :Elektrisch treinstel STR_LIVERY_PASSENGER_WAGON_STEAM :Passagierswagon (Stoom) @@ -1905,7 +1917,7 @@ STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Verander # Network server list STR_NETWORK_SERVER_LIST_CAPTION :{WHITE}Multiplayer STR_NETWORK_SERVER_LIST_ADVERTISED :{BLACK}Openbaar -STR_NETWORK_SERVER_LIST_ADVERTISED_TOOLTIP :{BLACK}Kies tussen een openbaar (internet) en een niet openbaar (Local Area Network, LAN) spel +STR_NETWORK_SERVER_LIST_ADVERTISED_TOOLTIP :{BLACK}Kies tussen een openbaar (internet) en een niet-openbaar (Local Area Network, LAN) spel STR_NETWORK_SERVER_LIST_ADVERTISED_NO :Nee STR_NETWORK_SERVER_LIST_ADVERTISED_YES :Ja STR_NETWORK_SERVER_LIST_PLAYER_NAME :{BLACK}Spelersnaam: @@ -1959,28 +1971,28 @@ STR_NETWORK_SERVER_LIST_PLAYER_NAME_OSKTITLE :{BLACK}Vul je n STR_NETWORK_SERVER_LIST_ENTER_IP :{BLACK}Voer het IP-adres van de server in # Start new multiplayer server -STR_NETWORK_START_SERVER_CAPTION :{WHITE}Start nieuw multiplayer spel +STR_NETWORK_START_SERVER_CAPTION :{WHITE}Start nieuw multiplayerspel STR_NETWORK_START_SERVER_NEW_GAME_NAME :{BLACK}Spelnaam: -STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}De spelnaam wordt weergegeven aan andere spelers in het multiplayer-spelselectie menu +STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}De spelnaam wordt weergegeven aan andere spelers in het multiplayerspelselectiemenu STR_NETWORK_START_SERVER_SET_PASSWORD :{BLACK}Kies wachtwoord STR_NETWORK_START_SERVER_PASSWORD_TOOLTIP :{BLACK}Bescherm je spel met een wachtwoord als je niet wilt dat deze algemeen toegankelijk is STR_NETWORK_START_SERVER_UNADVERTISED :Nee STR_NETWORK_START_SERVER_ADVERTISED :Ja STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} speler{P "" s} -STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Maximum aantal spelers: +STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Maximumaantal spelers: STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Kies het maximaal aantal toegestane spelers. Niet alle posities hoeven gebruikt te worden STR_NETWORK_START_SERVER_COMPANIES_SELECT :{BLACK}{NUM} bedr{P ijf ijven} -STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES :{BLACK}Maximum aantal bedrijven: +STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES :{BLACK}Maximumaantal bedrijven: STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES_TOOLTIP :{BLACK}Beperk de server tot een bepaald aantal bedrijven STR_NETWORK_START_SERVER_SPECTATORS_SELECT :{BLACK}{NUM} toeschouwer{P "" s} -STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS :{BLACK}Maximum aantal toeschouwers: +STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS :{BLACK}Maximumaantal toeschouwers: STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS_TOOLTIP :{BLACK}Beperk de server tot een bepaald aantal toeschouwers STR_NETWORK_START_SERVER_LANGUAGE_SPOKEN :{BLACK}Gesproken taal: STR_NETWORK_START_SERVER_LANGUAGE_TOOLTIP :{BLACK}Andere spelers zullen weten welke taal er wordt gesproken op de server -STR_NETWORK_START_SERVER_NEW_GAME_NAME_OSKTITLE :{BLACK}Geef de naam van het netwerk spel +STR_NETWORK_START_SERVER_NEW_GAME_NAME_OSKTITLE :{BLACK}Geef de naam van het netwerkspel # Network game languages ############ Leave those lines in this order!! @@ -2016,7 +2028,7 @@ STR_NETWORK_LANG_UKRAINIAN :Oekraïens STR_NETWORK_LANG_AFRIKAANS :Afrikaans STR_NETWORK_LANG_CROATIAN :Kroatisch STR_NETWORK_LANG_CATALAN :Catalaans -STR_NETWORK_LANG_ESTONIAN :Ests +STR_NETWORK_LANG_ESTONIAN :Estisch STR_NETWORK_LANG_GALICIAN :Galiciaans STR_NETWORK_LANG_GREEK :Grieks STR_NETWORK_LANG_LATVIAN :Lets @@ -2030,7 +2042,7 @@ STR_NETWORK_GAME_LOBBY_COMPANY_LIST_TOOLTIP :{BLACK}Een lijs STR_NETWORK_GAME_LOBBY_COMPANY_INFO :{SILVER}BEDRIJFSINFORMATIE STR_NETWORK_GAME_LOBBY_COMPANY_NAME :{SILVER}Bedrijfsnaam: {WHITE}{STRING} -STR_NETWORK_GAME_LOBBY_INAUGURATION_YEAR :{SILVER}Begonnen in: {WHITE}{NUM} +STR_NETWORK_GAME_LOBBY_INAUGURATION_YEAR :{SILVER}Gestart in: {WHITE}{NUM} STR_NETWORK_GAME_LOBBY_VALUE :{SILVER}Bedrijfswaarde: {WHITE}{CURRENCY_LONG} STR_NETWORK_GAME_LOBBY_CURRENT_BALANCE :{SILVER}Huidige kas: {WHITE}{CURRENCY_LONG} STR_NETWORK_GAME_LOBBY_LAST_YEARS_INCOME :{SILVER}Inkomen vorig jaar: {WHITE}{CURRENCY_LONG} @@ -2054,8 +2066,8 @@ STR_NETWORK_CONNECTING_CAPTION :{WHITE}Verbinde STR_NETWORK_CONNECTING_1 :{BLACK}(1/6) Verbinden... STR_NETWORK_CONNECTING_2 :{BLACK}(2/6) Inloggen... STR_NETWORK_CONNECTING_3 :{BLACK}(3/6) Wachten... -STR_NETWORK_CONNECTING_4 :{BLACK}(4/6) Downloaden kaart... -STR_NETWORK_CONNECTING_5 :{BLACK}(5/6) Verwerken gegevens... +STR_NETWORK_CONNECTING_4 :{BLACK}(4/6) Kaart downloaden... +STR_NETWORK_CONNECTING_5 :{BLACK}(5/6) Gegevens verwerken... STR_NETWORK_CONNECTING_6 :{BLACK}(6/6) Registreren... STR_NETWORK_CONNECTING_SPECIAL_1 :{BLACK}Spelinformatie ophalen... @@ -2091,18 +2103,18 @@ STR_NETWORK_GIVE_MONEY_CAPTION :{WHITE}Voer de STR_NETWORK_TOOLBAR_LIST_SPECTATOR :{BLACK}Toeschouwer # Network set password -STR_COMPANY_PASSWORD_CANCEL :{BLACK}Sla het ingegeven wachtwoord niet op -STR_COMPANY_PASSWORD_OK :{BLACK}Geef het bedrijf het nieuwe wachtwoord +STR_COMPANY_PASSWORD_CANCEL :{BLACK}Ingevoerd wachtwoord niet opslaan +STR_COMPANY_PASSWORD_OK :{BLACK}Bedrijf het nieuwe wachtwoord geven STR_COMPANY_PASSWORD_CAPTION :{WHITE}Bedrijfswachtwoord STR_COMPANY_PASSWORD_MAKE_DEFAULT :{BLACK}Standaard bedrijfswachtwoord -STR_COMPANY_PASSWORD_MAKE_DEFAULT_TOOLTIP :{BLACK}Gebruik dit bedrijfswachtwoord als standaard voor nieuwe bedrijven +STR_COMPANY_PASSWORD_MAKE_DEFAULT_TOOLTIP :{BLACK}Dit bedrijfswachtwoord gebruiken als standaard voor nieuwe bedrijven # Network company info join/password -STR_COMPANY_VIEW_JOIN :{BLACK}Doe mee +STR_COMPANY_VIEW_JOIN :{BLACK}Meedoen STR_COMPANY_VIEW_JOIN_TOOLTIP :{BLACK}Doe mee en speel als dit bedrijf STR_COMPANY_VIEW_PASSWORD :{BLACK}Wachtwoord STR_COMPANY_VIEW_PASSWORD_TOOLTIP :{BLACK}Bescherm het bedrijf met een wachtwoord zodat niet-geautoriseerde personen niet mee kunnen doen -STR_COMPANY_VIEW_SET_PASSWORD :{BLACK}Geef bedrijfswachtwoord op +STR_COMPANY_VIEW_SET_PASSWORD :{BLACK}Bedrijfswachtwoord instellen # Network chat STR_NETWORK_CHAT_SEND :{BLACK}Verstuur @@ -2115,20 +2127,20 @@ STR_NETWORK_CHAT_TO_COMPANY :[Team] Aan {STR STR_NETWORK_CHAT_CLIENT :[Privé] {STRING}: {WHITE}{STRING} STR_NETWORK_CHAT_TO_CLIENT :[Privé] Aan {STRING}: {WHITE}{STRING} STR_NETWORK_CHAT_ALL :[Iedereen] {STRING}: {WHITE}{STRING} -STR_NETWORK_CHAT_OSKTITLE :{BLACK}Geef de tekst voor de netwerk-chat +STR_NETWORK_CHAT_OSKTITLE :{BLACK}Geef tekst voor netwerkchat # Network messages STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Geen netwerkapparaten gevonden of gecompileerd zonder ENABLE_NETWORK STR_NETWORK_ERROR_NOSERVER :{WHITE}Kon geen enkel netwerkspel vinden STR_NETWORK_ERROR_NOCONNECTION :{WHITE}De server beantwoordde het verzoek niet -STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Kan geen verbinding maken, je hebt niet dezelfde NewGRF bestanden als de server +STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Kan geen verbinding maken, je hebt niet dezelfde NewGRF-bestanden als de server STR_NETWORK_ERROR_DESYNC :{WHITE}Synchronisatie van netwerkspel mislukt STR_NETWORK_ERROR_LOSTCONNECTION :{WHITE}Verbinding met netwerkspel kwijt STR_NETWORK_ERROR_SAVEGAMEERROR :{WHITE}Kon opgeslagen spel niet laden STR_NETWORK_ERROR_SERVER_START :{WHITE}Kan server niet starten STR_NETWORK_ERROR_CLIENT_START :{WHITE}Kan geen verbinding maken STR_NETWORK_ERROR_TIMEOUT :{WHITE}Verbinding #{NUM} duurde te lang -STR_NETWORK_ERROR_SERVER_ERROR :{WHITE}Er is een protocolfout gemaakt en onze verbinding is gesloten +STR_NETWORK_ERROR_SERVER_ERROR :{WHITE}Er is een protocolfout gedetecteerd en de verbinding werd gesloten STR_NETWORK_ERROR_WRONG_REVISION :{WHITE}De revisie van deze client komt niet overeen met de revisie van de server STR_NETWORK_ERROR_WRONG_PASSWORD :{WHITE}Ongeldig wachtwoord STR_NETWORK_ERROR_SERVER_FULL :{WHITE}De server is vol @@ -2137,9 +2149,9 @@ STR_NETWORK_ERROR_KICKED :{WHITE}Je bent STR_NETWORK_ERROR_CHEATER :{WHITE}Valsspelen is niet toegestaan op deze server STR_NETWORK_ERROR_TOO_MANY_COMMANDS :{WHITE}Je stuurde te veel commando's naar de server STR_NETWORK_ERROR_TIMEOUT_PASSWORD :{WHITE}Het invoeren van het wachtwoord duurde te lang -STR_NETWORK_ERROR_TIMEOUT_COMPUTER :{WHITE}Het duurde jouw computer te lang totdat uw computer zich aanmeldde -STR_NETWORK_ERROR_TIMEOUT_MAP :{WHITE}Het duurde jouw computer te lang om de kaart te downloaden -STR_NETWORK_ERROR_TIMEOUT_JOIN :{WHITE}Het duurde jouw computer te lang om met de server te verbinden +STR_NETWORK_ERROR_TIMEOUT_COMPUTER :{WHITE}Uw computer is te traag om de server bij te houden +STR_NETWORK_ERROR_TIMEOUT_MAP :{WHITE}Uw computer deed er te lang over om de kaart te downloaden +STR_NETWORK_ERROR_TIMEOUT_JOIN :{WHITE}Uw computer deed er te lang over om met de server te verbinden ############ Leave those lines in this order!! STR_NETWORK_ERROR_CLIENT_GENERAL :algemene fout @@ -2159,7 +2171,7 @@ STR_NETWORK_ERROR_CLIENT_CHEATER :probeerde vals STR_NETWORK_ERROR_CLIENT_SERVER_FULL :server is vol STR_NETWORK_ERROR_CLIENT_TOO_MANY_COMMANDS :stuurde te veel commando's STR_NETWORK_ERROR_CLIENT_TIMEOUT_PASSWORD :wachtwoord niet op tijd ontvangen -STR_NETWORK_ERROR_CLIENT_TIMEOUT_COMPUTER :algemene timeout +STR_NETWORK_ERROR_CLIENT_TIMEOUT_COMPUTER :algemene time-out STR_NETWORK_ERROR_CLIENT_TIMEOUT_MAP :downloaden van de kaart duurde te lang STR_NETWORK_ERROR_CLIENT_TIMEOUT_JOIN :verwerken van de kaart duurde te lang ############ End of leave-in-this-order @@ -2174,12 +2186,12 @@ STR_NETWORK_SERVER_MESSAGE_GAME_PAUSED :Spel gepauzeerd STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_1 :Spel nog steeds gepauzeerd ({STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_2 :Spel nog steeds gepauzeerd ({STRING}, {STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_3 :Spel nog steeds gepauzeerd ({STRING}, {STRING}, {STRING}) -STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_4 :Spel is nog steeds gepauzeerd ({STRING}, {STRING}, {STRING}, {STRING}) +STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_4 :Spel nog steeds gepauzeerd ({STRING}, {STRING}, {STRING}, {STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_UNPAUSED :Spel vervolgd ({STRING}) STR_NETWORK_SERVER_MESSAGE_GAME_REASON_NOT_ENOUGH_PLAYERS :aantal spelers STR_NETWORK_SERVER_MESSAGE_GAME_REASON_CONNECTING_CLIENTS :spelers maken verbinding STR_NETWORK_SERVER_MESSAGE_GAME_REASON_MANUAL :handmatig -STR_NETWORK_SERVER_MESSAGE_GAME_REASON_GAME_SCRIPT :spel script +STR_NETWORK_SERVER_MESSAGE_GAME_REASON_GAME_SCRIPT :spelscript ############ End of leave-in-this-order STR_NETWORK_MESSAGE_CLIENT_LEAVING :vertrekt STR_NETWORK_MESSAGE_CLIENT_JOINED :*** {STRING} heeft zich bij het spel gevoegd @@ -2191,8 +2203,8 @@ STR_NETWORK_MESSAGE_CLIENT_LEFT :*** {STRING} he STR_NETWORK_MESSAGE_NAME_CHANGE :*** {STRING} heeft zijn/haar naam gewijzigd naar {STRING} STR_NETWORK_MESSAGE_GIVE_MONEY :*** {STRING} gaf je bedrijf {2:CURRENCY_LONG} STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** Je gaf {2:CURRENCY_LONG} aan {1:STRING} -STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}De server heeft de sessie gestopt -STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}De server wordt opnieuw gestart...{}Wacht aub... +STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}De server heeft de sessie gesloten +STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}De server wordt opnieuw gestart...{}Wacht alstublieft... # Content downloading window STR_CONTENT_TITLE :{WHITE}Download extra content @@ -2263,28 +2275,29 @@ STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE :{WHITE}... best STR_CONTENT_ERROR_COULD_NOT_EXTRACT :{WHITE}Kon gedownload bestand niet uitpakken STR_MISSING_GRAPHICS_SET_CAPTION :{WHITE}Ontbrekende graphics -STR_MISSING_GRAPHICS_SET_MESSAGE :{BLACK}OpenTTD heeft graphics nodig om te kunnen werken, maar er konden er geen gevonden worden. Wilt u toestaan dat OpenTTD graphics downloadt en installeert? +STR_MISSING_GRAPHICS_SET_MESSAGE :{BLACK}OpenTTD heeft graphics nodig om te kunnen werken, maar er konden er geen gevonden worden. Staat u toe dat OpenTTD deze graphics downloadt en installeert? STR_MISSING_GRAPHICS_YES_DOWNLOAD :{BLACK}Ja, download de graphics STR_MISSING_GRAPHICS_NO_QUIT :{BLACK}Nee, OpenTTD afsluiten # Transparency settings window STR_TRANSPARENCY_CAPTION :{WHITE}Doorzichtigheidsopties -STR_TRANSPARENT_SIGNS_TOOLTIP :{BLACK}Schakel transparantie voor stationsnamen aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_TREES_TOOLTIP :{BLACK}Schakel transparantie voor bomen aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_HOUSES_TOOLTIP :{BLACK}Schakel transparantie voor huizen aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_INDUSTRIES_TOOLTIP :{BLACK}Schakel transparantie voor industrieën aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_BUILDINGS_TOOLTIP :{BLACK}Schakel transparantie voor gebouwen zoals stations, depots en controleposten aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_BRIDGES_TOOLTIP :{BLACK}Schakel transparantie voor bruggen aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_STRUCTURES_TOOLTIP :{BLACK}Schakel transparantie voor gebouwen zoals vuurtorens en antennes aan/uit. Ctrl+klik om vast te zetten -STR_TRANSPARENT_CATENARY_TOOLTIP :{BLACK}Schakel transparantie voor bovenleiding aan/uit. Ctrl+klik voor onthouden -STR_TRANSPARENT_LOADING_TOOLTIP :{BLACK}Schakel transparantie voor laadindicatoren aan/uit. Ctrl+klik om vast te zetten +STR_TRANSPARENT_SIGNS_TOOLTIP :{BLACK}Transparantie voor stationsnamen aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_TREES_TOOLTIP :{BLACK}Transparantie voor bomen aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_HOUSES_TOOLTIP :{BLACK}Transparantie voor huizen aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_INDUSTRIES_TOOLTIP :{BLACK}Transparantie voor industrieën aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_BUILDINGS_TOOLTIP :{BLACK}Transparantie aan-uit voor gebouwen zoals stations, remises en routepunten. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_BRIDGES_TOOLTIP :{BLACK}Transparantie voor bruggen aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_STRUCTURES_TOOLTIP :{BLACK}Transparantie voor gebouwen zoals vuurtorens en zendmasten aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_CATENARY_TOOLTIP :{BLACK}Transparantie voor bovenleiding aan-uit. Ctrl+klik om vast te zetten. +STR_TRANSPARENT_LOADING_TOOLTIP :{BLACK}Transparantie voor laadpercentages aan-uit. Ctrl+klik om vast te zetten. STR_TRANSPARENT_INVISIBLE_TOOLTIP :{BLACK}Maak objecten onzichtbaar in plaats van transparant # Linkgraph legend window -STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Vracht Stroom Legenda +STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Vrachtstroomlegende STR_LINKGRAPH_LEGEND_ALL :{BLACK}Alle STR_LINKGRAPH_LEGEND_NONE :{BLACK}Geen STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Selecteer weer te geven bedrijven +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}ongebruikt @@ -2304,38 +2317,38 @@ STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Biedt aa STR_JOIN_STATION_CAPTION :{WHITE}Station samenvoegen STR_JOIN_STATION_CREATE_SPLITTED_STATION :{YELLOW}Bouw een losstaand station -STR_JOIN_WAYPOINT_CAPTION :{WHITE}Controlepost samenvoegen -STR_JOIN_WAYPOINT_CREATE_SPLITTED_WAYPOINT :{YELLOW}Bouw een losstaande controlepost +STR_JOIN_WAYPOINT_CAPTION :{WHITE}Routepunt samenvoegen +STR_JOIN_WAYPOINT_CREATE_SPLITTED_WAYPOINT :{YELLOW}Los routepunt bouwen # Rail construction toolbar STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION :Bouw spoorwegen STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Bouw geëlektrificeerde spoorwegen -STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Bouw monorail-spoorwegen -STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Bouw magneetzweeftrein-spoorwegen +STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Bouw monorailspoorwegen +STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Bouw magneetzweeftreinspoorwegen STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Plaats spoor. Ctrl schakelt tussen bouwen/verwijderen van het spoor. Shift schakelt tussen bouwen/inschatting van de kosten STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Bouw spoor met de Autorail-methode. Ctrl schakelt tussen bouwen/verwijderen van het spoor. Shift schakelt tussen bouwen/inschatting van de kosten -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Bouw treindepot (om treinen te kopen en te onderhouden). Shift schakelt tussen bouwen/inschatting van de kosten -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Bouw spoor om naar controlepost. Houd Ctrl ingedrukt om samen te voegen met andere controlepost. Shift schakelt tussen bouwen/inschatting van de kosten +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Remise bouwen (om treinen te kopen en te onderhouden). Shift schakelt tussen bouwen/kosten weergeven. +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Spoor ombouwen naar routepunt. Ctrl om samen te voegen met ander routepunt. Shift schakelt tussen bouwen/kosten weergeven. STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Bouw treinstation. Houd Ctrl ingedrukt om samen te voegen met ander station. Shift schakelt tussen bouwen/inschatting van de kosten -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Plaats seinen. Ctrl wisselt tussen armseinen/lichtseinen{}Slepen plaatst seinen langs een recht stuk spoor. Ctrl bouwt seinen tot de volgende wissel{}Ctrl+klik schakelt het openen van het keuzescherm voor seinen aan/uit. Shift schakelt tussen bouwen/inschatting van de kosten +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Seinen bouwen. Ctrl wisselt tussen armseinen/lichtseinen{}Slepen plaatst seinen langs een recht stuk spoor. Ctrl bouwt seinen tot de volgende wissel{}Ctrl+klik schakelt het openen van seinkeuzelijst aan-uit. Shift schakelt tussen bouwen/kosten weergeven. STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Bouw spoorbrug. Shift schakelt tussen bouwen/inschatting van de kosten STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Graaf spoortunnel. Shift schakelt tussen bouwen/inschatting van de kosten -STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Kies tussen bouwen en verwijderen van sporen, seinen, controleposten en stations. Houd Ctrl ingedrukt om ook het spoor van controleposten en stations te verwijderen +STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Schakelt tussen bouwen en verwijderen van sporen, seinen, routepunten en stations. Ctrl verwijdert ook het spoor van routepunten en stations. STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Verander spoortype. Shift schakelt tussen bouwen/inschatting van de kosten STR_RAIL_NAME_RAILROAD :Spoorweg -STR_RAIL_NAME_ELRAIL :Spoorweg met bovenleiding +STR_RAIL_NAME_ELRAIL :Geëlektrificeerde spoorweg STR_RAIL_NAME_MONORAIL :Monorail STR_RAIL_NAME_MAGLEV :Zweeftrein # Rail depot construction window -STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Richting van treindepot -STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP :{BLACK}Selecteer richting van treindepot +STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Richting van remise +STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP :{BLACK}Selecteer richting van remise # Rail waypoint construction window -STR_WAYPOINT_CAPTION :{WHITE}Controlepost -STR_WAYPOINT_GRAPHICS_TOOLTIP :{BLACK}Selecteer type controlepost +STR_WAYPOINT_CAPTION :{WHITE}Routepunt +STR_WAYPOINT_GRAPHICS_TOOLTIP :{BLACK}Type routepunt selecteren # Rail station construction window STR_STATION_BUILD_RAIL_CAPTION :{WHITE}Stationskeuze @@ -2352,69 +2365,69 @@ STR_STATION_BUILD_STATION_CLASS_TOOLTIP :{BLACK}Selectee STR_STATION_BUILD_STATION_TYPE_TOOLTIP :{BLACK}Selecteer het type station om te bouwen STR_STATION_CLASS_DFLT :Standaardstation -STR_STATION_CLASS_WAYP :Controleposten +STR_STATION_CLASS_WAYP :Routepunten # Signal window -STR_BUILD_SIGNAL_CAPTION :{WHITE}Seinkeuze +STR_BUILD_SIGNAL_CAPTION :{WHITE}Seinselectie STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Bloksein (armsein){}Dit is het simpelste soort sein dat slechts één trein tegelijk in hetzelfde blok toelaat -STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Ingangssein (semafoor){}Groen zolang als er één of meer groene uitgangsseinen zijn volgend na dit sein. Anders is deze rood -STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Uitgangssein (armsein){}Gedraagt zich hetzelfde als een gewoon bloksein, maar is nodig om ingangs- en combinatieseinen te sturen -STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Combinatiesein (armsein){}Het combinatiesein gedraagt zich als zowel ingangs- als uitgangssein. Zo kun je grote netwerken van beginseinen maken +STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Ingangssein (armsein){}Groen als er een groen uitgangssein is uit het volgende blok. Anders rood. +STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Uitgangssein (armsein){}Gedraagt zich hetzelfde als een standaardsein, maar is nodig om ingangs- en combinatie-voorseinen aan te sturen +STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Combinatiesein (armsein){}Het combinatiesein gedraagt zich als zowel ingangs- als uitgangssein. Zo kun je grote netwerken van voorseinen maken STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Routesein (armsein){}Een routesein laat meer dan één trein tegelijk in een seinblok toe als de trein een route kan reserveren naar een veilige stopplaats. Routeseinen kunnen van achteren worden gepasseerd -STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Eenrichtingsrouteseinen (armsein){}Een routesein laat meer dan één trein tegelijk in een seinblok toe als de trein een route kan reserveren naar een veilige stopplaats. Eenrichtingsrouteseinen kunnen niet van achteren worden gepasseerd -STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Standaard sein (elektrisch){}Seinen zijn nodig om te voorkomen dat treinen botsen bij netwerken met meer dan één trein +STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Eénrichtingsroutesein (armsein){}Een routesein laat meer dan één trein tegelijk in een seinblok toe als de trein een route kan reserveren naar een veilige stopplaats. Eénrichtingsrouteseinen kunnen niet van achteren worden gepasseerd. +STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Standaardsein (elektrisch){}Seinen zijn nodig om te voorkomen dat treinen botsen bij netwerken met meer dan één trein STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Ingangssein (elektrisch){}Groen als er meer dan één groen uitgangssein is in de volgende sectie. Anders is deze rood -STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Uitgangssein (elektrisch){}Gedraagt zich hetzelfde als een standaard sein, maar is nodig om ingangs- & combinatie-seinen aan te sturen +STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Uitgangssein (elektrisch){}Gedraagt zich hetzelfde als een standaardsein, maar is nodig om ingangs- & combinatie-seinen aan te sturen STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combinatiesein (elektrisch){}Het combinatiesein gedraagt zich als zowel ingangs- als uitgangssein. Zo kun je grote netwerken van beginseinen maken STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Routeseinen (elektrisch){}Een routesein laat meer dan één trein tegelijk op een seinblok toe als de trein een route kan reserveren naar een veilige stopplaats. Routeseinen kunnen van achteren worden gepasseerd -STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Eenrichtingsrouteseinen (elektrisch){}Een routesein laat meer dan één trein tegelijk op een seinblok toe als de trein een route kan reserveren naar een veilige stopplaats. Eenrichtingsrouteseinen kunnen niet van achteren worden gepasseerd -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Sein ombouwen{}Als dit geselecteerd is, dan zal door te klikken op een bestaand sein deze worden omgebouwd naar het geselecteerde seintype en variant, Ctrl+klik verandert de bestaande variant (armsein/elektrisch). Shift+klik toont de geschatte ombouwkosten -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dichtheid van seinen bij het slepen -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Verklein dichtheid van seinen bij het slepen -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Vergroot dichtheid van seinen bij het slepen +STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Eénrichtingsroutesein (elektrisch){}Een routesein laat meer dan één trein tegelijk op een seinblok toe als de trein een route kan reserveren naar een veilige stopplaats. Eénrichtingsrouteseinen kunnen niet van achteren worden gepasseerd. +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Sein ombouwen{}Als dit geselecteerd is, dan kun je door klikken een bestaand sein ombouwen naar het geselecteerde seintype en variant, Ctrl+klik verandert de bestaande variant (armsein/elektrisch). Shift+klik geeft de geschatte ombouwkosten. +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dichtheid van seinen bij slepen +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Dichtheid van seinen bij slepen verkleinen +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Dichtheid van seinen bij slepen vergroten # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Kies type spoorbrug -STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Kies type brug +STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Kies type wegbrug STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brugkeuze - klik op de gewenste brug om die te bouwen STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} -STR_BRIDGE_NAME_SUSPENSION_STEEL :Hangend, Staal -STR_BRIDGE_NAME_GIRDER_STEEL :Koker, Staal -STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Staal -STR_BRIDGE_NAME_SUSPENSION_CONCRETE :Hangend, Beton +STR_BRIDGE_NAME_SUSPENSION_STEEL :Hangend, staal +STR_BRIDGE_NAME_GIRDER_STEEL :Ligger, staal +STR_BRIDGE_NAME_CANTILEVER_STEEL :Vrijdragend, staal +STR_BRIDGE_NAME_SUSPENSION_CONCRETE :Hangend, beton STR_BRIDGE_NAME_WOODEN :Hout STR_BRIDGE_NAME_CONCRETE :Beton -STR_BRIDGE_NAME_TUBULAR_STEEL :Buis, Staal -STR_BRIDGE_TUBULAR_SILICON :Buis, Silicium +STR_BRIDGE_NAME_TUBULAR_STEEL :Buis, staal +STR_BRIDGE_TUBULAR_SILICON :Buis, silicium # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Bouw wegen -STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Bouw tramwegen +STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Bouw tramsporen STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Bouw weg. Ctrl schakelt tussen bouwen/verwijderen van de weg. Shift schakelt tussen bouwen/inschatting van de kosten -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Bouw tramrails. Ctrl schakelt tussen bouwen/verwijderen van tramrails. Shift schakelt tussen bouwen/inschatting van de kosten +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Bouw tramsporen. Ctrl schakelt tussen bouwen/verwijderen van tramsporen. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Bouw weg met de Autoroad-methode. Ctrl schakelt tussen bouwen/verwijderen van de weg. Shift schakelt tussen bouwen/inschatting van de kosten -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Bouw tramrails met de Autotram-methode. Ctrl schakelt tussen bouwen/verwijderen van tramrails. Shift schakelt tussen bouwen/inschatting van de kosten +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Bouw tramsporen met de Autotram-methode. Ctrl schakelt tussen bouwen/verwijderen van tramrails. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Bouw garage (voor het kopen en onderhouden van wegvoertuigen). Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Bouw tramdepot (voor het kopen en onderhouden van trams). Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Bouw bushalte. Houd Ctrl ingedrukt om samen te voegen met ander station. Shift schakelt tussen bouwen/inschatting van de kosten -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Bouw passagiertramhalte. Houd Ctrl ingedrukt om samen te voegen met ander station. Shift schakelt tussen bouwen/inschatting van de kosten +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Bouw passagierstramhalte. Houd Ctrl ingedrukt om samen te voegen met ander station. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Bouw vrachtwagenlaadhal. Houd Ctrl ingedrukt om samen te voegen met ander station. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Bouw vrachttramhalte. Houd Ctrl ingedrukt om samen te voegen met ander station. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activeer/Deactiveer eenrichtingsverkeer -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Bouw viaduct. Shift schakelt tussen bouwen/inschatting van de kosten -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Bouw brug voor tramrails. Shift schakelt tussen bouwen/inschatting van de kosten +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Bouw wegbrug. Shift schakelt tussen bouwen/inschatting van de kosten +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Bouw brug voor tramsporen. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Bouw wegtunnel. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Bouw tramtunnel. Shift schakelt tussen bouwen/inschatting van de kosten STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Kies tussen bouwen en verwijderen bij wegenbouw -STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Kies tussen bouwen en verwijderen bij tramrailaanleg +STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Kies tussen bouwen en verwijderen bij tramspooraanleg # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Richting van garage STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Selecteer richting van garage -STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Richting van tramdepot -STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Selecteer richting van tramdepot +STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Richting van tramremise +STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Selecteer richting van tramremise # Road vehicle station construction window STR_STATION_BUILD_BUS_ORIENTATION :{WHITE}Richting van bushalte @@ -2452,14 +2465,14 @@ STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Bouw vli # Airport construction window STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Keuze van vliegveld STR_STATION_BUILD_AIRPORT_TOOLTIP :{BLACK}Kies grootte en type van vliegveld -STR_STATION_BUILD_AIRPORT_CLASS_LABEL :{BLACK}Vliegveld klasse +STR_STATION_BUILD_AIRPORT_CLASS_LABEL :{BLACK}Vliegveldklasse STR_STATION_BUILD_AIRPORT_LAYOUT_NAME :{BLACK}Layout {NUM} STR_AIRPORT_SMALL :Klein STR_AIRPORT_CITY :Stad -STR_AIRPORT_METRO :Hoofdstedelijk +STR_AIRPORT_METRO :Grootstedelijk STR_AIRPORT_INTERNATIONAL :Internationaal vliegveld -STR_AIRPORT_COMMUTER :Pendel +STR_AIRPORT_COMMUTER :Forens STR_AIRPORT_INTERCONTINENTAL :Intercontinentaal STR_AIRPORT_HELIPORT :Heliport STR_AIRPORT_HELIDEPOT :Helihangar @@ -2467,7 +2480,7 @@ STR_AIRPORT_HELISTATION :Helikopterstati STR_AIRPORT_CLASS_SMALL :Kleine vliegvelden STR_AIRPORT_CLASS_LARGE :Grote vliegvelden -STR_AIRPORT_CLASS_HUB :Centraal vliegveld +STR_AIRPORT_CLASS_HUB :Knooppuntvliegvelden STR_AIRPORT_CLASS_HELIPORTS :Helikoptervliegvelden STR_STATION_BUILD_NOISE :{BLACK}Geluidsoverlast: {GOLD}{COMMA} @@ -2476,24 +2489,24 @@ STR_STATION_BUILD_NOISE :{BLACK}Geluidso STR_LANDSCAPING_TOOLBAR :{WHITE}Terreinvorming STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Verlaag een hoek van het land. Slepen verlaagt de eerste geselecteerde hoek en brengt het geselecteerde gebied naar de hoogte van die hoek. Ctrl selecteert het gebied diagonaal. Shift maakt een inschatting van de kosten STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Verhoog een hoek van het land. Slepen verhoogt de eerste geselecteerde hoek en brengt het geselecteerde gebied naar de hoogte van die hoek. Ctrl selecteert het gebied diagonaal. Shift maakt een inschatting van de kosten -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Egaliseer land naar de hoogte van de eerst geselecteerde hoek. Ctrl selecteert een diagonaal gebied. Shift+klik wisselt tussen bouwen/tonen verwachte kosten -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Koop land voor toekomstig gebruik. Shift+klik wisselt tussen bouwen/tonen verwachte kosten +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Land egaliseren op hoogte van eerst geselecteerde hoek. Ctrl selecteert een diagonaal gebied. Shift+klik wisselt tussen bouwen/verwachte kosten weergeven. +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Land kopen voor toekomstig gebruik. Shift+klik wisselt tussen bouwen/verwachte kosten weergeven. # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Keuze van object -STR_OBJECT_BUILD_TOOLTIP :{BLACK}Kies het te bouwen object. Shift+Klik wisselt tussen bouwen/tonen verwachte kosten +STR_OBJECT_BUILD_TOOLTIP :{BLACK}Object selecteren voor bouwen. Shift+Klik wisselt tussen bouwen/verwachte kosten weergeven. STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Kies klasse van het te bouwen object STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Bekijk het object STR_OBJECT_BUILD_SIZE :{BLACK}Grootte: {GOLD}{NUM} x {NUM} tegels STR_OBJECT_CLASS_LTHS :Vuurtorens -STR_OBJECT_CLASS_TRNS :Zender +STR_OBJECT_CLASS_TRNS :Zendmasten # Tree planting window (last two for SE only) STR_PLANT_TREE_CAPTION :{WHITE}Bomen -STR_PLANT_TREE_TOOLTIP :{BLACK}Kies een soort boom om te planten. Als de tegel al bomen bevat zullen er meer bomen van verschillende types bij komen, onafhankelijk van het geselecteerde type. +STR_PLANT_TREE_TOOLTIP :{BLACK}Kies een soort boom om te planten. Als de tegel al bomen bevat, zullen er meer bomen van verschillende types bijkomen, onafhankelijk van het geselecteerde type. STR_TREES_RANDOM_TYPE :{BLACK}Willekeurige soorten bomen -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Plant bomen van willekeurige soort. Shift+klik wisselt tussen bouwen/toont verwachte kosten +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Willekeurig bomen planten. Shift+klik wisselt tussen bouwen/verwachte kosten. STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Willekeurige bomen STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant bomen willekeurig over de kaart @@ -2514,7 +2527,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Weet je # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Stadsontwikkeling STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}Nieuwe stad -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Sticht nieuwe stad. Shift+klik toont alleen de verwachte kosten +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Nieuwe stad stichten. Shift+klik geeft alleen de verwachte kosten. STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Willekeurige stad STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Sticht stad op willekeurige locatie STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Veel willekeurige steden @@ -2561,14 +2574,14 @@ STR_INDUSTRY_CARGOES_CUSTOMERS :{WHITE}Accepter STR_INDUSTRY_CARGOES_HOUSES :{WHITE}Huizen STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP :{BLACK}Klik op de industrie om de leveranciers en klanten te zien STR_INDUSTRY_CARGOES_CARGO_TOOLTIP :{BLACK}{STRING}{}Klik op de vracht om de leveranciers en klanten te zien -STR_INDUSTRY_DISPLAY_CHAIN :{BLACK}Toon keten -STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP :{BLACK}Toon vracht leverende en accepterende industrieën +STR_INDUSTRY_DISPLAY_CHAIN :{BLACK}Keten weergeven +STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP :{BLACK}Industrieën weergeven die vracht leveren en accepteren STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP :{BLACK}Link naar de kleine kaart -STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP :{BLACK}Kies de getoonde industrie ook in de kleine kaart +STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP :{BLACK}Weergegeven industrieën ook op de kleine kaart selecteren STR_INDUSTRY_CARGOES_SELECT_CARGO :{BLACK}Kies vracht -STR_INDUSTRY_CARGOES_SELECT_CARGO_TOOLTIP :{BLACK}Kies de vracht om te tonen +STR_INDUSTRY_CARGOES_SELECT_CARGO_TOOLTIP :{BLACK}Vracht selecteren voor weergeven STR_INDUSTRY_CARGOES_SELECT_INDUSTRY :{BLACK}Kies bedrijf -STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Kies het bedrijf om te tonen +STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Bedrijf selecteren voor weergeven # Land area window STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Landinformatie @@ -2579,21 +2592,21 @@ STR_LAND_AREA_INFORMATION_OWNER_N_A :Geen STR_LAND_AREA_INFORMATION_OWNER :{BLACK}Eigenaar: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_ROAD_OWNER :{BLACK}Eigenaar van weg: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_TRAM_OWNER :{BLACK}Eigenaar van tramrails: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_RAIL_OWNER :{BLACK}Spoorweg eigenaar: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_RAIL_OWNER :{BLACK}Eigenaar van spoorweg: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Gemeente: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Geen STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Coördinaten: {LTBLUE}{NUM} x {NUM} x {NUM} ({STRING}) STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Bouwjaar: {LTBLUE}{DATE_LONG} STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Stationsklasse: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Stationstype: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Vliegveld klasse: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Vliegveld naam: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Vliegveld tegel naam: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Vliegveldklasse: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Vliegveldnaam: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Vliegveldtegelnaam: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Geaccepteerde vracht: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) -STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Rail type: {LTBLUE}{STRING} -STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Spoor snelheidslimiet: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Spoortype: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Spoorsnelheidslimiet: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Snelheidslimiet weg: {LTBLUE}{VELOCITY} # Description of land area of different tiles @@ -2605,35 +2618,35 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Akkers STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Sneeuw STR_LAI_CLEAR_DESCRIPTION_DESERT :Woestijn -STR_LAI_RAIL_DESCRIPTION_TRACK :Spoorweg spoor -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Spoorweg spoor met blokseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Spoorweg spoor met voorseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Spoorweg spoor met exitseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Spoorweg spoor met combo-seinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Spoorweg spoor met routeseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Spoorweg spoor met eenrichtingsseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Spoorweg spoor met blok en voorseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Spoorweg spoor met blok en exitseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Spoorweg spoor met blok en combo-seinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Spoorweg spoor met blok en routeseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Spoorweg spoor met blok en eenrichtingsseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Spoorweg spoor met voor- en exitseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Spoorweg spoor met voor- en combo-seinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Spoorweg spoor met voor- en routeseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Spoorweg spoor met voor- en eenrichtingsseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Spoorweg spoor met exit- en combo-seinen +STR_LAI_RAIL_DESCRIPTION_TRACK :Spoor +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Spoor met blokseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Spoor met voorseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Spoor met uitgangsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Spoor met combinatieseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Spoor met routeseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Spoor met eenrichtingsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Spoor met blok- en voorseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Spoor met blok- en uitgangsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Spoor met blok- en combinatieseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Spoor met blok- en routeseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Spoor met blok- en eenrichtingsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Spoor met voor- en uitgangsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Spoor met voor- en combinatieseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Spoor met voor- en routeseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Spoor met voor- en eenrichtingsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Spoor met uitgangs- en combinatieseinen STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Spoorweg spoor met exit- en routeseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Spoorweg spoor met exit- en eenrichtingsseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Spoorweg spoor met combo- en routeseinen -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Spoorweg Spoor met combo- en eenrichtingssein -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Spoorweg spoor met route en eenrichtingssein -STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Spoorweg trein depot +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Spoor met uitgangs- en eenrichtingsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Spoor met combinatie- en routeseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Spoor met combinatie- en eenrichtingsseinen +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Spoor met route- en eenrichtingsseinen +STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Spoorwegtreindepot STR_LAI_ROAD_DESCRIPTION_ROAD :Weg STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Weg met straatlantaarns STR_LAI_ROAD_DESCRIPTION_TREE_LINED_ROAD :Weg met bomenrij STR_LAI_ROAD_DESCRIPTION_ROAD_VEHICLE_DEPOT :Garage -STR_LAI_ROAD_DESCRIPTION_ROAD_RAIL_LEVEL_CROSSING :Gelijkvloerse overweg +STR_LAI_ROAD_DESCRIPTION_ROAD_RAIL_LEVEL_CROSSING :Gelijkvloerse kruising met weg/spoor STR_LAI_ROAD_DESCRIPTION_TRAMWAY :Tramrails # Houses come directly from their building names @@ -2650,7 +2663,7 @@ STR_LAI_STATION_DESCRIPTION_TRUCK_LOADING_AREA :Vrachtwagenlaad STR_LAI_STATION_DESCRIPTION_BUS_STATION :Bushalte STR_LAI_STATION_DESCRIPTION_SHIP_DOCK :Haven STR_LAI_STATION_DESCRIPTION_BUOY :Boei -STR_LAI_STATION_DESCRIPTION_WAYPOINT :Controlepost +STR_LAI_STATION_DESCRIPTION_WAYPOINT :Routepunt STR_LAI_WATER_DESCRIPTION_WATER :Water STR_LAI_WATER_DESCRIPTION_CANAL :Kanaal @@ -2664,34 +2677,84 @@ STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT :Dok STR_LAI_TUNNEL_DESCRIPTION_RAILROAD :Spoortunnel STR_LAI_TUNNEL_DESCRIPTION_ROAD :Wegtunnel -STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL :Stalen hangbrug (spoor) -STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL :Stalen kokerbrug (spoor) -STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL :Stalen cantileverbrug (spoor) -STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE :Hangbrug van gewapend beton (spoor) -STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN :Houten brug (spoor) -STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE :Betonnen brug (spoor) -STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL :Buisvormige brug (spoor) +STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL :Stalen hangende spoorbrug +STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL :Spoorbrug met stalen koker +STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL :Stalen vrijdragende spoorbrug +STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE :Hangende spoorbrug van gewapend beton +STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN :Houten spoorbrug +STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE :Betonnen spoorbrug +STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL :Buisvormige spoorbrug -STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL :Stalen hangbrug (weg) -STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL :Stalen kokerbrug (weg) -STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL :Stalen cantileverbrug (weg) -STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE :Hangbrug van gewapend beton (weg) -STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN :Houten brug (weg) -STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE :Betonnen brug (weg) -STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL :Buisvormige brug (weg) +STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL :Stalen hangende wegbrug +STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL :Wegbrug met stalen koker +STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL :Stalen vrijdragende wegbrug +STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE :Hangende wegbrug van gewapend beton +STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN :Houten wegbrug +STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE :Betonnen wegbrug +STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL :Buisvormige wegbrug STR_LAI_BRIDGE_DESCRIPTION_AQUEDUCT :Aquaduct STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER :Radiomast STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE :Vuurtoren -STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS :Bedrijfshoofdkwartier +STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS :Hoofdkantoor STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terrein in bedrijfseigendom # About OpenTTD window STR_ABOUT_OPENTTD :{WHITE}Over OpenTTD -STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Originele copyright {COPYRIGHT} 1995 Chris Sawyer, alle rechten voorbehouden -STR_ABOUT_VERSION :{BLACK}OpenTTD versie {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Het OpenTTD-team +STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Originele auteursrecht {COPYRIGHT} 1995 Chris Sawyer, alle rechten voorbehouden +STR_ABOUT_VERSION :{BLACK}OpenTTD-versie {REV} +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Het OpenTTD-team + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Frame rate +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Simulatiesnelheid: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Aantal gesimuleerde speltikken per seconde. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Grafische framesnelheid: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Aantal videoframes die weergegeven worden per seconde. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Huidige spelsnelheidsfactor: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Hoe snel het spel momenteel draait, vergeleken met de verwachte snelheid bij een normale simulatiesnelheid. +STR_FRAMERATE_CURRENT :{WHITE}Huidig +STR_FRAMERATE_AVERAGE :{WHITE}Gemiddelde +STR_FRAMERATE_DATA_POINTS :{BLACK}Gegevens gebaseerd op {COMMA} metingen +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} frames/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} frames/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} frames/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Spellustotaal: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Vrachtafhandeling: +STR_FRAMERATE_GL_TRAINS :{BLACK} Treintikken: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Wegvoertuigtikken: +STR_FRAMERATE_GL_SHIPS :{BLACK} Scheepstikken: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Vliegtuigtikken: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Wereldtikken: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Vertraging koppelinggrafiek: +STR_FRAMERATE_DRAWING :{WHITE}Grafische weergave: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Wereldkijkvensters: +STR_FRAMERATE_VIDEO :{BLACK}Video-uitvoer: +STR_FRAMERATE_SOUND :{BLACK}Geluid mengen: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Gameloop +STR_FRAMETIME_CAPTION_GL_ECONOMY :Cargoafhandeling +STR_FRAMETIME_CAPTION_GL_TRAINS :Treintikken +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Wegvoertuigtikken +STR_FRAMETIME_CAPTION_GL_SHIPS :Scheepstikken +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Vliegtuigtikken +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Wereldtikken +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Link grafiekvertraging +STR_FRAMETIME_CAPTION_DRAWING :Graphics weergeven +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Wereldkijkvenster weergeven +STR_FRAMETIME_CAPTION_VIDEO :Video-output +STR_FRAMETIME_CAPTION_SOUND :Geluid mixen +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spel Opslaan @@ -2710,11 +2773,14 @@ STR_SAVELOAD_SAVE_BUTTON :{BLACK}Opslaan STR_SAVELOAD_SAVE_TOOLTIP :{BLACK}Sla het huidige spel op onder de gekozen naam STR_SAVELOAD_LOAD_BUTTON :{BLACK}Laad STR_SAVELOAD_LOAD_TOOLTIP :{BLACK}Laad het geselecteerde spel -STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP :{BLACK}Laad de geselecteerd hoogtekaart +STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP :{BLACK}Laad de geselecteerde hoogtekaart STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Spel details STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Geen informatie beschikbaar STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtertekenreeks: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Bestand overschrijven +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Weet je zeker dat je het bestaande bestand wilt overschrijven? STR_SAVELOAD_OSKTITLE :{BLACK}Voer een naam in voor het spel dat moet worden opgeslagen @@ -2726,12 +2792,12 @@ STR_MAPGEN_BY :{BLACK}* STR_MAPGEN_NUMBER_OF_TOWNS :{BLACK}Aantal steden: STR_MAPGEN_DATE :{BLACK}Datum: STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}Aantal industrieën: -STR_MAPGEN_MAX_HEIGHTLEVEL :{BLACK}Maximum kaarthoogte -STR_MAPGEN_MAX_HEIGHTLEVEL_UP :{BLACK}Verhoog de maximum hoogte van bergen op de kaart met één -STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN :{BLACK}Verklein de maximum hoogte van bergen op de kaart met één +STR_MAPGEN_MAX_HEIGHTLEVEL :{BLACK}Maximale kaarthoogte +STR_MAPGEN_MAX_HEIGHTLEVEL_UP :{BLACK}Verhoog de maximale hoogte van bergen op de kaart met één +STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN :{BLACK}Verklein de maximale hoogte van bergen op de kaart met één STR_MAPGEN_SNOW_LINE_HEIGHT :{BLACK}Hoogte van sneeuwgrens: -STR_MAPGEN_SNOW_LINE_UP :{BLACK}Verschuif de sneeuwgrens één omhoog -STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Verschuif de sneeuwgrens één omlaag +STR_MAPGEN_SNOW_LINE_UP :{BLACK}Verhoog de sneeuwgrens met één +STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Verlaag de sneeuwgrens met één STR_MAPGEN_LAND_GENERATOR :{BLACK}Landgenerator: STR_MAPGEN_TREE_PLACER :{BLACK}Bosalgoritme: STR_MAPGEN_TERRAIN_TYPE :{BLACK}Terreintype: @@ -2758,9 +2824,9 @@ STR_MAPGEN_HEIGHTMAP_NAME :{BLACK}Naam van STR_MAPGEN_HEIGHTMAP_SIZE_LABEL :{BLACK}Grootte: STR_MAPGEN_HEIGHTMAP_SIZE :{ORANGE}{NUM} x {NUM} -STR_MAPGEN_MAX_HEIGHTLEVEL_QUERY_CAPT :{WHITE}Wijzig maximum kaarthoogte +STR_MAPGEN_MAX_HEIGHTLEVEL_QUERY_CAPT :{WHITE}Maximale kaarthoogte wijzigen STR_MAPGEN_SNOW_LINE_QUERY_CAPT :{WHITE}Verander hoogte van sneeuwgrens -STR_MAPGEN_START_DATE_QUERY_CAPT :{WHITE}Verander beginjaar +STR_MAPGEN_START_DATE_QUERY_CAPT :{WHITE}Verander startjaar # SE Map generation STR_SE_MAPGEN_CAPTION :{WHITE}Scenariotype @@ -2768,8 +2834,8 @@ STR_SE_MAPGEN_FLAT_WORLD :{WHITE}Vlak lan STR_SE_MAPGEN_FLAT_WORLD_TOOLTIP :{BLACK}Genereer een vlakke kaart STR_SE_MAPGEN_RANDOM_LAND :{WHITE}Willekeurig land STR_SE_MAPGEN_FLAT_WORLD_HEIGHT :{BLACK}Hoogte van vlak land: -STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_DOWN :{BLACK}Maak de hoogte van vlak land één lager -STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_UP :{BLACK}Maak de hoogte van vlak land één hoger +STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_DOWN :{BLACK}Verlaag de hoogte van vlak land met één +STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_UP :{BLACK}Verhoog de hoogte van vlak land met één STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT :{WHITE}Verander hoogte van vlak land @@ -2792,11 +2858,11 @@ STR_GENERATION_PREPARING_GAME :{BLACK}Voorbere # NewGRF settings STR_NEWGRF_SETTINGS_CAPTION :{WHITE}NewGRF-instellingen -STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Gedetaileerde NewGRF informatie -STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Actieve NewGRF bestanden -STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactieve NewGRF bestanden +STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Gedetaileerde NewGRF-informatie +STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Actieve NewGRF-bestanden +STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactieve NewGRF-bestanden STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Kies voorkeur: -STR_NEWGRF_FILTER_TITLE :{ORANGE}Filter tekst: +STR_NEWGRF_FILTER_TITLE :{ORANGE}Filtertekst: STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Laad de geselecteerde voorkeursinstelling STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Bewaar voorkeursinstelling STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Bewaar de huidige lijst als voorkeursinstelling @@ -2832,7 +2898,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versie: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Laagste compatibele versie: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palet: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Standaard (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Standaard (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Oorspronkelijk (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Oorspronkelijk (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parameters: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Geen STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Geen informatie beschikbaar STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Bestand niet gevonden @@ -2843,17 +2914,17 @@ STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}Niet compa STR_SAVE_PRESET_CAPTION :{WHITE}Preset opslaan STR_SAVE_PRESET_LIST_TOOLTIP :{BLACK}Lijst met beschikbare presets, Kies er één om deze te kopiëren naar de opslagnaam hieronder STR_SAVE_PRESET_TITLE :{BLACK}Voer een naam in voor de preset -STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}Nu gekozen naam voor de preset opslag +STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}Huidig gekozen naam voor de preset om op te slaan STR_SAVE_PRESET_CANCEL :{BLACK}Annuleren STR_SAVE_PRESET_CANCEL_TOOLTIP :{BLACK}Preset niet wijzigen STR_SAVE_PRESET_SAVE :{BLACK}Opslaan -STR_SAVE_PRESET_SAVE_TOOLTIP :{BLACK}Sla de huidige preset op naar de nu gekozen naam +STR_SAVE_PRESET_SAVE_TOOLTIP :{BLACK}Sla de huidige preset op naar de huidig gekozen naam # NewGRF parameters window -STR_NEWGRF_PARAMETERS_CAPTION :{WHITE}NewGRF parameters wijzigen +STR_NEWGRF_PARAMETERS_CAPTION :{WHITE}NewGRF-parameters wijzigen STR_NEWGRF_PARAMETERS_CLOSE :{BLACK}Sluiten STR_NEWGRF_PARAMETERS_RESET :{BLACK}Reset -STR_NEWGRF_PARAMETERS_RESET_TOOLTIP :{BLACK}Zet alle parameters naar de standaard waarde +STR_NEWGRF_PARAMETERS_RESET_TOOLTIP :{BLACK}Zet alle parameters naar de standaardwaarde STR_NEWGRF_PARAMETERS_DEFAULT_NAME :Parameter {NUM} STR_NEWGRF_PARAMETERS_SETTING :{STRING}: {ORANGE}{STRING} STR_NEWGRF_PARAMETERS_NUM_PARAM :{LTBLUE}Aantal parameters: {ORANGE}{NUM} @@ -2865,7 +2936,7 @@ STR_NEWGRF_INSPECT_PARENT_TOOLTIP :{BLACK}Inspecte STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT :{STRING} bij {HEX} STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT :Object -STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE :Spoor type +STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE :Spoortype STR_NEWGRF_INSPECT_QUERY_CAPTION :{WHITE}NewGRF variable 60+x parameter (hexadecimaal) @@ -2900,19 +2971,21 @@ STR_NEWGRF_ERROR_UNSET_SWITCH :{1:STRING} is o STR_NEWGRF_ERROR_INVALID_PARAMETER :Ongeldige parameter voor {1:STRING}: parameter {STRING} ({NUM}) STR_NEWGRF_ERROR_LOAD_BEFORE :{1:STRING} moet geladen zijn voor {STRING} STR_NEWGRF_ERROR_LOAD_AFTER :{1:STRING} moet geladen zijn na {STRING} -STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{1:STRING} heeft OpenTTD versie {STRING} of beter nodig +STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{1:STRING} heeft OpenTTD-versie {STRING} of beter nodig STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :het GRF-bestand die het probeert te vertalen STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :Er zijn te veel NewGRFs geladen STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Laden van {1:STRING} als statische NewGRF met {STRING} kan desynchronisatiefouten (desyncs) veroorzaken STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Onverwachte sprite (sprite {3:NUM}) -STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Onbekende Actie 0 eigenschap {4:HEX} (sprite {3:NUM}) +STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Onbekende Action 0-eigenschap {4:HEX} (sprite {3:NUM}) STR_NEWGRF_ERROR_INVALID_ID :Poging om ongeldig ID te gebruiken (sprite {3:NUM}) -STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} bevat een ongeldige afbeelding. Alle ongeldige afbeeldingen worden getoond als een rood vraagteken (?) -STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Bevat meerdere acties 8 (sprite {3:NUM}) +STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} bevat een ongeldige sprite. Alle ongeldige sprites worden weergegeven als een rood vraagteken (?). +STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Bevat meerdere Action 8-invoer (sprite {3:NUM}) STR_NEWGRF_ERROR_READ_BOUNDS :Voorbij het einde van pseudo-sprite gelezen (sprite {3:NUM}) -STR_NEWGRF_ERROR_GRM_FAILED :Gevraagde GRF middelen niet beschikbaar (sprite {3:NUM}) +STR_NEWGRF_ERROR_GRM_FAILED :Gevraagde GRF-middelen niet beschikbaar (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} is uitgeschakeld door {STRING} -STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Ongeldig/onbekend sprite lay-out-formaat (sprite {3:NUM}) +STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Ongeldig/onbekend spritelay-outformaat (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Te veel elementen in eigenschappenwaardelijst (sprite {3:NUM}, eigenschap {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Ongeldige terugroep voor industriële productie (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Waarschuwing! @@ -2920,7 +2993,7 @@ STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}Je staa STR_NEWGRF_DUPLICATE_GRFID :{WHITE}Kan bestand niet toevoegen: identieke GRF-ID STR_NEWGRF_COMPATIBLE_LOADED :{ORANGE}Bijbehorend bestand niet gevonden (compatibele GRF geladen) -STR_NEWGRF_TOO_MANY_NEWGRFS :{WHITE}Kan bestand niet toevoegen: NewGRF bestandslimiet bereikt +STR_NEWGRF_TOO_MANY_NEWGRFS :{WHITE}Kan bestand niet toevoegen: NewGRF-bestandslimiet bereikt STR_NEWGRF_COMPATIBLE_LOAD_WARNING :{WHITE}Compatibele GRF(s) geladen voor ontbrekende bestanden STR_NEWGRF_DISABLED_WARNING :{WHITE}Missend(e) GRF-bestand(en) zijn uitgeschakeld @@ -2936,13 +3009,13 @@ STR_NEWGRF_LIST_MISSING :{RED}Ontbrekend # NewGRF 'it's broken' warnings STR_NEWGRF_BROKEN :{WHITE}Gedrag van NewGRF '{0:STRING}' zal waarschijnlijk desynchronisatiefouten (desyncs) en/of crashes veroorzaken STR_NEWGRF_BROKEN_POWERED_WAGON :{WHITE}Wagon '{1:ENGINE}' gewijzigde status van aandrijfeenheid wanneer niet in een depot -STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Het verandert de lengte van voertuig '{1:ENGINE}' terwijl het niet in een depot is +STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Het veranderde de lengte van voertuig '{1:ENGINE}' wanneer het niet in een depot is STR_NEWGRF_BROKEN_CAPACITY :{WHITE}Het wijzigde voertuigcapaciteit voor '{1:ENGINE}' wanneer niet in een depot of ombouwen -STR_BROKEN_VEHICLE_LENGTH :{WHITE}Trein '{VEHICLE}' behorend bij '{COMPANY}' heeft een ongeldige lengte. Het is waarschijnlijk veroorzaakt door problemen met NewGRF's. Het spel kan desynchroniseren of vastlopen +STR_BROKEN_VEHICLE_LENGTH :{WHITE}Trein '{VEHICLE}' behorend bij '{COMPANY}' heeft een ongeldige lengte. Dit wordt waarschijnlijk veroorzaakt door problemen met NewGRF's. Het spel kan desynchroniseren of vastlopen STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' geeft onjuiste informatie -STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Vracht-/ombouwinformatie voor '{1:ENGINE}' wijkt af van aanschaflijst na het bouwen. Dit kan resulteren in problemen bij ombouwen door automatisch vernieuwen/vervangen -STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' heeft een eindeloze loop veroorzaakt in de productie-callback +STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Vracht- of ombouwinformatie voor '{1:ENGINE}' wijkt af van aanschaflijst na het bouwen. Dit kan resulteren in problemen bij ombouwen door automatisch vernieuwen/vervangen +STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' heeft een eindeloze loop veroorzaakt in de productiecallback STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Callback {1:HEX} gaf onbekend/ongeldig resultaat {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs @@ -2958,13 +3031,13 @@ STR_INVALID_VEHICLE : -STR_WARNING_LOADGAME_REMOVED_TRAMS :{WHITE}Spel was opgeslagen in een versie zonder tram-ondersteuning. Alle trams zijn verwijderd +STR_WARNING_LOADGAME_REMOVED_TRAMS :{WHITE}Spel was opgeslagen in een versie zonder tramondersteuning. Alle trams zijn verwijderd # Map generation messages STR_ERROR_COULD_NOT_CREATE_TOWN :{WHITE}Kaartmaken afgebroken...{}... geen geschikte dorpslocaties @@ -4108,14 +4177,14 @@ STR_WARNING_HEIGHTMAP_SCALE_CAPTION :{WHITE}Schaalwa STR_WARNING_HEIGHTMAP_SCALE_MESSAGE :{YELLOW}Het aanpassen van de grootte van een bronkaart is niet aan te bevelen. Toch doorgaan? # Soundset messages -STR_WARNING_FALLBACK_SOUNDSET :{WHITE}Alleen backup geluid is gevonden. Als je geluid wilt, installeer dan een geluiddsset via het downloadsysteem +STR_WARNING_FALLBACK_SOUNDSET :{WHITE}Alleen back-upgeluid is gevonden. Als u geluid wilt, installeer dan een geluiddsset via het downloadsysteem # Screenshot related messages STR_WARNING_SCREENSHOT_SIZE_CAPTION :{WHITE}Grote schermafdruk STR_WARNING_SCREENSHOT_SIZE_MESSAGE :{YELLOW}De schermafdruk heeft een resolutie van {COMMA} x {COMMA} pixels. De schermafdruk maken kan even duren. Verder gaan? -STR_MESSAGE_SCREENSHOT_SUCCESSFULLY :{WHITE}Schermprint succesvol opgeslagen als '{STRING}' -STR_ERROR_SCREENSHOT_FAILED :{WHITE}Schermprint mislukt! +STR_MESSAGE_SCREENSHOT_SUCCESSFULLY :{WHITE}Schermafbeelding succesvol opgeslagen als '{STRING}' +STR_ERROR_SCREENSHOT_FAILED :{WHITE}Schermfoto mislukt! # Error message titles STR_ERROR_MESSAGE_CAPTION :{YELLOW}Bericht @@ -4142,9 +4211,9 @@ STR_ERROR_GENERIC_OBJECT_IN_THE_WAY :{WHITE}{1:STRIN STR_ERROR_NOT_ALLOWED_WHILE_PAUSED :{WHITE}Niet toegestaan wanneer gepauzeerd # Local authority errors -STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS :{WHITE}De gemeenteraad van {TOWN} staat dit niet toe -STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT :{WHITE}De gemeenteraad van {TOWN} staat bouwen van nog een vliegveld niet toe -STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE :{WHITE}{TOWN} lokale autoriteiten weigeren toestemming te geven voor vliegveld wegens zorgen om geluidsoverlast +STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS :{WHITE}Gemeentebestuur van {TOWN} staat dit niet toe +STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT :{WHITE}Gemeentebestuur van {TOWN} staat bouwen van nog een vliegveld niet toe +STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE :{WHITE}Gemeentebestuur van {TOWN} weigert toestemming voor vliegveld wegens zorgen om geluidsoverlast STR_ERROR_BRIBE_FAILED :{WHITE}Je omkopingspoging is ontdekt door een regionale controleur # Levelling errors @@ -4224,7 +4293,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Te veel STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Te veel treinstationsdelen STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Te veel bushaltes STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Te veel vrachtwagenlaadstations -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Te dicht bij een ander (laad)station STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Te dicht bij een andere haven STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Te dicht bij een ander vliegveld STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kan stationsnaam niet veranderen... @@ -4232,15 +4300,16 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... deze STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... weg is in de verkeerde richting STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... doorrij haltes kunnen geen bochten hebben STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... doorrij haltes kunnen geen kruisingen hebben +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... weg is eenrichtingsverkeer of geblokkeerd # Station destruction related errors -STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan deel van station niet weghalen... +STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan deel van station niet verwijderen... STR_ERROR_MUST_REMOVE_RAILWAY_STATION_FIRST :{WHITE}Treinstation moet eerst verwijderd worden STR_ERROR_CAN_T_REMOVE_BUS_STATION :{WHITE}Kan busstation niet verwijderen... STR_ERROR_CAN_T_REMOVE_TRUCK_STATION :{WHITE}Kan vrachtwagenlaadstation niet verwijderen... STR_ERROR_CAN_T_REMOVE_PASSENGER_TRAM_STATION :{WHITE}Kan passagierstramstation niet verwijderen... STR_ERROR_CAN_T_REMOVE_CARGO_TRAM_STATION :{WHITE}Kan vrachttramhalte niet verwijderen... -STR_ERROR_MUST_REMOVE_ROAD_STOP_FIRST :{WHITE}Moet wegstop eerst weghalen +STR_ERROR_MUST_REMOVE_ROAD_STOP_FIRST :{WHITE}Moet halte eerst verwijderen STR_ERROR_THERE_IS_NO_STATION :{WHITE}...er is hier geen station STR_ERROR_MUST_DEMOLISH_RAILROAD :{WHITE}Verwijder eerst treinstation @@ -4252,20 +4321,20 @@ STR_ERROR_MUST_DEMOLISH_DOCK_FIRST :{WHITE}Verwijde STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}Verwijder eerst vliegveld # Waypoint related errors -STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Voegt meer dan één bestaande controlepost samen -STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT :{WHITE}Te dicht bij een andere controlepost +STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Ligt naast meer dan één bestaand routepunt +STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT :{WHITE}Te dicht bij een ander routepunt -STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT :{WHITE}Kan hier geen treincontrolepost bouwen... +STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT :{WHITE}Kan hier geen routepunt bouwen... STR_ERROR_CAN_T_POSITION_BUOY_HERE :{WHITE}Kan boei hier niet plaatsen... -STR_ERROR_CAN_T_CHANGE_WAYPOINT_NAME :{WHITE}Kan naam controlepost niet aanpassen... +STR_ERROR_CAN_T_CHANGE_WAYPOINT_NAME :{WHITE}Kan naam routepunt niet aanpassen... -STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT :{WHITE}Kan hier treincontrolepost niet weghalen... -STR_ERROR_MUST_REMOVE_RAILWAYPOINT_FIRST :{WHITE}Controlepost moet eerst verwijderd worden +STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT :{WHITE}Kan hier geen routepunt verwijderen... +STR_ERROR_MUST_REMOVE_RAILWAYPOINT_FIRST :{WHITE}Routepunt moet eerst verwijderd worden STR_ERROR_BUOY_IN_THE_WAY :{WHITE}... boei in de weg STR_ERROR_BUOY_IS_IN_USE :{WHITE}... boei is in gebruik door een ander bedrijf! # Depot related errors -STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT :{WHITE}Kan hier geen treindepot bouwen... +STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT :{WHITE}Kan hier geen remise bouwen... STR_ERROR_CAN_T_BUILD_ROAD_DEPOT :{WHITE}Kan hier geen garage bouwen... STR_ERROR_CAN_T_BUILD_TRAM_DEPOT :{WHITE}Kan hier geen tramdepot bouwen... STR_ERROR_CAN_T_BUILD_SHIP_DEPOT :{WHITE}Kan dok hier niet bouwen... @@ -4285,7 +4354,7 @@ STR_ERROR_INCOMPATIBLE_RAIL_TYPES :spoortypes niet STR_ERROR_CAN_T_MOVE_VEHICLE :{WHITE}Kan voertuig niet verplaatsen... STR_ERROR_REAR_ENGINE_FOLLOW_FRONT :{WHITE}De achterste locomotief zal altijd het voorste deel volgen -STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Kan geen route naar lokale depot vinden +STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Kan geen route naar lokaal depot vinden STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Kan geen lokaal depot vinden STR_ERROR_DEPOT_WRONG_DEPOT_TYPE :Verkeerd depot-type @@ -4299,25 +4368,25 @@ STR_ERROR_AUTOREPLACE_MONEY_LIMIT :(onvoldoende ge STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION :{WHITE}Onmogelijke spoorcombinatie STR_ERROR_MUST_REMOVE_SIGNALS_FIRST :{WHITE}Sein moet eerst worden verwijderd STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Geen bruikbaar spoor -STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Bestaand spoor moet eerst weggehaald worden +STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Moet spoor eerst verwijderen STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Weg is eenrichtingsverkeer of geblokkeerd STR_ERROR_CROSSING_DISALLOWED :{WHITE}Gelijkvloerse kruisingen zijn niet toegestaan voor dit type spoor STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Kan hier geen seinen plaatsen... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Kan hier geen spoor leggen... -STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Kan hier geen spoor weghalen... -STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM :{WHITE}Kan hier geen seinen weghalen... +STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Kan hier geen spoor verwijderen... +STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM :{WHITE}Kan hier geen sein verwijderen... STR_ERROR_SIGNAL_CAN_T_CONVERT_SIGNALS_HERE :{WHITE}Kan sein hier niet ombouwen... STR_ERROR_THERE_IS_NO_RAILROAD_TRACK :{WHITE}...er is hier geen spoorlijn STR_ERROR_THERE_ARE_NO_SIGNALS :{WHITE}...er zijn geen seinen -STR_ERROR_CAN_T_CONVERT_RAIL :{WHITE}Kan railtype hier niet veranderen... +STR_ERROR_CAN_T_CONVERT_RAIL :{WHITE}Kan spoortype hier niet veranderen... # Road construction errors -STR_ERROR_MUST_REMOVE_ROAD_FIRST :{WHITE}Moet weg eerst weghalen +STR_ERROR_MUST_REMOVE_ROAD_FIRST :{WHITE}Moet weg eerst verwijderen STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION :{WHITE}... eenrichtingswegen kunnen geen kruisingen hebben STR_ERROR_CAN_T_BUILD_ROAD_HERE :{WHITE}Kan hier geen weg bouwen... STR_ERROR_CAN_T_BUILD_TRAMWAY_HERE :{WHITE}Kan hier geen tramrails bouwen... -STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Kan hier geen weg weghalen... +STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Kan hier geen weg verwijderen... STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Kan de tramrails hier niet verwijderen... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}...er is geen weg STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}...er is geen tramlijn @@ -4364,7 +4433,7 @@ STR_ERROR_TUNNEL_TOO_LONG :{WHITE}... tunn STR_ERROR_TOO_MANY_OBJECTS :{WHITE}... te veel objecten STR_ERROR_CAN_T_BUILD_OBJECT :{WHITE}Kan object niet bouwen... STR_ERROR_OBJECT_IN_THE_WAY :{WHITE}Object in de weg -STR_ERROR_COMPANY_HEADQUARTERS_IN :{WHITE}... bedrijfshoofdkwartier in de weg +STR_ERROR_COMPANY_HEADQUARTERS_IN :{WHITE}... hoofdkantoor in de weg STR_ERROR_CAN_T_PURCHASE_THIS_LAND :{WHITE}Kan dit stuk land niet kopen... STR_ERROR_YOU_ALREADY_OWN_IT :{WHITE}... het is al van jou! @@ -4403,28 +4472,28 @@ STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT :{WHITE}Kan wegv STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Kan schip niet naar dok sturen... STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR :{WHITE}Kan vliegtuig niet naar hangar sturen... -STR_ERROR_CAN_T_BUY_TRAIN :{WHITE}Kan railvoertuig niet kopen... +STR_ERROR_CAN_T_BUY_TRAIN :{WHITE}Kan trein niet kopen... STR_ERROR_CAN_T_BUY_ROAD_VEHICLE :{WHITE}Kan wegvoertuig niet kopen... STR_ERROR_CAN_T_BUY_SHIP :{WHITE}Kan schip niet kopen... STR_ERROR_CAN_T_BUY_AIRCRAFT :{WHITE}Kan vliegtuig niet kopen... -STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}Kan type van railvoertuig niet hernoemen... +STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}Kan treintype niet hernoemen... STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE_TYPE :{WHITE}Kan type van wegvoertuig niet hernoemen... STR_ERROR_CAN_T_RENAME_SHIP_TYPE :{WHITE}Kan type van schip niet hernoemen... STR_ERROR_CAN_T_RENAME_AIRCRAFT_TYPE :{WHITE}Kan type van vliegtuig niet hernoemen... -STR_ERROR_CAN_T_SELL_TRAIN :{WHITE}Kan railvoertuig niet verkopen... +STR_ERROR_CAN_T_SELL_TRAIN :{WHITE}Kan spoorvoertuig niet verkopen... STR_ERROR_CAN_T_SELL_ROAD_VEHICLE :{WHITE}Kan wegvoertuig niet verkopen... STR_ERROR_CAN_T_SELL_SHIP :{WHITE}Kan schip niet verkopen... STR_ERROR_CAN_T_SELL_AIRCRAFT :{WHITE}Kan vliegtuig niet verkopen... -STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Railvoertuig is niet beschikbaar +STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Spoorvoertuig is niet beschikbaar STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Wegvoertuig is niet beschikbaar STR_ERROR_SHIP_NOT_AVAILABLE :{WHITE}Schip is niet beschikbaar STR_ERROR_AIRCRAFT_NOT_AVAILABLE :{WHITE}Vliegtuig is niet beschikbaar STR_ERROR_TOO_MANY_VEHICLES_IN_GAME :{WHITE}Te veel voertuigen in het spel -STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}Kan onderhoudsinterval niet aanpassen... +STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}Kan onderhoudstermijn niet aanpassen... STR_ERROR_VEHICLE_IS_DESTROYED :{WHITE}... voertuig is vernietigd @@ -4434,7 +4503,7 @@ STR_ERROR_NO_VEHICLES_AVAILABLE_YET :{WHITE}Nog geen STR_ERROR_NO_VEHICLES_AVAILABLE_YET_EXPLANATION :{WHITE} Start een nieuw spel na {DATE_SHORT} of gebruik een NewGRF dat in vroege voertuigen voorziet # Specific vehicle errors -STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Kan trein niet het signaal laten passeren bij gevaar... +STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Kan trein niet het sein laten passeren bij gevaar... STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN :{WHITE}Kan de richting van de trein niet omdraaien... STR_ERROR_TRAIN_START_NO_POWER :Trein heeft geen vermogen @@ -4476,13 +4545,15 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Kan bord STR_DESKTOP_SHORTCUT_COMMENT :Een simulatiespel gebaseerd op Transport Tycoon Deluxe # Translatable descriptions in media/baseset/*.ob* files -STR_BASEGRAPHICS_DOS_DESCRIPTION :Originele graphics van de Transport Tycoon Deluxe DOS-versie. -STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Originele graphics van de Duitse Transport Tycoon Deluxe DOS-versie. -STR_BASEGRAPHICS_WIN_DESCRIPTION :Originele graphics van de Transport Tycoon Deluxe Windows-versie. -STR_BASESOUNDS_DOS_DESCRIPTION :Originele geluiden van de Transport Tycoon Deluxe DOS-versie. -STR_BASESOUNDS_WIN_DESCRIPTION :Originele geluiden van de Transport Tycoon Deluxe Windows-versie. -STR_BASESOUNDS_NONE_DESCRIPTION :Een geluidset zonder geluid. +STR_BASEGRAPHICS_DOS_DESCRIPTION :Originele grafische elementen van Transport Tycoon Deluxe voor DOS. +STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Originele grafische elementen van Transport Tycoon Deluxe voor DOS, Duitse versie. +STR_BASEGRAPHICS_WIN_DESCRIPTION :Originele grafische elementen van Transport Tycoon Deluxe voor Windows. +STR_BASESOUNDS_DOS_DESCRIPTION :Originele geluiden van Transport Tycoon Deluxe voor DOS. +STR_BASESOUNDS_WIN_DESCRIPTION :Originele geluiden van Transport Tycoon Deluxe voor Windows. +STR_BASESOUNDS_NONE_DESCRIPTION :Een geluidenset zonder geluid. STR_BASEMUSIC_WIN_DESCRIPTION :Originele muziek van de Transport Tycoon Deluxe Windows-versie. +STR_BASEMUSIC_DOS_DESCRIPTION :Originele muziek van Transport Tycoon Deluxe voor DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Originele muziek van Transport Tycoon (Original/World Editor) voor DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Een muziekset zonder muziek. ##id 0x2000 @@ -4497,7 +4568,7 @@ STR_TOWN_BUILDING_NAME_HOTEL_1 :Hotel STR_TOWN_BUILDING_NAME_STATUE_1 :Standbeeld STR_TOWN_BUILDING_NAME_FOUNTAIN_1 :Fontein STR_TOWN_BUILDING_NAME_PARK_1 :Park -STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_2 :Kantorenblok +STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_2 :Kantoorgebouw STR_TOWN_BUILDING_NAME_SHOPS_AND_OFFICES_1 :Winkels en kantoren STR_TOWN_BUILDING_NAME_MODERN_OFFICE_BUILDING_1 :Modern kantoorgebouw STR_TOWN_BUILDING_NAME_WAREHOUSE_1 :Warenhuis @@ -4518,7 +4589,7 @@ STR_TOWN_BUILDING_NAME_CINEMA_1 :Bioscoop STR_TOWN_BUILDING_NAME_SHOPPING_MALL_1 :Winkelcentrum STR_TOWN_BUILDING_NAME_IGLOO_1 :Iglo STR_TOWN_BUILDING_NAME_TEPEES_1 :Tepees -STR_TOWN_BUILDING_NAME_TEAPOT_HOUSE_1 :Theepothuis +STR_TOWN_BUILDING_NAME_TEAPOT_HOUSE_1 :Theehuis STR_TOWN_BUILDING_NAME_PIGGY_BANK_1 :Spaarvarken ##id 0x4800 @@ -4581,13 +4652,13 @@ STR_SV_STNAME_TRANSFER :{STRING} Transf STR_SV_STNAME_HALT :{STRING} Halte STR_SV_STNAME_VALLEY :{STRING} Vallei STR_SV_STNAME_HEIGHTS :{STRING} Hoogte -STR_SV_STNAME_WOODS :{STRING} Bossen +STR_SV_STNAME_WOODS :{STRING} Woud STR_SV_STNAME_LAKESIDE :{STRING} Meerkant STR_SV_STNAME_EXCHANGE :{STRING} Uitwisseling STR_SV_STNAME_AIRPORT :{STRING} Vliegveld STR_SV_STNAME_OILFIELD :{STRING} Olieveld STR_SV_STNAME_MINES :{STRING} Mijnen -STR_SV_STNAME_DOCKS :{STRING} Haven +STR_SV_STNAME_DOCKS :{STRING} Dokken STR_SV_STNAME_BUOY :{STRING} STR_SV_STNAME_WAYPOINT :{STRING} ##id 0x6020 @@ -4867,21 +4938,21 @@ STR_FORMAT_DATE_SHORT :{STRING} {NUM} STR_FORMAT_DATE_LONG :{STRING} {STRING} {NUM} STR_FORMAT_DATE_ISO :{2:NUM}-{1:STRING}-{0:STRING} -STR_FORMAT_BUOY_NAME :{TOWN} Boei -STR_FORMAT_BUOY_NAME_SERIAL :{TOWN} Boei #{COMMA} +STR_FORMAT_BUOY_NAME :Boei {TOWN} +STR_FORMAT_BUOY_NAME_SERIAL :Boei {TOWN} {COMMA} STR_FORMAT_COMPANY_NUM :(Bedrijf {COMMA}) STR_FORMAT_GROUP_NAME :Groep {COMMA} -STR_FORMAT_INDUSTRY_NAME :{TOWN} {STRING} -STR_FORMAT_WAYPOINT_NAME :{TOWN} Controlepost -STR_FORMAT_WAYPOINT_NAME_SERIAL :{TOWN} Controlepost #{COMMA} +STR_FORMAT_INDUSTRY_NAME :{1:STRING} {0:TOWN} +STR_FORMAT_WAYPOINT_NAME :Routepunt {TOWN} +STR_FORMAT_WAYPOINT_NAME_SERIAL :Routepunt {TOWN} {COMMA} -STR_FORMAT_DEPOT_NAME_TRAIN :{TOWN} Treindepot -STR_FORMAT_DEPOT_NAME_TRAIN_SERIAL :{TOWN} Treindepot #{COMMA} -STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE :{TOWN} Garage -STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE_SERIAL :{TOWN} Garage #{COMMA} -STR_FORMAT_DEPOT_NAME_SHIP :{TOWN} Dok -STR_FORMAT_DEPOT_NAME_SHIP_SERIAL :{TOWN} Dok #{COMMA} -STR_FORMAT_DEPOT_NAME_AIRCRAFT :{STATION} Hangar +STR_FORMAT_DEPOT_NAME_TRAIN :Remise {TOWN} +STR_FORMAT_DEPOT_NAME_TRAIN_SERIAL :Remise {TOWN} {COMMA} +STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE :Garage {TOWN} +STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE_SERIAL :Garage {TOWN} {COMMA} +STR_FORMAT_DEPOT_NAME_SHIP :Dok {TOWN} +STR_FORMAT_DEPOT_NAME_SHIP_SERIAL :Dok {TOWN} {COMMA} +STR_FORMAT_DEPOT_NAME_AIRCRAFT :Hangar {STATION} STR_UNKNOWN_STATION :onbekend station STR_DEFAULT_SIGN_NAME :Bord diff --git a/src/lang/english.txt b/src/lang/english.txt index 279969fba8..dd0043b6e0 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -10,7 +10,7 @@ ##grflangid 0x01 -# $Id: english.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -189,6 +189,8 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Brown STR_COLOUR_GREY :Grey STR_COLOUR_WHITE :White +STR_COLOUR_RANDOM :Random +STR_COLOUR_DEFAULT :Default # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -482,6 +484,7 @@ STR_ABOUT_MENU_SCREENSHOT :Screenshot STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Fully zoomed in screenshot STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Default zoom screenshot STR_ABOUT_MENU_GIANT_SCREENSHOT :Whole map screenshot +STR_ABOUT_MENU_SHOW_FRAMERATE :Show frame rate STR_ABOUT_MENU_ABOUT_OPENTTD :About 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite aligner STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Toggle bounding boxes @@ -658,6 +661,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}No music available STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{RAW_STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Track STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Title @@ -677,15 +681,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Select ' STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Toggle programme shuffle on/off STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Show music track selection window -STR_ERROR_NO_SONGS :{WHITE}A music set without songs has been selected. No songs will be played - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Music Programme Selection +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Music Programme - '{RAW_STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{RAW_STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Track Index STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programme - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Clear +STR_PLAYLIST_CHANGE_SET :{BLACK}Change set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Clear current programme (Custom1 or Custom2 only) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Change music selection to another installed set STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Click on music track to add to current programme (Custom1 or Custom2 only) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Click on music track to remove it from current programme (Custom1 or Custom2 only) @@ -821,6 +825,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Manager) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{RAW_STRING} sponsored construction of new town {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}A new town called {TOWN} has been constructed! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}New {STRING} under construction near {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}New {STRING} being planted near {TOWN}! @@ -888,10 +893,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Viewport {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copy to viewport +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Change viewport STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copy the location of the main view to this viewport -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Paste from viewport -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Paste the location of this viewport to the main view +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Change main view +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copy the location of this viewport to the main view # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Game Options @@ -933,6 +938,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :South African R STR_GAME_OPTIONS_CURRENCY_CUSTOM :Custom... STR_GAME_OPTIONS_CURRENCY_GEL :Georgian Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranian Rial (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :New Russian Ruble (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Mexican Peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Road vehicles @@ -1262,6 +1269,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING2} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows over-proportional with the network size, thus affecting bigger companies more than smaller ones +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Starting company colour: {STRING2} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Choose starting colour for the company + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING2} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction @@ -1345,8 +1355,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Colour of the t STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Green STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dark green STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Reverse scroll direction: {STRING2} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Behaviour when scrolling the map with the right mouse button. When disabled, the mouse moves the camera. When enabled, the mouse moves the map +STR_CONFIG_SETTING_SCROLLMODE :Viewport scroll behaviour: {STRING2} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Behaviour when scrolling the map +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Move viewport with RMB, mouse position locked +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Move map with RMB, mouse position locked +STR_CONFIG_SETTING_SCROLLMODE_RMB :Move map with RMB +STR_CONFIG_SETTING_SCROLLMODE_LMB :Move map with LMB STR_CONFIG_SETTING_SMOOTH_SCROLLING :Smooth viewport scrolling: {STRING2} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Control how the main view scrolls to a specific position when clicking on the smallmap or when issuing a command to scroll to a specific object on the map. If enabled, the viewport scrolls smoothly, if disabled it jumps directly to the targeted spot STR_CONFIG_SETTING_MEASURE_TOOLTIP :Show a measurement tooltip when using various build-tools: {STRING2} @@ -1378,8 +1392,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Off -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Left-click scrolling: {STRING2} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Enable scrolling the map by dragging it with the left mouse button. This is especially useful when using a touch-screen for scrolling STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Close window on right-click: {STRING2} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Closes a window by right-clicking inside it. Disables the tooltip on right-click! @@ -1837,7 +1849,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Change c STR_CHEAT_SETUP_PROD :{LTBLUE}Enable modifying production values: {ORANGE}{STRING1} # Livery window -STR_LIVERY_CAPTION :{WHITE}New Colour Scheme +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Colour Scheme STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Show general colour schemes STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Show train colour schemes @@ -2313,6 +2325,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Cargo Fl STR_LINKGRAPH_LEGEND_ALL :{BLACK}All STR_LINKGRAPH_LEGEND_NONE :{BLACK}None STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Select companies to be displayed +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}unused @@ -2401,9 +2414,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Si STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}When selected, clicking an existing signal will convert it to the selected signal type and variant. Ctrl+Click will toggle the existing variant. Shift+Click shows estimated conversion cost -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal density -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal density -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal density +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal distance +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal distance +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal distance # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge @@ -2725,7 +2738,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Company-owned l STR_ABOUT_OPENTTD :{WHITE}About OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Frame rate +STR_FRAMERATE_CAPTION_SMALL :{STRING2}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Simulation rate: {STRING2} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Number of game ticks simulated per second. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Graphics frame rate: {STRING2} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Number of video frames rendered per second. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Current game speed factor: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}How fast the game is currently running, compared to the expected speed at normal simulation rate. +STR_FRAMERATE_CURRENT :{WHITE}Current +STR_FRAMERATE_AVERAGE :{WHITE}Average +STR_FRAMERATE_DATA_POINTS :{BLACK}Data based on {COMMA} measurements +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} frames/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} frames/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} frames/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Game loop total: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Cargo handling: +STR_FRAMERATE_GL_TRAINS :{BLACK} Train ticks: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Road vehicle ticks: +STR_FRAMERATE_GL_SHIPS :{BLACK} Ship ticks: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Aircraft ticks: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} World ticks: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Link graph delay: +STR_FRAMERATE_DRAWING :{BLACK}Graphics rendering: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} World viewports: +STR_FRAMERATE_VIDEO :{BLACK}Video output: +STR_FRAMERATE_SOUND :{BLACK}Sound mixing: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Game loop +STR_FRAMETIME_CAPTION_GL_ECONOMY :Cargo handling +STR_FRAMETIME_CAPTION_GL_TRAINS :Train ticks +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Road vehicle ticks +STR_FRAMETIME_CAPTION_GL_SHIPS :Ship ticks +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Aircraft ticks +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :World ticks +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Link graph delay +STR_FRAMETIME_CAPTION_DRAWING :Graphics rendering +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :World viewport rendering +STR_FRAMETIME_CAPTION_VIDEO :Video output +STR_FRAMETIME_CAPTION_SOUND :Sound mixing +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Save Game @@ -2749,6 +2812,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Game Det STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter string: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Overwrite File +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Are you sure you want to overwrite the existing file? STR_SAVELOAD_OSKTITLE :{BLACK}Enter a name for the savegame @@ -2865,8 +2931,13 @@ STR_NEWGRF_SETTINGS_GRF_ID :{BLACK}GRF ID: STR_NEWGRF_SETTINGS_VERSION :{BLACK}Version: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Min. compatible version: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{RAW_STRING} -STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palette: {SILVER}{RAW_STRING} +STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palette: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Default (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Default (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Legacy (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Legacy (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parameters: {SILVER}{STRING1} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :None STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}No information available STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Matching file not found @@ -2947,6 +3018,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Read past end o STR_NEWGRF_ERROR_GRM_FAILED :Requested GRF resources not available (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:RAW_STRING} was disabled by {2:RAW_STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Invalid/unknown sprite layout format (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Too many elements in property value list (sprite {3:NUM}, property {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Invalid industry production callback (sprite {3:NUM}, "{1:RAW_STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Caution! @@ -3011,6 +3084,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Enter a STR_TOWN_DIRECTORY_CAPTION :{WHITE}Towns STR_TOWN_DIRECTORY_NONE :{ORANGE}- None - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to centre main view on town. Ctrl+Click opens a new viewport on town location STR_TOWN_POPULATION :{BLACK}World population: {COMMA} @@ -3018,8 +3092,7 @@ STR_TOWN_POPULATION :{BLACK}World po STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Population: {ORANGE}{COMMA}{BLACK} Houses: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passengers last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Mail last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargo needed for town growth: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} required STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} required in winter @@ -3324,21 +3397,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre t STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING}, {STRING}{RAW_STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{RAW_STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requires: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:RAW_STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} waiting{RAW_STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%) @@ -3391,6 +3457,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Groups - STR_GROUP_CREATE_TOOLTIP :{BLACK}Click to create a group STR_GROUP_DELETE_TOOLTIP :{BLACK}Delete the selected group STR_GROUP_RENAME_TOOLTIP :{BLACK}Rename the selected group +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Change livery of the selected group STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Click to protect this group from global autoreplace STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Delete Group @@ -3434,6 +3501,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacity STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Powered Wagons: {GOLD}+{POWER}{BLACK} Weight: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Refittable to: {GOLD}{STRING2} STR_PURCHASE_INFO_ALL_TYPES :All cargo types +STR_PURCHASE_INFO_NONE :None STR_PURCHASE_INFO_ALL_BUT :All but {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Max. Tractive Effort: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Range: {GOLD}{COMMA} tiles @@ -3833,6 +3901,7 @@ STR_ORDER_CONDITIONAL_AGE :Age (years) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Requires service STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Always STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Remaining lifetime (years) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maximum reliability STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}How to compare the vehicle data to the given value STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :is equal to @@ -4258,7 +4327,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railway station parts STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Too many lorry stations -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Too close to another station/loading area STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Too close to another dock STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Too close to another airport STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Can't rename station... @@ -4266,6 +4334,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... this STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... road facing in the wrong direction STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive through stops can't have corners STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive through stops can't have junctions +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... road is one way or blocked # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Can't remove part of station... @@ -4517,6 +4586,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Original Transp STR_BASESOUNDS_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition sounds. STR_BASESOUNDS_NONE_DESCRIPTION :A sound pack without any sounds. STR_BASEMUSIC_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition music. +STR_BASEMUSIC_DOS_DESCRIPTION :Original Transport Tycoon Deluxe DOS edition music. +STR_BASEMUSIC_TTO_DESCRIPTION :Original Transport Tycoon (Original/World Editor) DOS edition music. STR_BASEMUSIC_NONE_DESCRIPTION :A music pack without actual music. ##id 0x2000 diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index d5169628fd..b771355ff8 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -10,7 +10,7 @@ ##grflangid 0x3d -# $Id: english_AU.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -660,10 +660,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Select ' STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Toggle programme shuffle on/off STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Show music track selection window -STR_ERROR_NO_SONGS :{WHITE}A music set without songs has been selected. No songs will be played - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Music Programme Selection STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Track Index STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programme - '{STRING}' @@ -1233,6 +1230,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows in proportion to the network size, thus affecting larger companies more than smaller ones + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction @@ -1316,8 +1314,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Colour of the t STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Green STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dark green STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Reverse scroll direction: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Behaviour when scrolling the map with the right mouse button. When disabled, the mouse moves the camera. When enabled, the mouse moves the map STR_CONFIG_SETTING_SMOOTH_SCROLLING :Smooth viewport scrolling: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Control how the main view scrolls to a specific position when clicking on the smallmap or when issuing a command to scroll to a specific object on the map. If enabled, the viewport scrolls smoothly, if disabled it jumps directly to the targeted spot STR_CONFIG_SETTING_MEASURE_TOOLTIP :Show a measurement tooltip when using various build-tools: {STRING} @@ -1349,8 +1345,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Off -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Left-click scrolling: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Enable scrolling the map by dragging it with the left mouse button. This is especially useful when using a touch-screen for scrolling STR_CONFIG_SETTING_AUTOSAVE :Autosave: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Select interval between automatic game saves @@ -1781,7 +1775,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Change c STR_CHEAT_SETUP_PROD :{LTBLUE}Enable modifying production values: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}New Colour Scheme STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Show general colour schemes STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Show train colour schemes @@ -2662,7 +2655,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Company-owned l STR_ABOUT_OPENTTD :{WHITE}About OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Save Game @@ -2947,8 +2947,6 @@ STR_TOWN_POPULATION :{BLACK}World po STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Population: {ORANGE}{COMMA}{BLACK} Houses: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passengers last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Mail last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargo needed for town growth: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} required STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} required in winter @@ -3253,18 +3251,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre t STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%) @@ -4155,7 +4143,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railway station parts STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Too many Truck stations -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Too close to another station/loading area STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Too close to another dock STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Too close to another airport STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Can't rename station... diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index 1f38c3a8a0..4afd9de274 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -10,7 +10,7 @@ ##grflangid 0x00 -# $Id: english_US.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -650,6 +650,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}No music available STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Track STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Title @@ -669,15 +670,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Select ' STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Toggle program shuffle on/off STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Show music track selection window -STR_ERROR_NO_SONGS :{WHITE}A music set without songs has been selected. No songs will be played - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Music Program Selection +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Music Program - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Track Index STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Clear +STR_PLAYLIST_CHANGE_SET :{BLACK}Change set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Clear current program (Custom1 or Custom2 only) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Change music selection to another installed set STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Click on music track to add to current program (Custom1 or Custom2 only) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Click on music track to remove it from current program (Custom1 or Custom2 only) @@ -880,10 +881,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Viewport {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copy to viewport +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Change viewport STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copy the location of the main view to this viewport -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Paste from viewport -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Paste the location of this viewport to the main view +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Change main view +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copy the location of this viewport to the main view # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Game Options @@ -1254,6 +1255,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows over-proportional with the network size, thus affecting bigger companies more than smaller ones + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction @@ -1337,8 +1339,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Color of the te STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Green STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dark green STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Purple -STR_CONFIG_SETTING_REVERSE_SCROLLING :Reverse scroll direction: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Behavior when scrolling the map with the right mouse button. When disabled, the mouse moves the camera. When enabled, the mouse moves the map +STR_CONFIG_SETTING_SCROLLMODE :Viewport scroll behaviour: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Behavior when scrolling the map +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Move viewport with RMB, mouse position locked +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Move map with RMB, mouse position locked +STR_CONFIG_SETTING_SCROLLMODE_RMB :Move map with RMB +STR_CONFIG_SETTING_SCROLLMODE_LMB :Move map with LMB STR_CONFIG_SETTING_SMOOTH_SCROLLING :Smooth viewport scrolling: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Control how the main view scrolls to a specific position when clicking on the smallmap or when issuing a command to scroll to a specific object on the map. If enabled, the viewport scrolls smoothly, if disabled it jumps directly to the targeted spot STR_CONFIG_SETTING_MEASURE_TOOLTIP :Show a measurement tooltip when using various build-tools: {STRING} @@ -1370,8 +1376,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Off -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Left-click scrolling: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Enable scrolling the map by dragging it with the left mouse button. This is especially useful when using a touch-screen for scrolling STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Close window on right-click: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Closes a window by right-clicking inside it. Disables the tooltip on right-click! @@ -1809,7 +1813,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Change c STR_CHEAT_SETUP_PROD :{LTBLUE}Enable modifying production values: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}New Color Scheme STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Show general color schemes STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Show train color schemes @@ -2285,6 +2288,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Cargo Fl STR_LINKGRAPH_LEGEND_ALL :{BLACK}All STR_LINKGRAPH_LEGEND_NONE :{BLACK}None STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Select companies to be displayed +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}unused @@ -2691,7 +2695,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Company-owned l STR_ABOUT_OPENTTD :{WHITE}About OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Save Game @@ -2977,6 +2988,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Enter a STR_TOWN_DIRECTORY_CAPTION :{WHITE}Towns STR_TOWN_DIRECTORY_NONE :{ORANGE}- None - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to center main view on town. Ctrl+Click opens a new viewport on town location STR_TOWN_POPULATION :{BLACK}World population: {COMMA} @@ -2984,8 +2996,7 @@ STR_TOWN_POPULATION :{BLACK}World po STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Population: {ORANGE}{COMMA}{BLACK} Houses: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passengers last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Mail last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargo needed for town growth: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} required STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} required in winter @@ -3290,21 +3301,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Center t STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requires: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} waiting{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%) @@ -4224,7 +4225,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railroad station parts STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Too many truck stations -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Too close to another station/loading area STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Too close to another dock STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Too close to another airport STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Can't rename station... @@ -4232,6 +4232,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... this STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... road facing in the wrong direction STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive through stops can't have corners STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive through stops can't have junctions +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... road is one way or blocked # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Can't remove part of station... @@ -4483,6 +4484,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Original Transp STR_BASESOUNDS_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition sounds. STR_BASESOUNDS_NONE_DESCRIPTION :A sound pack without any sounds. STR_BASEMUSIC_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition music. +STR_BASEMUSIC_DOS_DESCRIPTION :Original Transport Tycoon Deluxe DOS edition music. +STR_BASEMUSIC_TTO_DESCRIPTION :Original Transport Tycoon (Original/World Editor) DOS edition music. STR_BASEMUSIC_NONE_DESCRIPTION :A music pack without actual music. ##id 0x2000 diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index 502d0b578f..c80cca6167 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -11,7 +11,7 @@ ##case n -# $Id: esperanto.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -663,10 +663,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Elektu l STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Miksu/ne miksu STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Montru muziker-elektan fenestron -STR_ERROR_NO_SONGS :{WHITE}Senkanta muzikaro estas elektita. Neniu kanto ludos. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Elekto de Muzikprogramo STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Numera Indekso STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programo - '{STRING}' @@ -1159,6 +1156,7 @@ STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Permesu trairaj STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :Permesu trairajn strathaltejojn sur stratoj posedataj de konkurantoj: {STRING} STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ne eblas ŝanĝi ĉi tiujn agordon dum veturiloj ĉeestas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flughavenoj neniam antikviĝas: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avertu se veturilo estas perdita: {STRING} @@ -1199,7 +1197,6 @@ STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR :Ligu landaspekt STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verda STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Malhele verda STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Viola -STR_CONFIG_SETTING_REVERSE_SCROLLING :Inversigu skroldirekton: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :Glata rulumado de vidujo: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP :Montru mezuran konsilbalonon ĉe uzo de konstruiloj: {STRING} STR_CONFIG_SETTING_LIVERIES :Montru veturiltipe specifajn liverojn: {STRING} @@ -1223,7 +1220,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Komando+Klako STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Klako STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Ne -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Maldekstr-klak-rulumado: {STRING} STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Uzu la {STRING} datformon por nomoj de konservludoj. @@ -1462,7 +1458,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Ŝanĝu STR_CHEAT_SETUP_PROD :{LTBLUE}Ebligu ŝanĝi produktvalorojn: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nova Kolorskemo STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Montru ĝeneralajn kolorskemojn STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Montru trajnajn kolorskemojn @@ -2265,7 +2260,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Kompanie poseda STR_ABOUT_OPENTTD :{WHITE}Pri OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Origina kopirajto {COPYRIGHT} 1995 Chris Sawyer, Ĉiuj rajtoj rezervitaj STR_ABOUT_VERSION :{BLACK}OpenTTD-versio {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 La teamo de OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 La teamo de OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Konservu Ludon @@ -2514,8 +2516,6 @@ STR_TOWN_POPULATION :{BLACK}Monda en STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Urbo) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Enloĝantoj: {ORANGE}{COMMA}{BLACK} Domoj: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Pasaĝeroj lastmonate: {ORANGE}{COMMA}{BLACK} maksimume: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Poŝto lastmonate: {ORANGE}{COMMA}{BLACK} maksimume: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Kargo bezonata por kreskigi urbon: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} bezonatas STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} bezonatas en vintro @@ -2725,18 +2725,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centri ĉefvidon ĉe la industrio. Stir+Klak por malfermi novan vidujon ĉe la industrioloko. STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produkta nivelo: {YELLOW}{COMMA}% -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Bezonas: {YELLOW}{STRING.n}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Bezonas: {YELLOW}{STRING.n}{STRING}, {STRING.n}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Bezonas: {YELLOW}{STRING.n}{STRING}, {STRING.n}{STRING}, {STRING.n}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produktas: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produktas: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ŝanĝu produktadon (multoble de 8, ĝis 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ŝanĝu produktan nivelon (procento, limigo je 800%) @@ -3579,7 +3569,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Tro da s STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Tro da partoj de stacidomo STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Tro da bushaltejoj STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Tro da ŝarĝaŭtaj stacioj -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Tro proksime al alia stacioj/ŝarĝejoj STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Tro proksime al alia haveno STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Tro proksime al alia flughaveno STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Ne povas alinomi stacion... diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index b0c6656d58..862206a4d7 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -11,7 +11,7 @@ ##case g in sü -# $Id: estonian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -532,6 +532,7 @@ STR_ABOUT_MENU_SCREENSHOT :Ekraanitõmmis STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Suurendatud ekraanitõmmis STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Tavasuurendusega ekraanitõmmis STR_ABOUT_MENU_GIANT_SCREENSHOT :Terve kaardi ekraanitõmmis +STR_ABOUT_MENU_SHOW_FRAMERATE :Näita kaadrisagedust STR_ABOUT_MENU_ABOUT_OPENTTD :'OpenTTD' kohta STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite aligner STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Kontuuride kuvamine @@ -726,10 +727,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Vali 'om STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Lülita lugude segamine sisse ja välja STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Näita muusikalugude valimise akent -STR_ERROR_NO_SONGS :{WHITE}Valitud muusikakomplekt ei sisalda ühtegi lugu. Ühtegi lugu ei esitata - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Muusikaprogrammi valimine STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Loo number STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programm - '{STRING}' @@ -982,6 +980,7 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Lõuna-Aafrika STR_GAME_OPTIONS_CURRENCY_CUSTOM :Omatehtud... STR_GAME_OPTIONS_CURRENCY_GEL :Gruusia lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iraani rial (IRR) +STR_GAME_OPTIONS_CURRENCY_MXN :Mehhiko Peeso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Sõidukid @@ -1273,10 +1272,10 @@ STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :Sisse lülitami STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :Ülesanded on esialgselt «Peatusteta»: {STRING} STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Tavaliselt peatub sõiduk igas peatuses, mida ta läbib. Selle seadega sõidab sõiduk lõppsihini ilma vahejaamades peatumata. NB! See seade määrab vaid uute korralduste esialgse seadistuse. Korraldusi saab hiljem eraldi ümber seadistada STR_CONFIG_SETTING_STOP_LOCATION :Esialgne platvormi peatumisosa uute rongide ülesannetes: {STRING} -STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Esialgne peatumiskoht rongiplatvormil. «Lõpu lähedal» tähendab sisenemispunkti lähistel. «Keskel» tähendab keset platvormi. «Kaugel lõpus» tähendab kaugel sisenemispunktist. NB! Selle seadega sõidab sõiduk lõppsihini ilma vahejaamades peatumata. NB! See seade määrab vaid uute korralduste esialgse seadistuse. Korraldusi saab hiljem eraldi ümber seadistada -STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :lõpu lähedal +STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Esialgne peatumiskoht rongiplatvormil. «alguses» tähendab sisenemispunkti lähistel. «keskel» tähendab keset platvormi. «lõpus» tähendab sisenemispunktist kaugeimal. NB! See seade määrab vaid uute korralduste esialgse seadistuse. Korraldusi saab hiljem eraldi ümber seadistada +STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :alguses STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :keskel -STR_CONFIG_SETTING_STOP_LOCATION_FAR_END :täiesti lõpus +STR_CONFIG_SETTING_STOP_LOCATION_FAR_END :lõpus STR_CONFIG_SETTING_AUTOSCROLL :Vaate liikumine, kui hiireosuti on akna servas: {STRING} STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT :Sisse lülitamisel liigub vaade, kui hiireosuti on aknaserva lähedal STR_CONFIG_SETTING_AUTOSCROLL_DISABLED :Väljas @@ -1311,6 +1310,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Sõiduki STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Taristu hooldamine: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Taristuga kaasnevad halduskulud. Kulud kasvavad taristu hulga suhtes ebaproportsionaalselt, ning mõjutavad pigem suurettevõtteid +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Vali ettevõttele esialgne värvus + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aegumatud lennuväljad: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Selle seade sisse lülitamine jätab kõik lennujaamade tüübid avatuks lõpmata ajaks peale nende avanemist @@ -1394,8 +1395,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Maa värv väik STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Roheline STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Tumeroheline STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violetne -STR_CONFIG_SETTING_REVERSE_SCROLLING :Vaade liigub vastassuunas: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Vaate liigutamine parema hiireklahviga. Kui see on välja lülitatud, siis hiireosuti juhib vaatepunkti. Kui sisse, siis kaarti STR_CONFIG_SETTING_SMOOTH_SCROLLING :Vaade keskendatakse sujuvalt: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Vaateakna asukohale keskendamise viis, kui vajutatakse väikesele kaardile, või kui vaade keskendatakse mõnele rekvisiidile. Sisse lülitades on liikumine sujuv, välja lülitades läheb vaade kohe sihtpunkti STR_CONFIG_SETTING_MEASURE_TOOLTIP :Ehitamisel mõõtude arvesti näitamine: {STRING} @@ -1427,8 +1426,7 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+klõps STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+klõps STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Väljas -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Vaate liigutamine vasaku hiireklahviga: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Lubab kaardi liigutamise vasaku hiireklahvi abil. See lihtsustab mängimist puutetundlikul ekraanil +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Akna sulgemine paremklõpsuga: {STRING} STR_CONFIG_SETTING_AUTOSAVE :Automaatne salvestamine: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Vali automaatse salvestamise intervall @@ -1863,7 +1861,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Muuda jo STR_CHEAT_SETUP_PROD :{LTBLUE}Tootmisväärtuste muutmine: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Uus värvivalik +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Värvivalik STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Näita üldiseid värvistikke STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Näita rongide värvistikke @@ -2745,7 +2743,27 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Ettevõtte maa STR_ABOUT_OPENTTD :{WHITE}OpenTTD lisainfo STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Algne autorikaitse {COPYRIGHT} 1995 Chris Sawyer, kõik õigused kaitstud STR_ABOUT_VERSION :{BLACK}OpenTTD osa {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 OpenTTD meeskond +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 OpenTTD meeskond + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Kaadrisagedus +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Renderdatud videokaadrite arv sekundis. +STR_FRAMERATE_AVERAGE :{WHITE}Keskmine +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} kaadrit/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} kaadrit/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} kaadrit/s +############ Leave those lines in this order!! +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Õhusõiduki sammud: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Ahelgraafiku viide: +STR_FRAMERATE_DRAWING :{BLACK}Graafika renderdamine: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Õhusõiduki sammud +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Mängu salvestamine @@ -3031,6 +3049,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Sisesta STR_TOWN_DIRECTORY_CAPTION :{WHITE}Linnad STR_TOWN_DIRECTORY_NONE :{ORANGE}- Puudub - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Linn){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Linnanimed - vajuta linnanimele, et viia vaade linnale. Ctrl+klõps avab uue vaate linna asukohast STR_TOWN_POPULATION :{BLACK}Maailma rahvastik: {COMMA} @@ -3038,8 +3057,7 @@ STR_TOWN_POPULATION :{BLACK}Maailma STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Linn) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Rahvaarv: {ORANGE}{COMMA}{BLACK} Ehitisi: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Reisijaid eelmisel kuul: {ORANGE}{COMMA}{BLACK} Enim: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Posti eelmisel kuul: {ORANGE}{COMMA}{BLACK} Enim: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} eelmisel kuul: {ORANGE}{COMMA}{BLACK} Suurim: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Veoseid linna kasvamiseks: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} vajalik STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} on talvel vajalik @@ -3344,18 +3362,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vaate ke STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tootlikkuse tase: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Tööstus teatab kohesest sulgemisest! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vajab: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vajab: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vajab: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Toodab: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Toodab: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Tootlikuse muutmine (kaheksaga jaguv, kuni 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Muuda tootlikkuse taset (protsent, kuni 800%) @@ -3418,6 +3426,7 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Eemalda kõik s STR_GROUP_RENAME_CAPTION :{BLACK}Rühma nime vahetamine +STR_GROUP_PROFIT_THIS_YEAR :Kasum sellel aastal: # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Uued rööbassõidukid @@ -3584,6 +3593,9 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :magnethõljukve STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Hind: {CURRENCY_LONG} Tühimass: {WEIGHT_SHORT}{}Tippkiirus: {VELOCITY} Võimsus: {POWER}{}Käituskulud: {CURRENCY_LONG}/aastas{}Kandevõime: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Hind: {CURRENCY_LONG} Tühimass: {WEIGHT_SHORT}{}Kiirus: {VELOCITY} Võimsus: {POWER} Veojõud: {6:FORCE}{}Käituskulud: {4:CURRENCY_LONG}/aasta{}Mahutavus: {5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Hind: {CURRENCY_LONG} Tippkiirus: {VELOCITY}{}Kandevõime: {CARGO_LONG}{}Käituskulud: {CURRENCY_LONG}/a +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Hind: {CURRENCY_LONG} Tippkiirus: {VELOCITY}{}Lennuki tüüp: {STRING}{}kandevõime: {CARGO_LONG}{}Käitluskulud: {CURRENCY_LONG}/a +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}Hind: {CURRENCY_LONG} Tippkiirus: {VELOCITY}{}Lennuki tüüp: {STRING} Lennukaugus: {COMMA} ruutu{}Kandevõime: {CARGO_LONG}, {CARGO_LONG}{}Käituskulud: {CURRENCY_LONG}/a +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Hind: {CURRENCY_LONG} Tippkiirus: {VELOCITY}{}Lennuki tüüp: {STRING} Lennukaugus: {COMMA} ruutu{}Kandevõime: {CARGO_LONG}{}Käituskulud: {CURRENCY_LONG}/a # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Asenda {STRING} - {STRING} @@ -3705,6 +3717,7 @@ STR_VEHICLE_INFO_AGE :{COMMA} aasta{P STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} aasta{P "" t} ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Tippkiirus: {LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Tippkiirus: {LTBLUE}{VELOCITY} {BLACK}Lennuki tüüp: {LTBLUE}{STRING} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Tühimass: {LTBLUE}{WEIGHT_SHORT} {BLACK}Võimsus: {LTBLUE}{POWER}{BLACK} Tippkiirus: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Tühimass: {LTBLUE}{WEIGHT_SHORT} {BLACK}Võimsus: {LTBLUE}{POWER}{BLACK} Tippkiirus: {LTBLUE}{VELOCITY} {BLACK}Veojõud: {LTBLUE}{FORCE} @@ -3924,9 +3937,9 @@ STR_ORDER_NO_UNLOAD_FULL_LOAD_ANY_REFIT :(Maha mitte laa STR_ORDER_AUTO_REFIT_ANY :võimalikud kaubad -STR_ORDER_STOP_LOCATION_NEAR_END :[lõpu lähedal] +STR_ORDER_STOP_LOCATION_NEAR_END :[alguses] STR_ORDER_STOP_LOCATION_MIDDLE :[keskel] -STR_ORDER_STOP_LOCATION_FAR_END :[täiesti lõpus] +STR_ORDER_STOP_LOCATION_FAR_END :[lõpus] STR_ORDER_OUT_OF_RANGE :{RED} (Järgmine sihtpunkt on väljaspool tegevusraadiust) @@ -4263,7 +4276,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Liiga pa STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Liiga palju raudteejaama osasid STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Liiga palju bussipeatusi STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Liiga palju laadimisplatvorme -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Mõnele teisele jaamale liiga lähedal STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Liiga lähedal teisele dokile STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Liiga lähedal teisele lennuväljale STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Jaama nime ei saa vahetada... @@ -4271,6 +4283,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... see STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... tee on vales suunas STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... nurgad ei saa läbisõidupeatustes olla STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... ristmikud ei saa olla läbisõidupeatustes +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... tee on ühesuunaline või blokeeritud # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Siinset jaamablokki ei saa lammutada... diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index 1f2b0075b9..e1fde3e3e8 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -11,7 +11,7 @@ ##gender m f n -# $Id: faroese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -647,10 +647,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Vel 'Sj STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Tendra/sløkk bland av skránni STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Vís tónleika spor úrvals glugga -STR_ERROR_NO_SONGS :{WHITE}Eitt tónleika sett uttan sangir er valt. Engir sangir vera spældir - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Úrval av tónleika skráðum STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Spor yvirlit STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Skrá - '{STRING}' @@ -1206,6 +1203,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ikki mø STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Innakervis viðlílkahald: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Um gilda, innankervi elvir til viðlíkahalds kostnað. Kostnaðurin vaksur yvir-lutfalsliga við støddina á kervinum, og ávirkar harvið størri fyritøkur meira enn smærri fyritøkur + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Floghavnir ganga ongantíð út: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Gildan av hesi áseting ger at hvørt floghavna slag altíð er tøkt eftir tað er komi í nýtslu @@ -1273,8 +1271,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Liturin av lend STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grønt STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Myrka grønt STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Blákollulitur -STR_CONFIG_SETTING_REVERSE_SCROLLING :Umvend skrull ætt: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Atburður tá tú skrullar korti við høgra músa knøtti. Um ógilda flytir músin kamerai. Um gilda flytir músin korti. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Mjúka sýnisglugga skrulling: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Stýr hvussu høvuðs sýni skrullar til eitt ávíst stað tá tú trýstir á lítlakorti ella tú tú gevur eini boð um at skrulla til ein ávísan lut á kortinum. Um gilda, skrullar sýni mjúgdliga, um ógilda leypur sýni beint til staði STR_CONFIG_SETTING_MEASURE_TOOLTIP :Vís eina mátingar vegleiðing tá tú brúkar ymisku byggji amboðini: {STRING} @@ -1306,8 +1302,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+trýst STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+trýst STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Sløkt -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Vinstra-trýst skrulling: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Gilda skrulling av kortinum við at toga ta við vinstra músa knøtti. Hetta er serstakliga hent um tú nýtur ein fingraskugga at skrulla vi STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Nýt {STRING} dato sniði til nøvnini á goymdum spølum @@ -1627,7 +1621,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Broyt n STR_CHEAT_SETUP_PROD :{LTBLUE}Gilda broytingar av framleiðslu virðum: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nýggja lit samanseting STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Vís vanligu lit samansetingarnar STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Vís tok lit samansetingarnar @@ -2427,7 +2420,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Ogn hjá fyrit STR_ABOUT_OPENTTD :{WHITE}Um OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Upprunalig upphavsrættindi {COPYRIGHT} 1995 Chris Sawyer, Øll rættindi umbiðin STR_ABOUT_VERSION :{BLACK}OpenTTD útgáva {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD toymi +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD toymi + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Goym spæl @@ -2650,8 +2650,6 @@ STR_TOWN_POPULATION :{BLACK}Heims f STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Býur) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Fólkatal: {ORANGE}{COMMA}{BLACK} Hús: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Ferðafólk síðsta mánað: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Postur síðsta mánað: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Farmur ið tørvast fyri bygda menning: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} krevst STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} krevst um veturin @@ -2917,18 +2915,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Savna høvuðs sýni á ídnaðin. Ctrl+trýst letur nýggjan sýnisglugga upp við sýni á ídnaðin STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Framleiðslu støði: {YELLOW}{COMMA}% -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Tørvar: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Tørvar: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Tørvar: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Framleiður: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Framleiður: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Broyt framleiðslu (fald av 8, upp til 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Broyt framleiðslu støði (prosent, upp til 800%) @@ -3725,7 +3713,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Ov nógv STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Ov nógvir tok støð deilir STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Ov nógvir buss steðgir STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Ov nógvar lastbila støðir -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Ov tætt við eina aðra støð/lessi øki STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Ov tætt við eina aðra havn STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Ov tætt við eina aðra floghavn STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kann ikki navngeva støð... diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index 645340ee9f..8a49261424 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -10,7 +10,7 @@ ##grflangid 0x35 -# $Id: finnish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -132,7 +132,7 @@ STR_QUANTITY_N_A :- STR_ABBREV_NOTHING : STR_ABBREV_PASSENGERS :{TINY_FONT}MA STR_ABBREV_COAL :{TINY_FONT}HL -STR_ABBREV_MAIL :{TINY_FONT}SP +STR_ABBREV_MAIL :{TINY_FONT}PO STR_ABBREV_OIL :{TINY_FONT}ÖL STR_ABBREV_LIVESTOCK :{TINY_FONT}KA STR_ABBREV_GOODS :{TINY_FONT}TA @@ -189,6 +189,7 @@ STR_COLOUR_ORANGE :Oranssi STR_COLOUR_BROWN :Ruskea STR_COLOUR_GREY :Harmaa STR_COLOUR_WHITE :Valkoinen +STR_COLOUR_RANDOM :Satunnainen # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -246,7 +247,7 @@ STR_TOOLTIP_RESIZE :{BLACK}Napsauta STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Suurenna/pienennä ikkuna STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Vierityspalkki - luettelon vieritys ylös/alas STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Vierityspalkki - luettelon vieritys vasemmalle/oikealle. -STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Tuhoa rakennuksia jne. ruudulta. Ctrl valitsee alueen vinottain. Shift vaihtaa tuhoamistilan ja kustannearvion välillä +STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Tuhoa rakennuksia jne. ruudulta. Ctrl valitsee alueen vinottain. Shift vaihtaa tuhoamistilan ja kustannusarvion välillä # Show engines button STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN :{BLACK}Näytä piilotetut @@ -350,15 +351,15 @@ STR_SCENEDIT_TOOLBAR_OPENTTD :{YELLOW}OpenTTD STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Skenaariomuokkain STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Siirrä aloituspäivää vuodella taaksepäin STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Siirrä aloituspäivää vuodella eteenpäin -STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Klikkaa asettaaksesi aloitusvuoden +STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Aseta aloitusvuosi napsauttamalla STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Näytä kartta, kaupunkihakemisto STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Maaston luonti STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Kaupunkien luonti STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Teollisuuden luonti STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Tienrakennus -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Istuta puita. Shift vaihtaa istutustilan ja kustannearvion välillä +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Istuta puita. Shift vaihtaa istutustilan ja kustannusarvion välillä STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Sijoita kyltti -STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Sijoita objekti. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Sijoita objekti. Shift vaihtaa rakennustilan ja kustannusarvion välillä ############ range for SE file menu starts STR_SCENEDIT_FILE_MENU_SAVE_SCENARIO :Tallenna skenaario @@ -475,7 +476,8 @@ STR_ABOUT_MENU_SCREENSHOT :Kuvakaappaus STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Täysin lähennetty kuvakaappaus STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Kuvakaappaus oletuslähennystasolla STR_ABOUT_MENU_GIANT_SCREENSHOT :Koko kartan kuvakaappaus -STR_ABOUT_MENU_ABOUT_OPENTTD :Tietoja 'OpenTTD':stä +STR_ABOUT_MENU_SHOW_FRAMERATE :Näytä kuvataajuus +STR_ABOUT_MENU_ABOUT_OPENTTD :Tietoja OpenTTD:stä STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite-kohdistaja STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Reunat päälle/pois STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Likaisten ruutujen värjäys päälle/pois @@ -534,15 +536,15 @@ STR_DAY_NUMBER_31ST :31. ############ range for days ends ############ range for months starts -STR_MONTH_ABBREV_JAN :01. -STR_MONTH_ABBREV_FEB :02. -STR_MONTH_ABBREV_MAR :03. -STR_MONTH_ABBREV_APR :04. -STR_MONTH_ABBREV_MAY :05. -STR_MONTH_ABBREV_JUN :06. -STR_MONTH_ABBREV_JUL :07. -STR_MONTH_ABBREV_AUG :08. -STR_MONTH_ABBREV_SEP :09. +STR_MONTH_ABBREV_JAN :{NBSP}1. +STR_MONTH_ABBREV_FEB :{NBSP}2. +STR_MONTH_ABBREV_MAR :{NBSP}3. +STR_MONTH_ABBREV_APR :{NBSP}4. +STR_MONTH_ABBREV_MAY :{NBSP}5. +STR_MONTH_ABBREV_JUN :{NBSP}6. +STR_MONTH_ABBREV_JUL :{NBSP}7. +STR_MONTH_ABBREV_AUG :{NBSP}8. +STR_MONTH_ABBREV_SEP :{NBSP}9. STR_MONTH_ABBREV_OCT :10. STR_MONTH_ABBREV_NOV :11. STR_MONTH_ABBREV_DEC :12. @@ -650,6 +652,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Musiikkia ei ole saatavilla STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Raita STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Nimi @@ -669,17 +672,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Valitse STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Sekoittaminen päälle/pois STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Näytä musiikkiraitojen valintaikkuna -STR_ERROR_NO_SONGS :{WHITE}Musiikkipaketti jossa ei ole kappaleita on valittu. Musiikkia ei soiteta - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Soittolistan valinta +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Soittolista - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Raita STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Soittolista - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Tyhjennä STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Tyhjennä nykyinen soittolista (vain Oma1 tai Oma2) STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Valitse musiikkiraita lisätäksesi sen nykyiseen soittolistaan (vain Oma1 tai Oma2). -STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klikkaa raitaa poistaaksesi se nykyisestä ohjelmasta (ainoastaan Custom1 tai Custom2) +STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Poista musiikkiraita nykyseiltä soittolistalta napsauttamalla (ainoastaan Custom1 tai Custom2) # Highscore window STR_HIGHSCORE_TOP_COMPANIES_WHO_REACHED :{BIG_FONT}{BLACK}Parhaat yhtiöt, jotka saavuttivat vuoden {NUM} @@ -714,9 +715,9 @@ STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Näytä STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Näytä kuljetusreitit kartalla. STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Näytä kasvillisuus kartalla. STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Näytä maanomistajat kartalla. -STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Klikkaa teollisuustyyppiä näyttääksesi sen. Ctrl+Klik näyttää valitun tyypin. Ctrl+Klik uudestaan näyttää kaikki teollisuustyypit -STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Klikkaa yhtiötä näyttääksesi sen omaisuuden. Ctrl+Klik näyttää ainoastaan valitun yhtiön. Ctrl+Klik uudestaan näyttää kaikki yhtiöt -STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Klikkaa rahtia näyttääksesi tai piilottaaksesi sen. Ctrl+Klik piilottaa kaikki paitsi valitun rahdin. Ctrl+Klik uudelleen palauttaa kaikki rahdit näkyviin +STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Napsauta teollisuustyyppiä näyttääksesi sen. Ctrl+Klik näyttää valitun tyypin. Ctrl+Klik uudestaan näyttää kaikki teollisuustyypit +STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Napsauta yhtiötä näyttääksesi sen omaisuuden. Ctrl+Klik näyttää ainoastaan valitun yhtiön. Ctrl+Klik uudestaan näyttää kaikki yhtiöt +STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Napsauta rahtia näyttääksesi tai piilottaaksesi sen. Ctrl+Klik piilottaa kaikki paitsi valitun rahdin. Ctrl+Klik uudelleen palauttaa kaikki rahdit näkyviin STR_SMALLMAP_LEGENDA_ROADS :{TINY_FONT}{BLACK}Tiet STR_SMALLMAP_LEGENDA_RAILROADS :{TINY_FONT}{BLACK}Rautatiet @@ -780,12 +781,12 @@ STR_NEWS_MESSAGE_CAPTION :{WHITE}Viesti STR_NEWS_CUSTOM_ITEM :{BIG_FONT}{BLACK}{STRING} STR_NEWS_FIRST_TRAIN_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen juna saapuu asemalle {STATION}! -STR_NEWS_FIRST_BUS_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen linja-auto saapuu asemalle {STATION}! -STR_NEWS_FIRST_TRUCK_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen kuorma-auto saapuu asemalle {STATION}! -STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen raitiovaunu saapuu asemalle {STATION}! -STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen rahtiraitiovaunu saapuu asemalle {STATION}! -STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen laiva saapuu asemalle {STATION}! -STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}Ensimmäinen lentokone saapuu asemalle {STATION}! +STR_NEWS_FIRST_BUS_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}{STATION} vastaanottaa ensimmäisen linja-auton! +STR_NEWS_FIRST_TRUCK_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}{STATION} vastaanottaa ensimmäisen kuorma-auton! +STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}{STATION} vastaanottaa ensimmäisen raitiovaunun! +STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}{STATION} vastaanottaa ensimmäisen rahtiraitiovaunun! +STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}{STATION} vastaanottaa ensimmäisen laivan! +STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Kaupunkilaiset juhlivat . . .{}{STATION} vastaanottaa ensimmäisen lentokoneen! STR_NEWS_TRAIN_CRASH :{BIG_FONT}{BLACK}Junaonnettomuus!{}{COMMA} kuolee törmäyksen jälkeisessä tulipallossa. STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER :{BIG_FONT}{BLACK}Tasoristeysturma!{}Kuljettaja kuolee junan ja auton törmäyksen jälkeisessä tulipallossa @@ -809,10 +810,11 @@ STR_NEWS_COMPANY_BANKRUPT_TITLE :{BIG_FONT}{BLAC STR_NEWS_COMPANY_BANKRUPT_DESCRIPTION :{BIG_FONT}{BLACK}{STRING} on suljettu velkojien toimesta ja kaikki omaisuus on myyty pois! STR_NEWS_COMPANY_LAUNCH_TITLE :{BIG_FONT}{BLACK}Uusi kuljetusyhtiö perustettu! STR_NEWS_COMPANY_LAUNCH_DESCRIPTION :{BIG_FONT}{BLACK}{STRING} aloittaa rakentamisen kaupungin {TOWN} lähistölle! -STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLACK}Yhtiön {STRING} on ottanut haltuun {STRING}! +STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLACK}{1:STRING} on ottanut haltuunsa yhtiön {0:STRING}! STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(pääjohtaja) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} rahoitti uuden kaupungin, {TOWN}, rakentamista! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Uusi kaupunki {TOWN} rakennettu! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Uusi {STRING} rakennetaan kaupungin {TOWN} lähistölle! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Uusi {STRING} istutetaan kaupungin {TOWN} lähistölle! @@ -834,9 +836,9 @@ STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_GENERAL :{BIG_FONT}{BLAC STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_FARM :{BIG_FONT}{BLACK}{INDUSTRY}: hyönteisparvet aiheuttavat tuhoa!{}Tuotanto vähenee 50{NBSP}%:lla. STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_SMOOTH :{BIG_FONT}{BLACK}{1:INDUSTRY} tuottaa {0:STRING} {2:COMMA}{NBSP}% entistä vähemmän! -STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} odottaa varikolla +STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} odottaa veturitallilla STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE} odottaa varikolla -STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} odottaa varikolla +STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} odottaa telakalla STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} odottaa lentokonehallissa # Order review system / warnings @@ -868,7 +870,7 @@ STR_NEWS_STATION_NOW_ACCEPTS_CARGO_AND_CARGO :{WHITE}{STATION STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Tuki päättynyt:{}{}{STRING} väli {STRING} - {STRING} ei ole enää tuettu STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Tuki vedetty pois:{}{}{STRING} kuljetuspalvelu välille {STRING}-{STRING} ei ole enää tuettu -STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Tuki tarjottu:{}{}Ensimmäinen {STRING}kuljetus välillä {STRING} - {STRING} saa vuoden mittaisen tuen paikallisviranomaisilta! +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Tuki tarjottu:{}{}Ensimmäinen {STRING}kuljetus välillä {STRING} – {STRING} saa vuoden mittaisen tuen paikallisviranomaisilta! STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Tuki myönnetty yhtiölle {STRING}!{}{}{STRING}kuljetus välillä {STRING}-{STRING} tuottaa 50{NBSP}% enemmän seuraavan vuoden ajan! STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Tuki myönnetty yhtiölle {STRING}!{}{}{STRING}kuljetus välillä {STRING}-{STRING} tuottaa tuplaten seuraavan vuoden ajan! STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Tuki myönnetty yhtiölle {STRING}!{}{}{STRING}kuljetus välillä {STRING}-{STRING} tuottaa kolminkertaisesti seuraavan vuoden ajan! @@ -876,7 +878,7 @@ STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLAC STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}{TOWN}: liikennekaaos!{}{}{STRING} rahoittaa katujen kunnostuksen; autoilijoille odotettavissa kuusi kuukautta kurjuutta! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Kuljetusmonopoli! -STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}Kaupungin {TOWN} paikallisviranomaiset allekirjoittavat sopimuksen yhtiön {STRING} kanssa vuoden pituisesta kuljetusyksinoikeudesta! +STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}{TOWN} ja {STRING} allekirjoittavat sopimuksen vuoden pituisesta kuljetusyksinoikeudesta! # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Näkymä {COMMA} @@ -895,10 +897,10 @@ STR_GAME_OPTIONS_CURRENCY_GBP :Englannin punta STR_GAME_OPTIONS_CURRENCY_USD :Yhdysvaltain dollari (USD) STR_GAME_OPTIONS_CURRENCY_EUR :Euro (EUR) STR_GAME_OPTIONS_CURRENCY_JPY :Japanin jeni (JPY) -STR_GAME_OPTIONS_CURRENCY_ATS :Itävallan shillinki (ATS) +STR_GAME_OPTIONS_CURRENCY_ATS :Itävallan šillinki (ATS) STR_GAME_OPTIONS_CURRENCY_BEF :Belgian frangi (BEF) STR_GAME_OPTIONS_CURRENCY_CHF :Sveitsin frangi (CHF) -STR_GAME_OPTIONS_CURRENCY_CZK :Tsekin koruna (CZK) +STR_GAME_OPTIONS_CURRENCY_CZK :Tšekin koruna (CZK) STR_GAME_OPTIONS_CURRENCY_DEM :Saksan markka (DEM) STR_GAME_OPTIONS_CURRENCY_DKK :Tanskan kruunu (DKK) STR_GAME_OPTIONS_CURRENCY_ESP :Espanjan peseta (ESP) @@ -912,7 +914,7 @@ STR_GAME_OPTIONS_CURRENCY_NLG :Hollannin gulde STR_GAME_OPTIONS_CURRENCY_NOK :Norjan kruunu (NOK) STR_GAME_OPTIONS_CURRENCY_PLN :Puolan złoty (PLN) STR_GAME_OPTIONS_CURRENCY_RON :Romanian leu (RON) -STR_GAME_OPTIONS_CURRENCY_RUR :Venjän rupla (RUR) +STR_GAME_OPTIONS_CURRENCY_RUR :Venäjän rupla (RUR) STR_GAME_OPTIONS_CURRENCY_SIT :Slovenian tolari (SIT) STR_GAME_OPTIONS_CURRENCY_SEK :Ruotsin kruunu (SEK) STR_GAME_OPTIONS_CURRENCY_TRY :Turkin liira (TRY) @@ -925,12 +927,14 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Etelä-Afrikan STR_GAME_OPTIONS_CURRENCY_CUSTOM :Oma... STR_GAME_OPTIONS_CURRENCY_GEL :Georgian lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranin rial (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Uusi Venäjän rupla (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Meksikon peso (MXN) ############ end of currency region -STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Ajoneuvot +STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Kulkuneuvot STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_TOOLTIP :{BLACK}Valitse kummalla puolella tietä ajetaan. -STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT :Vasemmalla kaistalla -STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT :Oikealla kaistalla +STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT :Vasemmanpuolinen liikenne +STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT :Oikeanpuolinen liikenne STR_GAME_OPTIONS_TOWN_NAMES_FRAME :{BLACK}Kaupunkien nimet STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP :{BLACK}Valitse kaupunkien nimien tyyli. @@ -951,7 +955,7 @@ STR_GAME_OPTIONS_TOWN_NAME_NORWEGIAN :Norjalainen STR_GAME_OPTIONS_TOWN_NAME_HUNGARIAN :Unkarilainen STR_GAME_OPTIONS_TOWN_NAME_AUSTRIAN :Itävaltalainen STR_GAME_OPTIONS_TOWN_NAME_ROMANIAN :Romanialainen -STR_GAME_OPTIONS_TOWN_NAME_CZECH :Tsekkiläinen +STR_GAME_OPTIONS_TOWN_NAME_CZECH :Tšekkiläinen STR_GAME_OPTIONS_TOWN_NAME_SWISS :Sveitsiläinen STR_GAME_OPTIONS_TOWN_NAME_DANISH :Tanskalainen STR_GAME_OPTIONS_TOWN_NAME_TURKISH :Turkkilainen @@ -1096,11 +1100,11 @@ STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Sulje ka STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT :(selitystä ei saatavilla) STR_CONFIG_SETTING_DEFAULT_VALUE :{LTBLUE}Oletusarvo: {ORANGE}{STRING} STR_CONFIG_SETTING_TYPE :{LTBLUE}Asetuksen tyyppi: {ORANGE}{STRING} -STR_CONFIG_SETTING_TYPE_CLIENT :Yleinen asetus (ei tallenneta tallenteisiin; vaikuttaa kaikkiin peleihin) +STR_CONFIG_SETTING_TYPE_CLIENT :Yleinen asetus (ei tallenneta tallennuksiin; vaikuttaa kaikkiin peleihin) STR_CONFIG_SETTING_TYPE_GAME_MENU :Pelin asetus (tallennetaan tallenteisiin; vaikuttaa vain uusiin peleihin) STR_CONFIG_SETTING_TYPE_GAME_INGAME :Pelin asetus (tallennetaan tallenteeseen; vaikuttaa vain nykyiseen peliin) STR_CONFIG_SETTING_TYPE_COMPANY_MENU :Yhtiön asetus (tallennetaan tallenteisiin; vaikuttaa vain uusiin peleihin) -STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Yhtiön asetus (tallennetaan tallenteeseen; vaikuttaa vain nykyiseen yhtiöön) +STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Yhtiön asetus (tallennetaan tallennukseen; vaikuttaa vain nykyiseen yhtiöön) STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Kategoria: STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Tyyppi: @@ -1254,6 +1258,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Tätä a STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktuurin huoltokustannukset: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Mikäli käytössä, infrastruktuurista aiheutuu huoltokuluja. Kulut kasvavat suhteettomasti verkon kokoon nähden, täten ne vaikuttavat suurempiin yhtiöihin enemmän kuin pieniin + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lentokentät eivät vanhene: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Mikäli käytössä, kaikki lentokenttätyypit ovat saatavilla ikuisesti niiden julkistamisen jälkeen @@ -1280,9 +1285,9 @@ STR_CONFIG_SETTING_ERRMSG_DURATION :Virheilmoituste STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT :Aika virheilmoitusten näyttämiseen punaisessa ikkunassa. Huomaa, että jotkut (kriittiset) virheilmoitukset eivät sulkeudu automaattisesti tämän ajan jälkeen, vaan ne on suljettava käsin STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE :{COMMA} sekunti{P 0 "" a} STR_CONFIG_SETTING_HOVER_DELAY :Näytä työkaluvihjeet: {STRING} -STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Viive ennen työkaluvihjeen näyttämistä, kun hiiren kursoria pidetään käyttöliittymäelementin päällä. Vaihtoehtoisesti työkaluvihjeen saa myös näkymiin painamalla hiiren oikeaa näppäintä jos arvoksi on määritetty 0. +STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Viive ennen työkaluvihjeen näyttämistä, kun hiiren kursoria pidetään käyttöliittymäelementin päällä. Vaihtoehtoisesti työkaluvihjeen saa myös näkymiin painamalla hiiren oikeata painiketta, kun arvoksi on määritetty 0. STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Pidä hiirtä päällä {COMMA} millisekunti{P 0 "" a} -STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :Hiiren oikea näppäin +STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :Hiiren oikea painike STR_CONFIG_SETTING_POPULATION_IN_LABEL :Näytä kaupungin asukasluku kaupungin nimessä: {STRING} STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Näytä kaupunkien asukasluku kartalla STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Viivojen paksuus kuvaajissa: {STRING} @@ -1337,8 +1342,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Maaston väri k STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Vihreä STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Tummanvihreä STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violetti -STR_CONFIG_SETTING_REVERSE_SCROLLING :Käänteinen vierityssuunta: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Käyttäytyminen siirrettäessä näkymää oikealla hiiren näppäimellä. Mikäli pois käytöstä, hiiri liikuttaa kameraa. Mikäli käytössä, hiiri liikuttaa karttaa +STR_CONFIG_SETTING_SCROLLMODE :Näkymän vieritystapa: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Toiminta karttaa vieritettäessä +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Siirrä näkymää hiiren oikealla painikkeella, hiiren sijainti lukiten +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Siirrä karttaa hiiren oikealla painikkeella, hiiren sijainti lukiten +STR_CONFIG_SETTING_SCROLLMODE_RMB :Siirrä karttaa hiiren oikealla painikkeella +STR_CONFIG_SETTING_SCROLLMODE_LMB :Siirrä karttaa hiiren vasemmalla painikkeella STR_CONFIG_SETTING_SMOOTH_SCROLLING :Näkymän tasainen vieritys: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Hallitse miten päänäkymä siirtyy valittuun paikkaan karttaa klikattaessa tai käytettäessä komentoa joka muuttaa näkymän sijaintia. Mikäli käytössä, päänäkymä siirtyy uuteen sijaintiin pehmeäesti, muutoin se hyppää suoraan valittuun sijaintiin STR_CONFIG_SETTING_MEASURE_TOOLTIP :Näytä mittauksen työkaluvihje, kun käytetään rakennustyökaluja: {STRING} @@ -1360,18 +1369,16 @@ STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT :Määritä hiir STR_CONFIG_SETTING_OSK_ACTIVATION :Virtuaalinäppäimistö: {STRING} STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Valitse tapa, jolla virtuaalinäppäimistö avataan syötettäessä tekstiä kun käytössä on ainoastaan osoitinlaite. Tämä on tarkoitettu pienille laitteille, joissa ei ole fyysistä näppäimistöä STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED :Pois käytöstä -STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Tuplaklikkaus -STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Yksi klikkaus (kun kohdistettuna) -STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :Yksi klikkaus (välittömästi) +STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Kaksoisnapsautus +STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Yksi napsautus (kun kohdistettuna) +STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :Yksi napsautus (välitön) STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU :Oikean painikkeen emulointi: {STRING} -STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT :Määritä kuinka hiiren oikean näppäimen painalluksia emuloidaan +STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT :Valitse, miten hiiren oikean painikkeen painalluksia emuloidaan STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Pois -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Vasemmalla hiiren painikkeella liikkuminen: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Salli näkymän siirtäminen vetämällä hiiren vasemmalla näppäimellä. Hyödyllinen erityisesti kosketusnäyttöä käytettäessä STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Sulje ikkuna hiiren oikealla painikkeella napsauttamalla: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Ikkunat sulkeutuvat, kun niitä napsautetaan hiiren oikealla painikkeella. Tämä korvaa tavallisesti näkyvän työkaluvihjeen! @@ -1386,9 +1393,9 @@ STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_ISO :ISO (2008-12-31 STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME :Uusi peli alkaa pysäytettynä: {STRING} STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME_HELPTEXT :Mikäli käytössä, peli pysäytetään automaattisesti uuden pelin alussa, mahdollistaen esimerkiksi kartan tarkemman tutkimisen -STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL :Pelin ollessa pysäytetty, salli: {STRING} +STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL :Salli pelin ollessa pysäytettynä: {STRING} STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_HELPTEXT :Valitse käytössä olevat toiminnot pelin ollessa pysäytettynä -STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_NO_ACTIONS :Ei mitkään toiminnot +STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_NO_ACTIONS :Ei mitään toimintoja STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_CONSTRUCTION :Kaikki ei-rakennustoiminnot STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_LANDSCAPING :Kaikki paitsi maastonmuokkaustoiminnot STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_ACTIONS :Kaikki toiminnot @@ -1396,8 +1403,8 @@ STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :Käytä ryhmiä STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Salli kehittyneiden kulkuneuvolistojen käyttö kulkuneuvojen ryhmittelyssä STR_CONFIG_SETTING_LOADING_INDICATORS :Lastausilmaisimet: {STRING} STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Määritä näytetäänkö lastausilmaisimet kulkuneuvojen yläpuolella lastatessa ja purettaessa rahtia -STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Näytä aikataulu tickseissä päivien sijaan: {STRING} -STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Näytä aikataulun ajat päivien sijasta tickeinä +STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Näytä aikataulu askelina päivien sijaan: {STRING} +STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Näytä aikataulun ajat päivien sijasta askelina STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Näytä saapuminen ja lähtö aikatauluissa: {STRING} STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Näytä odotetut saapumis- ja lähtemisajat aikatauluissa STR_CONFIG_SETTING_QUICKGOTO :Nopea kulkuneuvon käskyjen luominen: {STRING} @@ -1422,8 +1429,8 @@ STR_CONFIG_SETTING_SOUND_NEW_YEAR :Vuoden loppu: { STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT :Toista ääni vuoden lopussa verrattaessa yhtiön tulosta edelliseen vuoteen STR_CONFIG_SETTING_SOUND_CONFIRM :Rakentaminen: {STRING} STR_CONFIG_SETTING_SOUND_CONFIRM_HELPTEXT :Toista ääni onnistuneen rakennus- tai muun toiminnon jälkeen -STR_CONFIG_SETTING_SOUND_CLICK :Painikkeiden klikkaus: {STRING} -STR_CONFIG_SETTING_SOUND_CLICK_HELPTEXT :Piippaa klikattaessa painikkeita +STR_CONFIG_SETTING_SOUND_CLICK :Painikkeiden napsautus: {STRING} +STR_CONFIG_SETTING_SOUND_CLICK_HELPTEXT :Piippaa painikkeita napsauttaessa STR_CONFIG_SETTING_SOUND_DISASTER :Vahingot/onnettomuudet: {STRING} STR_CONFIG_SETTING_SOUND_DISASTER_HELPTEXT :Toista vahinkojen ja onnettomuuksien äänet STR_CONFIG_SETTING_SOUND_VEHICLE :Ajoneuvot: {STRING} @@ -1549,8 +1556,8 @@ STR_CONFIG_SETTING_TOWN_LAYOUT :Uusissa kaupung STR_CONFIG_SETTING_TOWN_LAYOUT_HELPTEXT :Kaupunkien käyttämä tieverkon kaava STR_CONFIG_SETTING_TOWN_LAYOUT_DEFAULT :Alkuperäinen STR_CONFIG_SETTING_TOWN_LAYOUT_BETTER_ROADS :Parempia teitä -STR_CONFIG_SETTING_TOWN_LAYOUT_2X2_GRID :2x2-ruudukko -STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :3x3-ruudukko +STR_CONFIG_SETTING_TOWN_LAYOUT_2X2_GRID :2×2-ruudukko +STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :3×3-ruudukko STR_CONFIG_SETTING_TOWN_LAYOUT_RANDOM :Satunnainen STR_CONFIG_SETTING_ALLOW_TOWN_ROADS :Kaupungit saavat rakentaa teitä: {STRING} STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Salli kaupunkien rakentaa teitä kasvaessaan. Mikäli pois käytöstä, kaupungit eivät voi rakentaa teitä itse @@ -1571,9 +1578,9 @@ STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_RAINFOREST :Vain sademetsii STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_ALL :Kaikkialle STR_CONFIG_SETTING_TOOLBAR_POS :Päätyökalupalkin sijainti: {STRING} -STR_CONFIG_SETTING_TOOLBAR_POS_HELPTEXT :Ruudun yläreunassa olevan työkalupalkin sijainti leveyssuunnassa +STR_CONFIG_SETTING_TOOLBAR_POS_HELPTEXT :Ruudun yläreunassa olevan työkalupalkin sijainti vaakasuunnassa STR_CONFIG_SETTING_STATUSBAR_POS :Tilarivin sijainti: {STRING} -STR_CONFIG_SETTING_STATUSBAR_POS_HELPTEXT :Ruudun alareunassa olevan tilapalkin sijanti leveyssuunnassa +STR_CONFIG_SETTING_STATUSBAR_POS_HELPTEXT :Ruudun alareunassa olevan tilapalkin sijanti vaakasuunnassa STR_CONFIG_SETTING_SNAP_RADIUS :Ikkunoiden kiinnittymisetäisyys: {STRING} STR_CONFIG_SETTING_SNAP_RADIUS_HELPTEXT :Ikkunoiden välinen etäisyys ennen niiden kohdistamista toistensa kanssa STR_CONFIG_SETTING_SNAP_RADIUS_VALUE :{COMMA} pikseli{P 0 "" ä} @@ -1600,7 +1607,7 @@ STR_CONFIG_SETTING_TOWN_GROWTH_NORMAL :Tavallinen STR_CONFIG_SETTING_TOWN_GROWTH_FAST :Nopea STR_CONFIG_SETTING_TOWN_GROWTH_VERY_FAST :Erittäin nopea STR_CONFIG_SETTING_LARGER_TOWNS :Suurkaupunkien osuus: {STRING} -STR_CONFIG_SETTING_LARGER_TOWNS_HELPTEXT :Suurkaupungiksi muuttuvien kaupunkien määrä, eli kaupungit jotka ovat suurempia ja kasvavat nopeammin +STR_CONFIG_SETTING_LARGER_TOWNS_HELPTEXT :Suurkaupungiksi muuttuvien kaupunkien määrä, eli suurempana aloittavat ja nopeammin kasvavat kaupungit STR_CONFIG_SETTING_LARGER_TOWNS_VALUE :1 / {COMMA} STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :Ei yhtään STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Kasvukerroin alussa: {STRING} @@ -1785,7 +1792,7 @@ STR_OSNAME_OS2 :OS/2 STR_OSNAME_SUNOS :SunOS # Abandon game -STR_ABANDON_GAME_CAPTION :{WHITE}Lopeta peli +STR_ABANDON_GAME_CAPTION :{WHITE}Pelin lopetus STR_ABANDON_GAME_QUERY :{YELLOW}Lopetetaanko peli? STR_ABANDON_SCENARIO_QUERY :{YELLOW}Lopetetaanko skenaario? @@ -1809,7 +1816,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Muuta ny STR_CHEAT_SETUP_PROD :{LTBLUE}Salli tuotantomäärien muuttaminen: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Uusi väriteema +STR_LIVERY_CAPTION :{WHITE}{COMPANY}: Väriteema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Näytä yleiset väriteemat STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Näytä junan väriteemat @@ -1988,7 +1995,7 @@ STR_NETWORK_LANG_ANY :mikä tahansa STR_NETWORK_LANG_ENGLISH :englanti STR_NETWORK_LANG_GERMAN :saksa STR_NETWORK_LANG_FRENCH :ranska -STR_NETWORK_LANG_BRAZILIAN :brasilia +STR_NETWORK_LANG_BRAZILIAN :brasilianportugali STR_NETWORK_LANG_BULGARIAN :bulgaria STR_NETWORK_LANG_CHINESE :kiina STR_NETWORK_LANG_CZECH :tšekki @@ -2015,7 +2022,7 @@ STR_NETWORK_LANG_TURKISH :turkki STR_NETWORK_LANG_UKRAINIAN :ukraina STR_NETWORK_LANG_AFRIKAANS :afrikaans STR_NETWORK_LANG_CROATIAN :kroatia -STR_NETWORK_LANG_CATALAN :katalan +STR_NETWORK_LANG_CATALAN :katalaani STR_NETWORK_LANG_ESTONIAN :viro STR_NETWORK_LANG_GALICIAN :galego STR_NETWORK_LANG_GREEK :kreikka @@ -2190,7 +2197,7 @@ STR_NETWORK_MESSAGE_CLIENT_COMPANY_NEW :*** {STRING} on STR_NETWORK_MESSAGE_CLIENT_LEFT :*** {STRING} on poistunut pelistä ({2:STRING}) STR_NETWORK_MESSAGE_NAME_CHANGE :*** {STRING} on muuttanut nimekseen {STRING} STR_NETWORK_MESSAGE_GIVE_MONEY :*** {STRING} antoi yhtiöllesi {2:CURRENCY_LONG} -STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** Annoit henkilölle {1:STRING} {2:CURRENCY_LONG} +STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** Annoit yhtiölle {1:STRING} {2:CURRENCY_LONG} STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}Palvelin sulki istunnon STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}Palvelin käynnistyy uudelleen...{}Odota, ole hyvä... @@ -2200,7 +2207,7 @@ STR_CONTENT_TYPE_CAPTION :{BLACK}Tyyppi STR_CONTENT_TYPE_CAPTION_TOOLTIP :{BLACK}Sisällön tyyppi STR_CONTENT_NAME_CAPTION :{BLACK}Nimi STR_CONTENT_NAME_CAPTION_TOOLTIP :{BLACK}Sisällön nimi -STR_CONTENT_MATRIX_TOOLTIP :{BLACK}Klikkaa kohtaa nähdäkesi lisätiedot{}Klikkaa valintaruutua valitaksesi sen ladattavaksi +STR_CONTENT_MATRIX_TOOLTIP :{BLACK}Katso lisätiedot napsauttamalla riviä{}Valitse ladattavaksi valintaruutua napsauttamalla STR_CONTENT_SELECT_ALL_CAPTION :{BLACK}Valitse kaikki STR_CONTENT_SELECT_ALL_CAPTION_TOOLTIP :{BLACK}Merkitse kaikki sisältö ladattavaksi STR_CONTENT_SELECT_UPDATES_CAPTION :{BLACK}Valitse päivitykset @@ -2285,6 +2292,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Rahtivir STR_LINKGRAPH_LEGEND_ALL :{BLACK}Kaikki STR_LINKGRAPH_LEGEND_NONE :{BLACK}Ei mitään STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Valitse näytettävät yhtiöt +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}käyttämätön @@ -2313,16 +2321,16 @@ STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Sähköradan ra STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Yksiraiteisen rakentaminen STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Maglevin rakentaminen -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Rakenna rautateitä. Ctrl vaihtaa rakennus/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Rakenna rautatiet käyttäen Autorail-tilaa. Ctrl vaihtaa rakennus/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Rakenna veturitalli (junien ostamista ja huoltoa varten). Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Muunna raide reittipisteeksi. Ctrl liittää reittipisteet. Shift vaihtaa muuntotilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Rakenna rautatieasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Rakenna opastimia. Ctrl vaihtaa joko siipiopastimet tai valo-opastimet{}Vetäminen rakentaa opastimia suoralle rautatielle. Ctrl rakentaa opastimia seuraavaan risteykseen saakka{}Ctrl+Click avaa opastimenvalintaikkunan. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Rakenna rautatiesilta. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Rakenna rautatietunneli. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Rakenna rautateitä. Ctrl vaihtaa rakennus-/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Rakenna rautatietä automaattisesti valittuun suuntaan. Ctrl vaihtaa rakennus-/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Rakenna veturitalli (junien ostamista ja huoltoa varten). Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Muunna raide reittipisteeksi. Ctrl liittää reittipisteet. Shift vaihtaa muuntotilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Rakenna rautatieasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Rakenna opastimia. Ctrl vaihtaa joko siipiopastimet tai valo-opastimet{}Vetäminen rakentaa opastimia suoralle rautatielle. Ctrl rakentaa opastimia seuraavaan risteykseen saakka{}Ctrl+Click avaa opastimenvalintaikkunan. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Rakenna rautatiesilta. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Rakenna rautatietunneli. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Rautatien, opastimien, reittipisteiden ja asemien rakentaminen/poisto päälle/pois. Pidä pohjassa Ctrl-näppäintä poistaaksesi myös aseman tai reittipisteen alla olevat raiteet. -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Muunna/päivitä raidetyyppi. Shift vaihtaa muuntotilan ja kustannearvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Muunna/päivitä raidetyyppi. Shift vaihtaa muuntotilan ja kustannusarvion välillä STR_RAIL_NAME_RAILROAD :Rautatie STR_RAIL_NAME_ELRAIL :Sähköistetty rautatie @@ -2368,7 +2376,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Poistumi STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Yhdistelmäopastin (valo-opastin){}Yhdistelmäopastin toimii yhtä aikaa tulo- ja poistumisopastimena. Tämän avulla on mahdollista luoda suuria "opastinpuita" STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Reittiopastin (valo-opastin){}Reittiopastin varmistaa junille turvallisen reitin ja siten mahdollistaa useampien junien yhtäaikaisen liikenteen moniraiteisissa risteyksissä. Tavalliset reittiopastimet voi ohittaa takakautta STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Yksisuuntainen reittiopastin (valo-opastin){}Reittiopastin varmistaa junille turvallisen reitin ja siten mahdollistaa useampien junien yhtäaikaisen liikenteen moniraiteisissa risteyksissä. Yksisuuntaisia opastimia ei voi ohittaa takakautta -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Opastinten muuntaminen{}Kun tämä on valittu, olemassaolevan opastimen klikkaaminen muuntaa siitä valituntyyppisen ja -muotoisen. Ctrl+Klik vaihtaa nykyistä opastimen muotoa. Shift+Klik näyttää muuntamisen kustannearvion +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Opastinten muuntaminen{}Kun tämä on valittu, olemassaolevan opastimen napsauttaminen muuntaa siitä valituntyyppisen ja -muotoisen. Ctrl+Klik vaihtaa nykyistä opastimen muotoa. Shift+Klik näyttää muuntamisen kustannusarvion STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Opastimien väli vetämällä lisättäessä STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Pienennä opastimien väliä vetämällä lisättäessä STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Suurenna opastimien väliä vetämällä lisättäessä @@ -2392,29 +2400,29 @@ STR_BRIDGE_TUBULAR_SILICON :Putkirakenne, p # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Tien rakentaminen STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Raitiotien rakentaminen -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Rakenna tieosuus. Ctrl vaihtaa rakennus/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Rakenna raitiotietä. Ctrl vaihtaa rakennus/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Rakenna tieosuus käyttäen Autoroad-tilaa. Ctrl vaihtaa rakennus/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Rakenna raitiotieosuus käyttäen Autotram-tilaa. Ctrl vaihtaa rakennus/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Rakenna autovarikko (ajoneuvojen ostamista ja huoltoa varten). Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Rakenna raitiotievarikko (vaunujen ostamiseen ja korjaamiseen). Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Rakenna linja-autoasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Rakenna matkustaja-asema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Rakenna lastauslaituri. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Rakenna rahtiasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Rakenna tieosuus. Ctrl vaihtaa rakennus-/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Rakenna raitiotietä. Ctrl vaihtaa rakennus-/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Rakenna tieosuus automaattisesti valittuun suuntaan. Ctrl vaihtaa rakennus-/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Rakenna raitiotieosuus automaattisesti valittuun suuntaan. Ctrl vaihtaa rakennus-/poistotilan välillä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Rakenna autovarikko (ajoneuvojen ostamista ja huoltoa varten). Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Rakenna raitiotievarikko (vaunujen ostamiseen ja korjaamiseen). Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Rakenna linja-autoasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Rakenna raitiotien matkustaja-asema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Rakenna lastauslaituri. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Rakenna raitiotien rahtiasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Ota yksisuuntaiset tiet käyttöön/pois käytöstä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Rakenna maantiesilta. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Rakenna raitiotiesilta. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Rakenna maantietunneli. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Rakenna raitiotietunneli. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Rakenna maantiesilta. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Rakenna raitiotiesilta. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Rakenna maantietunneli. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Rakenna raitiotietunneli. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Tien rakentaminen/siirtäminen päälle/pois STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Vaihda raitiotien rakentamisen ja purkamisen välillä # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Autovarikon suunta STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Valitse autovarikon suunta. -STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Varikon suunta -STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Valitse varikon suunta +STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Raitiotievarikon suunta +STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Valitse raitiotievarikon suunta # Road vehicle station construction window STR_STATION_BUILD_BUS_ORIENTATION :{WHITE}Linja-autoaseman suunta @@ -2429,12 +2437,12 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Valitse # Waterways toolbar (last two for SE only) STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Vesireittien rakentaminen STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Vesireitit -STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Rakenna kanavia. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Rakenna sulku. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Rakenna telakka (laivojen ostamista ja huoltamista varten). Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Rakenna satama. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Sijoita poiju: voidaan käyttää reittipisteenä. Shift vaihtaa rakennustilan ja kustannearvion välillä -STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Rakenna akvedukti. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Rakenna kanavia. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Rakenna sulku. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Rakenna telakka (laivojen ostamista ja huoltamista varten). Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Rakenna satama. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Sijoita poiju, jota voi käyttää reittipisteenä. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Rakenna akvedukti. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Määrittele vesialue.{}Tee kanava, paitsi jos Ctrl on painettuna merenpinnalla. Tällöin meri laajenee ympäristöön. STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Sijoita jokia @@ -2447,7 +2455,7 @@ STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Satama # Airport toolbar STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Lentokentät -STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Rakenna lentokenttä. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Rakenna lentokenttä. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä # Airport construction window STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Lentokentän valinta @@ -2474,17 +2482,17 @@ STR_STATION_BUILD_NOISE :{BLACK}Aiheutet # Landscaping toolbar STR_LANDSCAPING_TOOLBAR :{WHITE}Maastonmuokkaus -STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Laske ruudun kulmaa. Vetäminen laskee ensimmäistä valittua kulmaa ja tasoittaa valitun alueen kulman korkeudelle. Ctrl valitsee alueen vinottain. Shift vaihtaa muokkaustilan ja kustannearvion välillä -STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Nosta ruudun kulmaa. Vetäminen nostaa ensimmäistä valittua kulmaa ja tasoittaa valitun alueen kulman korkeudelle. Ctrl valitsee alueen vinottain. Shift vaihtaa muokkaustilan ja kustannearvion välillä -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Tasoita maata ensimmäisen valitun kulman korkeudelle. Ctrl valitsee alueen vinottain. Shift vaihtaa muokkaustilan ja kustannearvion välillä -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Osta maata tulevaa käyttöä varten. Shift vaihtaa ostotilan ja kustannearvion välillä +STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Laske ruudun kulmaa. Vetäminen laskee ensimmäistä valittua kulmaa ja tasoittaa valitun alueen kulman korkeudelle. Ctrl valitsee alueen vinottain. Shift vaihtaa muokkaustilan ja kustannusarvion välillä +STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Nosta ruudun kulmaa. Vetäminen nostaa ensimmäistä valittua kulmaa ja tasoittaa valitun alueen kulman korkeudelle. Ctrl valitsee alueen vinottain. Shift vaihtaa muokkaustilan ja kustannusarvion välillä +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Tasoita maata ensimmäisen valitun kulman korkeudelle. Ctrl valitsee alueen vinottain. Shift vaihtaa muokkaustilan ja kustannusarvion välillä +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Osta maata tulevaa käyttöä varten. Shift vaihtaa ostotilan ja kustannusarvion välillä # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Objektin valinta -STR_OBJECT_BUILD_TOOLTIP :{BLACK}Valitse rakennettava objekti. Shift vaihtaa rakennustilan ja kustannearvion välillä +STR_OBJECT_BUILD_TOOLTIP :{BLACK}Valitse rakennettava objekti. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Valitse rakennettavan objektin luokka STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Objektin esikatselu -STR_OBJECT_BUILD_SIZE :{BLACK}Koko: {GOLD}{NUM} x {NUM} ruutua +STR_OBJECT_BUILD_SIZE :{BLACK}Koko: {GOLD}{NUM} × {NUM} ruutua STR_OBJECT_CLASS_LTHS :Majakat STR_OBJECT_CLASS_TRNS :Lähettimet @@ -2493,7 +2501,7 @@ STR_OBJECT_CLASS_TRNS :Lähettimet STR_PLANT_TREE_CAPTION :{WHITE}Puita STR_PLANT_TREE_TOOLTIP :{BLACK}Valitse istutettava puutyyppi. Jos ruudussa on jo puu, tämä lisää uusia puita riippumatta valitun puun tyypistä STR_TREES_RANDOM_TYPE :{BLACK}Sattumanvaraisia puita -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Aseta sattumanvaraisia puita. Shift vaihtaa istutustilan ja kustannearvion välillä +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Aseta sattumanvaraisia puita. Shift vaihtaa istutustilan ja kustannusarvion välillä STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Satunnaisia puita. STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Istuta puita satunnaisesti maastoon @@ -2514,7 +2522,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Haluatko # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Luo kaupunkeja STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}Uusi kaupunki -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Perusta uusi kaupunki. Shift+Klik näyttää vain kustannearvion +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Perusta uusi kaupunki. Shift+Klik näyttää vain kustannusarvion STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Satunnainen kaupunki STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Perusta kaupunki satunnaiseen paikkaan STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Monta satunnaista kaupunkia @@ -2522,7 +2530,7 @@ STR_FOUND_TOWN_RANDOM_TOWNS_TOOLTIP :{BLACK}Peitä k STR_FOUND_TOWN_NAME_TITLE :{YELLOW}Kaupungin nimi: STR_FOUND_TOWN_NAME_EDITOR_TITLE :{BLACK}Syötä kaupungin nimi -STR_FOUND_TOWN_NAME_EDITOR_HELP :{BLACK}Klikkaa syöttääksesi kaupungin nimen +STR_FOUND_TOWN_NAME_EDITOR_HELP :{BLACK}Syötä kaupungin nimi napsauttamalla STR_FOUND_TOWN_NAME_RANDOM_BUTTON :{BLACK}Satunnainen nimi STR_FOUND_TOWN_NAME_RANDOM_TOOLTIP :{BLACK}Arvo uusi satunnainen nimi @@ -2539,8 +2547,8 @@ STR_FOUND_TOWN_ROAD_LAYOUT :{YELLOW}Kaupung STR_FOUND_TOWN_SELECT_TOWN_ROAD_LAYOUT :{BLACK}Valitse tiekaava tälle kaupungille STR_FOUND_TOWN_SELECT_LAYOUT_ORIGINAL :{BLACK}Alkuperäinen STR_FOUND_TOWN_SELECT_LAYOUT_BETTER_ROADS :{BLACK}Parempia teitä -STR_FOUND_TOWN_SELECT_LAYOUT_2X2_GRID :{BLACK}2x2-ruudukko -STR_FOUND_TOWN_SELECT_LAYOUT_3X3_GRID :{BLACK}3x3-ruudukko +STR_FOUND_TOWN_SELECT_LAYOUT_2X2_GRID :{BLACK}2×2-ruudukko +STR_FOUND_TOWN_SELECT_LAYOUT_3X3_GRID :{BLACK}3×3-ruudukko STR_FOUND_TOWN_SELECT_LAYOUT_RANDOM :{BLACK}Sattumanvarainen # Fund new industry window @@ -2559,8 +2567,8 @@ STR_INDUSTRY_CARGOES_CARGO_CAPTION :{WHITE}Teollisu STR_INDUSTRY_CARGOES_PRODUCERS :{WHITE}Tuottavia teollisuuksia STR_INDUSTRY_CARGOES_CUSTOMERS :{WHITE}Hyväksyviä teollisuuksia STR_INDUSTRY_CARGOES_HOUSES :{WHITE}Taloja -STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP :{BLACK}Klikkaa teollisuutta nähdäksesi sen tuottajat ja kuluttajat -STR_INDUSTRY_CARGOES_CARGO_TOOLTIP :{BLACK}{STRING}{}Klikkaa rahtia nähdäksesi sen tuottajat ja kuluttajat +STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP :{BLACK}Napsauta teollisuutta nähdäksesi sen tuottajat ja kuluttajat +STR_INDUSTRY_CARGOES_CARGO_TOOLTIP :{BLACK}{STRING}{}Napsauta rahtia nähdäksesi sen tuottajat ja kuluttajat STR_INDUSTRY_DISPLAY_CHAIN :{BLACK}Näytä ketju STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP :{BLACK}Näytä rahdin tuottajat ja hyväksyvät teollisuudet STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP :{BLACK}Yhdistä karttaan @@ -2691,7 +2699,37 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Yhtiön omistam STR_ABOUT_OPENTTD :{WHITE}Tietoja OpenTTD:stä STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Alkuperäiset oikeudet {COPYRIGHT} 1995 Chris Sawyer, kaikki oikeudet pidätetään STR_ABOUT_VERSION :{BLACK}OpenTTD-versio {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Kuvataajuus +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}×) +STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Simulaationopeus: {STRING} +STR_FRAMERATE_RATE_BLITTER :{WHITE}Grafiikan kuvataajuus: {STRING} +STR_FRAMERATE_SPEED_FACTOR :{WHITE}Pelin nykyinen nopeuskerroin: {DECIMAL}× +STR_FRAMERATE_CURRENT :{WHITE}Nykyinen +STR_FRAMERATE_DATA_POINTS :{BLACK}Data perustuu {COMMA} mittaukseen +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL}{WHITE} kuvaa/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE} kuvaa/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE} kuvaa/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Ajoneuvoaskeleet: +STR_FRAMERATE_GL_SHIPS :{BLACK} Laiva-askeleet: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Maailma-askeleet: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Maailmanäkymät: +STR_FRAMERATE_VIDEO :{WHITE}Videolähtö: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_SHIPS :Laiva-askeleet +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Ilma-alusaskeleet +STR_FRAMETIME_CAPTION_VIDEO :Videolähtö +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Tallenna peli @@ -2715,6 +2753,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Tietoja STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Tietoja ei ole saatavilla STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Suodatinteksti: STR_SAVELOAD_OSKTITLE :{BLACK}Syötä nimi tallennustiedostolle @@ -2723,9 +2762,9 @@ STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}Maailman STR_MAPGEN_MAPSIZE :{BLACK}Kartan koko: STR_MAPGEN_MAPSIZE_TOOLTIP :{BLACK}Valitse kartan koko ruutuina. Saatavilla olevien ruutujen määrä on hieman alhaisempi STR_MAPGEN_BY :{BLACK}× -STR_MAPGEN_NUMBER_OF_TOWNS :{BLACK}Kaupungit: +STR_MAPGEN_NUMBER_OF_TOWNS :{BLACK}Kaupunkien määrä: STR_MAPGEN_DATE :{BLACK}Päivämäärä: -STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}Teollisuus: +STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}Teollisuuden määrä: STR_MAPGEN_MAX_HEIGHTLEVEL :{BLACK}Suurin sallittu kartan korkeus: STR_MAPGEN_MAX_HEIGHTLEVEL_UP :{BLACK}Kasvata suurinta sallittua vuorten korkeutta yhdellä STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN :{BLACK}Vähennä suurinta sallittua vuorten korkeutta yhdellä @@ -2977,15 +3016,14 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Syötä STR_TOWN_DIRECTORY_CAPTION :{WHITE}Kaupungit STR_TOWN_DIRECTORY_NONE :{ORANGE}- Ei mitään - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) -STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Kaupunkien nimet - nimen klikkaaminen keskittää päänäkymän kaupunkiin. Ctrl+Klik avaa uuden näkymäikkunan kaupungin sijaintiin +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (suurkaup.){BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Kaupunkien nimet - keskitä päänäkymä kaupunkiin napsauttamalla nimeä. Ctrl+Klik avaa uuden näkymäikkunan kaupungin sijaintiin STR_TOWN_POPULATION :{BLACK}Maailman asukasluku: {COMMA} # Town view window STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Asukasluku: {ORANGE}{COMMA}{BLACK} Taloja: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Matkustajia viime kuussa: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Postia viime kuussa: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Kaupungin kasvuun tarvittava rahti: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} vaadittu STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} vaaditaan talvella @@ -3045,7 +3083,7 @@ STR_GOALS_SPECTATOR_NONE :{ORANGE}- Ei sa STR_GOALS_PROGRESS :{ORANGE}{STRING} STR_GOALS_PROGRESS_COMPLETE :{GREEN}{STRING} STR_GOALS_COMPANY_TITLE :{BLACK}Yhtiön tavoitteet: -STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikkaa tavoitetta keskittääksesi päänäkymän teollisuuteen/kaupunkiin/ruutuun. Ctrl+Klik avaa uuden näkymän teollisuuden/kaupungin/ruudun sijaintiin +STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Keskitä päänäkymä teollisuuteen/kaupunkiin/ruutuun napsauttamalla tavoitetta. Ctrl+Klik avaa uuden näkymän teollisuuden/kaupungin/ruudun sijaintiin # Goal question window STR_GOAL_QUESTION_CAPTION_QUESTION :Kysymys @@ -3084,7 +3122,7 @@ STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Napsauta palvelua keskittääksesi päänäkymän teollisuuteen/kaupunkiin. Ctrl+Klik avaa uuden näkymäikkunan teollisuuden/kaupungin sijaintiin # Story book window -STR_STORY_BOOK_CAPTION :{WHITE}Yhtiön {COMPANY} historia +STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY}: historia STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Yleinen yhtiöhistoria STR_STORY_BOOK_TITLE :{YELLOW}{STRING} STR_STORY_BOOK_GENERIC_PAGE_ITEM :Sivu {NUM} @@ -3162,7 +3200,7 @@ STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Keskitä STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Muuta aseman nimi. STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Näytä kaikki junat, joilla on tämä asema käskyissään. -STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Näytä kaikki autot, joilla on tämä asema käskyissään. +STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Näytä kaikki ajoneuvot, joilla on tämä asema käskyissään. STR_STATION_VIEW_SCHEDULED_AIRCRAFT_TOOLTIP :{BLACK}Näytä kaikki lentokoneet, joilla on tämä asema käskyissään. STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP :{BLACK}Näytä kaikki laivat, joilla on tämä asema käskyissään. @@ -3202,10 +3240,10 @@ STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURREN STR_FINANCES_TOTAL_CAPTION :{WHITE}Yhteensä: STR_FINANCES_BANK_BALANCE_TITLE :{WHITE}Tilin saldo STR_FINANCES_LOAN_TITLE :{WHITE}Laina -STR_FINANCES_MAX_LOAN :{WHITE}Laina enimmillään: {BLACK}{CURRENCY_LONG} +STR_FINANCES_MAX_LOAN :{WHITE}Laina enintään: {BLACK}{CURRENCY_LONG} STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG} -STR_FINANCES_BORROW_BUTTON :{BLACK}Ota lainaa {CURRENCY_LONG} -STR_FINANCES_BORROW_TOOLTIP :{BLACK}Ota lisää lainaa. Ctrl+Klik lisää lainaa niin paljon kuin mahdollista +STR_FINANCES_BORROW_BUTTON :{BLACK}Nosta lainaa {CURRENCY_LONG} +STR_FINANCES_BORROW_TOOLTIP :{BLACK}Ota lisää lainaa. Ctrl+Klik nostaa lainaa niin paljon kuin mahdollista STR_FINANCES_REPAY_BUTTON :{BLACK}Lyhennä lainaa {CURRENCY_LONG} STR_FINANCES_REPAY_TOOLTIP :{BLACK}Lyhennä lainaa. Ctrl+Klik lyhentää lainaa niin paljon kuin mahdollista STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastruktuuri @@ -3236,8 +3274,8 @@ STR_COMPANY_VIEW_BUILD_HQ_BUTTON :{BLACK}Rakenna STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Rakenna yhtiön päämaja STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}Näytä päämaja STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}Näytä yhtiön päämaja -STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Sijoita päämaja -STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rakenna yhtiön päärakennus muualle, kustannus 1{NBSP}% yhtiön arvosta. Shift+Klik näyttää kustannearvion sijoittamatta päärakennusta uudelleen +STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Siirrä päämaja +STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rakenna yhtiön päärakennus muualle, kustannus 1{NBSP}% yhtiön arvosta. Shift+Klik näyttää kustannusarvion sijoittamatta päärakennusta uudelleen STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Yksityiskohdat STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}Näytä tarkka infrastruktuurin määrä @@ -3252,7 +3290,7 @@ STR_COMPANY_VIEW_PRESIDENT_NAME_TOOLTIP :{BLACK}Muuta p STR_COMPANY_VIEW_BUY_SHARE_BUTTON :{BLACK}Osta 25{NBSP}%:n osuus yhtiöstä STR_COMPANY_VIEW_SELL_SHARE_BUTTON :{BLACK}Myy 25{NBSP}%:n osuus yhtiöstä -STR_COMPANY_VIEW_BUY_SHARE_TOOLTIP :{BLACK}Osta 25{NBSP}%:n osuus tästä yhtiöstä. Shift+Klik näyttää kustannearvion ostamatta osuuksia +STR_COMPANY_VIEW_BUY_SHARE_TOOLTIP :{BLACK}Osta 25{NBSP}%:n osuus tästä yhtiöstä. Shift+Klik näyttää kustannusarvion ostamatta osuuksia STR_COMPANY_VIEW_SELL_SHARE_TOOLTIP :{BLACK}Myy 25{NBSP}%:n osuus tästä yhtiöstä. Shift+Klik näyttää tuottoarvion myymättä osuuksia STR_COMPANY_VIEW_COMPANY_NAME_QUERY_CAPTION :Yhtiön nimi @@ -3261,7 +3299,7 @@ STR_COMPANY_VIEW_PRESIDENT_S_NAME_QUERY_CAPTION :Pääjohtajan n STR_BUY_COMPANY_MESSAGE :{WHITE}Etsimme kuljetusyhtiötä, joka ottaisi haltuunsa yhtiömme{}{}Haluatko ostaa yhtiön {COMPANY} hintaan {CURRENCY_LONG}? # Company infrastructure window -STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Yhtiön {COMPANY} infrastruktuuri +STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}{COMPANY}: Infrastruktuuri STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Rautatiepalat: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Opastimet STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Teiden palat: @@ -3280,7 +3318,7 @@ STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ei mi STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% kuljetettu) STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% kuljetettu) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} -STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Teollisuusmuotojen nimet - klikkaa nimeä kohdistaaksesi päänäkymän teollisuuslaitokseen. Ctrl+Klik avaa uuden näkymäikkunan teollisuuslaitoksen sijaintiin +STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Teollisuusmuotojen nimet - kohdista päänäkymä teollisuuslaitokseen napsauttamalla nimeä. Ctrl+Klik avaa uuden näkymäikkunan teollisuuslaitoksen sijaintiin # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} @@ -3290,29 +3328,19 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Keskitä STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tuotantotaso: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Teollisuuslaitos ilmoittaa pikaisesta sulkeutumisestaan! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Tarvitsee: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Tarvitsee: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Tarvitsee: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Tarvitsee: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} odottamassa{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Tuottaa: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Tuottaa: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Muokkaa tuotantoa (8:n kerroin, 2040 asti) -STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Muuta tuotantotasoa (prosentteina, 800% asti) +STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Muuta tuotantotasoa (prosentteina, 800{NBSP}% asti) # Vehicle lists -STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} junaa -STR_VEHICLE_LIST_ROAD_VEHICLE_CAPTION :{WHITE}{STRING} - {COMMA} ajoneuvoa -STR_VEHICLE_LIST_SHIP_CAPTION :{WHITE}{STRING} - {COMMA} laivaa -STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING} - {COMMA} lentokonetta +STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} juna{P "" a} +STR_VEHICLE_LIST_ROAD_VEHICLE_CAPTION :{WHITE}{STRING} - {COMMA} ajoneuvo{P "" a} +STR_VEHICLE_LIST_SHIP_CAPTION :{WHITE}{STRING} - {COMMA} laiva{P "" a} +STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING} - {COMMA} lentokone{P "" tta} STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP :{BLACK}Junat - napsauta junaa saadaksesi tietoja. STR_VEHICLE_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Ajoneuvot - napsauta ajoneuvoa saadaksesi tietoja. @@ -3337,23 +3365,23 @@ STR_VEHICLE_LIST_SEND_ROAD_VEHICLE_TO_DEPOT :Lähetä variko STR_VEHICLE_LIST_SEND_SHIP_TO_DEPOT :Lähetä telakalle STR_VEHICLE_LIST_SEND_AIRCRAFT_TO_HANGAR :Lähetä varikolle -STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP :{BLACK}Pysäytä kaikki listalla olevat kulkuneuvot klikkaamalla -STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP :{BLACK}Käynnistä kaikki listalla olevat ajoneuvot klikkaamalla +STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP :{BLACK}Pysäytä kaikki listalla olevat kulkuneuvot napsauttamalla +STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP :{BLACK}Käynnistä kaikki listalla olevat ajoneuvot napsauttamalla STR_VEHICLE_LIST_SHARED_ORDERS_LIST_CAPTION :{WHITE}{COMMA} ajoneuvon jaetut käskyt # Group window STR_GROUP_ALL_TRAINS :Kaikki junat -STR_GROUP_ALL_ROAD_VEHICLES :Kaikki autot +STR_GROUP_ALL_ROAD_VEHICLES :Kaikki ajoneuvot STR_GROUP_ALL_SHIPS :Kaikki laivat STR_GROUP_ALL_AIRCRAFTS :Kaikki lentoalukset STR_GROUP_DEFAULT_TRAINS :Muut junat -STR_GROUP_DEFAULT_ROAD_VEHICLES :Muut autot +STR_GROUP_DEFAULT_ROAD_VEHICLES :Muut ajoneuvot STR_GROUP_DEFAULT_SHIPS :Muut laivat STR_GROUP_DEFAULT_AIRCRAFTS :Muut lentokoneet -STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Ryhmät - klikkaa ryhmää nähdäksesi kaikki kulkuneuvot tässä ryhmässä. Järjestä ryhmiä vetämällä ja pudottamalla. +STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Ryhmät - napsauta ryhmää nähdäksesi kaikki kulkuneuvot tässä ryhmässä. Järjestä ryhmiä vetämällä ja pudottamalla. STR_GROUP_CREATE_TOOLTIP :{BLACK}Luo ryhmä STR_GROUP_DELETE_TOOLTIP :{BLACK}Poista valittu ryhmä STR_GROUP_RENAME_TOOLTIP :{BLACK}Nimeä valittu ryhmä @@ -3369,6 +3397,7 @@ STR_GROUP_RENAME_CAPTION :{BLACK}Nimeä r STR_GROUP_PROFIT_THIS_YEAR :Tuotto tänä vuonna: STR_GROUP_PROFIT_LAST_YEAR :Tuotto viime vuonna: +STR_GROUP_OCCUPANCY :Nykyinen käyttö: STR_GROUP_OCCUPANCY_VALUE :{NUM} % # Build vehicle window @@ -3414,10 +3443,10 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Osta ajo STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Osta laiva STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Osta lentokone -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Osta valittu yksikkö. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Osta valittu ajoneuvo.. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Osta valittu laiva. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Osta korostettu lentokone. Shift+Klik näyttää kustannearvion ostamatta kopiota +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Osta valittu yksikkö. Shift+Klik näyttää kustannusarvion ostamatta +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Osta valittu ajoneuvo. Shift+Klik näyttää kustannusarvion ostamatta +STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Osta valittu laiva. Shift+Klik näyttää kustannusarvion ostamatta +STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Osta korostettu lentokone. Shift+Klik näyttää kustannusarvion ostamatta STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Nimeä STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Nimeä @@ -3460,10 +3489,10 @@ STR_DEPOT_VEHICLE_TOOLTIP :{BLACK}{ENGINE} STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} kulkuneuvo{P "" a}{STRING} STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) -STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Junat - vedä kulkuneuvoa vasemmalla hiiren painikkella lisätäksesi/poistaaksesi junasta, oikealla näppäimellä lisätietoja, Pidä pohjassa Ctrl-näppäintä toteuttaaksesi molemmat toiminnot seuraavaan ketjuun -STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Ajoneuvot - napsauta ajoneuvoa oikealla hiiren näppäimellä saadaksesi tietoja. -STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Laivat - napsauta laivaa oikealla hiiren näppäimellä saadaksesi tietoja. -STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Lentokoneet - napsauta lentokonetta oikealla hiiren näppäimellä saadaksesi tietoja. +STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Junat - vedä kulkuneuvoa vasemmalla hiiren painikkella lisätäksesi/poistaaksesi junasta, oikealla painikkeella lisätietoja. Pidä pohjassa Ctrl-näppäintä toteuttaaksesi molemmat toiminnot seuraavaan ketjuun +STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Ajoneuvot - napsauta ajoneuvoa oikealla hiiren painikkeella saadaksesi tietoja. +STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Laivat - napsauta laivaa oikealla hiiren painikkeella saadaksesi tietoja. +STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Lentokoneet - napsauta lentokonetta oikealla hiiren painikkeella saadaksesi tietoja. STR_DEPOT_TRAIN_SELL_TOOLTIP :{BLACK}Vedä yksikkö tähän myydäksesi sen. STR_DEPOT_ROAD_VEHICLE_SELL_TOOLTIP :{BLACK}Vedä ajoneuvo tähän myydäksesi sen. @@ -3472,12 +3501,12 @@ STR_DEPOT_AIRCRAFT_SELL_TOOLTIP :{BLACK}Vedä le STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP :{BLACK}Vedä junan veturi tähän myydäksesi koko junan. -STR_DEPOT_SELL_ALL_BUTTON_TRAIN_TOOLTIP :{BLACK}Myy kaikki varikolla olevat junat +STR_DEPOT_SELL_ALL_BUTTON_TRAIN_TOOLTIP :{BLACK}Myy kaikki veturitallilla olevat junat STR_DEPOT_SELL_ALL_BUTTON_ROAD_VEHICLE_TOOLTIP :{BLACK}Myy kaikki varikolla olevat ajoneuvot STR_DEPOT_SELL_ALL_BUTTON_SHIP_TOOLTIP :{BLACK}Myy kaikki telakalla olevat laivat STR_DEPOT_SELL_ALL_BUTTON_AIRCRAFT_TOOLTIP :{BLACK}Myy kaikki hallissa olevat ilma-alukset -STR_DEPOT_AUTOREPLACE_TRAIN_TOOLTIP :{BLACK}Korvaa kaikki varikolla olevat junat automaattisesti +STR_DEPOT_AUTOREPLACE_TRAIN_TOOLTIP :{BLACK}Korvaa kaikki veturitallilla olevat junat automaattisesti STR_DEPOT_AUTOREPLACE_ROAD_VEHICLE_TOOLTIP :{BLACK}Korvaa kaikki varikolla olevat ajoneuvot automaattisesti STR_DEPOT_AUTOREPLACE_SHIP_TOOLTIP :{BLACK}Korvaa kaikki telakalla olevat laivat automaattisesti STR_DEPOT_AUTOREPLACE_AIRCRAFT_TOOLTIP :{BLACK}Korvaa kaikki hallissa olevat lento-alukset automaattisesti @@ -3497,10 +3526,10 @@ STR_DEPOT_CLONE_ROAD_VEHICLE :{BLACK}Kloonaa STR_DEPOT_CLONE_SHIP :{BLACK}Kloonaa laiva STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Kloonaa lentokone -STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Tämä ostaa kopion junasta ja kaikista sen vaunuista. Paina tätä nappia ja sen jälkeen junaa varikon sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Tämä ostaa kopion ajoneuvosta. Paina tätä nappia ja sen jälkeen ajoneuvoa varikon sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Tämä ostaa kopion laivasta. Paina tätä nappia ja sen jälkeen laivaa telakan sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Tämä ostaa kopion lentokoneesta. Paina tätä nappia ja sen jälkeen lentokonetta lentokonehallin sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota +STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Tämä ostaa kopion junasta ja kaikista sen vaunuista. Napsauta tätä painiketta ja sen jälkeen junaa varikon sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota +STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Tämä ostaa kopion ajoneuvosta. Napsauta tätä painiketta ja sen jälkeen ajoneuvoa varikon sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota +STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Tämä ostaa kopion laivasta. Napsauta tätä painiketta ja sen jälkeen laivaa telakan sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota +STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Tämä ostaa kopion lentokoneesta. Napsauta tätä painiketta ja sen jälkeen lentokonetta lentokonehallin sisä- tai ulkopuolella. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Keskitä näkymä veturitallin sijaintiin. Ctrl+Klik avaa uuden näkymäikkunan veturitallin sijaintiin STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Keskitä päänäkymä varikon sijaintiin. Ctrl+Klik avaa uuden näkymäikkunan varikon sijaintiin @@ -3512,15 +3541,15 @@ STR_DEPOT_VEHICLE_ORDER_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Näytä STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TOOLTIP :{BLACK}Näytä tässä terminaalissa olevien laivojen käskyt STR_DEPOT_VEHICLE_ORDER_LIST_AIRCRAFT_TOOLTIP :{BLACK}Näytä tämän lentokentän ilma-alusten käskyistä hallista riippumatta -STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP :{BLACK}Pysäytä kaikki varikolla olevat junat klikkaamalla -STR_DEPOT_MASS_STOP_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Pysäytä kaikki varikolla olevat ajoneuvot klikkaamalla -STR_DEPOT_MASS_STOP_DEPOT_SHIP_TOOLTIP :{BLACK}Pysäytä kaikki telakalla olevat laivat klikkaamalla -STR_DEPOT_MASS_STOP_HANGAR_TOOLTIP :{BLACK}Pysäytä kaikki hallissa olevat ilma-alukset klikkaamalla +STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP :{BLACK}Pysäytä kaikki veturitallilla olevat junat napsauttamalla +STR_DEPOT_MASS_STOP_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Pysäytä kaikki varikolla olevat ajoneuvot napsauttamalla +STR_DEPOT_MASS_STOP_DEPOT_SHIP_TOOLTIP :{BLACK}Pysäytä kaikki telakalla olevat laivat napsauttamalla +STR_DEPOT_MASS_STOP_HANGAR_TOOLTIP :{BLACK}Pysäytä kaikki hallissa olevat ilma-alukset napsauttamalla -STR_DEPOT_MASS_START_DEPOT_TRAIN_TOOLTIP :{BLACK}Käynnistä kaikki varikolla olevat junat klikkaamalla -STR_DEPOT_MASS_START_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Käynnistä kaikki varikolla olevat ajoneuvot klikkaamalla -STR_DEPOT_MASS_START_DEPOT_SHIP_TOOLTIP :{BLACK}Käynnistä kaikki telakalla olevat laivat klikkaamalla -STR_DEPOT_MASS_START_HANGAR_TOOLTIP :{BLACK}Käynnistä kaikki hallissa olevat ilma-alukset klikkaamalla +STR_DEPOT_MASS_START_DEPOT_TRAIN_TOOLTIP :{BLACK}Käynnistä kaikki veturitallilla olevat junat napsauttamalla +STR_DEPOT_MASS_START_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Käynnistä kaikki varikolla olevat ajoneuvot napsauttamalla +STR_DEPOT_MASS_START_DEPOT_SHIP_TOOLTIP :{BLACK}Käynnistä kaikki telakalla olevat laivat napsauttamalla +STR_DEPOT_MASS_START_HANGAR_TOOLTIP :{BLACK}Käynnistä kaikki hallissa olevat ilma-alukset napsauttamalla STR_DEPOT_SELL_CONFIRMATION_TEXT :{YELLOW}Olet myymässä kaikki varikon ajoneuvot. Oletko varma? @@ -3595,10 +3624,10 @@ STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Lähetä STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Lähetä laiva telakalle. Ctrl+Klik suorittaa vain huollon STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Lähetä lentokone lentokonehalliin. Ctrl+Klik suorittaa vain huollon -STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Tämä ostaa kopion junasta ja kaikista sen vaunuista. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Tämä ostaa kopion ajoneuvosta. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Tämä ostaa kopion laivasta. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota -STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Tämä ostaa kopion lentokoneesta. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannearvion ostamatta kopiota +STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Tämä ostaa kopion junasta vaunuineen. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota +STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Tämä ostaa kopion ajoneuvosta. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota +STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Tämä ostaa kopion laivasta. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota +STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Tämä ostaa kopion lentokoneesta. Ctrl+Klik jakaa komennot. Shift+Klik näyttää kustannusarvion ostamatta kopiota STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Anna junalle lupa ohittaa punainen opastin. @@ -3724,7 +3753,7 @@ STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}Uusi kap STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}Uusi kapasiteetti: {GOLD}{CARGO_LONG}{}{BLACK}Tulot sovittamisesta: {GREEN}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}Uusi kapasiteetti: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Sovituksen kustannus: {RED}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}Uusi kapasiteetti: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Tulot sovittamisesta: {GREEN}{CURRENCY_LONG} -STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Valitse sovitettavat kulkuneuvot. Hiirellä vetäminen sallii useamman kulkuneuvon valinnan. Tyhjän alueen klikkaus valitsee koko kulkuneuvon. Ctrl+Klik valitsee kulkuneuvon ja sitä seuraavan ketjun +STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Valitse sovitettavat kulkuneuvot. Hiirellä vetäminen sallii useamman kulkuneuvon valinnan. Tyhjän alueen napsautus valitsee koko kulkuneuvon. Ctrl+Klik valitsee kulkuneuvon ja sitä seuraavan ketjun STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Valitse junan rahtityyppi STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Valitse ajoneuvolla ajettava rahti @@ -3754,7 +3783,7 @@ STR_ORDERS_END_OF_ORDERS :- - Käskyjen l STR_ORDERS_END_OF_SHARED_ORDERS :- - Jaettujen käskyjen loppu - - # Order bottom buttons -STR_ORDER_NON_STOP :{BLACK}Nonstop +STR_ORDER_NON_STOP :{BLACK}Välipysähdyksetön STR_ORDER_GO_TO :Mene STR_ORDER_GO_NON_STOP_TO :Mene pysähtymättä STR_ORDER_GO_VIA :Mene kautta @@ -3803,7 +3832,7 @@ STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Miten ku STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :on yhtä kuin STR_ORDER_CONDITIONAL_COMPARATOR_NOT_EQUALS :ei ole yhtä kuin STR_ORDER_CONDITIONAL_COMPARATOR_LESS_THAN :on pienempi kuin -STR_ORDER_CONDITIONAL_COMPARATOR_LESS_EQUALS :on suurempi kuin +STR_ORDER_CONDITIONAL_COMPARATOR_LESS_EQUALS :on pienempi tai yhtä kuin STR_ORDER_CONDITIONAL_COMPARATOR_MORE_THAN :on enemmän kuin STR_ORDER_CONDITIONAL_COMPARATOR_MORE_EQUALS :on enemmän tai yhtä kuin STR_ORDER_CONDITIONAL_COMPARATOR_IS_TRUE :on tosi @@ -3826,7 +3855,7 @@ STR_ORDER_GO_TO_NEAREST_DEPOT :Mene lähimmäl STR_ORDER_GO_TO_NEAREST_HANGAR :Mene lähimmälle varikolle STR_ORDER_CONDITIONAL :Ehdollinen hyppykäsky STR_ORDER_SHARE :Jaa käskyt -STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Lisää uusi käsky ennen valittua, tai lisää listan viimeiseksi. Ctrl tekee asemakäskyistä 'lastaa täyteen kaikki rahti', reittipistekäskyistä 'non-stop' ja veturitallikäskyistä 'huolto'. 'Jaa käskyt' jakaa käskyt valitun kulkuneuvon kanssa. Kulkuneuvon klikkaaminen kopioi käskyt siitä kulkuneuvosta. Varikkokäsky poistaa käytöstä automaattisen huollon +STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Lisää uusi käsky ennen valittua, tai lisää listan viimeiseksi. Ctrl tekee asemakäskyistä 'lastaa täyteen kaikki rahti', reittipistekäskyistä 'non-stop' ja veturitallikäskyistä 'huolto'. 'Jaa käskyt' jakaa käskyt valitun kulkuneuvon kanssa. Kulkuneuvon napsauttaminen kopioi käskyt kyseisestä kulkuneuvosta. Varikkokäsky poistaa käytöstä automaattisen huollon STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Näytä kaikki ajoneuvot, jotka jakavat nämä käskyt @@ -3835,11 +3864,11 @@ STR_ORDER_GO_TO_WAYPOINT :Kierrä reittip STR_ORDER_GO_NON_STOP_TO_WAYPOINT :Mene pysäht. pisteen {WAYPOINT} kautta STR_ORDER_SERVICE_AT :Huolto -STR_ORDER_SERVICE_NON_STOP_AT :Nonstop-huolto +STR_ORDER_SERVICE_NON_STOP_AT :Huolto pysäytyksettä STR_ORDER_NEAREST_DEPOT :lähin STR_ORDER_NEAREST_HANGAR :lähin varikko -STR_ORDER_TRAIN_DEPOT :Junavarikko +STR_ORDER_TRAIN_DEPOT :Veturitalli STR_ORDER_ROAD_VEHICLE_DEPOT :Varikko STR_ORDER_SHIP_DEPOT :Telakka STR_ORDER_GO_TO_NEAREST_DEPOT_FORMAT :{STRING} {STRING} {STRING} @@ -3901,7 +3930,7 @@ STR_TIMETABLE_TITLE :{WHITE}{VEHICLE STR_TIMETABLE_ORDER_VIEW :{BLACK}Käskyt STR_TIMETABLE_ORDER_VIEW_TOOLTIP :{BLACK}Vaihda käskynäkymään -STR_TIMETABLE_TOOLTIP :{BLACK}Aikataulu - klikkaa käskyä valitaksesi sen +STR_TIMETABLE_TOOLTIP :{BLACK}Aikataulu - valitse käsky sitä napsauttamalla STR_TIMETABLE_NO_TRAVEL :Ei kulkua STR_TIMETABLE_NOT_TIMETABLEABLE :Kulje (automaattinen; aikataulu seuraavan manuaalisen käskyn mukaisesti) @@ -3916,7 +3945,7 @@ STR_TIMETABLE_AND_TRAVEL_FOR_ESTIMATED :(matkusta {STRI STR_TIMETABLE_STAY_FOR :ja odota {STRING} STR_TIMETABLE_AND_TRAVEL_FOR :ja kulje {STRING} STR_TIMETABLE_DAYS :{COMMA}{NBSP}päivä{P "" ä} -STR_TIMETABLE_TICKS :{COMMA}{NBSP}tick{P "" iä} +STR_TIMETABLE_TICKS :{COMMA}{NBSP}askel{P "" ta} STR_TIMETABLE_TOTAL_TIME :{BLACK}Aikataulun kesto on {STRING} STR_TIMETABLE_TOTAL_TIME_INCOMPLETE :{BLACK}Aikataulun kesto on vähintään {STRING} @@ -4223,7 +4252,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Liian mo STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Rautatieasema on jakautunut liian moneen osaan STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Liian monta linja-autopysäkkiä. STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Liian monta lastauslaituria. -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Liian lähellä toista asemaa tai lastausaluetta. STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Liian lähellä toista satamaa. STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Liian lähellä toista lentokenttää. STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Asemaa ei voi nimetä uudelleen. @@ -4231,6 +4259,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... kaup STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... tie on väärin päin STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... läpiajettavissa pysäkeissä ei voi olla mutkia STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... läpiajettavissa pysäkeissä ei voi olla risteyksiä +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... tie on yksisuuntainen tai suljettu # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Aseman osaa ei voi poistaa... @@ -4259,7 +4288,7 @@ STR_ERROR_CAN_T_POSITION_BUOY_HERE :{WHITE}Poijua e STR_ERROR_CAN_T_CHANGE_WAYPOINT_NAME :{WHITE}Reittipisteen nimeä ei voi muuttaa... STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT :{WHITE}Junien reittipistettä ei voi poistaa... -STR_ERROR_MUST_REMOVE_RAILWAYPOINT_FIRST :{WHITE}Junaradan reittipiste täytyy poistaa ensin +STR_ERROR_MUST_REMOVE_RAILWAYPOINT_FIRST :{WHITE}Rautatien reittipiste täytyy poistaa ensin STR_ERROR_BUOY_IN_THE_WAY :{WHITE}... poiju on tiellä STR_ERROR_BUOY_IS_IN_USE :{WHITE}... poiju on toisen yhtiön käytössä! @@ -4272,7 +4301,7 @@ STR_ERROR_CAN_T_BUILD_SHIP_DEPOT :{WHITE}Telakkaa STR_ERROR_CAN_T_RENAME_DEPOT :{WHITE}Varikon nimeä ei voi vaihtaa... STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... täytyy olla pysähdyksissä veturitallin sisällä -STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... täytyy olla pysähtyneenä varikolla +STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... täytyy olla pysäytettynä varikolla STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... täytyy olla pysähdyksissä telakalla STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR :{WHITE}... täytyy olla pysähdyksissä lentokonehallissa @@ -4482,6 +4511,7 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Alkuperäiset T STR_BASESOUNDS_WIN_DESCRIPTION :Alkuperäiset Transport Tycoon Deluxen Windows-version äänet. STR_BASESOUNDS_NONE_DESCRIPTION :Äänipaketti, jossa ei ole ääniä. STR_BASEMUSIC_WIN_DESCRIPTION :Alkuperäinen Transport Tycoon Deluxen Windows-version musiikki. +STR_BASEMUSIC_DOS_DESCRIPTION :Alkuperäinen Transport Tycoon Deluxen DOS-version musiikki. STR_BASEMUSIC_NONE_DESCRIPTION :Musiikkipaketti, jossa ei ole musiikkia. ##id 0x2000 @@ -4855,7 +4885,7 @@ STR_VEHICLE_NAME_AIRCRAFT_PLODDYPHUT_500 :Ploddyphut 500 STR_VEHICLE_NAME_AIRCRAFT_FLASHBANG_X1 :Flashbang X1 STR_VEHICLE_NAME_AIRCRAFT_JUGGERPLANE_M1 :Juggerplane M1 STR_VEHICLE_NAME_AIRCRAFT_FLASHBANG_WIZZER :Flashbang Wizzer -STR_VEHICLE_NAME_AIRCRAFT_TRICARIO_HELICOPTER :Tricario -helikopteri +STR_VEHICLE_NAME_AIRCRAFT_TRICARIO_HELICOPTER :Tricario-helikopteri STR_VEHICLE_NAME_AIRCRAFT_GURU_X2_HELICOPTER :Guru X2 -helikopteri STR_VEHICLE_NAME_AIRCRAFT_POWERNAUT_HELICOPTER :Powernaut-helikopteri diff --git a/src/lang/french.txt b/src/lang/french.txt index e6df9662a2..3b108cb9ed 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -11,7 +11,7 @@ ##gender m m2 f -# $Id: french.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -190,6 +190,8 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Marron STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Blanc +STR_COLOUR_RANDOM :Aléatoire +STR_COLOUR_DEFAULT :Défaut # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -476,6 +478,7 @@ STR_ABOUT_MENU_SCREENSHOT :Copie d'écran STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Copie d'écran au zoom maximum STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Copie d'écran au zoom par défaut STR_ABOUT_MENU_GIANT_SCREENSHOT :Copie d'écran de la carte entière +STR_ABOUT_MENU_SHOW_FRAMERATE :Afficher la fréquence d'images STR_ABOUT_MENU_ABOUT_OPENTTD :À propos d'OpenTTD STR_ABOUT_MENU_SPRITE_ALIGNER :Alignement de sprite STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Afficher/Cacher les boites de dimensions maximum @@ -651,6 +654,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Aucune musique disponible STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Piste STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titre @@ -664,21 +668,21 @@ STR_MUSIC_TOOLTIP_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Faire gl STR_MUSIC_TOOLTIP_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Choisir le programme «{NBSP}Tout{NBSP}» STR_MUSIC_TOOLTIP_SELECT_OLD_STYLE_MUSIC :{BLACK}Choisir le programme musical «{NBSP}Ancien style{NBSP}» STR_MUSIC_TOOLTIP_SELECT_NEW_STYLE_MUSIC :{BLACK}Choisir le programme musical «{NBSP}Nouveau style{NBSP}» -STR_MUSIC_TOOLTIP_SELECT_EZY_STREET_STYLE :{BLACK}Sélectionner le programme musical «{NBSP}Ezy Street{NBSP}» +STR_MUSIC_TOOLTIP_SELECT_EZY_STREET_STYLE :{BLACK}Choisir le programme musical «{NBSP}Ezy Street{NBSP}» STR_MUSIC_TOOLTIP_SELECT_CUSTOM_1_USER_DEFINED :{BLACK}Choisir le programme personnalisé «{NBSP}Personnalisé 1{NBSP}» STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Choisir le programme personnalisé «{NBSP}Personnalisé 2{NBSP}» STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Activer/Désactiver le mode aléatoire STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Afficher la fenêtre de sélection de pistes -STR_ERROR_NO_SONGS :{WHITE}Un ensemble de musique vide a été choisi. Aucune musique ne sera jouée. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Sélection du programme musical -STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programme musical - «{NBSP}{STRING}{NBSP}» +STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} «{NBSP}{STRING}{NBSP}» STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Index des pistes -STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programme - '{STRING}' +STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programme - «{NBSP}{STRING}{NBSP}» STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Effacer +STR_PLAYLIST_CHANGE_SET :{BLACK}Changer d'ensemble STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Effacer le programme actuel (Personnalisé 1 ou Personnalisé 2 seulement) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Choisir un autre ensemble de musique STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Cliquer sur une piste pour l'ajouter au programme courant (Personnalisé 1 ou Personnalisé 2 seulement) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Cliquer sur une piste pour la retirer du programme courant (Personnalisé 1 ou Personnalisé 2 seulement) @@ -814,6 +818,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Président) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} a sponsorisé la construction de la nouvelle ville {TOWN}{NBSP}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Une nouvelle ville nommée {TOWN} a été construite{NBSP}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Un{G 0 "" "" e} nouv{G 0 eau el elle} {STRING} en construction près de {TOWN}{NBSP}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Un{G 0 "" "" e} nouv{G 0 eau el elle} {STRING} s'implante près de {TOWN}{NBSP}! @@ -881,10 +886,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Vue {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copier vers la vue -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copier l'emplacement de la vue principale vers cette vue-ci -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Coller depuis la vue -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Coller l'emplacement de cette vue-ci vers la vue principale +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Modifier cette vue +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copier l'emplacement de la vue principale vers cette vue +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Modifier la vue principale +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copier l'emplacement de cette vue vers la vue principale # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Options @@ -926,6 +931,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand sud-africa STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personnalisée... STR_GAME_OPTIONS_CURRENCY_GEL :Lari Géorgien (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iranien (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nouveau rouble russe (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso méxicain (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Véhicules routiers @@ -1255,6 +1262,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Il n'est STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Entretien de l'infrastructure{NBSP}: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Si activé, les infrastructures entraineront des coût d'entretien. Le coût augmente proportionnellement à la taille du réseau, affectant les grosses compagnies plus que les petites +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Couleur de la compagnie au démarrage{NBSP}: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Choisir la couleur de démarrage pour la compagnie + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Les aéroports n'expirent jamais{NBSP}: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activer ce paramètre fait que chaque type d'aéroports reste toujours disponible après son introduction @@ -1338,8 +1348,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Couleur du terr STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Vert STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Vert foncé STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Inverser la direction lors du défilement avec la souris{NBSP}: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Comportement lors du défilement de la carte avec le bouton droit de la souris. Quand il est désactivé, la souris déplace la caméra. Quand il est activé, la souris déplace la carte +STR_CONFIG_SETTING_SCROLLMODE :Défilement de la vue{NBSP}: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportement lors du défilement de la carte +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Défilement de la vue par clic droit, position de la souris verrouillée +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Défilement de la carte par clic droit, position de la souris verrouillée +STR_CONFIG_SETTING_SCROLLMODE_RMB :Défilement de la carte par clic droit +STR_CONFIG_SETTING_SCROLLMODE_LMB :Défilement de la carte par clic gauche STR_CONFIG_SETTING_SMOOTH_SCROLLING :Défilement régulier de la vue{NBSP}: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Contrôle comment la vue principale défile jusqu'à une position spécifique lors d'un clic sur la mini-carte ou pour atteindre un objet précis sur la carte. Si activé, la vue défile doucement, si désactivé elle saute directement à la cible STR_CONFIG_SETTING_MEASURE_TOOLTIP :Montrer une infobulle de mesure lors de l'utilisation de divers outils de construction{NBSP}: {STRING} @@ -1371,8 +1385,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Commande-clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl-clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Désactivé -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Défilement par clic gauche{NBSP}: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Active le défilement de la carte en la glissant avec le bouton gauche de la souris. C'est surtout utile pour les écrans tactiles STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Fermer une fenêtre en cliquant droit{NBSP}: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Fermer une fenêtre en cliquant droit à l’intérieur de celle-ci. Désactive l'infobulle sur clic droit{NBSP}! @@ -1810,7 +1822,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Modifier STR_CHEAT_SETUP_PROD :{LTBLUE}Permettre la modification des valeurs de production{NBSP}: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nouvelle couleur +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Couleur STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Montrer les livrées générales STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Montrer les livrées de trains @@ -2286,6 +2298,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Légende STR_LINKGRAPH_LEGEND_ALL :{BLACK}Toute STR_LINKGRAPH_LEGEND_NONE :{BLACK}Aucune STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Choisir les compagnies à afficher +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}inutilisé @@ -2370,9 +2383,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Signal c STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Signal de chemin (électrique){}Un signal de chemin autorise plus d'un train à entrer dans un bloc de signaux en même temps, si le train peut réserver un chemin jusqu'à un point d'attente sûr. Les signaux de chemin peuvent être passés par l'arrière. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Signal de chemin à sens unique (électrique){}Un signal de chemin autorise plus d'un train à entrer dans un bloc de signaux en même temps, si le train peut réserver un chemin jusqu'à un point d'attente sûr. Les signaux de chemin à sens unique ne peuvent pas être passés par l'arrière. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversion de signal.{}Si sélectionné, cliquer sur un signal existant le convertit vers le type et la variante choisis.{}Ctrl-clic pour alterner entre les variantes existantes.{}Shift pour afficher seulement le coût estimé. -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densité de signaux -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Réduire l'intervalle entre les signaux (augmenter la densité) -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmenter l'intervalle entre les signaux (réduire la densité) +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Intervalle entre les signaux +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Réduire l'intervalle entre les signaux +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmenter l'intervalle entre les signaux # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Choisir un pont ferroviaire @@ -2692,7 +2705,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terrain apparte STR_ABOUT_OPENTTD :{WHITE}À propos de OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright original {COPYRIGHT} 1995 Chris Sawyer, Tous droits réservés STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 L'équipe OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 L'équipe OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Fréquence d'images +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Fréquence de simulation{NBSP}: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Nombre de ticks simulés par seconde. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Fréquence des graphismes{NBSP}: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Nombre d'images rendues par seconde. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Facteur de vitesse actuel{NBSP}: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}À quelle vitesse le jeu tourne actuellement, comparé à la vitesse attendue pour la simulation normale. +STR_FRAMERATE_CURRENT :{WHITE}Actuel +STR_FRAMERATE_AVERAGE :{WHITE}Moyen +STR_FRAMERATE_DATA_POINTS :{BLACK}Données basées sur {COMMA} mesures +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} images/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} images/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} images/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Total de la boucle de jeu{NBSP}: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Traitement des marchandises{NBSP}: +STR_FRAMERATE_GL_TRAINS :{BLACK} Ticks des trains{NBSP}: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} Ticks des véhicules routiers{NBSP}: +STR_FRAMERATE_GL_SHIPS :{BLACK} Ticks des navires{NBSP}: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Ticks des aéroplanes{NBSP}: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Ticks du monde{NBSP}: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Délai du flux des marchandises{NBSP}: +STR_FRAMERATE_DRAWING :{BLACK}Rendu des graphismes{NBSP}: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Vues{NBSP}: +STR_FRAMERATE_VIDEO :{BLACK}Sortie vidéo{NBSP}: +STR_FRAMERATE_SOUND :{BLACK}Mixage sonore{NBSP}: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Boucle de jeu +STR_FRAMETIME_CAPTION_GL_ECONOMY :Traitement des marchandises +STR_FRAMETIME_CAPTION_GL_TRAINS :Ticks des trains +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Ticks des véhicules routiers +STR_FRAMETIME_CAPTION_GL_SHIPS :Ticks des navires +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Ticks des aéroplanes +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Ticks du monde +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Délai du flux des marchandises +STR_FRAMETIME_CAPTION_DRAWING :Rendu des graphismes +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Rendu des vues +STR_FRAMETIME_CAPTION_VIDEO :Sortie vidéo +STR_FRAMETIME_CAPTION_SOUND :Mixage sonore +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Sauvegarder la partie @@ -2716,6 +2779,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Détails STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Pas d'informations disponibles STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}{NBSP}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF{NBSP}: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtre{NBSP}: STR_SAVELOAD_OSKTITLE :{BLACK}Entrer un nom pour la sauvegarde @@ -2833,7 +2897,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Version{ STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Version compatible min.{NBSP}: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum{NBSP}: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palette{NBSP}: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Défaut (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Défaut (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Ancienne (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Ancienne (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Paramètres{NBSP}: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Aucuns STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Pas d'informations disponibles STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Module correspondant non trouvé @@ -2914,6 +2983,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Lecture après STR_NEWGRF_ERROR_GRM_FAILED :Indisponibilité de la ressource demandée (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} a été désactivé par {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Format de sprite invalide ou inconnu (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Trop d'éléments dans la liste des valeurs de la propriété (sprite {3:NUM}, propriété {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Fonction de rappel de production d'industrie invalide (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Attention{NBSP}! @@ -2978,6 +3049,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Entrer u STR_TOWN_DIRECTORY_CAPTION :{WHITE}Villes STR_TOWN_DIRECTORY_NONE :{ORANGE}− Aucune − STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Métropole){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Noms des villes - Cliquer sur un nom pour centrer la vue principale sur la ville. Ctrl-clic pour ouvrir une nouvelle vue sur la ville. STR_TOWN_POPULATION :{BLACK}Population mondiale{NBSP}: {COMMA} @@ -2985,8 +3057,7 @@ STR_TOWN_POPULATION :{BLACK}Populati STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Métropole) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Population{NBSP}: {ORANGE}{COMMA}{BLACK} − Maisons{NBSP}: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passagers le mois dernier{NBSP}: {ORANGE}{COMMA}{BLACK} − max.{NBSP}: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Courrier le mois dernier{NBSP}: {ORANGE}{COMMA}{BLACK} − max.{NBSP}: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} le mois dernier{NBSP}: {ORANGE}{COMMA}{BLACK} - max.{NBSP}: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargaison nécessaire à la croissance de la ville{NBSP}: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} requis STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} requis en hiver @@ -3291,21 +3362,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Niveau de production{NBSP}: {YELLOW}{COMMA}{NBSP}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}L'industrie a annoncé sa fermeture imminente{NBSP}! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produit{NBSP}: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Nécessite{NBSP}: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}{NBSP}: {CARGO_SHORT} en attente{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produit{NBSP}: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produit{NBSP}: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Changer la production (multiple de 8, max. 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Changer le niveau de production (pourcentage, max. 800{NBSP}%) @@ -3358,6 +3422,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Groupes STR_GROUP_CREATE_TOOLTIP :{BLACK}Créer un groupe de véhicules STR_GROUP_DELETE_TOOLTIP :{BLACK}Supprimer le groupe sélectionné STR_GROUP_RENAME_TOOLTIP :{BLACK}Renommer le groupe sélectionné +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Changer la couleur du groupe sélectionné STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Cliquer pour protéger ce groupe contre l'auto-remplacement global STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Supprimer un groupe @@ -3401,6 +3466,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacit STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Wagons motorisés{NBSP}: {GOLD}+{POWER}{BLACK} − Poids{NBSP}: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Réaménageable pour{NBSP}: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Tous les types de cargaison +STR_PURCHASE_INFO_NONE :Aucune cargaison STR_PURCHASE_INFO_ALL_BUT :Tous sauf {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Effort de traction max.{NBSP}: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Rayon d'action{NBSP}: {GOLD}{COMMA}{NBSP}cases @@ -3800,6 +3866,7 @@ STR_ORDER_CONDITIONAL_AGE :Âge du véhicu STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Entretien nécessaire STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Toujours STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Durée de vie restante (années) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Fiabilité maximum STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Comment comparer les données du véhicule à la valeur donnée STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :est égal à @@ -4225,7 +4292,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Trop de STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Trop de parties de gare STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Trop d'arrêts d'autobus STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Trop d'aires de chargement -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Trop près d'une autre gare STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Trop près d'un autre port STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Trop près d'un autre aéroport STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Impossible de renommer la gare... @@ -4233,6 +4299,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... cett STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... mauvaise orientation de la route STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... les arrêts ne peuvent pas avoir de virages STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... les arrêts ne peuvent pas avoir de jonctions +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la route est à sens unique ou bloquée # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Impossible de supprimer une partie de la gare... @@ -4484,6 +4551,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sons originaux STR_BASESOUNDS_WIN_DESCRIPTION :Sons originaux de Transport Tycoon Deluxe (version Windows). STR_BASESOUNDS_NONE_DESCRIPTION :Un pack de sons sans sons. STR_BASEMUSIC_WIN_DESCRIPTION :Musiques originales de Transport Tycoon Deluxe (version Windows). +STR_BASEMUSIC_DOS_DESCRIPTION :Musiques originales de Transport Tycoon Deluxe (version DOS). +STR_BASEMUSIC_TTO_DESCRIPTION :Musiques originales de Transport Tycoon (version Originale/World Editor). STR_BASEMUSIC_NONE_DESCRIPTION :Un pack de musiques sans musiques. ##id 0x2000 diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index d91fef5cad..942f935f5e 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -12,7 +12,7 @@ ##case nom gen dat voc -# $Id: gaelic.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -868,10 +868,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Tagh am STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Toglaich prògram air thuaiream air/dheth STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Seall uinneag taghadh tracaichean ciùil -STR_ERROR_NO_SONGS :{WHITE}Chaidh seata dhe cheòl às aonais òrain a thaghadh. Cha tèid òran sam bith a chluiche - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Taghadh prògram ciùil STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} “{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Clàr-amais nan traca STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Prògram - “{STRING}" @@ -1456,6 +1453,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Cha ghab STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Cumail suas a' bhun-structair: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Nuair a bhios seo air, bidh cumail suas a' bhun-structair a' cosg airgid. Fàsaidh na cosgaisean nas luaithe na meud an lìonraidh, mar sin bheir an roghainn seo barrachd buaidh air companaidhean mòra + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Chan fhalbh an ùine air puirt-adhair: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Nuair a chuireas tu an roghainn seo an comas, cumaidh gach port-adhair a' dol gu bràth an dèidh a thogail @@ -1539,8 +1537,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Dath na crutha- STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Uaine STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dorch-uaine STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Purpaidh -STR_CONFIG_SETTING_REVERSE_SCROLLING :Comhair sgrolaidh chontrarra: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Giùlan nuair a thèid am mapa a sgroladh le putan deas na luchaige. Nuair a bhios seo air, gluaisidh an luchag am mapa STR_CONFIG_SETTING_SMOOTH_SCROLLING :Sgroladh mìn nam port-seallaidh: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Tagh mar a ghluaiseas am prìomh-shealladh gu ionad sònraichte. Ma tha seo dheth, thèid leum dhan ionad a chaidh a thaghadh sa bhad STR_CONFIG_SETTING_MEASURE_TOOLTIP :Seall gliocasan-sgrìn tomhais le innealan togail: {STRING} @@ -1572,8 +1568,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Briogad STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Briogadh STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Dheth -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Sgroladh le briogadh clì: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Cuir an comas gun tèid am mapa a sgroladh le slaodadh le putan clì na luchaige. Tha seo feumail gu h-àraidh nuair a chleachdas tu sgrìn-shuathaidh airson sgroladh STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Dùin an uinneag le briogadh deas: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Dùinidh seo uinneag le briogadh deas ’na broinn. Cuiridh e à comas an gliocas-sgrìn le briogadh deas! @@ -2011,7 +2005,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Atharrai STR_CHEAT_SETUP_PROD :{LTBLUE}Cuir an comas atharrachadh air luachan saothrachaidh: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Sgeama nan dath ùr STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Seall sgeamannan nan dath coitcheann STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Seall sgeamannan nan dath airson trèanaichean @@ -2932,7 +2925,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Tìr a' chompan STR_ABOUT_OPENTTD :{WHITE}Mu dheidhinn OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Còir-lethbhreac tùsail {COPYRIGHT} 1995 Chris Sawyer, a h-uile còir glèidhte STR_ABOUT_VERSION :{BLACK}OpenTTD tionndadh {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 An sgioba OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 An sgioba OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Sàbhail an geama @@ -3225,8 +3225,6 @@ STR_TOWN_POPULATION :{BLACK}Sluagh a STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Mòr-bhaile) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Sluagh: {ORANGE}{COMMA}{BLACK} Taighean: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Taistealaich am mìos mu dheireadh: {ORANGE}{COMMA}{BLACK} as motha: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post am mìos mu dheireadh: {ORANGE}{COMMA}{BLACK} as motha: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Carago a tha a dhìth ach am fàs am baile: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED}Feum air {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{BLACK}Feum air {ORANGE}{STRING}{BLACK} sa gheamhradh @@ -3531,21 +3529,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Meadhana STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ìre an dèanadais: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Tha an gnìomhachas gu bhith a dhùnadh a dh'aithghearr! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Feum air: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Feum air: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Feum air: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Feum air: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} a' feitheamh{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Toradh: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Toradh: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Atharraich an saothrachaidh (iomadach aig 8, suas gu 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Atharraich ìre an saothrachaidh (ceudad, suas gu 800%) @@ -4465,7 +4453,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Cus stè STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Cus pàirtean dhe stèisean-rèile STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Gus stèiseanan bus STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Tha cus ionadan-luchdaidh nan làraidh ann -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Ro fhaisg air stèisean/ionad-luchdaidh eile STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Ro fhaisg air port eile STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Ro fhaisg air port-adhair eile STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Cha ghabh ainm an stèisein atharrachadh... diff --git a/src/lang/galician.txt b/src/lang/galician.txt index 2504d9db48..e6e7af5c9e 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -11,7 +11,7 @@ ##gender m f n -# $Id: galician.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -670,10 +670,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Seleccio STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Activar/desactivar programa aleatorio STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Amosar a fiestra de selección de pista musical -STR_ERROR_NO_SONGS :{WHITE}Seleccionouse unha lista de reprodución sen cancións. Non se reproducirá ningunha canción - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Selección do programa de música STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Índice de pistas STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa - '{STRING}' @@ -1255,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non é p STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantemento de infraestrutura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cando se activa, a infraestrutura provoca custos de mantemento. O custo aumenta sobre-proporcionadamente co tamaño da rede, e afecta máis ás compañías máis grandes cás pequenas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Os aeroportos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activar esta opción fai que cada tipo de aeroporto siga estando dispoñíbel para sempre dende a súa aparición @@ -1338,8 +1336,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Cor do terreo n STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde escuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violeta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Inverti-la dirección de desprazamento: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Acción cando o mapa se despraza co botón dereito do rato. Cando se desactiva, o rato move a cámara. Cando se activa, o rato move o mapa STR_CONFIG_SETTING_SMOOTH_SCROLLING :Desprazamento de vista suave: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla como a vista principal se despraza a unah posición específica cando se fai clic no minimapa ou cando se emprega un comando para desprazarse a un obxecto específico sobre o mapa. Se se activa, a vista desprázase suavemente, se se desactiva salta directamente STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostrar medidas ao usar as ferramentas de construción: {STRING} @@ -1371,8 +1367,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Tecla Command+C STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Apagado -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Desprazamento con click esquerdo: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Habilitar o desprazamento do mapa arrastrándoo co botón esquerdo do rato. Isto é especialmente útil se se emprega unha pantalla táctil para desprazarse STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Pechar a fiestra con click dereito: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Pecha a fiestra facendo botón dereito dentro de ela. Deshabilita a axuda contextual facendo click-dereito! @@ -1810,7 +1804,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Cambiar STR_CHEAT_SETUP_PROD :{LTBLUE}Permitir a modificación dos valores de producción: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Novo esquema de cor STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Mostra-los esquemas de cor xerais STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Mostra-los esquemas de cor dos trens @@ -2692,7 +2685,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terreo propieda STR_ABOUT_OPENTTD :{WHITE}Acerca de OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright orixinal {COPYRIGHT} 1995 Chris Sawyer, Tódolos dereitos reservados STR_ABOUT_VERSION :{BLACK}OpenTTD versión {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 O equipo de OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 O equipo de OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Gravar partida @@ -2985,8 +2985,6 @@ STR_TOWN_POPULATION :{BLACK}Poboaci STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Cidade) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Poboación: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Pasaxeiros último mes: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Correo último mes: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Carga necesaria para o crecemento da cidade: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} necesario STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} necesarios en inverno @@ -3291,21 +3289,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de produción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A industria anunció un peche inminente -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Require: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} agardando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambiar produción (múltiplo de 8, ata 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambiar o nivel de produción (porcentaxe, ata 800%) @@ -4225,7 +4213,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Demasiad STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Demasiadas partes de estación de tren STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Demasiadas paradas de autobús STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Demasiadas estacións de camións -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Demasiado preto doutra estación ou área de carga STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Demasiado preto doutro peirao STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Demasiado preto doutro aeroporto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Non se pode renomear a estación... diff --git a/src/lang/german.txt b/src/lang/german.txt index e1f33bdb6d..bf6ce994f8 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -11,7 +11,7 @@ ##gender m w n p -# $Id: german.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -190,6 +190,8 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Braun STR_COLOUR_GREY :Grau STR_COLOUR_WHITE :Weiß +STR_COLOUR_RANDOM :Zufällig +STR_COLOUR_DEFAULT :Standard # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -476,6 +478,7 @@ STR_ABOUT_MENU_SCREENSHOT :Screenshot (Sta STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Screenshot in Nahaufnahme STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Screenshot mit normalem Zoom STR_ABOUT_MENU_GIANT_SCREENSHOT :Riesiger Screenshot (Standard: Strg+G) +STR_ABOUT_MENU_SHOW_FRAMERATE :Bildwiederholrate anzeigen STR_ABOUT_MENU_ABOUT_OPENTTD :Über OpenTTD STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite-Ausrichtung STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Hüllquader anzeigen/ausblenden @@ -651,6 +654,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Keine Musik verfügbar STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Track STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titel @@ -670,15 +674,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Programm STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Zufällige Wiedergabe ein/aus STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Zeige Musiktitelauswahl -STR_ERROR_NO_SONGS :{WHITE}Ein Musikset ohne Musikdateien wurde ausgewählt. Es kann folglich nichts abgespielt werden. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musik-Programmauswahl +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Musikprogramm - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Track Inhalt STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programm - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Bereinigen +STR_PLAYLIST_CHANGE_SET :{BLACK}Set ändern STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Lösche laufendes Programm (nur für Benutzerdefiniert 1 und 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Ein anderes Musik-Set auswählen) STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klicke auf einen Musiktitel, um ihn in das laufende Programm zu übernehmen (nur für Benutzerdefiniert 1 und 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klicke auf einen Musiktitel, um ihn aus der aktuellen Liste zu entfernen (nur für Benutzerdefiniert 1 und 2) @@ -814,6 +818,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Manager) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} finanziert die Gründung der Stadt {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Eine neue Stadt mit dem Namen {TOWN} wurde errichtet! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Neue{G r "" s ""} {STRING} {G 0 wird wird wird werden} nahe {TOWN} gebaut! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Neue{G r "" s ""} {STRING} {G 0 wird wird wird werden} nahe {TOWN} angepflanzt! @@ -881,9 +886,9 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Ansicht {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}In Zusatzansicht kopieren +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Zusatzansicht ändern STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Aktuelle Position der Hauptansicht in diese Zusatzansicht kopieren -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Aus Zusatzansicht einfügen +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Hauptansicht ändern STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Hauptansicht zur Position dieser Zusatzansicht scrollen # Game options window @@ -913,7 +918,7 @@ STR_GAME_OPTIONS_CURRENCY_NLG :Niederländisch STR_GAME_OPTIONS_CURRENCY_NOK :Norwegische Kronen (NOK) STR_GAME_OPTIONS_CURRENCY_PLN :Polnische Zloty (PLN) STR_GAME_OPTIONS_CURRENCY_RON :Rumänische Lei (RON) -STR_GAME_OPTIONS_CURRENCY_RUR :Russische Rubel (RUR) +STR_GAME_OPTIONS_CURRENCY_RUR :Alte Russische Rubel (RUR) STR_GAME_OPTIONS_CURRENCY_SIT :Slovenische Taler (SIT) STR_GAME_OPTIONS_CURRENCY_SEK :Schwedische Kronen (SEK) STR_GAME_OPTIONS_CURRENCY_TRY :Türkische Lire (TRY) @@ -926,6 +931,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Südafrikanisch STR_GAME_OPTIONS_CURRENCY_CUSTOM :Eigene... STR_GAME_OPTIONS_CURRENCY_GEL :Georgischer Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranischer Rial (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Russische Rubel (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Mexikanischer Peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Fahrzeuge @@ -1222,7 +1229,7 @@ STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :am Anfang STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :in der Mitte STR_CONFIG_SETTING_STOP_LOCATION_FAR_END :am Ende STR_CONFIG_SETTING_AUTOSCROLL :Spielfeld scrollen, wenn die Maus am Bildrand anstößt: {STRING} -STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT :Falls aktiv wird der Kartenausschnit scrollen, wenn die Maus nahe dem Fensterrand ist +STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT :Falls aktiv, wird der Kartenausschnitt scrollen, wenn die Maus nahe dem Fensterrand ist STR_CONFIG_SETTING_AUTOSCROLL_DISABLED :Ausgeschaltet STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT_FULLSCREEN :Hauptfenster, nur bei Vollbildschirm STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT :Hauptfenster @@ -1255,6 +1262,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Diese Ei STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Instandhaltung der Infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Unterhaltskosten für Infrastruktur einschalten. Die Unterhaltskosten wachsen mit zunehmender Netzwerkgröße überproportional an, so dass sie größere Firmen stärker belasten als kleinere +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Firmenfarbe zu Spielbeginn: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Wähle die Firmenfarbe zu Spielbeginn + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flughäfen veralten nie: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Wird diese Option aktiviert, können Flughäfen, die einmal eingeführt wurden, das ganze Spiel über gebaut werden und veralten nie @@ -1338,8 +1348,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Farbe von Landf STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grün STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dunkelgrün STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Lila -STR_CONFIG_SETTING_REVERSE_SCROLLING :Scrollrichtung invertieren: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Legt das Verhalten beim Scrollen der Karte mit der rechten Maustaste fest. Ist diese Option aktiviert, bewegt sich der sichtbare Kartenausschnitt in Mausrichtung. Ist sie deaktiviert, bewegt sich die Karte entgegen der Mausrichtung +STR_CONFIG_SETTING_SCROLLMODE :Verhalten beim Verschieben der Zusatzansicht: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Verhalten beim Verschieben der Karte +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Bewege Zusatzansicht mit rechter Maustaste, Mausposition fixiert +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Bewege die Karte mit rechter Maustaste, Mausposition fixiert +STR_CONFIG_SETTING_SCROLLMODE_RMB :Bewege die Karte mit rechter Maustaste +STR_CONFIG_SETTING_SCROLLMODE_LMB :Bewege die Karte mit linker Maustaste STR_CONFIG_SETTING_SMOOTH_SCROLLING :Weicher Bildlauf beim Springen zu einer Position: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Lege fest, auf welche Weise die Hauptansicht an eine bestimmte Position wechselt (z.B. wenn ein Punkt auf der Weltkarte angeklickt wird oder der Standort eines Bahnhofs angezeigt werden soll). Ist diese Option eingeschaltet, schwenkt die Ansicht über die Karte, bis sie am gewünschten Punkt angekommen ist. Ist sie ausgeschaltet, springt die Ansicht sofort an die gewünschte Position STR_CONFIG_SETTING_MEASURE_TOOLTIP :Beim Bauen Tooltip mit Abmessungen anzeigen: {STRING} @@ -1371,8 +1385,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Kommando+Klick STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Strg+Klick STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Aus -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Scrollen mit linker Maustaste: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Scrolle die Karte, indem mit der linken Maustaste gezogen wird. Dies ist besonders sinnvoll, wenn ein Touchscreen zum Scrollen genutzt wird STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Fenster mit Rechtsklick schließen: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Schließt ein Fenster mittels Rechts-Klick. Schaltet Tooltip mit Rechts-Klick ab! @@ -1810,7 +1822,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Ändert STR_CHEAT_SETUP_PROD :{LTBLUE}Erlaube manuelles Ändern der Produktionsleistungen: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Neues Farbschema +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Farbschema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Allgemeines Farbschema anzeigen STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Zugfarbschema anzeigen @@ -2286,6 +2298,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legende STR_LINKGRAPH_LEGEND_ALL :{BLACK}Alle STR_LINKGRAPH_LEGEND_NONE :{BLACK}Keine STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Anzuzeigende Firmen auswählen +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}unbenutzt @@ -2692,7 +2705,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Firmeneigenes G STR_ABOUT_OPENTTD :{WHITE}OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Transport Tycoon-Urheberrecht {COPYRIGHT} 1995 Chris Sawyer, alle Rechte vorbehalten STR_ABOUT_VERSION :{BLACK}OpenTTD-Version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD-Team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD-Team + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Bildwiederholrate +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Simulationsrate: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Anzahl an simulierten Ticks pro Sekunde. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Bildwiederholrate: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Anzahl an Einzelbildern, die pro Sekunde gerendert werden. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Aktueller Geschwindigkeitsfaktor des Spiels: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Wie schnell das Spiel aktuell läuft, verglichen mit der erwarteten Geschwindigkeit bei normaler Simulationsrate. +STR_FRAMERATE_CURRENT :{WHITE}Momentan +STR_FRAMERATE_AVERAGE :{WHITE}Durchschnitt +STR_FRAMERATE_DATA_POINTS :{BLACK}Daten basierend auf {COMMA} Messungen +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} Bilder/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} Bilder/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} Bilder/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Spielschleifen insgesamt: +STR_FRAMERATE_GL_ECONOMY :{BLACK}Warenumschlag: +STR_FRAMERATE_GL_TRAINS :{BLACK}Ticks (Züge): +STR_FRAMERATE_GL_ROADVEHS :{BLACK}Ticks (Straßenfahrzeuge): +STR_FRAMERATE_GL_SHIPS :{BLACK}Ticks (Schiffe): +STR_FRAMERATE_GL_AIRCRAFT :{BLACK}Ticks (Luftfahrzeuge) +STR_FRAMERATE_GL_LANDSCAPE :{BLACK}Welt-Ticks: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK}Intervall für Neuberechnung des Verteilungsgraphen: +STR_FRAMERATE_DRAWING :{BLACK}Grafik-Rendering: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK}Kartenansichten: +STR_FRAMERATE_VIDEO :{BLACK}Videoausgabe: +STR_FRAMERATE_SOUND :{BLACK}Sound-Abmischung: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Spielschleife +STR_FRAMETIME_CAPTION_GL_ECONOMY :Warenumschlag +STR_FRAMETIME_CAPTION_GL_TRAINS :Ticks (Züge) +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Ticks (Straßenfahrzeuge) +STR_FRAMETIME_CAPTION_GL_SHIPS :Ticks (Schiffe) +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Ticks (Luftfahrzeuge) +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Welt-Ticks +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Intervall für Neuberechnung des Verteilungsgraphen +STR_FRAMETIME_CAPTION_DRAWING :Grafik-Rendering +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Karten-Rendering +STR_FRAMETIME_CAPTION_VIDEO :Videoausgabe +STR_FRAMETIME_CAPTION_SOUND :Sound-Abmischung +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spiel speichern @@ -2716,6 +2779,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Spielsta STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Keine Informationen verfügbar STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Suchtext: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Datei überschreiben +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Existierende Datei wirklich überschreiben? STR_SAVELOAD_OSKTITLE :{BLACK}Namen für den Spielstand eingeben @@ -2833,7 +2899,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Version: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Min. kompatible Version: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5-Summe: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Farbpalette: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Standard (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Standard (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :veraltet (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :veraltet (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parameter: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Keine STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Keine Informationen verfügbar STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Zugehörige Datei nicht gefunden @@ -2906,7 +2977,7 @@ STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :der NewGRF-Date STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :Zu viele NewGRFs geladen STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Das Laden von {1:STRING} als statisches NewGRF mit {STRING} könnte Synchronisationsfehler hervorrufen STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Unerwartetes Sprite (Sprite {3:NUM}) -STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Unbekannte Action 0 - Property {4:HEX} (Sprite {3:NUM}) +STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Unbekannte Action 0 - Eigenschaft {4:HEX} (Sprite {3:NUM}) STR_NEWGRF_ERROR_INVALID_ID :Zugriff auf eine ungültige ID (Sprite {3:NUM}) STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} enthält fehlerhafte Grafiken. Diese werden als Fragezeichen (?) dargestellt STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Enthält mehrere Action 8 - Einträge (Sprite {3:NUM}) @@ -2914,6 +2985,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Lesezugriff üb STR_NEWGRF_ERROR_GRM_FAILED :Die angeforderte GRF-Ressource ist nicht verfügbar (Sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} wurde von {STRING} deaktiviert STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Ungültiges oder unbekanntes Format für Spritelayout (Sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Zu viele Elemente in Eigenschaftswert-Liste (Sprite {3:NUM}, Eigenschaft {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Ungültige Produktions-Rückruffunktion (Sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Achtung! @@ -2943,13 +3016,13 @@ STR_BROKEN_VEHICLE_LENGTH :{WHITE}Zug '{VE STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' liefert falsche Informationen STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Fracht / Ersetzungs - Informationen für '{1:ENGINE}' weichen von der Einkaufsliste nach dem Kauf ab. Das kann dazu führen, dass das Umrüsten beim autmatisches Ersetzen oder Erneuern nicht korrekt funktioniert -STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' verursachte eine Endlosschleife im 'Production callback' +STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' verursachte eine Endlosschleife in Produktions-Rückruffunktion STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Callback {1:HEX} lieferte des unbekannte und ungülte Resultat {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs STR_NEWGRF_INVALID_CARGO : STR_NEWGRF_INVALID_CARGO_ABBREV :?? -STR_NEWGRF_INVALID_CARGO_QUANTITY :{COMMA} of +STR_NEWGRF_INVALID_CARGO_QUANTITY :{COMMA} Einheiten STR_NEWGRF_INVALID_ENGINE : STR_NEWGRF_INVALID_INDUSTRYTYPE : @@ -2978,6 +3051,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Text fü STR_TOWN_DIRECTORY_CAPTION :{WHITE}Städte STR_TOWN_DIRECTORY_NONE :{ORANGE}- Keine - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Städtenamen - Klick auf den Namen zentriert Hauptansicht auf die Stadt. Strg+Klick öffnet neue Zusatzansicht zentriert auf die Stadt STR_TOWN_POPULATION :{BLACK}Weltbevölkerung: {COMMA} @@ -2985,8 +3059,7 @@ STR_TOWN_POPULATION :{BLACK}Weltbev STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Großstadt) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Einwohner: {ORANGE}{COMMA}{BLACK} Häuser: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passagiere im letzten Monat: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Postsäcke im letzten Monat: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} im letzten Monat: {ORANGE}{COMMA}{BLACK} Max.: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Für Stadtwachstum benötigte Fracht: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} benötigt STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} im Winter benötigt @@ -3291,21 +3364,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Hauptans STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsrate: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Diese Industrie wird in Kürze schließen! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produziert: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}benötigt: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} wartend{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produziert: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produziert: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Produktion ändern (Vielfache von 8, maximal 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Produktionsrate ändern (prozentual, bis zu 800%) @@ -3358,6 +3424,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Gruppen STR_GROUP_CREATE_TOOLTIP :{BLACK}Neue Gruppe erstellen STR_GROUP_DELETE_TOOLTIP :{BLACK}Ausgewählte Gruppe löschen STR_GROUP_RENAME_TOOLTIP :{BLACK}Ausgewählte Gruppe umbenennen +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Farbschema der ausgewählten Gruppe ändern STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Diese Gruppe von der automatischen Fahrzeugersetzung ausschließen STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Gruppe löschen @@ -3401,6 +3468,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Kapazit STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Angetriebene Waggons: {GOLD}+{POWER}{BLACK} Gewicht: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Umrüstbar auf: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Alle Frachtarten +STR_PURCHASE_INFO_NONE :Keine STR_PURCHASE_INFO_ALL_BUT :Alles außer {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Max. Zugkraft: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Reichweite: {GOLD}{COMMA} Felder @@ -3800,6 +3868,7 @@ STR_ORDER_CONDITIONAL_AGE :Fahrzeugalter ( STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Wartung erforderlich STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Immer STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Verbleibende Laufzeit (Jahre) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maximale Zuverlässigkeit STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Die Bedingung, die erfüllt werden muss STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :gleich @@ -3821,7 +3890,7 @@ STR_ORDERS_DELETE_BUTTON :{BLACK}Löschen STR_ORDERS_DELETE_TOOLTIP :{BLACK}Lösche den markierten Auftrag STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Lösche alle Aufträge STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Gemeinsame Aufträge aufheben -STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Gemeinsame Auftragliste aufheben. Ctrl+Klick löscht zusätzlich die Auftragliste für dieses Fahrzeug +STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Gemeinsame Auftragliste aufheben. Strg+Klick löscht zusätzlich die Auftragliste für dieses Fahrzeug STR_ORDERS_GO_TO_BUTTON :{BLACK}Fahre zu STR_ORDER_GO_TO_NEAREST_DEPOT :Nächstes Depot @@ -4225,7 +4294,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Zu viele STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Zu viele Bahnsteigteile STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Zu viele Bushaltestellen STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Zu viele Lkw-Ladeplätze -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Stationen liegen zu dicht beisammen STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Zu dicht an einem anderen Hafen STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Zu dicht an einem anderen Flughafen STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Station kann nicht umbenannt werden... @@ -4233,6 +4301,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... dies STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... Straße verläuft in die falsche Richtung STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... Bus- und Lkw-Haltestellen können nicht um die Kurve gehen STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... Bus- und Lkw-Haltestellen können keine Abzweigung haben +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}...Einbahnstraße oder blockierter Weg # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Dieser Teil der Station kann nicht entfernt werden... @@ -4484,6 +4553,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Original Transp STR_BASESOUNDS_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows Basissounds. STR_BASESOUNDS_NONE_DESCRIPTION :Basissounds ohne Sound. STR_BASEMUSIC_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows Musikset. +STR_BASEMUSIC_DOS_DESCRIPTION :Original Transport Tycoon Deluxe DOS edition music. +STR_BASEMUSIC_TTO_DESCRIPTION :Original Transport Tycoon (Original/World Editor) DOS edition music. STR_BASEMUSIC_NONE_DESCRIPTION :Ein Musikset ohne Musik. ##id 0x2000 diff --git a/src/lang/greek.txt b/src/lang/greek.txt index b6984220e1..ca2730163b 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -12,7 +12,7 @@ ##case subs date geniki -# $Id: greek.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -250,6 +250,8 @@ STR_COLOUR_ORANGE :Πορτοκα STR_COLOUR_BROWN :Καφέ STR_COLOUR_GREY :Γκρι STR_COLOUR_WHITE :Λευκό +STR_COLOUR_RANDOM :Τυχαία +STR_COLOUR_DEFAULT :Προεπιλογή # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}μίλια/ώρα @@ -731,7 +733,7 @@ STR_PERFORMANCE_DETAIL_LOAN :{BLACK}Δάνε STR_PERFORMANCE_DETAIL_TOTAL :{BLACK}Σύνολο: ############ End of order list STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}Απαρίθμηση των οχημάτων που απέφεραν κέρδος πέρσι. Περιλαμβανομένων των επιγείων οχημάτων, τρένων, πλοίων και αεροσκαφών. -STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Αριθμός των πρόσφατα επισκευασμένων σταθμών. Σταθμοί τραίνων, στάσεις λεωφορείων, αεροδρόμια, κ.ο.κ. προσμετρώνται ξεχωριστά, ακόμα κι αν ανήκουν στον ίδιο σταθμό. +STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Αριθμός των πρόσφατα επισκευασμένων σταθμών. Σταθμοί τρένων, στάσεις λεωφορείων, αεροδρόμια, κ.ο.κ. προσμετρώνται ξεχωριστά, ακόμα κι αν ανήκουν στον ίδιο σταθμό. STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP :{BLACK}Το κέρδος του οχήματος με το μικρότερο εισόδημα (μόνο οχήματα παλιότερα των 2 ετών θα λαμβάνονται υπόψην) STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}Το ποσό των χρημάτων που έγιναν σε ένα τρίμηνο με το μικρότερο κέρδος των τελευταίων 12 τριμήνων STR_PERFORMANCE_DETAIL_MAX_INCOME_TOOLTIP :{BLACK}Το ποσό των χρημάτων που έγιναν σε ένα τρίμηνο με το μεγαλύτερο κέρδος των τελευταίων 12 τριμήνων @@ -757,6 +759,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Δεν υπάρχει διαθέσιμη μουσική STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}«{STRING}» STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Κομμάτι STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Τίτλος @@ -776,15 +779,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Επιλ STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Εναλλαγή τυχαίας αναπαραγωγής on/off στο πρόγραμμα STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Εμφάνιση παραθύρου επιλογής μουσικού κομματιού -STR_ERROR_NO_SONGS :{WHITE}Επιλέχτηκε σετ μουσικής χωρίς τραγούδια. Κανένα τραγούδι δεν θα παιχτεί - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Επιλογή Μουσικού Προγράμματος +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Πρόγραμμα μουσικής - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} «{STRING}» STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Λίστα σιδηροτροχιών STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Πρόγραμμα - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Καθαρισμός +STR_PLAYLIST_CHANGE_SET :{BLACK}Αλλαγή σετ STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Καθαρισμός τρέχοντος προγράμματος (μόνο Προσαρμοσμένο 1 ή Προσαρμοσμένο 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Αλλαγή μουσικής επιλογής σε άλλο εγκατεστημένο σετ STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Πατήστε στο μουσικό κομμάτι για προσθήκη στο τρέχον πρόγραμμα (Προσαρμοσμένο1 ή Προσαρμοσμένο2 μόνο) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Πατήστε στο τραγούδι για να το αφαιρέσετε από το πρόγραμμα (Προσαρμοσμένο 1 ή 2 μόνο) @@ -987,9 +990,9 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Εμφάνιση {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Αντιγραφή στην εμφάνιση +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Αντιγραφή στο παράθυρο εμφάνισης STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Αντιγραφή της τοποθεσίας της κύριας προβολής σε αυτό το παράθυρο εμφάνισης -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Επικόλληση από εμφάνιση +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Επικόλληση από παράθυρο εμφάνισης STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Επικόλληση της τοποθεσίας αυτού του παραθύρου εμφάνισης στην κύρια προβολή # Game options window @@ -1032,6 +1035,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Νοτιοαφ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Άλλο... STR_GAME_OPTIONS_CURRENCY_GEL :Γεοργιανό Λάρι (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Ιρανικό Ριάλ (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Νεο Ρώσικο Ρούβλι (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Πεσος Μεξικου (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Οχήματα δρόμου @@ -1278,22 +1283,22 @@ STR_CONFIG_SETTING_CATCHMENT :Επιτρέπ STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Διαφορετικοί σταθμοί και αεροδρόμια έχουν περιοχές κάλυψης διαφορετικού μεγέθους STR_CONFIG_SETTING_EXTRADYNAMITE :Επιτρέπεται η αφαίρεση περισσότερων ιδιοκτησιών των πολέων: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Είναι ευκολότερη η αφαίρεση υποδομών και κτιρίων που κατέχονται από την πόλη -STR_CONFIG_SETTING_TRAIN_LENGTH :Μέγιστο μήκος τραίνων: {STRING} -STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT :Ορίστε το μέγιστο μήκος των τραίνων +STR_CONFIG_SETTING_TRAIN_LENGTH :Μέγιστο μήκος τρένων: {STRING} +STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT :Ορίστε το μέγιστο μήκος των τρένων STR_CONFIG_SETTING_TILE_LENGTH :{COMMA} τετραγωνίδι{P 0 ο α} STR_CONFIG_SETTING_SMOKE_AMOUNT :Ποσότητα καπνού/σπινθύρων οχήματος: {STRING} STR_CONFIG_SETTING_SMOKE_AMOUNT_HELPTEXT :Ορίστε τον όγκο του καπνού ή τον αριθμό των σπιθών που παράγονται από τα οχήματα STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL :Μοντέλο επιτάχυνσης τρένων: {STRING} -STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_HELPTEXT :Επιλέξτε το μοντέλο φυσικής για την επιτάχυνση των τραίνων. Με το «αρχικό» μοντέλο οι κλίσεις επιβαρύνουν το ίδιο όλα τα οχήματα. Με το «ρεαλιστικό» μοντέλο οι κλίσεις και οι στροφές τα επιβαρύνουν ανάλογα με διάφορες ιδιότητες όπως το μήκος και το ελκτικό φορτίο +STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_HELPTEXT :Επιλέξτε το μοντέλο φυσικής για την επιτάχυνση των τρένων. Με το «αρχικό» μοντέλο οι κλίσεις επιβαρύνουν το ίδιο όλα τα οχήματα. Με το «ρεαλιστικό» μοντέλο οι κλίσεις και οι στροφές τα επιβαρύνουν ανάλογα με διάφορες ιδιότητες όπως το μήκος και το ελκτικό φορτίο STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL :Μοντέλο επιτάχυνσης οχημάτων δρόμου: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL_HELPTEXT :Επιλέξτε το μοντέλο φυσικής για την επιτάχυνση των οχημάτων. Με το «αρχικό» μοντέλο οι κλίσεις επιβαρύνουν το ίδιο όλα τα οχήματα. Με το «ρεαλιστικό» μοντέλο οι κλίσεις και οι στροφές τα επιβαρύνουν ανάλογα με διάφορες ιδιότητες όπως το μήκος και το ελκτικό φορτίο -STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS :Κλίση εδάφους για τα τραίνα: {STRING} -STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Η κλίση ενός κεκλιμένου τετραγωνίδιου για τα τραίνα. Μεγαλύτερες τιμές καθιστούν δυσκολότερο το ανέβασμα λόφων +STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS :Κλίση εδάφους για τα τρένα: {STRING} +STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Η κλίση ενός κεκλιμένου τετραγωνίδιου για τα τρένα. Μεγαλύτερες τιμές καθιστούν δυσκολότερο το ανέβασμα λόφων STR_CONFIG_SETTING_PERCENTAGE :{COMMA}% STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS :Κλίση εδάφους για τα οδικά οχήματα: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Η κλίση ενός κεκλιμένου τετραγωνίδιου για τα οδικά οχήματα. Μεγαλύτερες τιμές καθιστούν δυσκολότερο το ανέβασμα λόφων STR_CONFIG_SETTING_FORBID_90_DEG :Απαγόρευση στα τρένα και πλοία να κάνουν στροφές 90°: {STRING} -STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Στροφές 90 μοιρών προκύπτουν όταν μια οριζόντια σιδηροτροχιά ακολουθείται από μια κάθετη στο επόμενο τετραγωνίδιο, κάνοντας το τραίνο να στρίψει κατά 90 μοίρες όταν αλλάζει τετραγωνίδιο, αντί για τις συνηθισμένες 45 μοίρες σε άλλους συνδυασμούς σιδηροτροχιών. Αυτό έχει επίσης εφαρμογή στην ακτίνα στροφής των πλοίων +STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Στροφές 90 μοιρών προκύπτουν όταν μια οριζόντια σιδηροτροχιά ακολουθείται από μια κάθετη στο επόμενο τετραγωνίδιο, κάνοντας το τρένο να στρίψει κατά 90 μοίρες όταν αλλάζει τετραγωνίδιο, αντί για τις συνηθισμένες 45 μοίρες σε άλλους συνδυασμούς σιδηροτροχιών. Αυτό έχει επίσης εφαρμογή στην ακτίνα στροφής των πλοίων STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Να επιτρέπεται η συνένωση μη παρακείμενων σταθμών: {STRING} STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Επιτρέπεται η προσθήκη τμημάτων σε σταθμό χωρίς αυτά να αγγίζουν τα ήδη υπάρχοντα τμήματα. Χρειάζεται Ctrl+Κλικ κατά την τοποθέτηση των νέων τμημάτων STR_CONFIG_SETTING_INFLATION :Πληθωρισμός: {STRING} @@ -1323,7 +1328,7 @@ STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :Όταν ενε STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :Οι νέες οδηγίες είναι «χωρίς στάση» από προεπιλογή: {STRING} STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Κανονικά, τα οχήματα σταματούν σε κάθε σταθμό που περνούν. Ενεργοποιώντας αυτήν τη ρύθμιση, δεν θα σταματούν σε κανένα σταθμό που θα βρει στη διαδρομή τους προς τον τελικό προορισμό. Σημείωστε πως αυτή η ρύθμιση ορίζει μόνο μια καθορισμένη τιμή για νέες εντολές. Ειδικές εντολές μπορούν να δοθούν για οποιαδήποτε συμπεριφορά, άσχετα από την προκαθορισμένη STR_CONFIG_SETTING_STOP_LOCATION :Οι εντόλες νέων τρένων διορίζουν ότι σταματάνε εξ ορισμού στο {STRING} της πλατφόρμας -STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Το προεπιλεγμένο σημείο όπου θα σταματούν τα τραίνα στην πλατφόρμα . Το «κοντινό άκρο» σημαίνει κοντά στο σημείο εισόδου, «Μέση» σημαίνει στο μέσο της πλατφόρμας και «μακρινό άκρο» σημαίνει στο άλλο άκρο από το σημείο εισόδου. Σημειώστε ότι αυτή η ρύθμιση ορίζει μόνο την προκαθορισμένη τιμή για νέες εντολές. Παρ' όλα αυτά, είναι δυνατό να δοθούν διαφορετικές εντολές για οποιαδήποτε συμπεριφορά. +STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Το προεπιλεγμένο σημείο όπου θα σταματούν τα τρένα στην πλατφόρμα . Το «κοντινό άκρο» σημαίνει κοντά στο σημείο εισόδου, «Μέση» σημαίνει στο μέσο της πλατφόρμας και «μακρινό άκρο» σημαίνει στο άλλο άκρο από το σημείο εισόδου. Σημειώστε ότι αυτή η ρύθμιση ορίζει μόνο την προκαθορισμένη τιμή για νέες εντολές. Παρ' όλα αυτά, είναι δυνατό να δοθούν διαφορετικές εντολές για οποιαδήποτε συμπεριφορά. STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :κοντινό άκρο STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :στη μέση STR_CONFIG_SETTING_STOP_LOCATION_FAR_END :μακρινό άκρο @@ -1344,7 +1349,7 @@ STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT :Επιτρέπ STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :Επιτρέπεται η αποστολή χρημάτων σε άλλες εταιρίες: {STRING} STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT :Επιτρέπεται η μεταφορά χρημάτων μεταξύ των εταιρειών σε παιχνίδια πολλαπλών παικτών STR_CONFIG_SETTING_FREIGHT_TRAINS :Πολλαπλασιαστής βάρους σε φορτία για εξομοίωση βαρέων τρένων: {STRING} -STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT :Ορίζεται ο αντίκτυπος της μεταφοράς φορτίων στα τραίνα. Υψηλότερη τιμή κάνει τη μεταφορά φορτίων πιο απαιτητική για τραίνα, ιδιαίτερα στους λόφους +STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT :Ορίζεται ο αντίκτυπος της μεταφοράς φορτίων στα τρένα. Υψηλότερη τιμή κάνει τη μεταφορά φορτίων πιο απαιτητική για τρένα, ιδιαίτερα στους λόφους STR_CONFIG_SETTING_PLANE_SPEED :Παράγοντας ταχύτητας αεροπλάνων: {STRING} STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Ορίζεται η σχετική ταχύτητα των αεροπλάνων συγκριτικά με τους άλλους τύπους οχημάτων, ώστε να μειώνεται το ποσό του εισοδήματος από μεταφορές με αεροσκάφη STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA} @@ -1361,6 +1366,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Δεν STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Συντήρηση υποδομής: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Όταν είναι ενεργοποιημένη, οι υποδομές προκαλούν έξοδα συντήρησης. Το κόστος μεγαλώνει δυσανάλογα με το μέγεθος του δικτύου, επηρεάζοντας έτσι τις μεγάλες εταιρείες περισσότερο από τις μικρότερες + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Τα αεροδρόμια δεν λήγουν ποτέ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ενεργοποιώντας αυτήν τη ρύθμιση κάθε τύπος αεροδρομίου παραμένει διαθέσιμο για πάντα μετά την παρουσίασή του @@ -1444,8 +1450,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Χρώμα εδ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Πράσινο STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Σκούρο πράσινο STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Βιολετί -STR_CONFIG_SETTING_REVERSE_SCROLLING :Ανάποδη μετακίνηση οθόνης: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Συμπεριφορά όταν κυλίεται ο χάρτης με το δεξί κουμπί του ποντικιού. Όταν είναι απενεργοποιημένη, το ποντίκι μετακινεί την κάμερα. Όταν είναι ενεργοποιημένη, το ποντίκι μετακινεί τον χάρτη +STR_CONFIG_SETTING_SCROLLMODE :Συμπεριφορά κύλισης του παραθύρου εμφάνισης: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Συμπεριφορά κατά την κύλιση του χάρτη +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Μετακίνηση μικρού χάρτη με ΔΠΠ, θέση ποντικιού κλειδωμένη +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Μετακίνηση χάρτη με ΔΠΠ, θέση ποντικιού κλειδωμένη +STR_CONFIG_SETTING_SCROLLMODE_RMB :Μετακίνηση χάρτη με ΔΠΠ +STR_CONFIG_SETTING_SCROLLMODE_LMB :Μετακίνηση χάρτη με ΑΠΠ STR_CONFIG_SETTING_SMOOTH_SCROLLING :Ομαλή μετάβαση οθόνης: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Ελέγξτε τον τρόπο με τον οποίο η κύρια προβολή κυλίεται σε μια συγκεκριμένη θέση όταν πατάτε πάνω στον μικρό χάρτη ή όταν δίνετε εντολή για μετάβαση σε ένα συγκεκριμένο αντικείμενο στον χάρτη. Όταν είναι ενεργοποιημένη, η κύλιση γίνεται ομαλά, και όταν είναι απενεργοποιημένη μεταβαίνει απ' ευθείας στο επιλεγμένο σημείο STR_CONFIG_SETTING_MEASURE_TOOLTIP :Εμφάνιση εργαλείου μετρήσεως όταν χρησιμοποιούνται διάφορα εργαλεία: {STRING} @@ -1477,8 +1487,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Κλι STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control+Κλικ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Απενεργοποιημένος -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Μετάβαση με αριστερό κλικ: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Ενεργοποίηση της κύλισης του χάρτη σύροντας τον με το αριστερό κουμπί του ποντικιού. Αυτό είναι ιδιαίτερα χρήσιμο για την κύλιση όταν χρησιμοποιείται οθόνη αφής STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Κλείσιμο παραθύρου με δεξί-κλικ: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Κλείνει το παράθυρο με δεξί πάτημα μέσα του. Απενεργοποιεί την ανάδυση επεξηγήσεων με το δεξί κουμπί! @@ -1504,7 +1512,7 @@ STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Ενεργοπ STR_CONFIG_SETTING_LOADING_INDICATORS :Χρήση δεικτών φόρτωσης: {STRING} STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Επιλέξτε εάν οι δείκτες φόρτωσης εμφανίζονται πάνω από τα οχήματα που φορτώνουν ή ξεφορτώνουν STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Εμφάνιση δρομολογίων σε στιγμές αντί για ημέρες: {STRING} -STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Εμφάνιση χρόνων ταξιδιού στα χρονοδιαγράμματα σε χρόνο παιχνιδιού αντί σε ημέρες +STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Εμφάνιση χρόνων ταξιδιού στα χρονοδιαγράμματα σε στιγμές αντί σε ημέρες STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Εμφάνιση αφίξεων και αναχωρήσεων στα δρομολόγια: {STRING} STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Εμφάνιση αναμενόμενης ώρας άφιξης και αναχώρησης στα χρονοδιαγράμματα STR_CONFIG_SETTING_QUICKGOTO :Γρήγορη δημιουργία εντολών για τα οχήματα: {STRING} @@ -1514,8 +1522,8 @@ STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_HELPTEXT :Επιλογή STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST :Πρώτος διαθέσιμος STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_LAST :Τελευταίος διαθέσιμος STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_MOST_USED :Περισσότερο χρησιμοποιούμενος -STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Εμφάνιση δεσμέυσεων διαδρομών για γραμμές τραίνου: {STRING} -STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT :Δίνεται ένα διαφορετικό χρώμα στις κατειλημμένες ράγες για να σας βοηθήσουν με προβλήματα όταν τα τραίνα αρνούνται να εισέλθουν σε τμήματα με βάση τροχιές +STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Εμφάνιση δεσμέυσεων διαδρομών για γραμμές τρένου: {STRING} +STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT :Δίνεται ένα διαφορετικό χρώμα στις κατειλημμένες ράγες για να σας βοηθήσουν με προβλήματα όταν τα τρένα αρνούνται να εισέλθουν σε τμήματα με βάση τροχιές STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :Διατήρηση των οικοδομικών εργαλείων ενεργών μετά από χρήση τους: {STRING} STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT :Διατήρηση ανοικτών των εργαλείων για γέφυρες, σήραγγες, κλπ μετά από τη χρήση STR_CONFIG_SETTING_EXPENSES_LAYOUT :Ομαδοποίηση εξόδων στο παράθυρο οικονομικών της εταιρίας: {STRING} @@ -1541,7 +1549,7 @@ STR_CONFIG_SETTING_SOUND_AMBIENT_HELPTEXT :Παίζει τ STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :Απενεργοποίηση των υποδομών για τα οχήματα που δεν είναι διαθέσιμα: {STRING} STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING_HELPTEXT :Όταν είναι ενεργοποιημένο, οι υποδομές είναι διαθέσιμες μόνο όταν υπάρχουν διαθέσιμα οχήματα, αποτρέποντας σπατάλη χρόνου και χρημάτων σε μη χρησιμοποιήσιμες υποδομές STR_CONFIG_SETTING_MAX_TRAINS :Μέγιστος αριθμός τρένων ανά εταιρία: {STRING} -STR_CONFIG_SETTING_MAX_TRAINS_HELPTEXT :Μέγιστος αριθμός τραίνων που μπορεί να έχει μια εταιρεία +STR_CONFIG_SETTING_MAX_TRAINS_HELPTEXT :Μέγιστος αριθμός τρένων που μπορεί να έχει μια εταιρεία STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :Μέγιστος αριθμός οχημάτων δρόμου ανά εταιρία: {STRING} STR_CONFIG_SETTING_MAX_ROAD_VEHICLES_HELPTEXT :Μέγιστος αριθμός οδικών οχημάτων που μπορεί να έχει μια εταιρεία STR_CONFIG_SETTING_MAX_AIRCRAFT :Μέγιστος αριθμός αεροσκαφών ανά εταιρία: {STRING} @@ -1550,7 +1558,7 @@ STR_CONFIG_SETTING_MAX_SHIPS :Μέγιστο STR_CONFIG_SETTING_MAX_SHIPS_HELPTEXT :Μέγιστος αριθμός πλοίων που μπορεί να έχει μια εταιρεία STR_CONFIG_SETTING_AI_BUILDS_TRAINS :Απενεργοποίηση τρένων για τον υπολογιστή: {STRING} -STR_CONFIG_SETTING_AI_BUILDS_TRAINS_HELPTEXT :Ενεργοποιώντας αυτήν τη ρύθμιση κάνει αδύνατη την κατασκευή τραίνων από παίκτη του υπολογιστή +STR_CONFIG_SETTING_AI_BUILDS_TRAINS_HELPTEXT :Ενεργοποιώντας αυτήν τη ρύθμιση κάνει αδύνατη την κατασκευή τρένων από παίκτη του υπολογιστή STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES :Απενεργοποίηση οχημάτων υπολογιστή: {STRING} STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES_HELPTEXT :Ενεργοποιώντας αυτήν τη ρύθμιση κάνει αδύνατη την κατασκευή οδικών οχημάτων από παίκτη του υπολογιστή STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT :Απενεργοποίηση αεροσκαφών υπολογιστή: {STRING} @@ -1571,8 +1579,8 @@ STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Μέγιστο STR_CONFIG_SETTING_SERVINT_ISPERCENT :Τα διαστήματα μεταξύ συντήρησης είναι σε ποσοστά: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Επιλέξτε εάν η επισκευή των οχημάτων εξαρτάται από τον χρόνο που πέρασε από την τελευταία επισκευή ή από την μείωση της αξιοπιστίας κατά ένα συγκεκριμένο ποσοστό της μέγιστης αξιοπιστίας -STR_CONFIG_SETTING_SERVINT_TRAINS :Προκαθορισμένο διάστημα μεταξύ επισκευών για τα τραίνα: {STRING} -STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT :Ορίστε το προκαθορισμένο διάστημα μεταξύ συντηρήσεων για τα νέα οχήματα τραίνων, όταν δεν δίνεται άλλο διάστημα για το όχημα +STR_CONFIG_SETTING_SERVINT_TRAINS :Προκαθορισμένο διάστημα μεταξύ επισκευών για τα τρένα: {STRING} +STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT :Ορίστε το προκαθορισμένο διάστημα μεταξύ συντηρήσεων για τα νέα οχήματα τρένων, όταν δεν δίνεται άλλο διάστημα για το όχημα STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA}{NBSP}ημέρ{P 0 α ες}/% STR_CONFIG_SETTING_SERVINT_DISABLED :Απενεργοποιημένο STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES :Προκαθορισμένο διάστημα μεταξύ συντηρήσεων για οδικά οχήματα: {STRING} @@ -1584,7 +1592,7 @@ STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Ορίστε τ STR_CONFIG_SETTING_NOSERVICE :Απενεργοποίηση επισκευών όταν οι καταρρεύσεις είναι απενεργοποιημένες: {STRING} STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Όταν είναι ενεργοποιημένη, τα οχήματα δεν συντηρούνται όταν δεν είναι δυνατό να χαλάσουν STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Ενεργοποίηση ορίων ταχύτητας βαγονιών: {STRING} -STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Όταν είναι ενεργοποιημένο, χρησιμοποιούνται και τα όρια ταχύτητας των βαγονιών όταν αποφασίζεται η μέγιστη ταχύτητα ενός τραίνου +STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Όταν είναι ενεργοποιημένο, χρησιμοποιούνται και τα όρια ταχύτητας των βαγονιών όταν αποφασίζεται η μέγιστη ταχύτητα ενός τρένου STR_CONFIG_SETTING_DISABLE_ELRAILS :Απενεργοποίηση ηλεκτρικών σιδηροτροχιών: {STRING} STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Ενεργοποιώντας αυτήν την ρύθμιση απενεργοποιείται η ανάγκη ηλεκτροδότησης των σιδηροτροχιών για να μπορέσουν σε αυτές να λειτουργήσουν οι ηλεκτρικές μηχανές @@ -1802,13 +1810,13 @@ STR_CONFIG_SETTING_PATHFINDER_NPF :NPF STR_CONFIG_SETTING_PATHFINDER_YAPF_RECOMMENDED :YAPF {BLUE}(Συνίσταται) STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS :Μέθοδος δρομολόγησης για τρένα: {STRING} -STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS_HELPTEXT :Μέθοδος διαπίστωσης διαδρομής που χρησιμοποιείται για τα τραίνα +STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS_HELPTEXT :Μέθοδος διαπίστωσης διαδρομής που χρησιμοποιείται για τα τρένα STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES :Μέθοδος δρομολόγησης για οχήματα δρόμου: {STRING} STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES_HELPTEXT :Μέθοδος διαπίστωσης διαδρομής που χρησιμοποιείται για τα οδικά οχήματα STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS :Μέθοδος δρομολόγησης για πλοία: {STRING} STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT :Μέθοδος διαπίστωσης διαδρομής που χρησιμοποιείται για τα πλοία STR_CONFIG_SETTING_REVERSE_AT_SIGNALS :Αυτόματη αναστροφή σε σηματοδότες: {STRING} -STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Επιτρέπεται στα τραίνα να αντιστραφούν σε σήμα, εάν περιμένουν εκεί για πολύ ώρα +STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Επιτρέπεται στα τρένα να αντιστραφούν σε σήμα, εάν περιμένουν εκεί για πολύ ώρα STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Αλλαγή τιμής ρύθμισης @@ -1916,7 +1924,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Αλλα STR_CHEAT_SETUP_PROD :{LTBLUE}Ενεργοποίηση δυνατότητας αλλαγής τιμών παραγωγής: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Νέος Χρωματισμός +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Νέος Χρωματισμός STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Εμφάνιση γενικών χρωματικών μοτίβων STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Εμφάνιση χρωματικών μοτίβων τρένων @@ -2392,6 +2400,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Υπόμ STR_LINKGRAPH_LEGEND_ALL :{BLACK}Όλες STR_LINKGRAPH_LEGEND_NONE :{BLACK}Καμία STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Επιλογή εταιριών για να εμφανιστούν +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}μη χρησιμοποιημένο @@ -2798,7 +2807,43 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Ιδιοκτη STR_ABOUT_OPENTTD :{WHITE}Σχετικά με το OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Αρχικά Πνευματικά Δικαιώματα {COPYRIGHT} 1995 Chris Sawyer, Όλα τα δικαιώματα διατηρούνται STR_ABOUT_VERSION :{BLACK}Έκδοση OpenTTD{REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Η ομάδα του OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Η ομάδα του OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Αριθμός στιγμών παιχνιδιού που προσομοιώνεται ανά δευτερόλεπτο. +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Αριθμος των παραγμενων video frames ανα δευτερολεπτο +STR_FRAMERATE_SPEED_FACTOR :{WHITE}Παράγοντας ταχύτητας τρέχοντος παιχνιδιού: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Πόσο γρήγορα εκτελείται το παιχνίδι αυτήν τη στιγμή, σε σύγκριση με την αναμενόμενη ταχύτητα στον κανονικό ρυθμό εξομοίωσης. +STR_FRAMERATE_CURRENT :{WHITE}Τρέχον +STR_FRAMERATE_AVERAGE :{WHITE}Μέσο +STR_FRAMERATE_DATA_POINTS :{WHITE}Τα δεδομένα βασίζονται σε μετρήσεις {COMMA} +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} frames/δευτ. +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} frames/δευτ. +############ Leave those lines in this order!! +STR_FRAMERATE_GL_ECONOMY :{WHITE} Διαχείριση φορτίου: +STR_FRAMERATE_GL_TRAINS :Στιγμές τρένων: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} Στιγμές οχημάτων δρόμου: +STR_FRAMERATE_GL_SHIPS :Στιγμές πλοίων: +STR_FRAMERATE_GL_AIRCRAFT :Στιγμές αεροσκαφών: +STR_FRAMERATE_GL_LANDSCAPE :Στιγμές κόσμου: +STR_FRAMERATE_VIDEO :{WHITE}Έξοδος βίντεο: +STR_FRAMERATE_SOUND :{WHITE}Μίξη ήχου: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_ECONOMY :Διαχείριση φορτίου +STR_FRAMETIME_CAPTION_GL_TRAINS :Στιγμές τρένων +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Στιγμές οχημάτων δρόμου +STR_FRAMETIME_CAPTION_GL_SHIPS :Στιγμές πλοίων +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Στιγμές αεροσκαφών +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Στιγμές κόσμου +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Καθυστέρηση γραφήματος συνδέσμου +STR_FRAMETIME_CAPTION_VIDEO :Έξοδος βίντεο +STR_FRAMETIME_CAPTION_SOUND :Μίξη ήχου +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Αποθήκευση Παιχνιδιού @@ -2822,6 +2867,8 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Λεπτ STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Δεν υπάρχουν πληροφορίες. STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Αντικατάσταση Αρχείου +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Είστε σίγουροι οτι θέλετε να αντικαταστήσετε το υπάρχων αρχείο; STR_SAVELOAD_OSKTITLE :{BLACK}Δώστε το όνομα του παιχνιδιού προς αποθήκευση @@ -2939,7 +2986,9 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Έκδο STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Ελάχ. συμβατή έκδοση: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Παλέτα: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Προεπιλογή (D) STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Παράμετροι: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Κανένα STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Δεν υπάρχουν διαθέσιμες πληροφορίες STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Δεν βρέθηκε το ταυτοποιημένο αρχείο @@ -3084,6 +3133,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Δώστ STR_TOWN_DIRECTORY_CAPTION :{WHITE}Πόλεις STR_TOWN_DIRECTORY_NONE :{ORANGE}- Τίποτα - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Πόλη){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Ονόματα πόλεων - πατήστε στο όνομα για να κεντράρετε την εικόνα στην πόλη. Με Ctrl+Κλικ ανοίγει νέο παράθυρο προβολής στην τοποθεσία της πόλης STR_TOWN_POPULATION :{BLACK}Παγκόσμιος πληθυσμός: {COMMA} @@ -3091,8 +3141,7 @@ STR_TOWN_POPULATION :{BLACK}Παγκ STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Πόλη) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Πληθυσμός: {ORANGE}{COMMA}{BLACK} Σπίτια: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Επιβάτες τον προηγούμενο μήνα: {ORANGE}{COMMA}{BLACK} μεγ: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Αλληλογραφία τον προηγούμενο μήνα: {ORANGE}{COMMA}{BLACK} μεγ: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} προηγούμενος μήνας: {ORANGE}{COMMA}{BLACK} μέγιστο: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Εμπορεύματα που χρειάζονται για την επέκταση της πόλης: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} απαιτείται STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} απαιτείται τον χειμώνα @@ -3293,7 +3342,7 @@ STR_FINANCES_EXPENDITURE_INCOME_TITLE :{WHITE}Έξοδ STR_FINANCES_YEAR :{WHITE}{NUM} STR_FINANCES_SECTION_CONSTRUCTION :{GOLD}Κατασκευές STR_FINANCES_SECTION_NEW_VEHICLES :{GOLD}Νέα Οχήματα -STR_FINANCES_SECTION_TRAIN_RUNNING_COSTS :{GOLD}Λειτουργικά Έξοδα Τραίνων +STR_FINANCES_SECTION_TRAIN_RUNNING_COSTS :{GOLD}Λειτουργικά Έξοδα Τρένων STR_FINANCES_SECTION_ROAD_VEHICLE_RUNNING_COSTS :{GOLD}Λειτουργικά Έξοδα Οχημάτων STR_FINANCES_SECTION_AIRCRAFT_RUNNING_COSTS :{GOLD}Λειτουργικά Έξοδα Αεροσκαφών STR_FINANCES_SECTION_SHIP_RUNNING_COSTS :{GOLD}Λειτουργικά Έξοδα Πλοίων @@ -3397,21 +3446,12 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Κεντ STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Επίπεδο παραγωγής: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Η βιομηχανία έχει ανακοινώσει άμεσο κλείσιμο! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Απαιτεί: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Απαιτεί: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Απαιτεί: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Απαιτεί: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} σε αναμονή{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Παράγει: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Παράγει: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Αλλαγή παραγωγής (πολλαπλάσιο του 8, μέχρι το 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Αλλαγή του επιπέδου παραγωγής (ποσοστιαία, μέχρι το 800%) @@ -3605,7 +3645,7 @@ STR_DEPOT_CLONE_ROAD_VEHICLE :{BLACK}Κλων STR_DEPOT_CLONE_SHIP :{BLACK}Κλωνοποίηση Πλοίου STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Κλωνοποίηση Αεροσκάφους -STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Αυτό θα αγοράσει ένα αντίγραφο του τρένου μαζί με τα όλα τα βαγόνια. Πατήστε αυτό το κουμπί και μετά σε κάποιο τραίνο μέσα ή έξω από το αμαξοστάσιο. Με Ctrl+Κλικ θα έχει τις ίδιες εντολές. Με Shift+Κλικ εμφανίζεται το εκτιμώμενο κόστος χωρίς να γίνει η αγορά +STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Αυτό θα αγοράσει ένα αντίγραφο του τρένου μαζί με τα όλα τα βαγόνια. Πατήστε αυτό το κουμπί και μετά σε κάποιο τρένο μέσα ή έξω από το αμαξοστάσιο. Με Ctrl+Κλικ θα έχει τις ίδιες εντολές. Με Shift+Κλικ εμφανίζεται το εκτιμώμενο κόστος χωρίς να γίνει η αγορά STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Αυτό θα αγοράσει ένα αντίγραφο του οχήματος. Πατήστε αυτό το κουμπί και μετά σε κάποιο όχημα μέσα ή έξω από το αμαξοστάσιο. Με Ctrl+Κλικ θα έχει τις ίδιες εντολές. Με Shift+Κλικ εμφανίζεται το εκτιμώμενο κόστος χωρίς να γίνει η αγορά STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Αυτό θα αγοράσει ένα αντίγραφο του πλοίου. Πατήστε αυτό το κουμπί και μετά σε κάποιο πλοίο μέσα ή έξω από το ναυπηγείο. Με Ctrl+Κλικ θα έχει τις ίδιες εντολές. Με Shift+Κλικ εμφανίζεται το εκτιμώμενο κόστος χωρίς να γίνει η αγορά STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Αυτό θα αγοράσει ένα αντίγραφο του αεροσκάφους. Πατήστε αυτό το κουμπί και μετά σε κάποιο αεροσκάφος μέσα στο ή έξω από το υπόστεγο. Με Ctrl+Κλικ θα έχει τις ίδιες εντολές. Με Shift+Κλικ εμφανίζεται το εκτιμώμενο κόστος χωρίς να γίνει η αγορά @@ -4337,7 +4377,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Πάρα STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Πάρα πολλά κομμάτια σιδηροδρομικού σταθμού STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Πάρα πολλές στάσεις λεωφορείου STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Πάρα πολλοί σταθμοί φορτηγών -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Πολύ κοντά σε άλλη περιοχή σταθμού/φόρτωσης STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Πολύ κοντά σε άλλη αποβάθρα STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Πολύ κοντά σε άλλο αεροδρόμιο STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Δεν μπορεί να μετονομαστεί ο σταθμός... @@ -4345,6 +4384,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... αυ STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... ο δρόμος βλέπει σε λάθος κατεύθυνση STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... οι μη τερματικοί σταθμοί δε μπορούν να έχουν στροφές STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... οι μη τερματικοί σταθμοί δε μπορούν να έχουν διασταυρώσεις +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... ο δρόμος είναι μονόδρομος η μπλοκαρισμένος # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Δεν μπορεί να αφαιρεθεί μέρος του σταθμού... @@ -4549,7 +4589,7 @@ STR_ERROR_NO_VEHICLES_AVAILABLE_YET_EXPLANATION :{WHITE}Ξεκι # Specific vehicle errors STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Δεν μπορεί το τρένο να περάσει σήμα με κίνδυνο... STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN :{WHITE}Δεν αντιστρέφεται η κατεύθυνση του τρένου... -STR_ERROR_TRAIN_START_NO_POWER :Το τραίνο δεν έχει ενέργεια +STR_ERROR_TRAIN_START_NO_POWER :Το τρένο δεν έχει ενέργεια STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN :{WHITE}Δεν γίνεται να αλλάξει πορεία το όχημα... @@ -4596,6 +4636,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Αρχικοί STR_BASESOUNDS_WIN_DESCRIPTION :Αρχικοί ήχοι από το Transport Tycoon Deluxe έκδοση Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Ένα πάκετο ήχων χώρις ήχους. STR_BASEMUSIC_WIN_DESCRIPTION :Αρχική μουσική από το Transport Tycoon Deluxe έκδοση Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Αρχική μουσική από το Transport Tycoon Deluxe έκδοση DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Αρχική μουσική από το Transport Tycoon (Αρχικός Επεξεργαστής Κόσμου) έκδοση DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Ένα πάκετο μουσικής χωρίς πραγματική μουσική. ##id 0x2000 diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 2da4e58d5d..bb4e56d489 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -12,7 +12,7 @@ ##case singular plural gen -# $Id: hebrew.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -489,6 +489,7 @@ STR_ABOUT_MENU_SCREENSHOT :צילום מס STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :צילום מסך בהגדלה מלאה STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :ברירת מחדל של תקריב צילום מסך STR_ABOUT_MENU_GIANT_SCREENSHOT :צילום מסך ענק +STR_ABOUT_MENU_SHOW_FRAMERATE :הצג קצב פריימים STR_ABOUT_MENU_ABOUT_OPENTTD :'OpenTTD'{NBSP}אודות STR_ABOUT_MENU_SPRITE_ALIGNER :מיישר ספרייטים STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :הדלק/כבה הצגת תיבות גבול של ספרייטים @@ -664,6 +665,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}אין מוזיקה זמינה STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}רצועה STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}כותרת @@ -683,14 +685,13 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}(בחר STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}עירבוב תוכניות פועל/כבוי STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}הצג את חלון בחירת המנגינה -STR_ERROR_NO_SONGS :{WHITE}נבחרה ערכת מוזיקה ללא שירים. לא יושמעו שירים - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}בחירת תכנית מנגינה +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}תוכנית מוזיקה - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}רשימת רצועות STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}תוכנית- '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}מחק +STR_PLAYLIST_CHANGE_SET :{BLACK}ערכת שינוי STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}מחק תוכנית נוכחית STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}(לחץ כאן כדי להוסיף לתוכנית הנוכחית(מותאם אישית1 או מותאם אישית 2 בלבד STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}(לחץ על רצועה כדי להסיר אותה מהתוכנית הנוחכית(מותאם אישית 1 או מותאם אישית 2 בלבד @@ -939,6 +940,7 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :(ZAR) ראנד STR_GAME_OPTIONS_CURRENCY_CUSTOM :אחר... STR_GAME_OPTIONS_CURRENCY_GEL :לארי גאורגי (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :ריאל איראני (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :רובל רוסי (RUB) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}רכבי כביש @@ -1268,6 +1270,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}שינו STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :תחזוקת תשתיות: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :כאשר מאופשר, תשתיות גורמות לעלויות תחזוקה. העלות גדלה באופן שהוא מעבר ליחסי לעומת גודל הרשת, וכך משפיע יותר על חברות גדולות מאשר על חברות קטנות + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :בטל התיישנות נמלי תעופה: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :אפשור הגדרה זו גורם לכל סוג נמל תעופה להישאר זמין לעד אחרי השקתו @@ -1351,8 +1354,10 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :צבע פני STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :ירוק STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :ירוק כהה STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :סגול -STR_CONFIG_SETTING_REVERSE_SCROLLING :{STRING} :היפוך כיוון הגלילה של התצוגה -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :התנהגות בעת גלילת המפה באמצעות כפתור העכבר האמצעי. כאשר מבוטל, העכבר מזיז את המצלמה. כאשר מאופשר, העכבר מזיז את המפה +STR_CONFIG_SETTING_SCROLLMODE :התנהגות גלילת תצוגה: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :הזז את התצוגה עם כפתור עכבר ימני, מיקום העכבר נעול +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :הזזת מפה עם כפתור עכבר ימני, מיקום העכבר נעול +STR_CONFIG_SETTING_SCROLLMODE_LMB :הזז מפה עם כפתור עכבר שמאלי STR_CONFIG_SETTING_SMOOTH_SCROLLING :{STRING} :גלילה חלקה של התצוגה המשנית STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :שלוט כיצד התצוגה הראשית נגללת למיקום מסוים כאשר מקליקים על המפה הקטנה אן כאשר נותנים הוראה לגלול לעצם מסוים על גבי המפה. אם מאופשר, חלון התצוגה נגלל באופן חלק, אם מבוטל הוא מוקפץ ישירות אל נקודת המטרה STR_CONFIG_SETTING_MEASURE_TOOLTIP :{STRING} :'הצג מידות בעת בניית כבישים/מסילות וכיוב @@ -1384,8 +1389,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command-click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control-click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :כבוי -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :גלילה בלחיצה שמאלית: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :אפשר גלילת המפה באמצעות גרירתה עם כפתור העכבר השמאלי. אפשרות זו שימושית במיוחד בעת שימוש במסך מגע לצורך גלילה STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :סגירת חלון בכפתור ימני: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :סוגר חלון על-ידי לחיצה ימנית בתוכו. מבטל הצגת מידע בלחיצה ימנית! @@ -1823,7 +1826,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}שנה STR_CHEAT_SETUP_PROD :{LTBLUE}אפשר שינוי ערכי התפוקה: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}הגדרות צבע חדשות STR_LIVERY_GENERAL_TOOLTIP :{BLACK}הצג הגדרות צבע כלליות STR_LIVERY_TRAIN_TOOLTIP :{BLACK}הצג הגדרות צבע לרכבות @@ -2705,7 +2707,43 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :שטח בבעל STR_ABOUT_OPENTTD :{WHITE}OpenTTD אודות STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}כל הזכויות שמורות , {COPYRIGHT}1995 כריס סויר - זכויות יוצרים מקוריות STR_ABOUT_VERSION :{BLACK}{REV} גירסה , OpenTTD -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 The OpenTTD team + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}קצב ריענון +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{WHITE}קצב סימולציה: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}מספר פעימות משחק לשניה +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}מספר פריימים של וידאו המעובדים בשניה +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK} כמה מהר המשחק כרגע רץ, בהשוואה למהירות הצפוייה בקצב סימולציה רגיל. +STR_FRAMERATE_CURRENT :נוכחי{WHITE} +STR_FRAMERATE_DATA_POINTS :{WHITE}נתונים מבוססים על {COMMA} מדידות +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} מילישניה +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} פריים/ים +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} פריים/ים +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} פריים/ים +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} ש' +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}סה"כ לולאת משחק: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} פעימות כלי רכב: +STR_FRAMERATE_GL_SHIPS :{WHITE} פעימות כלי שייט: +STR_FRAMERATE_GL_LANDSCAPE :{WHITE} נקודות עולם: +STR_FRAMERATE_DRAWING :{WHITE}עיבוד גרפיקה: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} תצוגות עולם: +STR_FRAMERATE_VIDEO :{BLACK}פלט וידאו: +STR_FRAMERATE_SOUND :{WHITE} ערבוב צליל: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :לולאת משחק +STR_FRAMETIME_CAPTION_GL_ECONOMY :טיפול במטען +STR_FRAMETIME_CAPTION_GL_TRAINS :פעימות רכבת +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :פעימות עולם +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :השהיית גרף קשרים +STR_FRAMETIME_CAPTION_DRAWING :עיבוד גרפיקה +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :עיבוד תצוגת עולם +STR_FRAMETIME_CAPTION_VIDEO :פלט וידאו +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}שמור משחק @@ -2729,11 +2767,12 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}פרטי STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}אין מידע זמין STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}מחרוזת סינון: STR_SAVELOAD_OSKTITLE :{BLACK}הכנס שם לשמירה # World generation -STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}יצור עולם +STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}יצירת עולם STR_MAPGEN_MAPSIZE :{BLACK}:גודל המפה STR_MAPGEN_MAPSIZE_TOOLTIP :{BLACK}בחר את גודל המפה במשבצות. מספר המשבצות הזמינות תהיה קצת קטנה יותר. STR_MAPGEN_BY :{BLACK}* @@ -2991,6 +3030,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}הכנס STR_TOWN_DIRECTORY_CAPTION :{WHITE}ערים STR_TOWN_DIRECTORY_NONE :{ORANGE}- אין - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}שמות ערים - לחץ על שם כדי למקד את התצוגה על העיר. Ctrl+לחיצה פותח חלונית תצוגה חדשה על מיקום העיר STR_TOWN_POPULATION :{BLACK}אוכלוסיית העולם: {COMMA} @@ -2998,8 +3038,6 @@ STR_TOWN_POPULATION :{BLACK}אוכל STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (עיר) STR_TOWN_VIEW_POPULATION_HOUSES :{ORANGE}{1:COMMA}{BLACK} :בתים {ORANGE}{0:COMMA}{BLACK} :אוכלוסיה -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{ORANGE}{1:COMMA}{BLACK} :מספר מירבי {ORANGE}{0:COMMA}{BLACK} :נוסעים בחודש שעבר -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{ORANGE}{1:COMMA}{BLACK} :מספר מירבי {ORANGE}{0:COMMA}{BLACK} :שקי דואר בחודש שעבר STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}המטען שצריך בשביל גידול עיר STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} דרוש STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} דרוש בחורף @@ -3304,21 +3342,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}מקד STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}רמת הפקה: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}התעשייה הכריזה על סגירה מתקרבת! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{YELLOW}{1:STRING}{0:STRING}{BLACK} : דורש -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{YELLOW}{3:STRING}{2:STRING},{1:STRING}{0:STRING}{BLACK} :דורש -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{YELLOW}{5:STRING}{4:STRING},{3:STRING}{2:STRING},{1:STRING}{0:STRING}{BLACK} :דורש -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}דורש: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} ממתין{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{YELLOW}{1:STRING}{0:STRING}{BLACK} :מייצר -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{YELLOW}{3:STRING}{2:STRING},{1:STRING}{0:STRING}{BLACK} :מייצר -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}שנה תפוקה (כפולות של 8, עד 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}שינוי ברמת ההפקה (עד 800% אחוז) @@ -3813,6 +3841,7 @@ STR_ORDER_CONDITIONAL_AGE :גיל (שני STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :זקוק לטיפול STR_ORDER_CONDITIONAL_UNCONDITIONALLY :תמיד STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :זמן חיים נותר (שנים) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :אמינות מירבית STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}כיצד יושוו נתוני כלי הרכב לערך נתון מסויים STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :שווה ל @@ -4238,7 +4267,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}יותר STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}התחנה מורכבת מיותר מידי חלקים STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}יותר מידי תחנות אוטובוס STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}יותר מידי תחנות משאיות -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}קרוב מידי לתחנה או איזור טעינה אחרים STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}יותר מידי קרוב למזח אחר STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}קרוב מידי לשדה תעופה אחר STR_ERROR_CAN_T_RENAME_STATION :{WHITE}לא ניתן לשנות שם תחנה... @@ -4246,6 +4274,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... כב STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}הכביש פונה לכיוון לא נכון... STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... לתחנות "על הדרך" לא יכולות להיות פינות STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... לתחנות "על הדרך" לא יכולות להיות צמתים +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... הדרך חד כיוונית או חסומה # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}... לא ניתן לבטל חלק מהתחנה @@ -4497,6 +4526,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :צלילי Tran STR_BASESOUNDS_WIN_DESCRIPTION :צלילי Transport Tycoon Deluxe המקורי בגרסת Windows. STR_BASESOUNDS_NONE_DESCRIPTION :אוסף צלילים ללא צלילים. STR_BASEMUSIC_WIN_DESCRIPTION :מנגינות Transport Tycoon Deluxe המקורי בגרסת Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :מנגינות Transport Tycoon Deluxe המקורי בגרסת DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :מנגינות Transport Tycoon Deluxe (Original/World Editor) המקורי בגרסת DOS. STR_BASEMUSIC_NONE_DESCRIPTION :אוסף מנגינות ללא מנגינות. ##id 0x2000 diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index 589235b051..2896a0b34e 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -11,7 +11,7 @@ ##case t ba -# $Id: hungarian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -732,10 +732,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}A 'Sajá STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Véletlen sorrendű lejátszás be/ki STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}A számkiválasztó ablak megjelenítése -STR_ERROR_NO_SONGS :{WHITE}Egy zeneszámokat nem tartalmazó zenei alapcsomag lett kiválasztva. A játékban nem lesz zene - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Zenei műsor kiválasztása STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Számlista STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}"{STRING}" Műsora @@ -944,9 +941,9 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}{COMMA}. látkép -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Látkép aktualizálása +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Látkép átállítása STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}A látképre a fő nézet pozícióját másolja -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Látkép visszatöltése +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Fő nézet ideállítása STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}A látkép pozícióját a fő nézetre másolja # Game options window @@ -1318,6 +1315,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}A beáll STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Az infrastruktúra fenntartási költségének engedélyezése: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Bekapcsolva az infrastruktúrának fenntartási költsége van. A költség hatványozottan nő a hálózatnagysággal, nagyobb hatással a nagyobb vállalatokra mint a kisebbekre + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Repülőterek nem avulnak el: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bekapcsolva minden repülőtértípus örökké elérhető marad bevezetése után @@ -1401,8 +1399,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Talaj színe a STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Zöld STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Sötétzöld STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Sötétkék -STR_CONFIG_SETTING_REVERSE_SCROLLING :Inverz görgetési irány: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :A térkép jobb gombbal történő görgetésének viselkedése. Kikapcsolva az egér mozgatja a kamerát. Bekapcsolva az egér a térképet mozgatja STR_CONFIG_SETTING_SMOOTH_SCROLLING :Finomított nézőpont-görgetés: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Beállítható, hogy a fő nézet hogyan mozogjon egy adott pozícióra a térképre kattintáskor ha egy adott objektumra történik mozgás. Bekapcsolva a nézet egyenletesen mozog, kikapcsolva közvetlenül a kijelölt helyre ugrik STR_CONFIG_SETTING_MEASURE_TOOLTIP :Területinformációk mutatása építési eszközök használatakor: {STRING} @@ -1434,8 +1430,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Parancs+Kattint STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+kattintás STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Kikapcsolva -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Bal gombos térképmozgatás: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Bal egérgombbal történő térképmozgatás engedélyezése. Különösen hasznos érintőképernyős mozgatás használata esetén STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Ablakok bezárása jobb gombbal: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :A jobb gombbal való kattintás az ablak területén bezárja az ablakot. Ez a beállítás kikapcsolja a segédletek jobb gombbal való megjelenítését! @@ -1873,7 +1867,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Aktuáli STR_CHEAT_SETUP_PROD :{LTBLUE}A nyersanyagüzemek termelése változtatható: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Új színséma STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Általános színsémák mutatása STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Vonat színsémák mutatása @@ -2433,9 +2426,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Kombiná STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Irányjelző (fény){}Egy irányjelző lehetővé teszi, hogy amennyiben a vonatok le tudnak foglalni maguknak egy biztonságos vágányutat a következő jelzőig, több vonat is beléphessen ugyanabba a jelzőblokkba. Az irányjelzők mellett hátulról is el lehet haladni STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Egyirányú irányjelző (fény){}Egy irányjelző lehetővé teszi, hogy amennyiben a vonatok le tudnak foglalni maguknak egy biztonságos vágányutat a következő jelzőig, több vonat is beléphessen ugyanabba a jelzőblokkba. Az egyirányú jelzők mellett nem lehet hátulról elhaladni STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Jelző átalakítás{}Amikor ki van jelölve, egy meglévő jelzőre való kattintással átkonvertálja a kiválasztott jelzőtípusra és -variációra, CTRL+kattintás a variációt fogja változtatni. Shift+kattintással megmutatja a becsült átalakítási költséget -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Automata jelzőtelepítés sűrűsége -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Automata jelzőtelepítés-sűrűség csökkentése -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Automata jelzőltelepítés-sűrűség növelése +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Automata jelzőtelepítés esetén a jelzők távolsága +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Automata jelzőtelepítés esetén a jelzők távolságának csökkentése +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Automata jelzőtelepítés esetén a jelzők távolságának növelése # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Válassz egy vasúti hidat @@ -2755,7 +2748,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Vállalat álta STR_ABOUT_OPENTTD :{WHITE}Az OpenTTD-ről STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Eredeti copyright {COPYRIGHT} 1995 Chris Sawyer, Minden jog fenntartva STR_ABOUT_VERSION :{BLACK}OpenTTD {REV} verzió -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 Az OpenTTD csapat +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 Az OpenTTD csapat + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Játék mentése @@ -3048,8 +3048,6 @@ STR_TOWN_POPULATION :{BLACK}Világn STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Város) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Lakosság: {ORANGE}{COMMA}{BLACK} Házak: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Utasok az előző hónapban: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Levélcsomagok az előző hónapban: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}A város növekedéséhez szükséges rakomány: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} szükséges STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} szükséges télen @@ -3354,21 +3352,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}A fő n STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Termelési szint: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A gyár bejelentette a közelgő bezárását! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Felhasznál: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Felhasznál: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Felhasznál: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Elfogad: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} várakozik{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Gyárt: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Gyárt: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Termelés megváltoztatása (8 többszörösei 2040-ig) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Termelési szint megváltoztatása (százalékosan, 800%-ig) @@ -4288,7 +4276,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Túl sok STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Túl sok vasútállomás-rész STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Túl sok buszmegálló STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Túl sok a teherautó-rakodóhely -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Túl közel van egy másik állomáshoz/rakodóhelyhez STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Túl közel van egy másik kikötőhöz STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Túl közel van egy másik repülőtérhez STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nem nevezheted át az állomást... diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index a821e88176..2c9b2282ae 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -11,7 +11,7 @@ ##gender karlkyn kvenkyn hvorugkyn -# $Id: icelandic.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -647,10 +647,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Velja 'S STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Kveikja/slökkva á stokkun STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Sýna lagalista -STR_ERROR_NO_SONGS :{WHITE}Tómur lagalisti hefur verið valinn. Engin lög verða spiluð - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Lagalistar STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Laganúmer STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Listi - '{STRING}' @@ -1206,6 +1203,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ekki er STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Viðhald á innviðum: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Ef þessi stilling er virk kostar að reka innviði fyrirtækisins. Kostnaður eykst í auknu hlutfalli við stærð fyrirtækisins, því eru áhrifin meiri á stór fyrirtæki en lítil + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Alltaf hægt að byggja allar gerðir flugvalla: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ef þessi stilling er virk þá er hver tegund flugvallar alltaf aðgengileg eftir að hann verður fyrst aðgengilegur @@ -1273,8 +1271,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Litur á landsl STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grænn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dökkgrænn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Fjólublátt -STR_CONFIG_SETTING_REVERSE_SCROLLING :Færa sjónarhorn í öfuga átt miðað við mús: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Hegðun þegar sjónarhornið er fært með hægri músartakkanum. Þegar stillingin er óvirk færir músin myndavélina. Þegar stillingin er virk færir músin sjónarhornið STR_CONFIG_SETTING_SMOOTH_SCROLLING :Mjúkt skrun í skjágluggum: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Stýrir hvernig aðalsjónarhornið færist á ákveðna staði þegar smellt er á þá á litla kortinu eða þegar ákveðinn hlutur er valin á kortinu. Ef stillingin er virk færist aðalsjónarhornið rólega, ef stillingin er óvirk fer aðalsjónarhornið beint á ákveðna staðinn STR_CONFIG_SETTING_MEASURE_TOOLTIP :Sýna mælingar þegar verið er að byggja og breyta landslagi: {STRING} @@ -1306,8 +1302,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+smella STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+smella STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Af -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Skrun með hægri músarhnappi: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Virkja að hægt sé að færa sjónarhornið með því að færa það með vinstri músar takkanum. Þetta er sérstaklega gott þegar notast er við snerti-skjá til að færa sjónarhornið STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Nota dagsetningar á {STRING} formi fyrir vistaða leiki. @@ -1669,7 +1663,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Breyta u STR_CHEAT_SETUP_PROD :{LTBLUE}Leyfa breytingar á verðmæti framleiðslu: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nýtt Litaskema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Grunnlitur fyrirtækis STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Litaskema lesta @@ -2536,7 +2529,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Land í eigu fy STR_ABOUT_OPENTTD :{WHITE}Um OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Upphaflegur höfundarréttur {COPYRIGHT} 1995 Chris Sawyer, Öll réttindi áskilin STR_ABOUT_VERSION :{BLACK}OpenTTD útgáfa {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 OpenTTD hópurinn +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 OpenTTD hópurinn + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Vista leik @@ -2808,8 +2808,6 @@ STR_TOWN_POPULATION :{BLACK}Heildar STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Borg) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Íbúafjöldi: {ORANGE}{COMMA}{BLACK} Hús: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Farþegar síðasta mánaðar: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Póstur síðasta mánaðar: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Nauðsynlegur farmur fyrir stækkun bæjarins: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} nauðsynlegt STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} nauðsynlegt á veturnar @@ -3077,18 +3075,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Miðja a STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Framleiðsla: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Iðnaðurinn hefur tilkynnt yfirvofandi lokun. -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Þarf: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Þarf: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Þarf: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Framleiðir: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Framleiðir: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Breyta framleiðslu (margfeldi af 8, allt að 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Breyta framleiðslumagni (prósentu hámark er 800%) @@ -3968,7 +3956,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Of marga STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Of margir hlutar af lestarstöðvum STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Of margar strætisvagnastöðvar STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Of margar vörubílastöðvar -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Of nálægt annarri stöð/lestunarsvæði STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Of nálægt annarri bryggju STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Of nálægt öðrum flugvelli STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Get ekki endurnefnt stöð... diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 54680619bc..0f7fe21256 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -10,7 +10,7 @@ ##grflangid 0x5a -# $Id: indonesian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -650,6 +650,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Tidak ada musik yang tersedia STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Track STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titel @@ -669,14 +670,13 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Pilih 'B STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Acak/Urut program STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Tampilkan jendela pemilihan judul musik -STR_ERROR_NO_SONGS :{WHITE}Set Musik tanpa lagu telah dipilih. Tidak ada lagu yang akan dimainkan. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Pilihan program Musik +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Program Musik - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Daftar rel STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Kosong +STR_PLAYLIST_CHANGE_SET :{BLACK}Gantikan set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Hapus program saat ini (hanya Bebas 1 atau Bebas 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klik pada musik track untuk menambah pada program sekarang (hanya Bebas 1 atau Bebas 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klik pada track musik untuk menghapusnya dari program saat ini. (Bebas 1 atau Bebas 2 saja) @@ -813,6 +813,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Pimpinan) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} menjadi sponsor pembangunan kota baru {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Kota baru yang bernama {TOWN} baru dibuatkan! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Ada pembangunan {STRING} baru di dekat {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}{STRING} baru sedang ditanam di dekat {TOWN}! @@ -898,7 +899,7 @@ STR_GAME_OPTIONS_CURRENCY_JPY :Yen Jepang (JPY STR_GAME_OPTIONS_CURRENCY_ATS :Shilling Austria (ATS) STR_GAME_OPTIONS_CURRENCY_BEF :Franc Belgia (BEF) STR_GAME_OPTIONS_CURRENCY_CHF :Franc Swiss (CHF) -STR_GAME_OPTIONS_CURRENCY_CZK :Koruna Czech (CZK) +STR_GAME_OPTIONS_CURRENCY_CZK :Koruna Ceko (CZK) STR_GAME_OPTIONS_CURRENCY_DEM :Deutschmark (DEM) STR_GAME_OPTIONS_CURRENCY_DKK :Krone Denmark (DKK) STR_GAME_OPTIONS_CURRENCY_ESP :Peseta Spanyol (ESP) @@ -912,7 +913,7 @@ STR_GAME_OPTIONS_CURRENCY_NLG :Dutch Guilder ( STR_GAME_OPTIONS_CURRENCY_NOK :Krone Norwegia (NOK) STR_GAME_OPTIONS_CURRENCY_PLN :Zloty Polandia (PLN) STR_GAME_OPTIONS_CURRENCY_RON :Leu Romania (RON) -STR_GAME_OPTIONS_CURRENCY_RUR :Rubles Rusia (RUR) +STR_GAME_OPTIONS_CURRENCY_RUR :Rubel Rusia (RUR) STR_GAME_OPTIONS_CURRENCY_SIT :Tolar Slovenia (SIT) STR_GAME_OPTIONS_CURRENCY_SEK :Krona Swedia (SEK) STR_GAME_OPTIONS_CURRENCY_TRY :Lira Turki (TRY) @@ -925,6 +926,7 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand Afrika Sel STR_GAME_OPTIONS_CURRENCY_CUSTOM :Atur sendiri... STR_GAME_OPTIONS_CURRENCY_GEL :Lari Georgia (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iran (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Rubel Rusia Baru (RUB) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Kendaraan jalan raya @@ -941,7 +943,7 @@ STR_GAME_OPTIONS_TOWN_NAME_FRENCH :Perancis STR_GAME_OPTIONS_TOWN_NAME_GERMAN :Jerman STR_GAME_OPTIONS_TOWN_NAME_ADDITIONAL_ENGLISH :Inggris (Tambahan) STR_GAME_OPTIONS_TOWN_NAME_LATIN_AMERICAN :Amerika-Latin -STR_GAME_OPTIONS_TOWN_NAME_SILLY :Silly +STR_GAME_OPTIONS_TOWN_NAME_SILLY :Lucu STR_GAME_OPTIONS_TOWN_NAME_SWEDISH :Swedia STR_GAME_OPTIONS_TOWN_NAME_DUTCH :Belanda STR_GAME_OPTIONS_TOWN_NAME_FINNISH :Finlandia @@ -951,7 +953,7 @@ STR_GAME_OPTIONS_TOWN_NAME_NORWEGIAN :Norwegia STR_GAME_OPTIONS_TOWN_NAME_HUNGARIAN :Hungaria STR_GAME_OPTIONS_TOWN_NAME_AUSTRIAN :Austria STR_GAME_OPTIONS_TOWN_NAME_ROMANIAN :Romania -STR_GAME_OPTIONS_TOWN_NAME_CZECH :Czechnya +STR_GAME_OPTIONS_TOWN_NAME_CZECH :Ceko STR_GAME_OPTIONS_TOWN_NAME_SWISS :Swiss STR_GAME_OPTIONS_TOWN_NAME_DANISH :Denmark STR_GAME_OPTIONS_TOWN_NAME_TURKISH :Turki @@ -1254,6 +1256,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Tidak di STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Pemeliharaan Infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Jika dinyalakan, infrastruktur membutuhkan biaya pemeliharaan. Biaya berkembang secara proporsional sesuai dengan ukuran jaringan, lebih berdampak pada perusahaan besar dari pada perusahaan kecil + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Bandara tidak kedaluarsa: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Menyalakan setelan ini membuat semua jenis bandara tetap ada selamanya sejak pendesainanya @@ -1337,8 +1340,10 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Warna daratan d STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Hijau STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Hijau Gelap STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Berbalik Arah: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Untuk menggeser peta berlawanan arah dengan klik kanan. Ketika dimatikan, mouse menggeser kamera. Ketika dinyalakan, mouse menggeser peta +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Kelakuan waktu menggerakkan peta +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Gerakan viewport memakai tombol kanan tetikus, posisi tetikus terkunci +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Gerakan peta memakai tombol kanan tetikus, posisi tetikus terkunci +STR_CONFIG_SETTING_SCROLLMODE_RMB :Gerakan peta memakai tombol kanan tetikus STR_CONFIG_SETTING_SMOOTH_SCROLLING :Pergeseran pandangan viewport secara halus: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Menyetel bagaimana tampilan utama menggeser posisi di peta kecil. Jika dinyalakan, peta akan bergeser secara halus. Jika dimatikan, peta langsung menuju tempat yang di klik STR_CONFIG_SETTING_MEASURE_TOOLTIP :Tampilkan ukuran ketika menggunakan alat pembangun: {STRING} @@ -1370,8 +1375,7 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Perintah-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Kontrol-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Non-aktifkan -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Geser dgn klik-kiri: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Aktifkan penggeseran peta dengan menyeret menggunakan tombol kiri mouse. Hal ini sangat berguna apabila menggunakan layar sentuh. +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Tutup jendela dengan klik kanan: {STRING} STR_CONFIG_SETTING_AUTOSAVE :Simpan otomatis: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Memilih jarak waktu antara menyimpan data game @@ -1806,7 +1810,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Ubah tah STR_CHEAT_SETUP_PROD :{LTBLUE}Aktifkan modifikasi nilai produksi: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Warna tema baru STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Tampilkan skema warna umum STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Tampilkan skema warna kereta @@ -1988,7 +1991,7 @@ STR_NETWORK_LANG_FRENCH :Perancis STR_NETWORK_LANG_BRAZILIAN :Brazil STR_NETWORK_LANG_BULGARIAN :Bulgaria STR_NETWORK_LANG_CHINESE :China -STR_NETWORK_LANG_CZECH :Czech +STR_NETWORK_LANG_CZECH :Ceko STR_NETWORK_LANG_DANISH :Denmark STR_NETWORK_LANG_DUTCH :Belanda STR_NETWORK_LANG_ESPERANTO :Esperanto @@ -2003,7 +2006,7 @@ STR_NETWORK_LANG_NORWEGIAN :Norwegia STR_NETWORK_LANG_POLISH :Polandia STR_NETWORK_LANG_PORTUGUESE :Portugis STR_NETWORK_LANG_ROMANIAN :Rumania -STR_NETWORK_LANG_RUSSIAN :Russia +STR_NETWORK_LANG_RUSSIAN :Rusia STR_NETWORK_LANG_SLOVAK :Slovakia STR_NETWORK_LANG_SLOVENIAN :Slovenia STR_NETWORK_LANG_SPANISH :Spanyol @@ -2282,6 +2285,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Semua STR_LINKGRAPH_LEGEND_NONE :{BLACK}Tidak ada STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Pilih perusahaan yang akan ditampilkan +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}tak terpakai @@ -2589,6 +2593,7 @@ STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Nama are STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Muatan diterima: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) +STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Tipe Rel: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Batasan kecepatan rel: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Batasan kecepatan jalan: {LTBLUE}{VELOCITY} @@ -2687,7 +2692,39 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Tanah milik Per STR_ABOUT_OPENTTD :{WHITE}Tentang OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Hak Cipta asli {COPYRIGHT} 1995 Chris Sawyer, Hak Cipta dilindungi STR_ABOUT_VERSION :{BLACK}OpenTTD versi {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Tim OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Tim OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Rata simulasi: {STRING} +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Beberapa cepat permainan lagi berjalan, dibanding dengan kecepatan diharapkan memakai rata simulasi biasa. +STR_FRAMERATE_CURRENT :{WHITE}Sekarang +STR_FRAMERATE_DATA_POINTS :{WHITE}Data tergantung oleh ukuran {COMMA} +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GL_ECONOMY :{WHITE} Penanganan kargo: +STR_FRAMERATE_GL_TRAINS :{WHITE} Titik kereta: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} Titik kendaraan: +STR_FRAMERATE_GL_SHIPS :{WHITE} Titik kapal: +STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Titik pesawat: +STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Titik dunia: +STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Viewport dunia: +STR_FRAMERATE_SOUND :{WHITE}Mixing suara: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_ECONOMY :Penanganan kargo +STR_FRAMETIME_CAPTION_GL_TRAINS :Titik kereta +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Titik kendaraan +STR_FRAMETIME_CAPTION_GL_SHIPS :Titik kapal +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Titik pesawat +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Titik dunia +STR_FRAMETIME_CAPTION_SOUND :Mixing suara +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Simpan Permainan @@ -2976,8 +3013,7 @@ STR_TOWN_POPULATION :{BLACK}Populasi STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Populasi: {ORANGE}{COMMA}{BLACK} Rumah: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Penumpang bulan lalu: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Surat bulan lalu: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} bulan lalu: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Kargo untuk pertumbuhan kota: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED} Butuh {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} dibutuhkan saat musim dingin @@ -3282,17 +3318,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Arahkan STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tingkat produksi: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industri akan segera ditutup! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Membutuhkan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Membutuhkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Membutuhkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends - -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Menghasilkan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Menghasilkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends +STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Membutuhkan: +STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} menunggu{STRING} STR_CONFIG_GAME_PRODUCTION :{WHITE}Perubahan produksi (kelipatan 8, hingga 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ubah tingkat produksi (dalam persen, hingga 800%) @@ -3356,6 +3384,10 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Jual semua STR_GROUP_RENAME_CAPTION :{BLACK}Ubah nama kelompok +STR_GROUP_PROFIT_THIS_YEAR :Keuntungan tahun ini: +STR_GROUP_PROFIT_LAST_YEAR :Keuntungan tahun lalu: +STR_GROUP_OCCUPANCY :Penggunaan sekarang: +STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Kereta Baru @@ -3363,7 +3395,7 @@ STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :Kereta listrik STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Monorel Baru STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Maglev Baru -STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Semua Kereta +STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Kereta Baru STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Kendaraan Baru STR_BUY_VEHICLE_SHIP_CAPTION :Kapal Baru STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Buat Pesawat @@ -3388,6 +3420,7 @@ STR_PURCHASE_INFO_ALL_TYPES :Semua jenis kar STR_PURCHASE_INFO_ALL_BUT :Semua tapi tidak untuk {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Traksi Maks.: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Jangkauan: {GOLD}{COMMA} kotak +STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK}Jenis pesawat: {GOLD}{STRING} STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Daftar pilihan kereta - klik pada kereta untuk menampilkan informasi STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Daftar pilihan kendaraan - klik pada kendaraan untuk menampilkan informasi @@ -3522,6 +3555,10 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :lokomotif magle STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Biaya: {CURRENCY_LONG} Berat: {WEIGHT_SHORT}{}Kecepatan: {VELOCITY} Daya: {POWER}{}Biaya ops.: {CURRENCY_LONG}/thn{}Kapasitas: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Biaya: {CURRENCY_LONG} Berat: {WEIGHT_SHORT}{}Kecepatan: {VELOCITY} Power: {POWER} Max. T.E.: {6:FORCE}{}Biaya Operasional: {4:CURRENCY_LONG}/yr{}Kapasitas: {5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Biaya: {CURRENCY_LONG} Kec. Max: {VELOCITY}{}Kapasitas: {CARGO_LONG}{}Bea Berjalan: {CURRENCY_LONG}/thn +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :{BLACK}Biaya: {CURRENCY_LONG} Kec. Max.: {VELOCITY}{}Jenis pesawat: {STRING}{}Kapasitas: {CARGO_LONG}, {CARGO_LONG}{}Biaya operasi: {CURRENCY_LONG}/thn +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Biaya: {CURRENCY_LONG} Kec. Max.: {VELOCITY}{}Jenis pesawat: {STRING}{}Kapasitas: {CARGO_LONG}{}Biaya operasi: {CURRENCY_LONG}/thn +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}Biaya: {CURRENCY_LONG} Kec. Max.: {VELOCITY}{}Jenis pesawat: {STRING} Jangkauan: {COMMA} ubin{}Kapasitas: {CARGO_LONG}, {CARGO_LONG}{}Biaya Operasi: {CURRENCY_LONG}/thn +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Biaya: {CURRENCY_LONG} Kec. Max.: {VELOCITY}{}Jenis pesawat: {STRING} Jangkauan: {COMMA} ubin{}Kapasitas: {CARGO_LONG}{}Biaya operasi: {CURRENCY_LONG}/thn # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Ganti {STRING} - {STRING} @@ -3551,6 +3588,7 @@ STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Tekan un STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Pindah tampilan penggantian lokomitif atau gerbong STR_REPLACE_ENGINES :Lokomotif STR_REPLACE_WAGONS :Gerbong +STR_REPLACE_ALL_RAILTYPE :Semua kereta STR_REPLACE_HELP_RAILTYPE :{BLACK}Pilih jenis kereta yang anda inginkan untuk diganti STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Menampilkan kendaraan terpilih di sisi kiri yang akan diganti, jika ada @@ -3643,6 +3681,8 @@ STR_VEHICLE_INFO_AGE :{COMMA} tahun ( STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} tahun ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Kec. Max: {LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Kecepatan Maks.: {LTBLUE}{VELOCITY} {BLACK}Jenis pesawat: {LTBLUE}{STRING} +STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE :{BLACK}Kec. max.: {LTBLUE}{VELOCITY} {BLACK}Jenis pesawat: {LTBLUE}{STRING} {BLACK}Jangkauan: {LTBLUE}{COMMA} ubin STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Berat: {LTBLUE}{WEIGHT_SHORT} {BLACK}Tenaga: {LTBLUE}{POWER}{BLACK} Kec. Max: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Berat: {LTBLUE}{WEIGHT_SHORT} {BLACK}Tenaga: {LTBLUE}{POWER}{BLACK} Kec. Max: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE} @@ -4201,7 +4241,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Terlalu STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Terlalu banyak bag. stasiun STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Terlalu banyak pemberhentian Bus STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Terlalu banyak terminal truk -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Terlalu dekat dengan stasiun/area bongkar muat lainnya STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Terlalu dekat dengan dok/galangan kapal lainnya STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Terlalu dekat dengan bandara lainnya STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Tidak dapat mengganti nama stasiun... @@ -4209,6 +4248,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... jala STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... menghadap pada arah yang salah STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... terminal lintas-lalu tak bisa memiliki sudut STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... terminal lintas-lalu tak bisa memiliki simpangan +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... jalannya satu arah atau terhalang # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Tidak dapat menghapus bagian dari stasiun... @@ -4277,7 +4317,7 @@ STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION :{WHITE}Kombinas STR_ERROR_MUST_REMOVE_SIGNALS_FIRST :{WHITE}Sinyal harus dihancurkan dulu STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Tidak tersedia rel yang sesuai STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Harus membongkar rel terlebih dahulu -STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Jalan satu arah atau ada yang menghalangi +STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Jalannya satu arah atau terhalang STR_ERROR_CROSSING_DISALLOWED :{WHITE}Perlintasan tingkat tidak diperbolehkan pada tipe rel ini STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Tidak dapat membangun sinyal disini STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Tidak dapat membangun jalur rel disini @@ -4460,6 +4500,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Efek suara oris STR_BASESOUNDS_WIN_DESCRIPTION :Efek suara orisinil Transport Tycoon Deluxe versi Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Paket efek suara tanpa suara apapun. STR_BASEMUSIC_WIN_DESCRIPTION :Musik pengiring orisinil Transport Tycoon Deluxe versi Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Musik orisinil Transport Tycoon Deluxe versi DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Musik orisinil Transport Tycoon (Orisinil/Editor Dunia) versi DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Paket musik tanpa musik sungguhan. ##id 0x2000 diff --git a/src/lang/irish.txt b/src/lang/irish.txt index 729319b989..55ab4ec654 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -10,7 +10,7 @@ ##grflangid 0x08 -# $Id: irish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,10 +669,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Roghnaig STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Scoránaigh ord randamach clár air/as STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Taispeáin an fhuinneogh chun rianta ceoil a roghnú -STR_ERROR_NO_SONGS :{WHITE}Roghnaíodh sraith ceoil gan aon amhrán ann. Ní sheinnfear aon amhrán - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Clár Ceoil a Roghnú STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Innéacs na Rianta STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Clár - '{STRING}' @@ -1254,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ní féi STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Cothabháil bonneagair: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Má tá sé cumasaithe, bíonn costais chothabhála ar bhonneagar. Méadaíonn an costas níos tapúla ná méid an líonra, rad a fhágann go mbíonn tionchar níos mó aige ar chuideachtaí móra ná ar chuideachtaí beaga + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Ní imíonn aerfoirt as dáta riamh: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Má dhéantar an socrú seo a chumasú beidh gach cineál aerfoirt ar fáil go deo tar éis é a thabhairt isteach @@ -1337,8 +1335,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Dath an tír-ra STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Uaine STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Ciaruaine STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Corcairghorm -STR_CONFIG_SETTING_REVERSE_SCROLLING :Aisiompaigh an treo scrollaithe: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :An méid a tharlaíonn agus an léarscáil á scrollú leis an gcnaipe luchóige deas. Má bhíonn sé díchumasaithe, bogann an luchóg leis an gceamara. Má bhíonn sé cumasaithe, bogann an luchóg an léarscáil STR_CONFIG_SETTING_SMOOTH_SCROLLING :Scrollú mín do na fuinneoga amhairc: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Roghnaigh an chaoi a scrollóidh an príomhamharc chuig suíomh ar leith má chliceálann tú ar an léarscáil bheag nó má thugann tú ordú scrollú chuig oibiacht ar leith ar an léarscáil. Má tá sé cumasaithe, scrollóidh an fhuinneog amhairc go mín, má tá sé díchumasaithe léimfidh sé go díreach chuig an suíomh sin. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Taispeáin leid uirlise tomhais agu uirlisí tógála áirithe in úsáid: {STRING} @@ -1370,8 +1366,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Ordú+Cliceáil STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Cliceáil STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :As -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Scrollú le cléchliceáil: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Cumasaigh scrollú an léarscáil trí bheith ag tarraingt le cnaipe clé na luiche. Tá sé seo thar a bheith úsáideach don scrollú nuair atá scáileán tadhaill á úsáid STR_CONFIG_SETTING_AUTOSAVE :Uathshábháil: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Roghnaigh an t-eatramh idir uathshábhálacha cluichí @@ -1806,7 +1800,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Athraigh STR_CHEAT_SETUP_PROD :{LTBLUE}Cumasaigh luachanna táirgeachta a athrú: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Scéim Dathanna Nua STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Taispeáin scéimeanna dathanna ginearálta STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Taispeáin scéimeanna dathanna na dtraenacha @@ -2687,7 +2680,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Talamh faoi úi STR_ABOUT_OPENTTD :{WHITE}Maidir le OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Cóipcheart bunaidh {COPYRIGHT} 1995 Chris Sawyer, Gach ceart ar cosaint STR_ABOUT_VERSION :{BLACK}OpenTTD leagan {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 An fhoireann OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 An fhoireann OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Sábháil an Cluiche @@ -2980,8 +2980,6 @@ STR_TOWN_POPULATION :{BLACK}Daonra d STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Cathair) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Daonra: {ORANGE}{COMMA}{BLACK} Tithe: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Paisinéirí an mhí seo caite: {ORANGE}{COMMA}{BLACK} Uasmhéid: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post an mhí seo caite: {ORANGE}{COMMA}{BLACK} uasmhéid: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Lastas atá ag teastáil le go bhfásfaidh an baile: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} ag teastáil STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} ag teastáil sa Gheimhreadh @@ -3286,18 +3284,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Láraigh STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Leibhéal táirgeachta: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}D'fhógair an tionscal go ndúnfaidh sé gan mhoill! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Teastaíonn: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Teastaíonn: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Teastaíonn: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Táirgtear: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Táirgtear: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Athraigh táirgeacht (iolra de 8, suas go 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Athraigh an ráta táirgeachta (céatadán, suas go 800%) @@ -4205,7 +4193,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}An iomar STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}An iomarca codanna stáisiún iarnróid STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}An iomarca stadanna bus STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}An iomarca stáisiúin leoraithe -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Roghearr do stáisiún/limistéar lódála eile STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Roghearr do dug eile STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Roghearr d'aerfort eile STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Ní féidir an stáisiún a athainmniú... diff --git a/src/lang/italian.txt b/src/lang/italian.txt index 7a5bfaa0bf..81486a91bc 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -12,7 +12,7 @@ ##case ms mp fs fp -# $Id: italian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -191,6 +191,7 @@ STR_COLOUR_ORANGE :Arancio STR_COLOUR_BROWN :Marrone STR_COLOUR_GREY :Grigio STR_COLOUR_WHITE :Bianco +STR_COLOUR_RANDOM :Casuale # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -477,6 +478,7 @@ STR_ABOUT_MENU_SCREENSHOT :Screenshot STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Screenshot con zoom massimo STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Screenshot con zoom predefinito STR_ABOUT_MENU_GIANT_SCREENSHOT :Screenshot intera mappa +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostra frame rate STR_ABOUT_MENU_ABOUT_OPENTTD :Informazioni su 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Strumento allineamento sprite STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Attiva/disattiva bounding box @@ -652,6 +654,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Musica non disponibile STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Brano STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titolo @@ -671,15 +674,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Selezion STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Attiva/disattiva la riproduzione in ordine casuale STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Mostra la finestra di selezione dei brani musicali -STR_ERROR_NO_SONGS :{WHITE}È stato selezionato un pacchetto musicale senza brani. Non sarà possibile avviare la musica. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Selezione programma musicale +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programma musicale - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Indice brani STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programma - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Elimina +STR_PLAYLIST_CHANGE_SET :{BLACK}Cambia pacchetto STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Elimina il programma corrente (solo Personale1 e Personale2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Seleziona un altro pacchetto musicale installato STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Fare clic su un brano per aggiungerlo al programma corrente (solo Personale1 o Personale2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Fare clic su un brano per rimuoverlo dal programma corrente (solo Personale1 o Personale2) @@ -815,6 +818,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Presidente) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}La {STRING} finanzia la costruzione della nuova cittadina di {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}È stata fondata una nuova città chiamata {TOWN}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Nuov{G o o a} {STRING} in costruzione vicino a {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nuov{G 0 o o a} {STRING} piantat{G 0 o o a} vicino a {TOWN}! @@ -882,9 +886,9 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Mini visuale {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copia nella mini visuale +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Cambia mini visuale STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copia la posizione della visuale principale in questa mini visuale -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Copia dalla mini visuale +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Cambia vis. principale STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copia la posizione di questa mini visuale nella visuale principale # Game options window @@ -927,6 +931,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand sudafrican STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personalizzata... STR_GAME_OPTIONS_CURRENCY_GEL :Lari georgiano (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial iraniano (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nuovo rublo russo (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso messicano (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Automezzi @@ -1278,6 +1284,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non è p STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manutenzione infrastrutture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Se abilitata, le infrastrutture causano dei costi di manutenzione. I costi crescono in modo più che proporzionale alla dimensione della rete, influenzando maggiormente le compagnie più grandi rispetto alle piccole +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Colore iniziale compagnia: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Sceglie il colore iniziale della compagnia + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Non rendere mai obsoleti i tipi di aeroporto: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Abilitando questa impostazione, tutti i tipi di aeroporto rimangono disponibili indefinitamente dopo essere stati introdotti @@ -1361,8 +1370,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Colore del terr STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde scuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Viola -STR_CONFIG_SETTING_REVERSE_SCROLLING :Inverti direzione di scorrimento della mappa: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Comportamento dello scorrimento della mappa con il tasto destro del mouse. Se disabilitata, il mouse muove l'inquadratura. Se abilitata, il mouse muove la mappa +STR_CONFIG_SETTING_SCROLLMODE :Scorrimento delle visuali: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportamento dello scorrimento della mappa +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Muovi visuale col pulsante destro, puntatore bloccato +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Muovi mappa col pulsante destro, puntatore bloccato +STR_CONFIG_SETTING_SCROLLMODE_RMB :Muovi mappa col pulsante destro +STR_CONFIG_SETTING_SCROLLMODE_LMB :Muovi mappa col pulsante sinistro STR_CONFIG_SETTING_SMOOTH_SCROLLING :Scorrimento morbido delle visuali: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controlla il modo in cui la visuale principale scorre verso una specifica posizione quando si fa clic sulla minimappa o si ordina di visualizzare un oggetto specifico sulla mappa. Se abilitata, la visuale scorre in modo morbido. Se disabilitata, salta direttamente al punto prescelto STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostra un tooltip di misura durante la costruzione: {STRING} @@ -1394,8 +1407,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :COMANDO+clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :CTRL+clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Nessuna -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Scorrimento con clic sinistro: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Abilita lo scorrimento della mappa trascinandola con il pulsante sinistro del mouse. Questa impostazione è utile quando si utilizza un touch-screen STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Chiudi finestra con clic destro: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Consente di chiudere una finestra facendo clic col pulsante destro al suo interno. Disabilita i suggerimenti attivati al clic col pulsante destro! @@ -1833,7 +1844,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Cambia l STR_CHEAT_SETUP_PROD :{LTBLUE}Permetti la modifica dei valori di produzione: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nuovo schema colori STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Mostra gli schemi di colorazione generali STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Mostra gli schemi di colorazione dei treni @@ -2311,6 +2321,7 @@ STR_LINKGRAPH_LEGEND_NONE :{BLACK}Nessuno STR_LINKGRAPH_LEGEND_NONE.ms :{BLACK}Nessuno STR_LINKGRAPH_LEGEND_NONE.fs :{BLACK}Nessuna STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Seleziona le compagnie da mostrare +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}inutilizzata @@ -2721,7 +2732,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terreno possedu STR_ABOUT_OPENTTD :{WHITE}Informazioni su OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright originale {COPYRIGHT} 1995 Chris Sawyer, Tutti i diritti riservati STR_ABOUT_VERSION :{BLACK}OpenTTD versione {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Il team OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Il team OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Frame rate +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Velocità simulazione: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Numero di cicli di simulazione della partita in un secondo +STR_FRAMERATE_RATE_BLITTER :{BLACK}Frame rate grafica: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Numero di fotogrammi video renderizzati in un secondo +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Fattore di velocità corrente della partita: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Prestazioni correnti della partita, confrontate con le prestazioni attese alla velocità di giorno normale. +STR_FRAMERATE_CURRENT :{WHITE}Corrente +STR_FRAMERATE_AVERAGE :{WHITE}Media +STR_FRAMERATE_DATA_POINTS :{BLACK}Dati basati su {COMMA} misurazioni +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} frame/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} frame/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} frame/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Totale ciclo simulazione: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Gestione carichi: +STR_FRAMERATE_GL_TRAINS :{BLACK} Aggiornamento treni: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Aggiornamento automezzi: +STR_FRAMERATE_GL_SHIPS :{BLACK} Aggiornamento navi: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Aggiornamento aeromobili: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Aggiornamento mondo: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Ritardo grafo di distribuzione: +STR_FRAMERATE_DRAWING :{BLACK}Renderizzazione grafica: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Visuali mondo: +STR_FRAMERATE_VIDEO :{BLACK}Output video: +STR_FRAMERATE_SOUND :{BLACK}Missaggio suoni: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Ciclo simulazione +STR_FRAMETIME_CAPTION_GL_ECONOMY :Gestione carichi +STR_FRAMETIME_CAPTION_GL_TRAINS :Aggiornamento treni +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Aggiornamento automezzi +STR_FRAMETIME_CAPTION_GL_SHIPS :Aggiornamento navi +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Aggiornamento aeromobili +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Aggiornamento mondo +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Ritardo grafo di distribuzione +STR_FRAMETIME_CAPTION_DRAWING :Renderizzazione grafica +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderizzazione visuali mondo +STR_FRAMETIME_CAPTION_VIDEO :Output video +STR_FRAMETIME_CAPTION_SOUND :Missaggio suoni +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Salva partita @@ -2745,6 +2806,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Dettagli STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Informazioni non disponibili STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtro: STR_SAVELOAD_OSKTITLE :{BLACK}Inserire un nome per il salvataggio @@ -2862,7 +2924,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versione STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Versione minima compatibile: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}Somma MD5: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Tavolozza: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Predefinita (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Predefinita (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Legacy (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Legacy (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parametri: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Nessuno STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Informazioni non disponibili STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}File corrispondente non trovato @@ -2943,6 +3010,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Lettura oltre l STR_NEWGRF_ERROR_GRM_FAILED :Risorsa GRF richiesta non disponibile (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} è stato disabilitato da {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Formato di layout dello sprite sconosciuto o non valido (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Troppi elementi nella lista valori di una proprietà (sprite {3:NUM}, proprietà {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Callback di produzione industria non valido (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Attenzione! @@ -3007,6 +3076,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Inserire STR_TOWN_DIRECTORY_CAPTION :{WHITE}Città STR_TOWN_DIRECTORY_NONE :{ORANGE}- Nessuna - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Metropoli){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nomi delle città - fare clic su un nome per centrare la visuale principale sulla città. CTRL+clic la mostra in una mini visuale. STR_TOWN_POPULATION :{BLACK}Popolazione mondiale: {COMMA} @@ -3014,8 +3084,7 @@ STR_TOWN_POPULATION :{BLACK}Popolazi STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Metropoli) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Popolazione: {ORANGE}{COMMA}{BLACK} Case: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passeggeri il mese scorso: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Posta il mese scorso: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} il mese scorso: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Carichi richiesti per la crescita della città: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} richiest{G 0 o o a} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} richiest{G 0 o o a} in inverno @@ -3320,21 +3389,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra l STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Livello di produzione: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}L'industria ha annunciato che a breve chiuderà! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Richiede: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} in attesa{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambia produzione (multiplo di 8, fino a 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambia livello di produzione (percentuale, fino a 800%) @@ -3430,6 +3492,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacit STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Vagoni motorizzati: {GOLD}+{POWER}{BLACK} Peso: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Riadattabile per: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Tutti i tipi di carico +STR_PURCHASE_INFO_NONE :Niente STR_PURCHASE_INFO_ALL_BUT :Tutto tranne {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Sforzo di trazione massimo: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Autonomia: {GOLD}{COMMA} riquadr{P o i} @@ -3829,6 +3892,7 @@ STR_ORDER_CONDITIONAL_AGE :Età (anni) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Manutenzione richiesta STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Sempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Vita rimanente (anni) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Affidabilità massima STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Modalità di confronto del dato del veicolo con il valore inserito STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :è uguale a @@ -4254,7 +4318,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Troppe s STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Stazione composta da troppe parti STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Troppe stazioni degli autobus STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Troppe aree di carico per camion -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Troppo vicino ad un'altra stazione/area di carico STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Troppo vicino ad un altro molo STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Troppo vicino ad un altro aeroporto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Impossibile rinominare la stazione... @@ -4262,6 +4325,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ques STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... strada rivolta nella direzione sbagliata STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... le fermate passanti non possono trovarsi in curva STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... le fermate passanti non possono avere raccordi +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la strada è bloccata o a senso unico # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Impossibile rimuovere parte della stazione... @@ -4513,6 +4577,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Suoni originali STR_BASESOUNDS_WIN_DESCRIPTION :Suoni originali di Transport Tycoon Deluxe, edizione Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Un pacchetto sonoro non contenente alcun suono. STR_BASEMUSIC_WIN_DESCRIPTION :Musica originale di Transport Tycoon Deluxe, edizione Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Musica originale di Transport Tycoon Deluxe, edizione DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Musica originale di Transport Tycoon (edizione Original/World). STR_BASEMUSIC_NONE_DESCRIPTION :Un pacchetto musicale non contenente alcuna musica. ##id 0x2000 diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index c2bfbddd38..9aed8efccf 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -10,7 +10,7 @@ ##grflangid 0x39 -# $Id: japanese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,10 +669,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}プレ STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}プレイリストのシャッフルの有効/無効を切り替えます STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}曲選択のウィンドウを表示します -STR_ERROR_NO_SONGS :{WHITE}選択した音楽セットに曲がありません - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}プレイリストの選択 STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}楽曲索引 STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}プレイリスト - '{STRING}' @@ -1254,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}この STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :インフラ補修: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :有効にすると、インフラ設備にも維持費が発生するようになります。維持費はネットワークのサイズに非線形で比例する為、小さい会社よりも大きい会社の方が影響が大きくなります + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :空港の旧式化撤廃: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :有効にすると、いずれの種類の空港であっても、その開発後であれば永久に建設が可能になります @@ -1337,8 +1335,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :ミニマップ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :緑 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :濃緑 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :青紫 -STR_CONFIG_SETTING_REVERSE_SCROLLING :スクロール方面を反転: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :マウス右ボタンで地図をスクロールする時の挙動を設定します。無効にした場合はマウスはカメラを動かします(マウスの移動方向に移動します)。有効にした場合は地図を動かします(マウスの移動方向と逆に移動します) STR_CONFIG_SETTING_SMOOTH_SCROLLING :画面のスムーズスクロール: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :ミニマップでの移動や「現在位置に移動」などのコマンドを使用した際にメイン画面がどのように移動するかを設定します。有効にした場合はスムーズにスクロールして移動します。無効の場合は目的地に直接ジャンプします STR_CONFIG_SETTING_MEASURE_TOOLTIP :測定ツールチップ表示: {STRING} @@ -1370,8 +1366,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :コマンド+ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+クリック (Win) STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :切 -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :左ドラッグスクロール: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :有効にすると左ドラッグでマップのスクロールができるようになります。特にタッチスクリーンを利用しているときに便利です STR_CONFIG_SETTING_AUTOSAVE :オートセーブ: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :オートセーブの間隔を設定します @@ -1806,7 +1800,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}現在 STR_CHEAT_SETUP_PROD :{LTBLUE}生産量変更: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}コーポレートカラー STR_LIVERY_GENERAL_TOOLTIP :{BLACK}通常のコーポレートカラー(車両塗装色)を表示します STR_LIVERY_TRAIN_TOOLTIP :{BLACK}列車の塗装色を表示します @@ -2688,7 +2681,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :社有地 STR_ABOUT_OPENTTD :{WHITE}OpenTTDについて STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}オリジナル版権{COPYRIGHT} 1995 Chris Sawyer All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD バージョン {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}ゲームを保存 @@ -2981,8 +2981,6 @@ STR_TOWN_POPULATION :{BLACK}地域 STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN}(市) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}人口: {ORANGE}{COMMA}人{BLACK} 建物: {ORANGE}{COMMA}戸 -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}旅客数(先月): {ORANGE}{COMMA}人{BLACK} 最大: {ORANGE}{COMMA}人 -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}郵便袋(先月): {ORANGE}{COMMA}袋{BLACK} 最大: {ORANGE}{COMMA}袋 STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}街の成長に必要な物資: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}が{RED}必要です STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}が{BLACK}冬に必要です @@ -3287,19 +3285,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}メイ STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生産量: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}この産業拠点は間もなく閉鎖されます! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING}と{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING}、{STRING}{STRING}、{STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES : {BLACK}必要物資: -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}生産品: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}生産品: {YELLOW}{STRING}{STRING}、{STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}生産量を変更 (8の倍数、最大2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}生産量を変更 (%表記、最大800%) @@ -4208,7 +4196,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}停留 STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}駅の部分が多すぎます STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}バス停が多すぎます STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}荷役所が多すぎます -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}他の停留施設に近すぎます STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}他の埠頭に近すぎます STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}他の空港に近すぎます STR_ERROR_CAN_T_RENAME_STATION :{WHITE}駅名を変更できません diff --git a/src/lang/korean.txt b/src/lang/korean.txt index a35f1edc8d..d4bb70baa6 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -11,7 +11,7 @@ ##gender m f -# $Id: korean.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -190,6 +190,8 @@ STR_COLOUR_ORANGE :주황 STR_COLOUR_BROWN :갈색 STR_COLOUR_GREY :회색 STR_COLOUR_WHITE :흰색 +STR_COLOUR_RANDOM :무작위 +STR_COLOUR_DEFAULT :기본 # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -476,6 +478,7 @@ STR_ABOUT_MENU_SCREENSHOT :스크린샷 STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :스크린샷 찍기 (지금 보고 있는 영역) STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :스크린샷 찍기 (창을 제외한 게임 화면만) STR_ABOUT_MENU_GIANT_SCREENSHOT :스크린샷 찍기 (지도 전체) +STR_ABOUT_MENU_SHOW_FRAMERATE :프레임레이트 보기 STR_ABOUT_MENU_ABOUT_OPENTTD :'OpenTTD'에 대해서 STR_ABOUT_MENU_SPRITE_ALIGNER :스프라이트 정렬도구 STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :박스 경계선 보기 전환 @@ -651,6 +654,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}사용 가능한 음악 없음 STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}트랙 STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}제목 @@ -670,15 +674,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}'사용 STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}프로그램을 무작위 재생합니다. STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}배경 음악 트랙을 선택할 수 있는 창을 엽니다. -STR_ERROR_NO_SONGS :{WHITE}선택된 배경 음악 목록에 노래가 없습니다. 배경 음악이 재생 되지 않을 것입니다. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}배경 음악 프로그램 선택 +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}음악 프로그램 - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}음악 목록 STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}프로그램 - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}초기화 +STR_PLAYLIST_CHANGE_SET :{BLACK}세트 변경 STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}현재 배경 음악 프로그램을 초기화합니다. (사용자1, 사용자2에서만 선택 가능) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}배경 음악 세트를 이미 설치된 다른 세트로 변경합니다. STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}배경 음악 목록에 음악을 추가하려면 클릭하세요. (사용자1, 사용자2에서만 사용 가능) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}배경 음악 목록에서 음악을 제거하려면 클릭하세요. (사용자1, 사용자2에서만 사용 가능) @@ -814,6 +818,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(사장) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING}은(는) 새로운 도시 {TOWN}을(를) 건설했습니다! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}{TOWN} - 새 도시가 생겼습니다! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}{1:TOWN} 근처에 새로운 {0:STRING}{G 0 "이" "가"} 건설되고 있습니다! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}새 {STRING}{G 0 "이" "가"} {TOWN} 근처에서 자라나고 있습니다! @@ -881,7 +886,7 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}외부 화면 {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}외부 화면에 복사 +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}외부 화면으로 복사 STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}현재 장소를 외부 화면에 복사합니다. STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}이 장소로 이동 STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}외부 화면에 저장된 장소로 이동합니다. @@ -926,6 +931,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :남아프리카 STR_GAME_OPTIONS_CURRENCY_CUSTOM :사용자 설정... STR_GAME_OPTIONS_CURRENCY_GEL :그루지야 라리 (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :이란 리알 (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :신 러시아 루블 (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :멕시코 페소 (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}차량 통행 방식 @@ -1003,7 +1010,7 @@ STR_GAME_OPTIONS_BASE_MUSIC_STATUS :{RED}{NUM}개 STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}기본 배경 음악 세트에 대한 추가 정보를 봅니다. STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}지원되는 해상도 목록을 불러오는데 실패하였습니다. -STR_ERROR_FULLSCREEN_FAILED :{WHITE}풀스크린 모드 실패 +STR_ERROR_FULLSCREEN_FAILED :{WHITE}전체화면 모드 실패 # Custom currency window @@ -1161,7 +1168,7 @@ STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT :이 설정을 STR_CONFIG_SETTING_DISASTERS :재앙: {STRING} STR_CONFIG_SETTING_DISASTERS_HELPTEXT :일정 구역이나 차량, 기반시설을 간혹 파괴할 수도 있는 재앙을 켜거나 끕니다. STR_CONFIG_SETTING_CITY_APPROVAL :지역 개발에 대한 도시의 태도: {STRING} -STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :회사가 유발하는 소음과 환경 파괴가 회사에 대한 도시의 평가치와 향후 해당 지역에서의 건설 행동에 얼마나 영향을 미칠지 선택하십시오. +STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :회사가 유발하는 소음과 환경 파괴가 회사에 대한 도시의 평가치와 향후 해당 지역에서 건설하는 행동에 얼마나 영향을 미칠지 선택하십시오. STR_CONFIG_SETTING_MAX_HEIGHTLEVEL :최대 지형 높이: {STRING} STR_CONFIG_SETTING_MAX_HEIGHTLEVEL_HELPTEXT :지도에 생성되는 산이 가질 수 있는 최대 높이를 설정합니다. @@ -1255,6 +1262,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}이미 STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :기반시설 유지비: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :이 설정을 켜면, 기반시설 유지비가 발생합니다. 유지비는 교통망의 규모에 비례하며 대형 회사는 소형 회사보다 많은 유지비가 들어갑니다. +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :시작시 회사 색상: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :새 회사에서 사용할 색상을 선택하세요. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :옛날 공항을 사라지지 않고 계속 만들 수 있게 함: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :이 설정을 켜면, 소형 공항을 포함한 모든 공항 종류를 도입 이후에 계속 사용할 수 있게 됩니다. @@ -1265,7 +1275,7 @@ STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT :이 설정을 STR_CONFIG_SETTING_ORDER_REVIEW_OFF :검사하지 않음 STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :정지한 차량을 제외하고 검사 STR_CONFIG_SETTING_ORDER_REVIEW_ON :모든 차량을 검사 -STR_CONFIG_SETTING_WARN_INCOME_LESS :차량의 수입이 적자일때 경고하기: {STRING} +STR_CONFIG_SETTING_WARN_INCOME_LESS :차량의 수입이 적자일 때 경고하기: {STRING} STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :이 설정을 켜면, 지난 해에 수익이 없는 차량이 있으면 뉴스 메시지로 알려줍니다. STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :옛날 차량을 사라지지 않고 계속 만들 수 있게 함: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :이 설정을 켜면, 오래된 차량 모델을 포함하여 모든 차량 모델을 도입 이후에 계속 사용할 수 있게 됩니다. @@ -1338,8 +1348,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :소형지도 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :녹색 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :어두운 녹색 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :보라색 -STR_CONFIG_SETTING_REVERSE_SCROLLING :스크롤 방향 뒤집기: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :마우스 오른쪽 클릭으로 지도를 스크롤하는 방법을 선택합니다. 이 설정을을 끄면, 마우스 방향과 화면의 스크롤 방향이 같아집니다. 설정을 켜면, 마우스 방향과 화면의 스크롤 방향이 반대가 됩니다. +STR_CONFIG_SETTING_SCROLLMODE :외부 화면 스크롤 행동: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :지도를 스크롤 할 때의 행동을 선택합니다. +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :마우스 오른쪽 클릭으로 외부 화면 이동 (마우스 위치는 고정) +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :마우스 오른쪽 클릭으로 지도 이동 (마우스 위치는 고정) +STR_CONFIG_SETTING_SCROLLMODE_RMB :마우스 오른쪽 클릭으로 지도 이동 +STR_CONFIG_SETTING_SCROLLMODE_LMB :마우스 왼쪽 클릭으로 지도 이동 STR_CONFIG_SETTING_SMOOTH_SCROLLING :게임 화면을 이동시킬 때 부드럽게 이동: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :소형 지도를 클릭하여 특정 지역으로 스크롤되거나 지도 상의 특정 장소로 이동하는 경우에 주 화면이 어떻게 스크롤 되는지를 설정합니다. 이 설정을 켜면, 화면이 목표 지점까지 부드럽게 이동하고, 설정을 끄면 목표 지점으로 곧바로 넘어가게 됩니다. STR_CONFIG_SETTING_MEASURE_TOOLTIP :건설도구 사용시 거리 도움말 표시: {STRING} @@ -1352,7 +1366,7 @@ STR_CONFIG_SETTING_LIVERIES_ALL :모든 회사 STR_CONFIG_SETTING_PREFER_TEAMCHAT :엔터(ENTER) 키로 같은 팀끼리 채팅: {STRING} STR_CONFIG_SETTING_PREFER_TEAMCHAT_HELPTEXT :이 설정을 켜면, 멀티 플레이시 같은 회사 간의 채팅을 키 대신 키로 할 수 있게 됩니다. STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING :마우스 휠 동작: {STRING} -STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT :상하좌우로 회전 가능한 마우스 휠(2차원 마우스휠)로 지도를 스크롤할 수 있게 허용합니다. +STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT :상하좌우로 회전 가능한 마우스 휠(2차원 마우스 휠)로 지도를 스크롤할 수 있게 허용합니다. STR_CONFIG_SETTING_SCROLLWHEEL_ZOOM :화면 확대/축소 STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL :지도 스크롤 STR_CONFIG_SETTING_SCROLLWHEEL_OFF :끄기 @@ -1371,8 +1385,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :커맨드 + 클 STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :CTRL + 클릭 STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :끄기 -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :마우스 왼쪽 버튼으로 스크롤: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :왼쪽 마우스 버튼을 드래그하여 지도를 스크롤 할 수 있도록 합니다. 터치 스크린 환경에서 이 설정을 켜면 매우 유용합니다. STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :오른쪽 클릭으로 창 닫기: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :창 내부를 오른쪽 클릭하여 창을 닫습니다. 오른쪽 클릭으로 도움말 표시 설정을 해제해야 합니다! @@ -1810,7 +1822,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}현재 STR_CHEAT_SETUP_PROD :{LTBLUE}1차 산업시설 생산량 조절 허용: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}새 색상 +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - 색상 STR_LIVERY_GENERAL_TOOLTIP :{BLACK}기본 색상 선택 STR_LIVERY_TRAIN_TOOLTIP :{BLACK}열차 색상 선택 @@ -2286,6 +2298,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}화물 STR_LINKGRAPH_LEGEND_ALL :{BLACK}모두 STR_LINKGRAPH_LEGEND_NONE :{BLACK}없음 STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}표시할 회사를 선택하십시오 +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}이용 없음 @@ -2692,7 +2705,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :회사 소유 STR_ABOUT_OPENTTD :{WHITE}OpenTTD에 대해서 STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD 버전 {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD 개발팀 +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD 개발팀 + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}프레임레이트 +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}시뮬레이션 비율: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}1초에 시뮬레이션하는 게임 틱 수입니다. +STR_FRAMERATE_RATE_BLITTER :{BLACK}그래픽 프레임레이트: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}1초에 표현하는 비디오 프레임 수입니다. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}현재 게임 속력 계수: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}현재 게임이 일반적인 시뮬레이션 비율 속도에 비해 얼마나 빠르게 구동되고 있는지를 보여줍니다. +STR_FRAMERATE_CURRENT :{WHITE}현재 +STR_FRAMERATE_AVERAGE :{WHITE}평균 +STR_FRAMERATE_DATA_POINTS :{BLACK}{COMMA}개의 값을 기반으로 측정한 데이터 +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{BLACK} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} 프레임/초 +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} 프레임/초 +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} 프레임/초 +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA}초 +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}총 게임 루프: +STR_FRAMERATE_GL_ECONOMY :{BLACK} 화물 처리: +STR_FRAMERATE_GL_TRAINS :{BLACK} 열차 틱: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} 자동차 틱: +STR_FRAMERATE_GL_SHIPS :{BLACK} 선박 틱: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} 항공기 틱: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} 세계 틱: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} 연결 그래프 지연: +STR_FRAMERATE_DRAWING :{BLACK}그래픽 렌더링: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} 세계 화면: +STR_FRAMERATE_VIDEO :{BLACK}비디오 출력: +STR_FRAMERATE_SOUND :{BLACK}사운드 합성: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :게임 루프 +STR_FRAMETIME_CAPTION_GL_ECONOMY :화물 처리 +STR_FRAMETIME_CAPTION_GL_TRAINS :열차 틱 +STR_FRAMETIME_CAPTION_GL_ROADVEHS :자동차 틱 +STR_FRAMETIME_CAPTION_GL_SHIPS :선박 틱 +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :항공기 틱 +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :세계 틱 +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :연결 그래프 지연 +STR_FRAMETIME_CAPTION_DRAWING :그래픽 렌더링 +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :세계 화면 렌더링 +STR_FRAMETIME_CAPTION_VIDEO :비디오 출력 +STR_FRAMETIME_CAPTION_SOUND :사운드 합성 +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}게임 저장 @@ -2716,6 +2779,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}게임 STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}사용 가능한 정보 없음. STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}검색할 문자열: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}파일 덮어쓰기 +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}정말로 이미 존재하는 파일에 덮어씌우시겠습니까? STR_SAVELOAD_OSKTITLE :{BLACK}게임을 저장할 파일명을 입력하세요 @@ -2833,7 +2899,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}버전: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}최소 이용 가능한 버전: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5합: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}색상표: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :도스 +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :도스 / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Windows +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Windows / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}매개 변숫값: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :없음 STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}관련 정보 없음 STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}일치하는 파일을 찾을 수 없습니다 @@ -2914,6 +2985,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :유사 스프 STR_NEWGRF_ERROR_GRM_FAILED :요청한 GRF 자원을 사용할 수 없음 (스프라이트 {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING}(은)는 {STRING} 때문에 사용할 수 없습니다 STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :유효하지 않은/알 수 없는 스프라이트 구조 유형 (스프라이트 {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :속성값 목록에 너무 많은 요소가 있음 (스프라이트 {3:NUM}, 속성 {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :유효하지 않은 산업 생산 콜백 (스프라이트 {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}경고! @@ -2978,6 +3051,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}팻말 STR_TOWN_DIRECTORY_CAPTION :{WHITE}도시 목록 STR_TOWN_DIRECTORY_NONE :{ORANGE}(없음) STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (대도시){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}도시 이름 - 이 도시로 시점을 변경하려면 클릭하세요. CTRL+클릭하면 이 도시 위치를 기준으로 새로운 외부 화면을 엽니다. STR_TOWN_POPULATION :{BLACK}총 인구 수: {COMMA} @@ -2985,8 +3059,7 @@ STR_TOWN_POPULATION :{BLACK}총 인 STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (대도시) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}인구: {ORANGE}{COMMA}{BLACK} 가구수: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}지난 달 승객 수: {ORANGE}{COMMA}{BLACK} 최대: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}지난달 우편수: {ORANGE}{COMMA}{BLACK} 최고: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} 지난 달: {ORANGE}{COMMA}{BLACK} 최대: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}도시가 성장하기 위해 필요한 화물: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED}{G 0 "이" "가"} 필요함 STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :겨울에는 {ORANGE}{STRING}{BLACK}{G 0 "이" "가"} 필요함 @@ -3291,21 +3364,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}이 산 STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}생산 수준: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}산업시설이 곧 폐쇄됩니다! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}필요함: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}필요함: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}필요함: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}받는 화물: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}생산 화물: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}받는 화물: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} 대기중{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}생산: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}생산: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}생산량 변경 (8의 배수, 최대 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}생산 등급 변경 (퍼센트, 800%까지) @@ -3358,6 +3424,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}그룹 - STR_GROUP_CREATE_TOOLTIP :{BLACK}그룹 만들기 STR_GROUP_DELETE_TOOLTIP :{BLACK}선택한 그룹 삭제 STR_GROUP_RENAME_TOOLTIP :{BLACK}선택한 그룹 이름 바꾸기 +STR_GROUP_LIVERY_TOOLTIP :{BLACK}선택한 그룹의 차량 색상을 변경합니다. STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}클릭하여 전체 자동 교체로부터 이 그룹을 보호합니다. STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}그룹 삭제 @@ -3387,8 +3454,8 @@ STR_BUY_VEHICLE_AIRCRAFT_CAPTION :새 항공기 STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}가격: {GOLD}{CURRENCY_LONG}{BLACK} 중량: {GOLD}{WEIGHT_SHORT} STR_PURCHASE_INFO_SPEED_POWER :{BLACK}속력: {GOLD}{VELOCITY}{BLACK} 힘: {GOLD}{POWER} STR_PURCHASE_INFO_SPEED :{BLACK}속력: {GOLD}{VELOCITY} -STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}바다에서의 속력: {GOLD}{VELOCITY} -STR_PURCHASE_INFO_SPEED_CANAL :{BLACK}운하/강에서의 속력: {GOLD}{VELOCITY} +STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}바다에서 속력: {GOLD}{VELOCITY} +STR_PURCHASE_INFO_SPEED_CANAL :{BLACK}운하/강에서 속력: {GOLD}{VELOCITY} STR_PURCHASE_INFO_RUNNINGCOST :{BLACK}유지비: {GOLD}{CURRENCY_LONG}/년 STR_PURCHASE_INFO_CAPACITY :{BLACK}수송량: {GOLD}{CARGO_LONG} {STRING} STR_PURCHASE_INFO_REFITTABLE :(개조 가능) @@ -3401,6 +3468,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}수용 STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}전원 화물차: {GOLD}+{POWER}{BLACK} 중량: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}개조가능 화물: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :모든 화물 +STR_PURCHASE_INFO_NONE :없음 STR_PURCHASE_INFO_ALL_BUT :{CARGO_LIST} 이외의 모든 화물 STR_PURCHASE_INFO_MAX_TE :{BLACK}최고 견인력: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}항속거리: {GOLD}{COMMA} 칸 @@ -3761,21 +3829,21 @@ STR_ORDER_GO_TO :완행 STR_ORDER_GO_NON_STOP_TO :직행 STR_ORDER_GO_VIA :완행 경유 STR_ORDER_GO_NON_STOP_VIA :직행 경유 -STR_ORDER_TOOLTIP_NON_STOP :{BLACK}선택한 목적지에서의 정차 방식을 변경합니다 +STR_ORDER_TOOLTIP_NON_STOP :{BLACK}선택한 목적지에서 화물을 정차할 방식을 변경합니다 STR_ORDER_TOGGLE_FULL_LOAD :{BLACK}아무 화물이나 가득 싣기 STR_ORDER_DROP_LOAD_IF_POSSIBLE :가능한 것만 적재 STR_ORDER_DROP_FULL_LOAD_ALL :모든 화물을 가득 실음 STR_ORDER_DROP_FULL_LOAD_ANY :아무 화물이나 가득 싣기 STR_ORDER_DROP_NO_LOADING :싣지 않기 -STR_ORDER_TOOLTIP_FULL_LOAD :{BLACK}선택한 목적지에서의 화물 적재 방식을 변경합니다 +STR_ORDER_TOOLTIP_FULL_LOAD :{BLACK}선택한 목적지에서 화물을 적재할 방식을 변경합니다 STR_ORDER_TOGGLE_UNLOAD :{BLACK}모든 화물 하차 STR_ORDER_DROP_UNLOAD_IF_ACCEPTED :화물을 받는경우 하차 STR_ORDER_DROP_UNLOAD :모든 화물 하차 STR_ORDER_DROP_TRANSFER :환승 STR_ORDER_DROP_NO_UNLOADING :화물을 하차시키지 않음 -STR_ORDER_TOOLTIP_UNLOAD :{BLACK}선택한 목적지에서의 화물 하차 방식을 변경합니다 +STR_ORDER_TOOLTIP_UNLOAD :{BLACK}선택한 목적지에서 화물을 하차할 방식을 변경합니다 STR_ORDER_REFIT :{BLACK}개조 STR_ORDER_REFIT_TOOLTIP :{BLACK}이 경로에서 열차를 어떤 화물을 받을 수 있게 개조할 것인지 선택하십시오. CTRL+클릭하면 개조 설정을 해제합니다. @@ -3800,6 +3868,7 @@ STR_ORDER_CONDITIONAL_AGE :연령 (년) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :정비 필요성 STR_ORDER_CONDITIONAL_UNCONDITIONALLY :항상 STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :남은 수명 (년) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :최대 신뢰도 STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}왼쪽의 비교조건과 오른쪽의 입력값을 비교할 연산자를 선택합니다. STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS := @@ -4225,7 +4294,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}역이 STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}철도역 조각이 너무 많습니다 STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}버스 정류장이 너무 많습니다 STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}트럭 적하장이 너무 많습니다 -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}다른 역과 너무 가깝습니다! STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}다른 항구와 너무 가깝습니다! STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}다른 공항과 너무 가깝습니다! STR_ERROR_CAN_T_RENAME_STATION :{WHITE}역 이름을 바꿀 수 없습니다... @@ -4233,6 +4301,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... 여 STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... 도로의 방향과 일치하지 않습니다. STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... 도로 통과 정류장은 곡선도로에 건설할 수 없습니다. STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... 도로 통과 정류장은 교차로에 건설할 수 없습니다. +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... 도로가 일방통행이거나 막혔습니다 # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}역의 일부를 제거할 수 없습니다... @@ -4480,10 +4549,12 @@ STR_DESKTOP_SHORTCUT_COMMENT :트랜스포트 STR_BASEGRAPHICS_DOS_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 도스 에디션의 그래픽입니다. STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 도스 에디션(독일)의 그래픽입니다. STR_BASEGRAPHICS_WIN_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 그래픽입니다. -STR_BASESOUNDS_DOS_DESCRIPTION :오리지널 트랜스포트 타이쿤 도스 에디션의 효과음입니다. +STR_BASESOUNDS_DOS_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 도스 에디션의 효과음입니다. STR_BASESOUNDS_WIN_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 효과음입니다. STR_BASESOUNDS_NONE_DESCRIPTION :아무런 효과음도 없는 효과음 팩입니다. STR_BASEMUSIC_WIN_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 음악입니다. +STR_BASEMUSIC_DOS_DESCRIPTION :오리지널 트랜스포트 타이쿤 디럭스 DOS 에디션의 음악입니다. +STR_BASEMUSIC_TTO_DESCRIPTION :오리지널 트랜스포트 타이쿤 (오리지널/월드 에디터) DOS 에디션의 음악입니다. STR_BASEMUSIC_NONE_DESCRIPTION :실제 음악이 없는 음악 목록입니다. ##id 0x2000 diff --git a/src/lang/latin.txt b/src/lang/latin.txt index 1485d00c65..cc670da54a 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -12,7 +12,7 @@ ##case gen acc abl dat -# $Id: latin.txt 27953 2017-12-27 21:55:30Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -838,6 +838,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Nulla musica parata STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Carmen STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titulus @@ -857,15 +858,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Eligere STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Incipere desinereve admixtionem carminum STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Monstrare fenestram electionis carminum -STR_ERROR_NO_SONGS :{WHITE}Compositio sine carminibus electa est. Nulla carmina canentur - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Electio Compositionis Musicae +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Compositio Musicae - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Index Carminum STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Compositio - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Vacuefacere +STR_PLAYLIST_CHANGE_SET :{BLACK}Mutare gregem STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Vacuefacere compositionem (modo Propriam I aut Propriam II) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Mutare gregem musicam STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Preme in carmen ut compositioni addantur (modo Propriae I aut Propriae II) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Preme in carmen ut ex compositione removeatur (modo Propria I aut Propria II) @@ -1068,10 +1069,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Fenestra conspectus {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Transcribere ad fenestram conspectus +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Mutare conspectum STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Transcribere locum primarium ad hanc fenestram conspectus -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Glutinare ex fenestra conspectus -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Glutinare locum ex hac fenestra ad conspectum primarium +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Mutare conspectum primum +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Transcribere locum ex hac fenestra ad conspectum primarium # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Ludi optiones @@ -1442,6 +1443,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non lice STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Tuitio infrastructurae: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Electa, infrastructura prodit expensa tuitionis. Expensa crescunt celerius quam pro portione magnitudini retis, ergo societates magnae affectantur magis quam parvae + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroportus numquam recedunt: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Electa, omnes aeroportuum typi permanent post introductionem @@ -1525,9 +1527,13 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Color terrae in STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Viridis STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Viridis Obscurus STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Purpureus -STR_CONFIG_SETTING_REVERSE_SCROLLING :Revertere cursum vagationis: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Quomodo tabula vagatur globulo dextri presso. Neglecta, mus conspectum movet. Electa, mus tabulam movet -STR_CONFIG_SETTING_SMOOTH_SCROLLING :Vagari conspectum leniter: {STRING} +STR_CONFIG_SETTING_SCROLLMODE :Modus conspectum movendi: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Quomodo tabula geographica vagatur +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Conspectus movetur globulo dextro, loco muris fixo +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Tabula movetur globulo dextro, loco muris fixo +STR_CONFIG_SETTING_SCROLLMODE_RMB :Tabula movetur globulo muris dextro +STR_CONFIG_SETTING_SCROLLMODE_LMB :Tabula movetur globulo muris sinistro +STR_CONFIG_SETTING_SMOOTH_SCROLLING :Movere conspectum leniter: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Quomodo conspectus vagatur ad quemdam locum globulo sinistro in tabula premendi aut cum iubetur vagari ad quamdam rem in tabula. Electa, conspectus leniter vagatur. Neglecta, statim salit ad locum STR_CONFIG_SETTING_MEASURE_TOOLTIP :Ostendere nuntium adiuvans apud varia ferramenta construendi: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Ostendere spatium atque altitudinem inter tegulas dum mus trahitur in construendo @@ -1558,8 +1564,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Cmd+Premere STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Premere STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Neglecta -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Vagatio globuli sinistri: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Annuere tabulam vagari trahendo globuli sinistri. Magnopere utilis est cum tangendo navigas in scrinio STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Claudere fenestras globulo muris dextro: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Facit ut globulus muris dexter fenestras claudat. Cave: hac electa, non apparent nuntia adiuvantia globulo dextro. @@ -1997,7 +2001,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Mutare a STR_CHEAT_SETUP_PROD :{LTBLUE}Sinere mutare productiones industriarum: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Schema Coloris Novum STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Monstrare schemata coloris generalia STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Monstrare schemata coloris traminum @@ -2483,6 +2486,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Formula STR_LINKGRAPH_LEGEND_ALL :{BLACK}Omnia STR_LINKGRAPH_LEGEND_NONE :{BLACK}Nulla STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Eligere societates monstrandas +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}non usus @@ -2895,6 +2899,13 @@ STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Privileg STR_ABOUT_VERSION :{BLACK}OpenTTD editio {REV} STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} MMII-MMXVII Manus OpenTTD +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Servare Ludum STR_SAVELOAD_LOAD_CAPTION :{WHITE}Legere Ludum @@ -3179,6 +3190,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Inscribe STR_TOWN_DIRECTORY_CAPTION :{WHITE}Oppida STR_TOWN_DIRECTORY_NONE :{ORANGE}- Nulla - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Urbs){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nomina oppidorum - preme in nomen ut conspectus supra oppidum locetur. Ctrl+Preme ut novam fenestram conspectus supra oppidum aperiatur STR_TOWN_POPULATION :{BLACK}Incolae mundi: {COMMA} @@ -3186,8 +3198,6 @@ STR_TOWN_POPULATION :{BLACK}Incolae STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Urbs) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Incolae: {ORANGE}{COMMA}{BLACK} Aedificia: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Vectores mensis prioris: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Epistulae mensis prioris: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Onera mandata ad oppidum crescendum: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} mandatur STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} hieme mandatur @@ -3492,21 +3502,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Movere c STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Quantitas productionis: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Haec industria mox claudetur! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Postulat: {YELLOW}{STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Postulat: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Postulat: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING}, {STRING.acc}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Postulat: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING.acc}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} manet{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Efficit: {YELLOW}{STRING.acc}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Efficit: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Mutare productionem (per octo multiplicatur, ad 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mutare productionem (centesima, ad 800%) @@ -4428,7 +4428,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Nimis st STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Nimis partes stationum ferriviariarum adsunt STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Nimis stationes laophoricae adsunt STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Nimis stationes autoplaustricae adsunt -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Nimis prope aliam stationem STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Nimis prope aliud navale STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Nimis prope alium aeroportum STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Non licet stationem renominare... @@ -4436,6 +4435,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... via STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... viae directio non convenit STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... stationi perviae non licet esse curva STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... stationi perviae non licet compita habere +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... via est monodromus vel obstructa # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Non licet partem stationis removere... @@ -4687,6 +4687,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Soni ex edition STR_BASESOUNDS_WIN_DESCRIPTION :Soni ex editione originale Transport Tycoon Deluxe Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Sarcina sonorum sine ullis sonis. STR_BASEMUSIC_WIN_DESCRIPTION :Musica ex editione originale Transport Tycoon Deluxe Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Musica ex editione originale Transport Tycoon Deluxe DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Musica ex editione originale Transport Tycoon (Originale/World Editor) DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Sarcina musicae sine ulla musica. ##id 0x2000 diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index fdc3a0dbe1..e68a3837d9 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -12,7 +12,7 @@ ##case kas -# $Id: latvian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -475,6 +475,7 @@ STR_ABOUT_MENU_SCREENSHOT :Ekrānuzņēmum STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Pilnībā pietuvināts ekrānuzņēmums STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Noklusējuma mēroga ekrānuzņēmums STR_ABOUT_MENU_GIANT_SCREENSHOT :Visas kartes ekrānuzņēmums +STR_ABOUT_MENU_SHOW_FRAMERATE :Rādīt kadru ātrumu STR_ABOUT_MENU_ABOUT_OPENTTD :Par 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Gariņu līdzinātājs STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Pārslēgt saistītās kastes @@ -669,10 +670,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Izvēlē STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Ieslēgt/izslēgt mūzikas saraksta jaukšanu STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Rādīt mūzikas celiņu atlases logu -STR_ERROR_NO_SONGS :{WHITE}Izvēlēts komplekts bez mūzikas. Mūzika netiks atskaņota - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Mūzikas programmas izvēle STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Celiņu rādītājs STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programma - '{STRING}' @@ -1238,6 +1236,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Ļauj būvēt c STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Šo iestatījumu nav iespējams mainīt, kad tur ir transportlīdzekļi STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktūras uzturēšana: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lidostas darbosies mūžīgi: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ieslēdzot šo iestatījumu, katrs lidostas veids pēc tā ieviešanas vienmēr ir pieejams @@ -1276,6 +1275,7 @@ STR_CONFIG_SETTING_LANDSCAPE :Ainava: {STRING STR_CONFIG_SETTING_LAND_GENERATOR :Zemes radītājs: {STRING} STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL :Sākotnējais STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :TerraGenesis +STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(Tikai TerraGenesis) Ainavas kalnainība STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maksimālais attālums no kartes malas naftas pārstrādes rūpnīcām: {STRING} STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Naftas pārstrādes rūpnīcas ir būvējamas tikai kartes malu tuvumā, salu kartēm tas ir pie krasta STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Sniega līnijas augstums: {STRING} @@ -1307,7 +1307,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Apvidus krāsa STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :zaļa STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :{G=f}tumši zaļa STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :{G=f}violeta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Pretējs ritināšanas virziens: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :Plūdena skatvietas ritināšana: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP :Rādīt mērījumu rīkjoslu, izmantojot dažādus būvniecības rīkus: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Rāda lauciņu attālumus un augstuma starpības, ar vilkšanu veicot būvniecības darbības @@ -1337,7 +1336,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Komanda+klikš STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+klikšķis STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Izslēgta -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Kreisā klikšķa ritināšana: {STRING} STR_CONFIG_SETTING_AUTOSAVE :Automātiskā saglabāšana: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Izvēlēties spēles automātiskās saglabāšanas starplaikus @@ -1566,6 +1564,7 @@ STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Lielpilsētu vi STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manuāli STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimetriska STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :simetriska +STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"nesimetriski" nozīmē, ka patvaļīgu kravas daudzumu var nosūtīt abos virzienos."manuāli" nozīmē, ka šīm kravām netiks veikta automātiska izplatīšana. STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Sadales precizitāte: {STRING} STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Uzstādod šo mazāk par 100% liks simetriskajai sadalei izturēties vairāk kā asimetriskajai. Mazāk kravas ar varu tiks sūtīts atpakaļ ja noteikts daudzums tiks sūtīts uz piestātni. Ja jūs uzstādīsiet to uz 0% simetriskā sadale izturēsies tā pat kā asimetriskā. @@ -1748,7 +1747,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Mainīt STR_CHEAT_SETUP_PROD :{LTBLUE}Ieslēgt ražojumu vērtības maiņu: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Jauna identitātes krāsu shēma STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Rādīt vispārējo identitates krāsu shēmas STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Rādīt vilcienu identitātes krāsu shēmas @@ -2628,7 +2626,17 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Uzņēmumam pie STR_ABOUT_OPENTTD :{WHITE}Par OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Oriģināla autortiesības {COPYRIGHT} 1995 Kriss Sojers. Visas tiesības paturētas STR_ABOUT_VERSION :{BLACK}OpenTTD versija {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD darba grupa +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD darba grupa + +# Framerate display window +STR_FRAMERATE_SPEED_FACTOR :{WHITE}pašreizējās spēles ātruma pakāpe: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Cik ātri spēle šobrīd iet salīdzinot ar standarta ātrumu. +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_VIDEO :{WHITE}video izeja +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Saglabāt spēli @@ -2780,6 +2788,7 @@ STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}Pašlaik STR_SAVE_PRESET_CANCEL :{BLACK}Atcelt STR_SAVE_PRESET_CANCEL_TOOLTIP :{BLACK}Nemainīt iepriekšiestatījumu STR_SAVE_PRESET_SAVE :{BLACK}Saglabāt +STR_SAVE_PRESET_SAVE_TOOLTIP :{BLACK}pašreizējos iestatījumus saglābāt kā sākontnējos iestatījumus # NewGRF parameters window STR_NEWGRF_PARAMETERS_CAPTION :{WHITE}Mainīt NewGRF parametrus @@ -2913,8 +2922,6 @@ STR_TOWN_POPULATION :{BLACK}Pasaules STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (lielpilsēta) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Iedzīvotāji: {ORANGE}{COMMA}{BLACK} Mājas: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Pasažieri pagājušajā mēnesī: {ORANGE}{COMMA}{BLACK} maksimāli: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Pasts pagājušajā mēnesī: {ORANGE}{COMMA}{BLACK} maksimāli: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Krava nepieciešama pilsētas attīstībai: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} nepieciešams STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} nepieciešams ziemā @@ -3219,18 +3226,9 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Iepriek STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} (aizvests {COMMA}%) STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrēt galveno skatu uz ražotni. Ctrl+klikšķis atvērs skatu uz ražotni jaunā skatlaukā STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ražošanas līmenis: {YELLOW}{COMMA}% - -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Nepieciešams: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Nepieciešams: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Nepieciešams: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nozare ir paziņojusi par nenovēršamu slēgšanu! -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Ražo: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Ražo: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends STR_CONFIG_GAME_PRODUCTION :{WHITE}Mainīt ražošanu (dalāmais ar 8, līdz pat 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mainīt ražošanas līmeni (procentos, līdz 800%) @@ -3293,6 +3291,7 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Novākt visus t STR_GROUP_RENAME_CAPTION :{BLACK}Pārdēvēt grupu +STR_GROUP_PROFIT_THIS_YEAR :Ienākumi šajā gadā: # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Jauni dzelzceļa transportlīdzekļi @@ -4058,6 +4057,7 @@ STR_ERROR_EXCAVATION_WOULD_DAMAGE :{WHITE}Rakšana STR_ERROR_ALREADY_AT_SEA_LEVEL :{WHITE}... jau ir jūras līmenī STR_ERROR_TOO_HIGH :{WHITE}... pārāk augstu STR_ERROR_ALREADY_LEVELLED :{WHITE}... jau ir līdzens +STR_ERROR_BRIDGE_TOO_HIGH_AFTER_LOWER_LAND :{WHITE}Tilta otrs gals ir pārāk augstu. # Company related errors STR_ERROR_CAN_T_CHANGE_COMPANY_NAME :{WHITE}Uzņēmuma nosaukumu nevar mainīt... @@ -4124,7 +4124,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Pārāk STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Pārāk daudz dzelzceļa stacijas daļu STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Pārāk daudz autobusu pieturvietu STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Pārāk daudz kravas automobiļu staciju -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Pārāk tuvu citai stacijai/iekraušanas zonai STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Pārāk tuvu citai piestātnei STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Pārāk tuvu citai lidostai STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nevar pārdēvēt staciju... @@ -4272,6 +4271,7 @@ STR_ERROR_YOU_ALREADY_OWN_IT :{WHITE}... tā STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}Nevar izveidot grupu... STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}Nevar izdzēst šo grupu... STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}Nevar pārdēvēt grupu... +STR_ERROR_GROUP_CAN_T_SET_PARENT :nevar iestatīt vecāku grupu... STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}Nevar noņemt no šīs grupas visus transportlīdzekļus... STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}Nevar pievienot transportlīdzekļus šai grupai... STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Nevar pievienot koplietojamos transportlīdzekļus šai grupai... diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index 00cbe5e473..82f92f9709 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -12,7 +12,7 @@ ##case kas ko kam ka kuo kur kreip -# $Id: lithuanian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -864,10 +864,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Parinkti STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Programos „Atsitiktiniai takeliai“ įj./išj. STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Rodyti muzikos takelių pasirinkimo langą -STR_ERROR_NO_SONGS :{WHITE}Pasirinktas muzikos rinkinys be dainų. Dainos nebus grojamos - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Muzikos programos pasirinkimas STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} „{STRING}“ STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Takelio numeris STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa - „{STRING}“ @@ -1459,6 +1456,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Neįmano STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktūros priežiūra reikalauja išlaidų: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Infrastruktūros (kelių, geležinkelių, stotelių, angarą ir kitų objektų) priežiūra kainuoja. Kaštai auga proporcingai kompanijos dydžiui, taigi didesnėms kompanijoms infrastruktūros priežiūra kainuos daugiau, nei mažesnėms + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Oro uostai niekada nepasensta: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Kartą atsiradę, oro uostų tipai niekada nebepasens ir galimybė juos statyti niekuomet nebus pašalinta @@ -1542,8 +1540,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Reljefo spalva STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Žalia STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Tamsiai žalia STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violetinė -STR_CONFIG_SETTING_REVERSE_SCROLLING :Priešinga slinkties kryptis: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Vaizdo slinkties elgsena, laikant nuspaudus dešinįjį pelės klavišą: pasirinkus „ne“, judės stebėtojas. Pasirinkus „taip“, judės žemėlapis STR_CONFIG_SETTING_SMOOTH_SCROLLING :Tolydi vaizdo slinktis: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Įjungus šią nuostatą ir pakeitus pagrindinio lango rodomą vietą (pvz., spragtelėjus žemėlapyje), vaizdas slinksis tolydžiai. Priešingu atveju vaizdas pasikeis akimirksniu, šuoliškai. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Rodyti matavimo pastabą, kai naudojami įvairūs statybų įrankiai: {STRING} @@ -1575,8 +1571,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Išjungta -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Left-click scrolling: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Slinkti žemėlapį velkant jį nuspaudus kairįjį pelės klavišą. Naudinga, jei žaidžiama kompiuteriuose su lietimui jautriais ekranais STR_CONFIG_SETTING_AUTOSAVE :Automatinis saugojimas: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Laiko tarpsnis tarp automatinių žaidimo išsaugojimų @@ -2025,7 +2019,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Pakeisti STR_CHEAT_SETUP_PROD :{LTBLUE}Leisti keisti produkcijos vertes: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Naujos spalvos STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Rodyti pagrinidines spalvų parinktis STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Rodyti traukiniš spalvas @@ -2906,7 +2899,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Kompanijos žem STR_ABOUT_OPENTTD :{WHITE}Apie OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Pradinės versijos teisės priklauso {COPYRIGHT} 1995 Chris Sawyer, Visos teisės saugomos STR_ABOUT_VERSION :{BLACK}OpenTTD versija {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 OpenTTD komanda +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 OpenTTD komanda + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Išsaugoti žaidimą @@ -3199,8 +3199,6 @@ STR_TOWN_POPULATION :{BLACK}Pasaulio STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Miestas) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Populiacija: {ORANGE}{COMMA}{BLACK} Namų skaičius: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Praėjusio mėnesio keleivių sk.: {ORANGE}{COMMA}{BLACK} Daugiausia: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Praėjusio mėnesio pašto siuntų sk.: {ORANGE}{COMMA}{BLACK} Daugiausia: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Kad miestas augtų reikalingi kroviniai: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} reikia STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} reikalingas žiemą @@ -3505,18 +3503,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centruot STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Gamybos sparta: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Pramonės įmonė paskelbė apie jos neišvengiamą uždarymą! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Reikalauja: {YELLOW}{STRING.ko}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Reikalauja: {YELLOW}{STRING.ko}{STRING}, {STRING.ko}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Reikalauja: {YELLOW}{STRING.ko}{STRING}, {STRING.ko}{STRING}, {STRING.ko}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Gamina: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Gamina: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Keisti gamybos apimtį (8 daugiklis, iki 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Pakeisti gamybos spartą (procentais, iki 800%) @@ -4480,7 +4468,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Per daug STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Perdaug traukinių stoties dalių STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Per daug autobusų stotelių STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Per daug sunkvežimių pakrovimo aikstelių -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Per arti kitos stotelės STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Per arti kitos prieplaukos STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Per arti kito oro uosto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Stotelės pervardinti negalima... diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index f7288ad7e4..ee811c0efe 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -10,7 +10,7 @@ ##grflangid 0x23 -# $Id: luxembourgish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,10 +669,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Wielt de STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Schalt den "shuffle" un/aus STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Weis d'Fënster fir Musik ze wielen -STR_ERROR_NO_SONGS :{WHITE}E Music Set ouni Lidder gouf gewielt. Et wäerten keng Lidder gespillt ginn - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musiksprogramm Auswiel STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Lidder Index STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programm - '{STRING}' @@ -1254,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Déi Ast STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastrukturënnerhalt {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Wann ugeschalt, kaschten Infrastrukturen Ennerhaltskäschten. D'Käschten wuessen iwwerproportional zu der Netzwierkgréisst, an treffen sou grouss Firmen méi wéi klenger + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Fluchhäfen lafen nie of: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Wann ugeschalt, bleift all Fluchhafentyp säit senger Aféierung bestoen @@ -1337,8 +1335,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Faarf vum Terra STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Gréng STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Donkelgréng STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Mof -STR_CONFIG_SETTING_REVERSE_SCROLLING :Deen anere Wee scrollen: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Verhalen beim Scrollen vun der Kaart mat der rietser Maustast. Wann ausgeschalt, beweegt d'Maus d'Kamera. Wann ugeschalt, beweegt d'Maus d'Kaart STR_CONFIG_SETTING_SMOOTH_SCROLLING :Feine Scrolling: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Kontrolléiert wéi d'Haptusiicht op eng bestëmmten Positioun scrollt, wann een op déi kléng Kaart klickt oder en Befehl fir ob en spezifescht Objet ze scrollen gëtt. Wann ugeschalt, gëtt bis dohin gescrollt, wann ausgeschalt, spréngt d'Vue op den Zielobjet STR_CONFIG_SETTING_MEASURE_TOOLTIP :Weis en Mooss-Tooltip wann verschidde Bau-Tools benotzt ginn: {STRING} @@ -1370,8 +1366,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :COMM+Klick STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :CTRL+Klick STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Aus -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Lénksklickscroll: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Schalt d'Scrollen vun der Kaart un, wann se mat der lénker Maustast gezunn gëtt STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Fënster mat rietsem Mausklick zouman: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Mécht eng Fenster mat engem Rietsklick zou, wann een an d'Fënster klickt. Schalt Tooltips aus déi per Rietsklick gemet ginn! @@ -1809,7 +1803,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Wiessel STR_CHEAT_SETUP_PROD :{LTBLUE}Erlaabt d'ännere vun de Produktiounswäerter: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Neie Faarfschema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Weis generell Faarfschemen STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Weis Zuch Faarfschemen @@ -2691,7 +2684,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Land am Firmenb STR_ABOUT_OPENTTD :{WHITE}Iwwert OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original Copyright {COPYRIGHT} 1995 Chris Sawyer, All Rechter virbehalen STR_ABOUT_VERSION :{BLACK}OpenTTD Versioun {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 D'OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 D'OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spill späicheren @@ -2984,8 +2984,6 @@ STR_TOWN_POPULATION :{BLACK}Weltbev STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Stad) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Awunner: {ORANGE}{COMMA}{BLACK} Haiser: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passagéier leschte Mount: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post leschte Mount: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Gidder gebraucht fir Stadwuesstem: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} gebraucht STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} gebraucht am Wanter @@ -3290,21 +3288,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Zentréi STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktiounslevel: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}D'Industrie annoncéiert dass se zougemaach gëtt -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Brauch: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Brauch: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Brauch: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Brauch: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} um waarden{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produzéiert: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produzéiert: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}D'Produktioun änneren (Multipel vun 8, bis op 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Änner de Produktiounslevel (Prozenter, bis zu 800%) @@ -4224,7 +4212,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Ze vill STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Ze vill Garesdeeler STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Ze vill Busarrêten STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Ze vill Camionsgaren -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Ze noo un enger aanerer Gare/Luedstatioun STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Ze noo un engem aanerem Hafen STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Ze noo un engem aaneren Fluchhafen STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kann d'Statioun net ëmbenennen... diff --git a/src/lang/malay.txt b/src/lang/malay.txt index 4d362fc8c8..0b95b6a190 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -10,7 +10,7 @@ ##grflangid 0x3c -# $Id: malay.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -215,6 +215,7 @@ STR_UNITS_VOLUME_LONG_SI :{COMMA} m³ STR_UNITS_FORCE_SI :{COMMA} kN STR_UNITS_HEIGHT_IMPERIAL :{COMMA} ka +STR_UNITS_HEIGHT_METRIC :{COMMA}{NBSP}m STR_UNITS_HEIGHT_SI :{COMMA} m # Common window strings @@ -241,6 +242,7 @@ STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Bar Skro STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Musnahkan bangunan dll. dari dataran tanah. Ctrl memilih kawasan menyerong. Shift bangunan/tunjukkan anggaran kos. # Show engines button +STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT :{BLACK}Tunjukkan perkara yang tersembunyi STR_SHOW_HIDDEN_ENGINES_VEHICLE_SHIP_TOOLTIP :{BLACK}Dengan membenarkan pilihan ini, kapal tersembunyi turut ditunjukkan @@ -453,7 +455,7 @@ STR_ABOUT_MENU_TOGGLE_CONSOLE :Papar atau pada STR_ABOUT_MENU_AI_DEBUG :Al/Skrip pepijat permainan STR_ABOUT_MENU_SCREENSHOT :Tangkapan skrin (Ctrl+S) STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Zum sepenuhnya di pembidik skrin -STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Tangkapan skrin dizoom asal +STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Tangkapan skrin di zum asal STR_ABOUT_MENU_GIANT_SCREENSHOT :Tangkap gambar skrin besar (Ctrl+G) STR_ABOUT_MENU_ABOUT_OPENTTD :Tentang 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Penjajar peperi @@ -610,7 +612,7 @@ STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}Jumlah w STR_PERFORMANCE_DETAIL_MAX_INCOME_TOOLTIP :{BLACK}Jumlah wang keuntungan dalam suku tahun dengan keuntungan tertinggi dalam 12 suku tahun yang lepas STR_PERFORMANCE_DETAIL_DELIVERED_TOOLTIP :{BLACK}Unit-unit kargo yang dihantar dalam 4 suku tahun yang lepas STR_PERFORMANCE_DETAIL_CARGO_TOOLTIP :{BLACK}Jumlah jenis kargo yang dihantar dalam suku tahun yang lepas -STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP :{BLACK}Jumlah wang syarikat ini mempunyai dalam bank +STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP :{BLACK}Jumlah wang syarikat di dalam bank STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP :{BLACK}Jumlah wang syarikat ini yang telah dipinjam STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP :{BLACK}Jumlah markah daripada markah yang boleh diperolehi @@ -649,10 +651,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Pilih ra STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Mainkan muzik secara rawak atau tidak STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Tunjukkan tetingkap pilihan lagu -STR_ERROR_NO_SONGS :{WHITE}Set muzik yang tidak mengandungi lagu telah dipilih. Tiada lagu yang akan dimainkan - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Pilihan Rancangan Muzik STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Indeks Lagu STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -737,6 +736,7 @@ STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Paparkan STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Papar atau padamkan heightmap STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES :{BLACK}Paparkan hartanah tanpa syarikat pada peta STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Paparkan seluruh maklumat hartanah syarikat pada peta +STR_SMALLMAP_TOOLTIP_ENABLE_ALL_CARGOS :{BLACK}Tunjukkan semua kargo di atas peta # Status bar messages STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Tunjukkan mesej atau laporan berita terakhir @@ -853,10 +853,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT} {BLA # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Tetingkap Pemandangan {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Salin ke tetingkap pemandangan +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Ubah tetingkap paparan STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Salin lokasi pemandangan global kepada tetingkap pemandangan ini -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Tampal daripada tetingkap pemandangan -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Salin lokasi tetingkap pemandangan ini kepada pemandangan utama +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Ubah paparan utama +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Salin lokasi tetingkap paparan ini ke paparan utama # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Pilihan Permainan @@ -1208,6 +1208,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Menukar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Penyelenggaraan Infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Apabila diupayakan,infrastuktur menyebabkan kos penyelenggaraan. Kadar kos tumbuh berdasarkan saiz rangkaian, sekaligus menjejaskan syarikat yang lebih besar daripada yang kecil + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lapangan terbang tidak akan tamat tempohnya: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Beri amaran sekiranya kenderaan sesat: {STRING} @@ -1218,6 +1219,7 @@ STR_CONFIG_SETTING_ORDER_REVIEW_ON :Semua kenderaan STR_CONFIG_SETTING_WARN_INCOME_LESS :Beri amaran jika pendapatan kenderaan adalah negatif: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Kenderaan tidak akan tamat tempohnya: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Gunakan pembaharuan automatik apabila kenderaan usang : {STRING} +STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER :{COMMA} bulan{P 0 "" s} selepas STR_CONFIG_SETTING_AUTORENEW_MONEY :Wang minimum yang diperlukan untuk pembaharuan automatik: {STRING} STR_CONFIG_SETTING_ERRMSG_DURATION :Jangkamasa mesej ralat: {STRING} STR_CONFIG_SETTING_POPULATION_IN_LABEL :Tunjukkan jumlah penduduk dalam label nama bandar: {STRING} @@ -1253,7 +1255,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR :Warna tanah yan STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Hijau STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Hijau Gelap STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Ungu -STR_CONFIG_SETTING_REVERSE_SCROLLING :Arah skrol terbalik: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :Skrol tetingkap pemandangan yang licin: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP :Tunjukkan bantuan ukuran ketika menggunakan alat binaan: {STRING} STR_CONFIG_SETTING_LIVERIES :Tunjukkan seragam syarikat: {STRING} @@ -1266,6 +1267,7 @@ STR_CONFIG_SETTING_SCROLLWHEEL_ZOOM :Membesarkan pet STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL :Skrol peta STR_CONFIG_SETTING_SCROLLWHEEL_OFF :Matikan STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER :Kelajuan roda skrol pada peta: {STRING} +STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT :Kawal kesensitifan skrol roda tetikus STR_CONFIG_SETTING_OSK_ACTIVATION :Papan kekunci di skrin: {STRING} STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Pilih kaedah untuk membuka papan kekunci pada skrin untuk memasukkan teks ke dalam kotak edit hanya menggunakan petunjuk peranti. Ini bertujuan untuk peranti kecil yang tiada papan kekunci sebenar STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED :Dinyah-upayakan @@ -1278,7 +1280,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Matikan -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Skrol klik-kiri: {STRING} STR_CONFIG_SETTING_AUTOSAVE :Simpanan automatik:{STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Pilih jarak waktu antara menyimpankan permainan automatik @@ -1298,6 +1299,7 @@ STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :Gunakan senarai STR_CONFIG_SETTING_LOADING_INDICATORS :Gunakan penunjuk muatan: {STRING} STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Tunjukkan jadual menggunakan tanda rait dan bukan hari: {STRING} STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Tunjukkan ketibaan dan pelepasan dalam jadual: {STRING} +STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Tunjukkan jangkaan waktu ketibaan dan pelepasan dalam jadual STR_CONFIG_SETTING_QUICKGOTO :Pewujudan pantas arahan kenderaan: {STRING} STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE :Landasan keretapi lazim (apabila memulakan permainan baru/buka permainan: {STRING} STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST :Yang tersedia terawal @@ -1305,6 +1307,7 @@ STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_LAST :Yang tersedia s STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_MOST_USED :Yang selalu digunakan STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Tunjukkan landasan yang ditempah: {STRING} STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :Alat binaan tetap aktif selepas digunakan: {STRING} +STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT :Simpan alat pembinaan untuk jambatan, terowong, dll. buka selepas guna STR_CONFIG_SETTING_EXPENSES_LAYOUT :Perbelanjaan kumpulan dalam tetingkap kewangan syarikat: {STRING} STR_CONFIG_SETTING_SOUND_CONFIRM :Pembinaan: {STRING} @@ -1312,6 +1315,7 @@ STR_CONFIG_SETTING_SOUND_CONFIRM :Pembinaan: {STR STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :Nyahaktif infrastruktur bangunan apabila tiada kenderaan yang sesuai: {STRING} STR_CONFIG_SETTING_MAX_TRAINS :Amaun maksimum kereta api setiap syarikat: {STRING} STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :Amaun maksimum kenderaan jalanraya setiap syarikat: {STRING} +STR_CONFIG_SETTING_MAX_ROAD_VEHICLES_HELPTEXT :Jumlah maksimum kenderaan darat sesebuah syarikat STR_CONFIG_SETTING_MAX_AIRCRAFT :Amaun maksimum pesawat setiap syarikat: {STRING} STR_CONFIG_SETTING_MAX_SHIPS :Amaun maksimum kapal setiap syarikat: {STRING} @@ -1332,7 +1336,10 @@ STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes sebelu STR_CONFIG_SETTING_SERVINT_ISPERCENT :Tempoh waktu servis dalam peratusan: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Pilih sama ada selenggara kenderaan dimulakan sejak tempoh masa dari servis terakhir atau apabila peratusan kebolehupayaan kenderaan berkurang kepada peratusan tertentu. +STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA}{NBSP}hari{P 0 "" s}/% STR_CONFIG_SETTING_SERVINT_DISABLED :Dilumpuhkan +STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Tetapkan selang masa servis untuk pesawat baru kepada tetapan asal jika tiada selang masa servis yang jelas ditetapkan untuk pesawat tersebut +STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Tetapkan selang masa servis untuk kapal baru kepada tetapan asal jika tiada selang masa servis yang jelas ditetapkan untuk kapal tersebut STR_CONFIG_SETTING_NOSERVICE :Servis tidak diperlukan apabila kerosakan kenderaan ditetapkan kepada tiada: {STRING} STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Benarkan had kelajuan untuk gerabak: {STRING} STR_CONFIG_SETTING_DISABLE_ELRAILS :Tiada landasan elektrik: {STRING} @@ -1344,13 +1351,16 @@ STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION :Maklumat syarik STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION_HELPTEXT :Paparkan surat khabar mengenai pembukaan syarikat baru, atau apabila syarikat dalam risiko untuk muflis STR_CONFIG_SETTING_NEWS_INDUSTRY_OPEN :Pembukaan industri: {STRING} STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE :Penutupan industri: {STRING} +STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE_HELPTEXT :Paparkan keratan akhbar apabila ada industri yang ditutup STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES :Perubahan ekonomi: {STRING} STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY :Perubahan pengeluaran industri-industri yang diservis oleh syarikat: {STRING} STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER :Perubahan pengeluaran industri-industri yang diservis oleh pesaing: {STRING} +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Paparkan keratan akhbar apabila berlaku perubahan tahap pengeluaran industri yang diservis oleh pesaing STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED :Pengubaran pengeluaran industri lain: {STRING} STR_CONFIG_SETTING_NEWS_ADVICE :Nasihat / maklumat tentang kenderaan syarikat: {STRING} STR_CONFIG_SETTING_NEWS_NEW_VEHICLES :Kenderaan baru: {STRING} STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE :Penukaran pada penerimaan kargo: {STRING} +STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE_HELPTEXT :Tunjukkan mesej berkenaan perubahan kebolehterimaan sesetengah kargo di stesen terlibat STR_CONFIG_SETTING_NEWS_SUBSIDIES :Subsidi: {STRING} STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION :Maklumat umum: {STRING} @@ -1411,17 +1421,25 @@ STR_CONFIG_SETTING_TOWN_GROWTH_NORMAL :Biasa STR_CONFIG_SETTING_TOWN_GROWTH_FAST :Pantas STR_CONFIG_SETTING_TOWN_GROWTH_VERY_FAST :Sangat pantas STR_CONFIG_SETTING_LARGER_TOWNS_VALUE :1 dalam {COMMA} +STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :Tiada STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Pengganda awal saiz bandar: {STRING} +STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL :Sistem Imperial (kuasa kuda/hp) +STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_METRIC :Sistem metrik (kuasa kuda/hp) +STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_SI :Unit SI (kW) + + +STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_SI :Unit SI (m³) - - +STR_CONFIG_SETTING_SOUND :{ORANGE}Bunyi STR_CONFIG_SETTING_INTERFACE :{ORANGE}Antaramuka (Interface) STR_CONFIG_SETTING_INTERFACE_CONSTRUCTION :{ORANGE}Pembinaan +STR_CONFIG_SETTING_ADVISORS :{ORANGE}Berita / Penasihat +STR_CONFIG_SETTING_COMPANY :{ORANGE}Syarikat STR_CONFIG_SETTING_VEHICLES :{ORANGE}Kenderaan STR_CONFIG_SETTING_VEHICLES_ROUTING :{ORANGE}Laluan STR_CONFIG_SETTING_ACCIDENTS :{ORANGE}Kecelakaan / Kemalangan @@ -1502,7 +1520,7 @@ STR_INTRO_TRANSLATION :{BLACK}Terjemah # Quit window STR_QUIT_CAPTION :{WHITE}Keluar -STR_QUIT_ARE_YOU_SURE_YOU_WANT_TO_EXIT_OPENTTD :{YELLOW}Pastikah anda untuk keluar dari OpenTTD dan kembali ke {STRING}? +STR_QUIT_ARE_YOU_SURE_YOU_WANT_TO_EXIT_OPENTTD :{YELLOW}Adakah anda pasti untuk keluar dari OpenTTD dan kembali ke {STRING}? STR_QUIT_YES :{BLACK}Ya STR_QUIT_NO :{BLACK}Tidak @@ -1520,8 +1538,8 @@ STR_OSNAME_SUNOS :SunOS # Abandon game STR_ABANDON_GAME_CAPTION :{WHITE}Tinggalkan Permainan -STR_ABANDON_GAME_QUERY :{YELLOW}Pastikah anda mahu keluar permainan ini? -STR_ABANDON_SCENARIO_QUERY :{YELLOW}Pastikah anda untuk keluar senario ini? +STR_ABANDON_GAME_QUERY :{YELLOW}Pastikah anda mahu keluar dari permainan ini? +STR_ABANDON_SCENARIO_QUERY :{YELLOW}Pastikah anda untuk keluar dari senario ini? # Cheat window STR_CHEATS :{WHITE}Penipuan (Cheats) @@ -1543,7 +1561,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Tukar ta STR_CHEAT_SETUP_PROD :{LTBLUE}Bolehkan pengubahsuaian nilai-nilai pengeluaran: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Skim Warna Baru STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Tunjukkan skim warna am STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Tunjukkan skim warna keretapi @@ -1696,6 +1713,7 @@ STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}Nama per STR_NETWORK_START_SERVER_SET_PASSWORD :{BLACK}Tetapkan kata laluan STR_NETWORK_START_SERVER_PASSWORD_TOOLTIP :{BLACK}Lindungi permainan anda dengan kata laluan jika anda tidak mahu ianya diakses awam +STR_NETWORK_START_SERVER_UNADVERTISED :Tidak STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} pelanggan STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Amaun maksimum pemain: STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Tentukan bilangan klien maks. Tidak perlu semua slot diisi @@ -1773,7 +1791,7 @@ STR_NETWORK_GAME_LOBBY_NEW_COMPANY_TOOLTIP :{BLACK}Mulakan STR_NETWORK_GAME_LOBBY_SPECTATE_GAME :{BLACK}Saksikan permainan STR_NETWORK_GAME_LOBBY_SPECTATE_GAME_TOOLTIP :{BLACK}Saksikan permainan sebagai seorang penyaksi STR_NETWORK_GAME_LOBBY_JOIN_COMPANY :{BLACK}Sertai syarikat -STR_NETWORK_GAME_LOBBY_JOIN_COMPANY_TOOLTIP :{BLACK}Bantu mengurus syarikat ini +STR_NETWORK_GAME_LOBBY_JOIN_COMPANY_TOOLTIP :{BLACK}Bantu uruskan syarikat ini # Network connecting window STR_NETWORK_CONNECTING_CAPTION :{WHITE}Menyambung... @@ -1934,6 +1952,7 @@ STR_CONTENT_SELECT_UPDATES_CAPTION :{BLACK}Pilih pe STR_CONTENT_SELECT_UPDATES_CAPTION_TOOLTIP :{BLACK}Tandakan semua kandungan sedia ada yang telah ditingkatkan untuk dimuat turun STR_CONTENT_UNSELECT_ALL_CAPTION :{BLACK}Nyahpilihkan semua STR_CONTENT_UNSELECT_ALL_CAPTION_TOOLTIP :{BLACK}Tandakan semua kandungan supaya jangan dimuat turun +STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER_CAPTION :{WHITE}Anda sedang meninggalkan OpenTTD! STR_CONTENT_FILTER_TITLE :{BLACK}Saringan tag/nama: STR_CONTENT_OPEN_URL :{BLACK}Lawati halaman STR_CONTENT_OPEN_URL_TOOLTIP :{BLACK}Lawati halaman untuk kandungan ini @@ -1986,7 +2005,7 @@ STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE :{WHITE}... fail STR_CONTENT_ERROR_COULD_NOT_EXTRACT :{WHITE}Tidak dapat menyahmampat fail yang dimuat turun STR_MISSING_GRAPHICS_SET_CAPTION :{WHITE}Grafik hilang -STR_MISSING_GRAPHICS_SET_MESSAGE :{BLACK}OpenTTD memerlukan grafik berfungsi tetapi tiada diperolehi. Adakah anda membenarkan OpenTTD untuk memuat turun dan memasang-grafik? +STR_MISSING_GRAPHICS_SET_MESSAGE :{BLACK}OpenTTD memerlukan grafik berfungsi tetapi tiada grafik diperolehi. Adakah anda benarkan OpenTTD untuk memuat turun dan memasang grafik? STR_MISSING_GRAPHICS_YES_DOWNLOAD :{BLACK}Ya, muat turun grafik STR_MISSING_GRAPHICS_NO_QUIT :{BLACK}Tidak, keluar dari OpenTTD @@ -2309,6 +2328,7 @@ STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Nama pet STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Kargo yang diterima: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) +STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Jenis landasan: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Had kelajuan landasan: {LTBLUE}{VELOCITY} # Description of land area of different tiles @@ -2321,28 +2341,28 @@ STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Tanah diliputi STR_LAI_CLEAR_DESCRIPTION_DESERT :Padang pasir STR_LAI_RAIL_DESCRIPTION_TRACK :Landasan keretapi -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Keretapi landasan dengan isyarat sekatan -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Keretapi landasan dengan pra-isyarat +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Landasan kereta api dengan isyarat sekatan +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Landasan kereta api dengan pra-isyarat STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Landasan keretapi dengan isyarat keluar STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Landasan keretapi dengan isyarat kombo -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Keretapi landasan dengan isyarat laluan +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Landasan kereta api dengan isyarat laluan STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Landasan keretapi dengan isyarat satu hala -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Keretapi landasan dengan isyarat sekatan dan pra-isyarat +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Landasan kereta api dengan isyarat sekatan dan pra-isyarat STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Landasan keretapi dengan isyarat sekatan dan keluar STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Landasan keretapi dengan isyarat sekatan dan kombo -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Keretapi landasan dengan isyarat sekatan dan laluan +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Landasan kereta api dengan isyarat sekatan dan laluan STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Landasan keretapi dengan isyarat sekatan dan satu hala -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Keretapi landasan dengan isyarat pra- dan keluar -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Keretapi landasan dengan isyarat pra- dan kombo -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Keretapi landasan dengan isyarat pra- dan laluan -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Keretapi landasan dengan isyarat pra- dan satu hala +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Landasan kereta api dengan pra-isyarat dan isyarat keluar +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Landasan kereta api dengan pra-isyarat dan isyarat kombo +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Landasan kereta api dengan pra-isyarat dan isyarat laluan +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Landasan kereta api dengan pra-isyarat dan isyarat laluan satu hala STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Landasan keretapi dengan isyarat keluar dan kombo. STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Landasan keretapi dengan isyarat keluar dan laluan STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Landasan keretapi dengan isyarat keluar dan satu hala STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Landasan keretapi dengan isyarat kombo dan signal laluan STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Landasan keretapi dengan isyarat kombo dan satu hala -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Keretapi landasan dengan isyarat laluan dan satu hala -STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Keretapi depoh keretapi +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Landasan kereta api dengan isyarat laluan dan isyarat laluan satu hala +STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Depoh penyelenggaraan kereta api STR_LAI_ROAD_DESCRIPTION_ROAD :Jalanraya STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Jalan raya berlampu @@ -2406,7 +2426,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Tanah dimiliki STR_ABOUT_OPENTTD :{WHITE}Tentang OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Hakcipta Asal {COPYRIGHT} 1995 Chris Sawyer, Hakcipta terpelihara STR_ABOUT_VERSION :{BLACK}OpenTTD versi {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Simpankan Permainan @@ -2555,6 +2582,7 @@ STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}Tidak sera # NewGRF save preset window STR_SAVE_PRESET_CAPTION :{WHITE}Simpan pratetapan STR_SAVE_PRESET_TITLE :{BLACK}Masukkan nama untuk pratetapan +STR_SAVE_PRESET_CANCEL :{BLACK}Batal STR_SAVE_PRESET_SAVE :{BLACK}Simpan # NewGRF parameters window @@ -2586,7 +2614,7 @@ STR_SPRITE_ALIGNER_GOTO_TOOLTIP :{BLACK}Pergi ke STR_SPRITE_ALIGNER_PREVIOUS_BUTTON :{BLACK}Peperi sebelumnya STR_SPRITE_ALIGNER_PREVIOUS_TOOLTIP :{BLACK}Teruskan ke peperi dahulu yang biasa, melangkau sebarang peperi pseudo/warna kembali/fon dan memusing balik semula STR_SPRITE_ALIGNER_SPRITE_TOOLTIP :{BLACK}Perwakilan peperi yang terpilih. Penjajaran tidak diendahkan apabila sedang melukiskan peperi. -STR_SPRITE_ALIGNER_MOVE_TOOLTIP :{BLACK}Alih peperi, mengubahkan ofset X dan Y +STR_SPRITE_ALIGNER_MOVE_TOOLTIP :{BLACK}Alihkan "sprite" ke lokasi lain lantas mengubah ofset X dan Y. "Ctrl+Click" untuk ubah lokasi "sprite" lapan unit pada satu-satu masa STR_SPRITE_ALIGNER_PICKER_BUTTON :{BLACK}Pilih peperi STR_SPRITE_ALIGNER_PICKER_TOOLTIP :{BLACK}Pilih peperi di mana-mana sahaja dari skrin @@ -2686,8 +2714,6 @@ STR_TOWN_POPULATION :{BLACK}Jumlah p STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Bandaraya) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Jumlah penduduk: {ORANGE}{COMMA}{BLACK} Rumah: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Penumpang bulan lalu: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Beg surat bulan lepas: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Kargi yang diperlukan untuk pembesaran bandar: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} diperlukan STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} diperlukan sewaktu musim sejuk @@ -2782,6 +2808,7 @@ STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik di # Story book window STR_STORY_BOOK_TITLE :{YELLOW}{STRING} +STR_STORY_BOOK_NEXT_PAGE :{BLACK}Seterusnya # Station list window STR_STATION_LIST_TOOLTIP :{BLACK}Nama stesen - klik pada nama untuk memusatkan pemandangan ke stesen. Ctrl+Klik membuka tetingkap pemandangan di lokasi stesen @@ -2808,6 +2835,10 @@ STR_STATION_VIEW_RATINGS_BUTTON :{BLACK}Penarafa STR_STATION_VIEW_RATINGS_TOOLTIP :{BLACK}Tunjukkan penarafan stesen STR_STATION_VIEW_SUPPLY_RATINGS_TITLE :{BLACK}Bekalan bulanan dan penarafan tempatan: +STR_STATION_VIEW_PLANNED_AMOUNT :Jumlah: Telah dirancang +STR_STATION_VIEW_VIA :{YELLOW}{CARGO_SHORT} melalui {STATION} +STR_STATION_VIEW_TO :{YELLOW}{CARGO_SHORT} ke {STATION} +STR_STATION_VIEW_VIA_HERE :{GREEN}{CARGO_SHORT} sedang berhenti di stesen ini ############ range for rating starts @@ -2825,12 +2856,13 @@ STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Pusatkan STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Tukarkan nama stesen STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Tunjukkan semua keretapi yang mengandungi stesen ini dalam jadual mereka -STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Tunjukkan semua kenderaan jalanraya yang mengandungi stesen ini dalam jadual mereka +STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Tunjukkan semua kenderaan darat yang mempunyai stesen ini di dalam jadual mereka STR_STATION_VIEW_SCHEDULED_AIRCRAFT_TOOLTIP :{BLACK}Tunjukkan semua pesawat yang mengandungi lapangan terbang ini dalam jadual mereka STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP :{BLACK}Tunjukkan semua kapal yang mengandungi stesen ini dalam jadual mereka STR_STATION_VIEW_RENAME_STATION_CAPTION :Namakan semula stesen/ruang punggahan +STR_STATION_VIEW_CLOSE_AIRPORT_TOOLTIP :{BLACK}Halang pesawat daripada mendarat di lapangan terbang ini # Waypoint/buoy view window STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT} @@ -2951,19 +2983,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Pusatkan STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tahap produksi: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW} Industri mengumumkan penutupan serta merta! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Memerlukan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Memerlukan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Memerlukan: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Diperlukan: -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Mengeluarkan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Mengeluarkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ubah pengeluaran (gandaan 8, sehingga 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ubah tahap produksi (peratus, hingga 800%) @@ -3012,11 +3034,11 @@ STR_GROUP_DEFAULT_ROAD_VEHICLES :Kenderaan jalan STR_GROUP_DEFAULT_SHIPS :Kapal yang belum berkumpulan STR_GROUP_DEFAULT_AIRCRAFTS :Pesawat yang belum berkumpulan -STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Kumpulan - klik sebuah kumpulan untuk menaraikan semua kenderaan di dalam kumpulan +STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Kumpulan - klik sebuah kumpulan untuk menyenaraikan semua kenderaan di dalam kumpulan tersebut. Tarik dan lepaskan kumpulan untuk menyusun kumpulan mengikut heirarki STR_GROUP_CREATE_TOOLTIP :{BLACK}Klik untuk mewujudkan kumpulan STR_GROUP_DELETE_TOOLTIP :{BLACK}Padamkan kumpulan yang telah dipilih STR_GROUP_RENAME_TOOLTIP :{BLACK}Tukar nama kumpulan yang terpilih -STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Klik untuk menghalang daripada kumpulan ini digantikan secara automatik +STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Klik untuk menghalang kumpulan ini daripada digantikan secara automatik STR_GROUP_ADD_SHARED_VEHICLE :Tambah kenderaan berkongsi @@ -3304,6 +3326,8 @@ STR_VEHICLE_INFO_AGE :{COMMA} tahun ( STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} tahun ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Kelajuan Maks.: {LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Kelajuan maksima: {LTBLUE}{VELOCITY} {BLACK}Jenis pesawat: {LTBLUE}{STRING} +STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE :{BLACK}Kelajuan maksima: {LTBLUE}{VELOCITY} {BLACK}Jenis pesawat: {LTBLUE}{STRING} {BLACK}Lingkungan: {LTBLUE}{COMMA} petak STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Berat: {LTBLUE}{WEIGHT_SHORT} {BLACK}Kuasa: {LTBLUE}{POWER}{BLACK} Kelajuan Maks.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Berat: {LTBLUE}{WEIGHT_SHORT} {BLACK}Kuasa: {LTBLUE}{POWER}{BLACK} Max. speed: {LTBLUE}{VELOCITY} {BLACK}T.E. Maks.: {LTBLUE}{FORCE} @@ -3323,6 +3347,7 @@ STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Tempoh P STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Tambah 10 tempoh penyenggelaraan. Ctrl+Klik untuk tambah 5 tempoh penyenggelaraan STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Kurangkan 10 tempoh penyenggelaraan. Ctrl+Klik untuk kurangkan 5 tempoh penyenggelaraan +STR_VEHICLE_DETAILS_DAYS :Hari STR_VEHICLE_DETAILS_PERCENT :Peratusan STR_QUERY_RENAME_TRAIN_CAPTION :{WHITE}Nama keretapi @@ -3462,7 +3487,7 @@ STR_ORDER_GO_TO_NEAREST_DEPOT :Pergi ke depoh STR_ORDER_GO_TO_NEAREST_HANGAR :Pergi ke hangar paling hampir STR_ORDER_CONDITIONAL :Lompatan arahan bersyarat STR_ORDER_SHARE :Kongsi arahan -STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Masukkan arahan baru ke atas arahan yang terpilih. Ctrl membuatkan arahan stesen 'muatan penuh sebarang kargo', arahan halutuju 'tanpa henti', dan arahn depoh 'penyenggelaraan'. 'Arahan berkongsi' atau Ctrl membenarkan kenderaan ini berkongsi arahan dengan kenderaan terpilih +STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Masukkan arahan baru ke dalam susunan senarai yang terpilih, atau tambah pada penghujung senarai. "Ctrl" mengubah arahan stesen kepada 'muatan penuh untuk apa-apa kargo', arahan halutuju 'tanpa henti', dan arahan depoh 'penyenggelaraan'. 'Arahan berkongsi' atau "Ctrl" membenarkan kenderaan ini berkongsi arahan dengan kenderaan terpilih STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Tunjukkan semua kenderaan yang berkongsi jadual yang sama @@ -3843,7 +3868,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Terlampa STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Terlampau banyak bahagian-bahagian stesen keretapi STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Terlampau banyak stesen bas STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Terlampau banyak ruang punggah lori -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Terlalu hampir dengan stesen/kawasan muatan lain STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Terlalu hampir dengan pelabuhan lain STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Terlalu hampir dengan lapangan terbang lain STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nama stesen tidak dapat ditukar... @@ -4079,7 +4103,7 @@ STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE :{WHITE}... pesa # Timetable related errors STR_ERROR_CAN_T_TIMETABLE_VEHICLE :{WHITE}Kenderaan tidak boleh dijadualkan... STR_ERROR_TIMETABLE_ONLY_WAIT_AT_STATIONS :{WHITE}Kenderaan hanya boleh menunggu di stesen -STR_ERROR_TIMETABLE_NOT_STOPPING_HERE :{WHITE}Kenderaan ini tidak akan berhenti di stesen ini +STR_ERROR_TIMETABLE_NOT_STOPPING_HERE :{WHITE}Kenderaan ini tidak akan berhenti di stesen berikut # Sign related errors STR_ERROR_TOO_MANY_SIGNS :{WHITE}... papan tanda terlalu banyak @@ -4092,8 +4116,12 @@ STR_DESKTOP_SHORTCUT_COMMENT :Sebuah permaina # Translatable descriptions in media/baseset/*.ob* files STR_BASEGRAPHICS_DOS_DESCRIPTION :Grafik asal Transport Tycoon Deluxe DOS edition. +STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Grafik asal Transport Tycoon DOS (German) edition STR_BASEGRAPHICS_WIN_DESCRIPTION :Grafik asal Transport Tycoon Deluxe edisi Windows. +STR_BASESOUNDS_WIN_DESCRIPTION :Bunyi asal Transport Tycoon Deluxe edisi Windows +STR_BASESOUNDS_NONE_DESCRIPTION :Sebuah pek suara tanpa apa-apa suara STR_BASEMUSIC_WIN_DESCRIPTION :Muzik asal Transport Tycoon Deluxe edisi Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Muzik asal Transport Tycoon Deluxe edisi DOS STR_BASEMUSIC_NONE_DESCRIPTION :Pek muzik tanpa muzik sebenar. ##id 0x2000 diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index 422e7ee569..e1cc630c0c 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -12,7 +12,7 @@ ##case small -# $Id: norwegian_bokmal.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -671,10 +671,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Velg pro STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Skru av/på tilfeldig program STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Vis musikkspormeny -STR_ERROR_NO_SONGS :{WHITE}Et musikksett uten sanger er valgt. Ingen sanger vil bli avspilt - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musikkprogram STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Sporliste STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1257,6 +1254,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Det er i STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Vedlikehold av infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Når aktivert, medfører infrastruktur vedlikeholdskostnader. Kostnadene vokser over-proporsjonalt med nettverkets størrelse, og påvirker dermed større selskaper mer enn de små + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flyplasser utgår aldri: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktivering av denne innstillingen gjør at hver type flyplass forblir tilgjengelig for alltid etter at sin introduksjon @@ -1340,8 +1338,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Farge på terre STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grønn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Mørkegrønn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Fiolett -STR_CONFIG_SETTING_REVERSE_SCROLLING :Snu rulleretningen: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Opptreden ved rulling av kartet med høyre museknapp. Når deaktivert, beveger musen kameraet. Når aktivert, beveger musen kartet STR_CONFIG_SETTING_SMOOTH_SCROLLING :Myk rulling: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Velge hvordan synsfeltet ruller til en bestemt posisjon når du klikker på det lille kartet, eller ved utstedelse av en kommando for å gå til et bestemt objekt på kartet. Hvis aktivert, ruller synsfeltet jevnt, og hvis deaktivert hopper det direkte til det valgte punktet STR_CONFIG_SETTING_MEASURE_TOOLTIP :Vis målingsverktøy ved bruk av byggingsverktøy: {STRING} @@ -1373,8 +1369,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Kommando+klikk STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+klikk STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Av -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Venstre-klikk rulling: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Tillat rulling av kartet ved å dra det med den venstre museknappen. Dette er spesielt nyttig når du bruker en berøringsskjerm STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Lukk vinduet med høyreklikk: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Lukker et vindu ved å høyreklikke i det. Deaktiverer verktøytipset med høyreklikk! @@ -1812,7 +1806,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Endre n STR_CHEAT_SETUP_PROD :{LTBLUE}Tillat endring av produksjonsmengder: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Ny firmafarge STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Vis generelle fargetemaer STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Vis togfargetemaer @@ -2695,7 +2688,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Firma-eid lando STR_ABOUT_OPENTTD :{WHITE}Om OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Opprinnelig opphavsbeskyttet {COPYRIGHT} 1995 Chris Sawyer, Alle rettigheter reservert STR_ABOUT_VERSION :{BLACK}OpenTTD versjon {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD-teamet +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD-teamet + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Lagre spill @@ -2988,8 +2988,6 @@ STR_TOWN_POPULATION :{BLACK}Verdensb STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (By) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Innbyggertall: {ORANGE}{COMMA}{BLACK} Antall hus: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passasjerer forrige måned: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post forrige måned: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Varebehov for byvekst: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} påkrevd STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} nødvendig om vinteren @@ -3294,21 +3292,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Gå til STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksjonsnivå: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Næringen har annonsert snarlig nedleggelse! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Trenger: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Trenger: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Trenger: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Krever: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} venter{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produserer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produserer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Endre produksjon (multiplum av 8, opptil 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Endre produksjonsnivå (prosentsats, opptil 800{NBSP}%) @@ -4229,7 +4217,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}For mang STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}For mange enkeltdeler på jernbanestasjonen STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}For mange bussholdeplasser STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}For mange lasteterminaler -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}For nærme en annen stasjon/lasteterminal STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}For nærme enn annen havn STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}For nærme en annen flyplass STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kan ikke endre stasjonens navn... diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index 96b00c9c88..c951d2e8f3 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -12,7 +12,7 @@ ##case small -# $Id: norwegian_nynorsk.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -671,10 +671,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Vel 'Eig STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Skru tilfeldig program av/på STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Syne musikkspormeny -STR_ERROR_NO_SONGS :{WHITE}Eit musikksett utan songar har blitt valt. Ingen songar vil bli spelt - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musikkprogram STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Sporregister STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1243,6 +1240,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Tillatt bygging STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Endring av denne instillinga er ikkje mogleg når det finst køyretøy STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Vedlikehald av infrastruktur: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flyplassar utgår aldri: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Advarsel om køyretøyet køyrer seg vill: {STRING} @@ -1311,7 +1309,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Farge på terre STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grøn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Mørkegrøn STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Fiolett -STR_CONFIG_SETTING_REVERSE_SCROLLING :Snu rulleretninga: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :Jamn rulling i tilleggsvindauge: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP :Syne eit målingverktøytips når ymse byggjeverktøy brukast: {STRING} STR_CONFIG_SETTING_LIVERIES :Syne firmaovertakingar: {STRING} @@ -1338,7 +1335,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Kommando+klikk STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :CTRL+klikk STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Av -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Venstreknapps-rulling: {STRING} STR_CONFIG_SETTING_AUTOSAVE :Autolaging: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Vel intervall for automatisk lagring av spel @@ -1727,7 +1723,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Byt nove STR_CHEAT_SETUP_PROD :{LTBLUE}Tillet endring av produksjonsmengder: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Ny firmafarge STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Syne generelle fargetema STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Syne togfargetema @@ -2608,7 +2603,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Feltet eigast a STR_ABOUT_OPENTTD :{WHITE}Om OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Opphaveleg opphavsbeskytta av {COPYRIGHT} 1995 Chris Sawyer, Alle rettigheiter reservert STR_ABOUT_VERSION :{BLACK}OpenTTD versjon {REV}. Oversett til nynorsk av Thor Morten Skogrand med fleire. -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD-teamet +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD-teamet + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Lagre spel @@ -2897,8 +2899,6 @@ STR_TOWN_POPULATION :{BLACK}Verdsinn STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (By) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Innbyggjartal: {ORANGE}{COMMA}{BLACK} Antal hus: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passasjerar førre månad: {ORANGE}{COMMA}{BLACK} maks.: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post førre månad: {ORANGE}{COMMA}{BLACK} maks.: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Varer naudsynt for folketalsauke: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} naudsynt STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} naudsynt om vinteren @@ -3203,18 +3203,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Midtstil STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksjonsnivå: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Verksemda legg snarleg ned drifta! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Treng: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Treng: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Treng: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Lagar: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Lagar: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Byt produksjon (8-gongen, opptil 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Endre produksjonsnivå (prosent, opp til 800%) @@ -4119,7 +4109,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}For mang STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}For mange togstasjon-delar STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}For mange busshaldeplassar STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}For mange lasteterminalar -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}For nær ein annan jernbanestasjon/lasteterminal STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}For nær ei anna hamn STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}For nær ein annan flyplass STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kan ikkje endre namnet på stasjonen... diff --git a/src/lang/polish.txt b/src/lang/polish.txt index ece3e59515..881494d78e 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -12,7 +12,7 @@ ##case d c b n m w -# $Id: polish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -568,6 +568,8 @@ STR_COLOUR_ORANGE :Pomarańczowy STR_COLOUR_BROWN :Brązowy STR_COLOUR_GREY :Szary STR_COLOUR_WHITE :Biały +STR_COLOUR_RANDOM :Losowy +STR_COLOUR_DEFAULT :Domyślny # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -854,6 +856,7 @@ STR_ABOUT_MENU_SCREENSHOT :Zrzut ekranu STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Zrzut ekranu z pełnym przybliżeniem STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Zrzut ekranu z przybliżeniem domyślnym STR_ABOUT_MENU_GIANT_SCREENSHOT :Zrzut ekranu całej mapy +STR_ABOUT_MENU_SHOW_FRAMERATE :Pokaż ilość klatek na sekundę STR_ABOUT_MENU_ABOUT_OPENTTD :Info o 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Wyrównywanie sprite'ów STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Włącz/wyłącz ramki @@ -1029,6 +1032,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Brak dostępnej muzyki STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Ścieżka STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Tytuł @@ -1048,15 +1052,14 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Wybierz STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Losowe odtwarzanie wł./wył. STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Pokaż okno wyboru ścieżek -STR_ERROR_NO_SONGS :{WHITE}Został wybrany zestaw muzyki bez utworów. Żaden utwór nie będzie odtwarzany - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Wybór Programu STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Wykaz ścieżek STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programuj - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Wyczyść +STR_PLAYLIST_CHANGE_SET :{BLACK}Zmień zestaw STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Wyczyść obecny program (tylko Wlasny1 lub Wlasny2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Zmień wybór muzyki na następny zainstalowany zestaw STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klik na ścieżce aby dodać do obecnego programu (Wlasny1 i Wlasny2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Kliknij na ścieżce muzycznej aby usunąć ją z wybranego programu (Wlasny1 lub Wlasny2) @@ -1193,6 +1196,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Prezes) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} sponsoruje konstrukcję nowego miasta {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Zostało wybudowane nowe miasto o nazwie {TOWN}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Rozpoczęto budowę nowe{G go j go} {STRING.d} blisko {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Now{G y a e} {STRING} został{G 0 "" a o} posadzon{G 0 y a e} blisko {TOWN}! @@ -1305,6 +1309,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand Południow STR_GAME_OPTIONS_CURRENCY_CUSTOM :Własna... STR_GAME_OPTIONS_CURRENCY_GEL :Lari gruzińskie (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial irański (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nowy rubel rosyjski (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso meksykańskie (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Pojazdy drogowe @@ -1634,6 +1640,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Zmiana t STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Utrzymywanie infrastruktury: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Kiedy włączone, utrzymanie infrastruktury jest naliczane w kosztach. Koszty wzrastają nadproporcjonalnie do rozmiarów sieci połączeń, a więc dotykają bardziej duże niż małe firmy +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Wybierz początkowy kolor dla firmy + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Pozwól budować stare lotniska: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Włączona opcja sprawia, że każdy typ lotniska będzie dostępny na zawsze od chwili wprowadzenia @@ -1717,8 +1725,11 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Kolor terenu na STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :zielony STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :ciemnozielony STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :fioletowy -STR_CONFIG_SETTING_REVERSE_SCROLLING :Przewijaj obraz myszką w przeciwnym kierunku: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Zachowanie podczas przewijania mapy za pomocą prawego przycisku myszy. W przypadku wyłączenia mysz porusza kamerą. Po włączeniu mysz przesuwa mapę +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Zachowanie podczas przeciągania mapy +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Przeciągnij okno podglądu prawym przyciskiem myszy, pozycja myszy zablokowana +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Przeciągnij mapę prawym przyciskiem myszy, pozycja myszy zablokowana +STR_CONFIG_SETTING_SCROLLMODE_RMB :Przeciągnij mapę prawym przyciskiem myszy +STR_CONFIG_SETTING_SCROLLMODE_LMB :Przeciągnij mapę lewym przyciskiem myszy STR_CONFIG_SETTING_SMOOTH_SCROLLING :Wygładź przesuwanie widoku: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Zdecyduj, jak główny widok przesuwa się do konkretnej lokacji, gdy klikasz na mini-mapie lub gdy używasz komendy do przesunięcia do danego obiektu na mapie. Kiedy włączone, widok przesuwa się płynnie, kiedy wyłączone, następuje skok bezpośrednio do wybranego miejsca STR_CONFIG_SETTING_MEASURE_TOOLTIP :Pokaż dymek z pomiarem podczas używania różnych narzędzi: {STRING} @@ -1750,8 +1761,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Wyłączona -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Przewijanie lewym przyciskiem myszy: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Włącz przewijanie mapy przeciąganiem lewym przyciskiem myszki. Jest to przydatne podczas używania ekranu dotykowego do przewijania STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Zamknij okno prawym przyciskiem: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Zamyka okno poprzez kliknięcie prawym przyciskiem. Wyłącza pomoc kontekstową! @@ -1777,7 +1786,7 @@ STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Wlącz obsług STR_CONFIG_SETTING_LOADING_INDICATORS :Pokazuj wskaźniki załadunku: {STRING} STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Wybierz, czy wskaźnik załadunku pokazuje się nad ładowanym/rozładowywanym pojazdem STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Pokazuj rozkłady jazdy w tickach, a nie w dniach: {STRING} -STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :W tabelach czasu, czas podróży pokaż w tyknięciach gry zamiast w dniach +STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :W tabelach czasu, czas podróży pokaż w tickach gry zamiast w dniach STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Pokazuj przyjazdy i odjazdy w rozkładach: {STRING} STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Wyświetlanie przewidywanego przyjazdu i odjazdu w rozkładach STR_CONFIG_SETTING_QUICKGOTO :Szybkie tworzenie poleceń pojazdu: {STRING} @@ -2189,7 +2198,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Zmiana o STR_CHEAT_SETUP_PROD :{LTBLUE}Pozwól modyfikować wielkość produkcji przedsiębiorstw: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nowy schemat kolorów +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Schemat kolorów STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Pokaż ogólne schematy koloru STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Pokaż schematy koloru pociągów @@ -2750,7 +2759,7 @@ STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sygnaliz STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Jednokierunkowy sygnalizator trasy (elektryczny){}Sygnalizator trasy umożliwiający wejście więcej niż jednemu pociagowi do bloku sygnalizatorów, o ile pociąg może zarezerwować trasę do bezpiecznego punktu zatrzymania. Sygnalizatory jednokierunkowe nie mogą być mijane w przeciwnym kierunku STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Zamiana sygnałów{}Jeżeli włączone, kliknięcie na istniejący sygnał spowoduje zamianę go na wybrany typ i wariant. CTRL+klik przełącza istniejący wariant. Shift+klik pokazuje szacowany koszt zamiany STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Gęstość sygnałów przy przeciąganiu -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Zmniejsz gęstość sygnałów przy przeciąganiu +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Zmniejsz odległość między sygnałami przy przeciąganiu STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Zwiększ gęstość sygnałów przy przeciąganiu # Bridge selection window @@ -3071,7 +3080,41 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Teren w posiada STR_ABOUT_OPENTTD :{WHITE}OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Prawa Autorskie {COPYRIGHT} 1995 Chris Sawyer, Wszelkie prawa zastrzeżone STR_ABOUT_VERSION :{BLACK}OpenTTD wersja {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 Zespół OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 Zespół OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Ilość klatek na sekundę +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Liczba ticków gry symulowanych na sekundę. +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Liczba renderowanych klatek wideo na sekundę. +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Jak szybko gra obecnie działa, w porównaniu do oczekiwanej prędkości przy normalnym tempie symulacji. +STR_FRAMERATE_CURRENT :{WHITE}Obecny +STR_FRAMERATE_AVERAGE :{WHITE}Średnia +STR_FRAMERATE_DATA_POINTS :{BLACK}Dane oparte na {COMMA} pomiarach +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} klatek/sek. +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} klatek/sek. +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} klatek/sek. +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} sek. +############ Leave those lines in this order!! +STR_FRAMERATE_GL_ECONOMY :{BLACK} Obsługa ładunku: +STR_FRAMERATE_GL_LINKGRAPH :{WHITE} Opóźnienie wykresu połączeń: +STR_FRAMERATE_DRAWING :{BLACK}Renderowanie grafiki: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Okna podgląu świata: +STR_FRAMERATE_VIDEO :{WHITE}Wyjście video: +STR_FRAMERATE_SOUND :{WHITE}Miksowanie dźwięku: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Pętla gry +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Opóźnienie wykresu połączeń +STR_FRAMETIME_CAPTION_DRAWING :Renderowanie grafiki +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderowanie okna podgląu świata +STR_FRAMETIME_CAPTION_VIDEO :Wyjście wideo +STR_FRAMETIME_CAPTION_SOUND :Miksowanie dźwięku +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Zapisz grę @@ -3095,6 +3138,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Szczegó STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Brak dostępnych informacji STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Fraza filtru: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Zastąp plik +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Czy na pewno chcesz zastąpić istniejący stan gry? STR_SAVELOAD_OSKTITLE :{BLACK}Wprowadź nazwę pod jaką zapisać grę @@ -3212,7 +3258,10 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Wersja: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Kompatybilność z wersją min.: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}Suma MD5: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Domyslny (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Domyślny (D) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parametry: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Żadne STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Brak dostępnych informacji STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Nie znaleziono pasującego pliku @@ -3357,6 +3406,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Wpisz na STR_TOWN_DIRECTORY_CAPTION :{WHITE}Miasta STR_TOWN_DIRECTORY_NONE :{ORANGE}- Żaden - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Miasto){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nazwy miast - klik na nazwie aby wycentrować widok na mieście. Ctrl+klik otwiera nowy podgląd na lokację miasta STR_TOWN_POPULATION :{BLACK}Populacja świata: {COMMA} @@ -3364,8 +3414,7 @@ STR_TOWN_POPULATION :{BLACK}Populacj STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Miasto) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Populacja: {ORANGE}{COMMA}{BLACK} Domów: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Pasażerów w zeszłym miesiącu: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Poczta w zeszłym miesiącu: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} w ostatnim miesiącu: {ORANGE}{COMMA}{BLACK} najwięcej: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Towar potrzebny do rozwoju miasta: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED}Wymagana {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} wymagane zimą @@ -3670,21 +3719,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centruj STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Poziom produkcji: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Przedsiębiorstwo ogłosiło likwidację! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Wymaga: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Wymaga: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Wymaga: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Potrzebuje: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} oczekuje{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Zmiana produkcji (wielokrotność 8, do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Zmiana poziomu produkcji (procentowo, do 800%) @@ -3780,6 +3819,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Ładowno STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Moc: {GOLD}+{POWER}{BLACK} Masa: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Można przystosować do: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :wszystkie typy ładunków +STR_PURCHASE_INFO_NONE :Żadne STR_PURCHASE_INFO_ALL_BUT :wszystko oprócz {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Maks. siła pociągowa: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Zasięg: {GOLD}{COMMA} pól @@ -4185,6 +4225,7 @@ STR_ORDER_CONDITIONAL_AGE :Wiek (w latach) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Wymaga serwisowania STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Zawsze STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Pozostały czas życia (w latach) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maksymalna niezawodność STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Jak porównać dane pojazdu z zadaną wartością STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :jest równy @@ -4610,7 +4651,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Za duzo STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Za dużo części stacji kolejowej STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Zbyt wiele przystanków autobusowych STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Zbyt wiele stacji załadunku ciężarówek -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Zbyt blisko innej stacji/strefy załadunku STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Zbyt blisko innego portu STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Zbyt blisko innego lotniska STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nie można zmienić nazwy stacji... @@ -4618,6 +4658,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ta d STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... droga jest zorientowana w złym kierunku STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... przystanki przelotowe nie mogą mieć zakrętów STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... przystanki przelotowe nie mogą mieć skrzyżowań +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... droga jest jednokierunkowa lub zablokowana # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nie można usunąć części stacji... @@ -4869,6 +4910,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Oryginalna edyc STR_BASESOUNDS_WIN_DESCRIPTION :Oryginalna edycja dźwięków dla Transport Tycoon Deluxe Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Zestaw dźwięków nie zawierający żadnych dźwięków. STR_BASEMUSIC_WIN_DESCRIPTION :Oryginalna edycja utworów muzycznych w Transport Tycoon Deluxe Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Oryginalna edycja utworów muzycznych dla Transport Tycoon Deluxe DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Oryginalna edycja utworów muzycznych dla Transport Tycoon DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Zestaw utworów muzycznych nie zawierający żadnej muzyki. ##id 0x2000 diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index 97790e8462..1eff62076c 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -11,7 +11,7 @@ ##gender n m f mp fp -# $Id: portuguese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -140,7 +140,7 @@ STR_ABBREV_GOODS :{TINY_FONT}BN STR_ABBREV_GRAIN :{TINY_FONT}CR STR_ABBREV_WOOD :{TINY_FONT}MD STR_ABBREV_IRON_ORE :{TINY_FONT}FR -STR_ABBREV_STEEL :{TINY_FONT}AÇ +STR_ABBREV_STEEL :{TINY_FONT}AC STR_ABBREV_VALUABLES :{TINY_FONT}VL STR_ABBREV_COPPER_ORE :{TINY_FONT}CO STR_ABBREV_MAIZE :{TINY_FONT}ML @@ -190,6 +190,8 @@ STR_COLOUR_ORANGE :Laranja STR_COLOUR_BROWN :Castanho STR_COLOUR_GREY :Cinzento STR_COLOUR_WHITE :Branco +STR_COLOUR_RANDOM :Aleatório +STR_COLOUR_DEFAULT :Padrão # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA} mph @@ -261,7 +263,7 @@ STR_SHOW_HIDDEN_ENGINES_VEHICLE_SHIP_TOOLTIP :{BLACK}Ao activ STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT_TOOLTIP :{BLACK}Ao activar este botão, os aviões ocultos também serão exibidos # Query window -STR_BUTTON_DEFAULT :{BLACK}Por Omissão +STR_BUTTON_DEFAULT :{BLACK}Padrão STR_BUTTON_CANCEL :{BLACK}Cancelar STR_BUTTON_OK :{BLACK}Confirmar @@ -476,7 +478,8 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de ecr STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Captura com resolução máxima STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Captura com resolução normal STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de mapa -STR_ABOUT_MENU_ABOUT_OPENTTD :Sobre o OpenTTD... +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar taxa de fotograma +STR_ABOUT_MENU_ABOUT_OPENTTD :Sobre o 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Alinhador de gráficos STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Alternar as caixas envolventes STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Ligar/Desligar coloração de blocos sujos @@ -603,7 +606,7 @@ STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR :Director STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHIEF_EXECUTIVE :Chefe Executivo STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHAIRMAN :Director Executivo STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_PRESIDENT :Presidente -STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TYCOON :Magnate +STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TYCOON :Magnata # Performance detail window STR_PERFORMANCE_DETAIL :{WHITE}Detalhes de rendimentos @@ -651,6 +654,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Nenhuma música disponível STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}'{STRING}' STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Faixa STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Título @@ -670,15 +674,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Seleccio STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Ligar/Desligar programa aleatório STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Mostrar janela de selecção de faixas de música -STR_ERROR_NO_SONGS :{WHITE}Um conjunto de música vazio foi seleccionado. Nenhuma música vai ser tocada. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Programação Musical +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programa musical - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} '{STRING}' STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Índice de faixas STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Limpar +STR_PLAYLIST_CHANGE_SET :{BLACK}Mudar conjunto STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Limpar programa actual (somente Personaliz. 1 ou Personaliz. 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Mudar selecção musical para outro conjunto instalado STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Clique na faixa de música para a adicionar ao programa actual (somente Personaliz. 1 ou Personaliz. 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Faça clique numa faixa para a remover da lista (Personaliz. 1 ou Personaliz. 2 apenas) @@ -814,6 +818,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Presidente) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} subsidiou a construção da nova cidade de {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Uma nova cidade chamada {TOWN} foi construida! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Nov{G 0 o o a os as} {STRING} em construção em {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nov{G 0 o o a os as} {STRING} est{G 0 á á á ão ão} a ser plantad{G 0 o o a os as} em {TOWN}! @@ -881,10 +886,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Visualizador {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copiar p/ o visualizador +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Alterar janela de exibição STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copiar a localização do visualizador global para este visualizador -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Colar do visualizador -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Colar a localização deste visualizador para o visualizador global +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Alterar vista principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copiar a localização desta janela de exibição para a vista principal # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opções do Jogo @@ -926,6 +931,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand Sul Africa STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personalizado... STR_GAME_OPTIONS_CURRENCY_GEL :Lari Georgiano (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iraniano (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Novo Rublo Russo (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso Mexicano (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Veículos rodoviários @@ -1166,11 +1173,11 @@ STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Escolha quanto STR_CONFIG_SETTING_MAX_HEIGHTLEVEL :Altura máxima do mapa: {STRING} STR_CONFIG_SETTING_MAX_HEIGHTLEVEL_HELPTEXT :Define altura máxima permitida para montanhas no mapa STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN :{WHITE}Pode aumentar a altura máxima do mapa para este valor. Pelo menos uma montanha no mapa é mais alta -STR_CONFIG_SETTING_AUTOSLOPE :Permitir formação de terra sob os edifícios, vias, etc. (auto-declive): {STRING} -STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Permitir formação de terras debaixo de edifícios e linhas sem os remover +STR_CONFIG_SETTING_AUTOSLOPE :Permite alteração de terra sob edifícios, vias, etc. (auto-declive): {STRING} +STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Permite alteração de terra sob edifícios e vias sem os remover STR_CONFIG_SETTING_CATCHMENT :Dimensionamento mais realista de áreas de abrangência: {STRING} STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Haver diferentes áreas de cobertura para diferentes tipos de estações e aeroportos -STR_CONFIG_SETTING_EXTRADYNAMITE :Permitir remover mais mais estradas, pontes e túneis detidos pela cidade: {STRING} +STR_CONFIG_SETTING_EXTRADYNAMITE :Permite remover mais estradas, pontes e túneis detidos pela cidade: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Facilitar a remoçar de edifícios e infraestruturas detidas pela cidade STR_CONFIG_SETTING_TRAIN_LENGTH :Tamanho máximo de comboios: {STRING} STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT :Assignar o tamanho máximo dos comboios @@ -1189,7 +1196,7 @@ STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Declive de um q STR_CONFIG_SETTING_FORBID_90_DEG :Proibir comboios e barcos fazer curvas de 90º: {STRING} STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Curvas de 90 graus ocorrem quando uma pista horizontal é directamente seguida por outra vertical num quadrado adjacente, fazendo com que o combóio vire 90 graus quando atravessa a fronteira dos quadrados, ao invés dos habituais 45 graus para outras combinações de pistas. Também se aplica ao raio de curvatura dos navios STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Permitir juntar estações não adjacentes: {STRING} -STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Permitir adicionar novas partes a uma estação sem tocar nas partes já existentes. Requer pressionar CTRL+click para adicionar as novas partes +STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Permite adicionar novas partes a uma estação sem tocar nas partes já existentes. Requer pressionar CTRL+click para adicionar as novas partes STR_CONFIG_SETTING_INFLATION :Inflação: {STRING} STR_CONFIG_SETTING_INFLATION_HELPTEXT :Ativar inflação na economia, para que os preços subam ligeiramente mais rápido do que os pagamentos STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH :Tamanho máximo de ponte: {STRING} @@ -1227,16 +1234,16 @@ STR_CONFIG_SETTING_AUTOSCROLL_DISABLED :Desligado STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT_FULLSCREEN :Visualizador principal, só ecrã cheio STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT :Visualizador principal STR_CONFIG_SETTING_AUTOSCROLL_EVERY_VIEWPORT :Todos os visualizadores -STR_CONFIG_SETTING_BRIBE :Permitir o suborno da autoridade local: {STRING} -STR_CONFIG_SETTING_BRIBE_HELPTEXT :Permitir que as companhias subornem as autoridades locais. Se o suborno for descoberto por um inspector, a companhia não poderá construir nessa localidade durante seis meses -STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :Permitir comprar exclusivo dos direitos de transportes: {STRING} +STR_CONFIG_SETTING_BRIBE :Permite o suborno da autoridade local: {STRING} +STR_CONFIG_SETTING_BRIBE_HELPTEXT :Permite que as companhias tentem subornar a autoridade local. Se o suborno for descoberto por um inspector, a companhia não poderá construir nessa localidade durante seis meses +STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :Permite comprar direitos de transporte em exclusividade: {STRING} STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT :Se uma empresa compra direitos exclusivos de transporte para uma cidade, as estações dos concorrentes (passageiros e carga) não receberão cargo durante um ano -STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS :Permitir investir em edificios: {STRING} -STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT :Permitir que empresas doem dinheiro às cidades para financiar creação de novas casas -STR_CONFIG_SETTING_ALLOW_FUND_ROAD :Permitir o financiamento de reconstrução de estradas locais:{STRING} -STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT :Permitir que as companhias financiem reparações de estradas para sabotar serviços rodoviários dos oponentes. -STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :Permitir enviar dinheiro para outras empresas: {STRING} -STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT :Permitir transferencias de dinheiro entre empresas em modo multi-jogador +STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS :Permite investir em edifícios: {STRING} +STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT :Permite que empresas doem dinheiro às cidades para financiar novas casas +STR_CONFIG_SETTING_ALLOW_FUND_ROAD :Permite financiar a reconstrução de estradas locais:{STRING} +STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT :Permite que as companhias financiem reparações de estrada para sabotar serviços rodoviários dos oponentes. +STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :Permite enviar dinheiro para outras empresas: {STRING} +STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT :Permite transferências de dinheiro entre empresas em modo multi-jogador STR_CONFIG_SETTING_FREIGHT_TRAINS :Multiplicador de peso para simular comboios pesados: {STRING} STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT :Define o impacto de carregar mercadoria nos combóios. Um valor superior torna o carregamento de meradoria mais exigente para os combóios, especialmente em terreno inclinado STR_CONFIG_SETTING_PLANE_SPEED :Fator de velocidade de avião: {STRING} @@ -1247,14 +1254,17 @@ STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Indicar a hipó STR_CONFIG_SETTING_PLANE_CRASHES_NONE :Nenhum STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :Reduzido STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :Normal -STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Permitir estações de passagem em estradas das cidades: {STRING} +STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Permite estações de passagem em estradas das cidades: {STRING} STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD_HELPTEXT :Permite construção de paragens drive-through em ruas que são prorpiedade das povoações -STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :Permitir estações de passagem em estradas do adversário: {STRING} +STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :Permite estações de passagem em estradas do adversário: {STRING} STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Permite construção de paragens drive-through em ruas que são prorpiedade de outras companhias STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Não é possível mudar quando já existem veículos. STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manutenção de infraestruturas: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Quando activo, as infraestruturas têm custos de manutenção. O custo cresce mais do que proporcionalmente com o tamanho da rede e com isso afecta mais as companhias maiores comparado com as mais pequeneas +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Côr de inicio da empresa: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Escolher côr de inicio da empresa + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroportos nunca expiram: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activar esta preferência torna cada tipo de aeroporto disponível para sempre após a sua introdução @@ -1273,8 +1283,8 @@ STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Auto-renovaçã STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Quando activo, um veículo a chegar ao fim de vida é automaticamente substituído quando as condições de renovação estão reunidas STR_CONFIG_SETTING_AUTORENEW_MONTHS :Renovar automaticamente quando um veículo chega a {STRING} de idade STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Idade relativa a partir da qual um veículo deva ser indicado para auto-renovação -STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE :{COMMA} mês{P 0 "" es} antes -STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER :{COMMA} mês{P 0 "" es} após +STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE :{COMMA} {P "mês" "meses"} antes +STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER :{COMMA} {P "mês" "meses"} após STR_CONFIG_SETTING_AUTORENEW_MONEY :Dinheiro mínimo para fazer auto-renovação: {STRING} STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Quantidade mínima de dinheiro que tem que estar no banco para auto-renovação de veículos ser considerada STR_CONFIG_SETTING_ERRMSG_DURATION :Duração da mensagem de erro: {STRING} @@ -1338,8 +1348,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Cor do terreno STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde Escuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violeta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Ao deslizar com o rato, mover a vista na direcção oposta: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Comportamento ao navegar pelo mapa com o botão direito do rato. Quando desactivado, o rato move a câmara. Quando activo, o rato move o mapa +STR_CONFIG_SETTING_SCROLLMODE :Comportamento de deslocação da janela de exibição: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportamento na deslocação do mapa +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Mover janela de exibição com Botão Direito Rato, posição do rato bloqueada +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Mover mapa com Botão Direito Rato, posição do rato bloqueada +STR_CONFIG_SETTING_SCROLLMODE_RMB :Mover mapa com Botão Direito Rato +STR_CONFIG_SETTING_SCROLLMODE_LMB :Mover mapa com Botão Esquerdo Rato STR_CONFIG_SETTING_SMOOTH_SCROLLING :Suavizar deslocamento da navegação no mapa: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla como a vista principal navega para uma posição específica ao clicar no mapa pequeno ou ao dar um comando para navegar para um objecto específico no mapa. Se activo, a vista principal navega suavemente, se inactivo a vista salta directamente para o destino. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostrar medidas nas várias ferramentas de construção: {STRING} @@ -1371,8 +1385,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND : + Cli STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL : + clique STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Desligado -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Deslocar com botão esquerdo: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Activar deslocamento do mapa através de arrastamento com o botão esquerdo do rato. Esta opção é particularmente útil quando é usado um ecran de toque para deslocamento STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Fechar janelas ao fazer clique direito: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Fecha uma janela ao fazer clique direito dentro dela. Desactiva os textos de ajuda ao fazer clique direito! @@ -1453,13 +1465,13 @@ STR_CONFIG_SETTING_AI_BUILDS_SHIPS :Desactivar barc STR_CONFIG_SETTING_AI_BUILDS_SHIPS_HELPTEXT :Activar esta preferência impossibilita a construção de navios por um jogador controlado pelo computador STR_CONFIG_SETTING_AI_PROFILE :Perfil de preferências por omissão: {STRING} -STR_CONFIG_SETTING_AI_PROFILE_HELPTEXT :Escolher o perfil de preferências a usar para AIs aleatórias ou para valores iniciais ao adicionar uma nova AI ou Game Script +STR_CONFIG_SETTING_AI_PROFILE_HELPTEXT :Escolher o perfil de preferências a usar para AIs aleatórias ou para valores iniciais ao adicionar uma nova AI ou Script de Jogo STR_CONFIG_SETTING_AI_PROFILE_EASY :Fácil STR_CONFIG_SETTING_AI_PROFILE_MEDIUM :Média STR_CONFIG_SETTING_AI_PROFILE_HARD :Difícil -STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Permitir IAs em multi-jogador: {STRING} -STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Permitir a jogadores controlados pelo computador a participação em jogos multijogador +STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Permite IAs em multi-jogador: {STRING} +STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Permite a jogadores controlados pelo computador a participação em jogos multi-jogador STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes antes de os scripts serem suspensos: {STRING} STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Número máximo de passos computacionais que um script pode executar num turno @@ -1471,7 +1483,7 @@ STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA} dia{P 0 STR_CONFIG_SETTING_SERVINT_DISABLED :Desativado STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES :Intervalo de serviço para veículos de estrada por omissão: {STRING} STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT :Definir o intervalo de manutenção por omissão para novos veículos de estrada, se não for configurado um intervalo de manutenção explícito para o veículo -STR_CONFIG_SETTING_SERVINT_AIRCRAFT :Intervalo de serviço para aeronaves por omissão: {STRING} +STR_CONFIG_SETTING_SERVINT_AIRCRAFT :Intervalo de serviço para aeronaves padrão: {STRING} STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Definir o intervalo de manutenção por omissão para novas aeronaves, se não for configurado um intervalo de manutenção explícito para o veículo STR_CONFIG_SETTING_SERVINT_SHIPS :Intervalo de serviço para navios por omissão: {STRING} STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Definir o intervalo de manutenção por omissão para novos navios, se não for configurado um intervalo de manutenção explícito para o veículo @@ -1554,7 +1566,7 @@ STR_CONFIG_SETTING_TOWN_LAYOUT_2X2_GRID :grelha 2x2 STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :grelha 3x3 STR_CONFIG_SETTING_TOWN_LAYOUT_RANDOM :Aleatório STR_CONFIG_SETTING_ALLOW_TOWN_ROADS :As cidades têm permissão para construir estradas: {STRING} -STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Permitir às cidades a construção de estradas para crescimento. Desactivar para não permitir às autoridades a construção de estradas +STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Permite às cidades a construção de estradas para crescimento. Desactivar para não permitir às autoridades a construção de estradas STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS :Cidades podem construir passagens de nível: {STRING} STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS_HELPTEXT :Activar esta preferência permite às cidades construir cruzamentos nivelados STR_CONFIG_SETTING_NOISE_LEVEL :Permitir que a cidade controle o nível de ruído dos aeroportos: {STRING} @@ -1689,7 +1701,7 @@ STR_CONFIG_SETTING_ENVIRONMENT_TOWNS :{ORANGE}Cidades STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :{ORANGE}Industrias STR_CONFIG_SETTING_ENVIRONMENT_CARGODIST :{ORANGE}Distribuição de Carga STR_CONFIG_SETTING_AI :{ORANGE}Oponentes -STR_CONFIG_SETTING_AI_NPC :{ORANGE}Jogadores computador +STR_CONFIG_SETTING_AI_NPC :{ORANGE}Jogadores Computador STR_CONFIG_SETTING_PATHFINDER_OPF :Original STR_CONFIG_SETTING_PATHFINDER_NPF :NPF @@ -1793,7 +1805,7 @@ STR_ABANDON_SCENARIO_QUERY :{YELLOW}Tem a c # Cheat window STR_CHEATS :{WHITE}Truques STR_CHEATS_TOOLTIP :{BLACK}As caixas de verificação indicam se já usou este truque antes -STR_CHEATS_WARNING :{BLACK} Atenção! Está prestes a trair seus concorrentes. Tenha em mente que a desonra vai ser lembrada para a eternidade +STR_CHEATS_WARNING :{BLACK} Atenção! Está prestes a trair seus concorrentes. Tenha em mente que a desonra será lembrada para a eternidade STR_CHEAT_MONEY :{LTBLUE}Aumentar dinheiro em {CURRENCY_LONG} STR_CHEAT_CHANGE_COMPANY :{LTBLUE}Jogando como empresa: {ORANGE}{COMMA} STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Bulldozer mágico (destrói indústrias, objectos amovíveis etc.): {ORANGE}{STRING} @@ -1810,7 +1822,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Alterar STR_CHEAT_SETUP_PROD :{LTBLUE}Activar modificação de valores de produção: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Novo Esquema de Cores +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Novo Esquema de Cores STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Exibir esquema de cores geral STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Exibir esquemas de cores dos comboios @@ -1840,8 +1852,8 @@ STR_LIVERY_TRUCK :Veículo de Mer STR_LIVERY_PASSENGER_SHIP :Barco de Passageiros STR_LIVERY_FREIGHT_SHIP :Barco Cargueiro STR_LIVERY_HELICOPTER :Helicóptero -STR_LIVERY_SMALL_PLANE :Aeronave de Pequenas Dimensões -STR_LIVERY_LARGE_PLANE :Aeronave de Grandes Dimensões +STR_LIVERY_SMALL_PLANE :Avião de Pequenas Dimensões +STR_LIVERY_LARGE_PLANE :Avião de Grandes Dimensões STR_LIVERY_PASSENGER_TRAM :Eléctrico de Passageiros STR_LIVERY_FREIGHT_TRAM :Eléctrico de Mercadorias @@ -2286,6 +2298,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Todos STR_LINKGRAPH_LEGEND_NONE :{BLACK}Nenhuma STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Selecione as companhias a serem mostradas +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}não usado @@ -2370,9 +2383,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Sinal Co STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sinal (eléctrico){}Os sinais permitem que vários comboios entrem na mesma linha ao mesmo tempo, desde que consigam chegar ao seu destino em segurança. Sinais padrão podem ser passados no sentido contrário. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Sinal de sentido único (eléctrico){}Um sinal de trajecto permite que mais de um comboio passe ao mesmo tempo um sinal se, o comboio conseguir reservar um caminho para onde posteriormente possa parar sem prejudicar o seguinte. Sinais de um único sentido não podem ser passados no sentido contrário. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversão de Sinal{}Quando seleccionado, ao fazer clique num sinal existente este será convertido no tipo e variante de sinal seleccionado, Ctrl+clique irá comutar a variante existente. Shift+Clique mostra estimativa do custo de conversão -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densidade de sinais -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Diminuir densidade de sinais -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar densidade de sinais +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distância de arrasto de sinais +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reduzir distância de arrasto de sinais +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar a distância de arrasto de sinais # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Seleccione Ponte Ferroviária @@ -2381,10 +2394,10 @@ STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selecç STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensa, Aço -STR_BRIDGE_NAME_GIRDER_STEEL :Vigas, Aço -STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Aço +STR_BRIDGE_NAME_GIRDER_STEEL :Viga, Aço +STR_BRIDGE_NAME_CANTILEVER_STEEL :Consola, Aço STR_BRIDGE_NAME_SUSPENSION_CONCRETE :Suspensa, Betão -STR_BRIDGE_NAME_WOODEN :De madeira +STR_BRIDGE_NAME_WOODEN :Madeira STR_BRIDGE_NAME_CONCRETE :Betão STR_BRIDGE_NAME_TUBULAR_STEEL :Tubular, Aço STR_BRIDGE_TUBULAR_SILICON :Tubular, Silício @@ -2463,8 +2476,8 @@ STR_AIRPORT_INTERNATIONAL :Internacional STR_AIRPORT_COMMUTER :Transbordo STR_AIRPORT_INTERCONTINENTAL :Intercontinental STR_AIRPORT_HELIPORT :Heliporto -STR_AIRPORT_HELIDEPOT :Heli-depósito -STR_AIRPORT_HELISTATION :Heli-estação +STR_AIRPORT_HELIDEPOT :Heli Hangar +STR_AIRPORT_HELISTATION :Heliponto STR_AIRPORT_CLASS_SMALL :Aeroportos pequenos STR_AIRPORT_CLASS_LARGE :Aeroportos grandes @@ -2666,17 +2679,17 @@ STR_LAI_TUNNEL_DESCRIPTION_RAILROAD :Túnel ferrovi STR_LAI_TUNNEL_DESCRIPTION_ROAD :Túnel rodoviário STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL :Ponte ferroviária suspensa em aço -STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL :Ponte ferroviária com vigas em aço -STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL :Ponte ferroviária cantilever em aço -STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE :Ponte ferroviária suspensa de betão reforçado +STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL :Ponte ferroviária em vigas de aço +STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL :Ponte ferroviária em consolas de aço +STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE :Ponte ferroviária suspensa de betão armado STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN :Ponte ferroviária de madeira STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE :Ponte ferroviária de betão STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL :Ponte rodoviária tubular STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL :Ponte rodoviária suspensa em aço STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL :Ponte rodoviária com vigas em aço -STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL :Ponte rodoviária cantilever em aço -STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE :Ponte rodoviária suspensa de betão reforçado +STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL :Ponte rodoviária em consolas de aço +STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE :Ponte rodoviária suspensa de betão armado STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN :Ponte rodoviária de madeira STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE :Ponte rodoviária de betão STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL :Ponte rodoviária tubular @@ -2689,10 +2702,60 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS :Sede de empresa STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terreno propriedade de uma empresa # About OpenTTD window -STR_ABOUT_OPENTTD :{WHITE}Sobre o OpenTTD... +STR_ABOUT_OPENTTD :{WHITE}Sobre o OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Direitos de autor originais {COPYRIGHT} 1995 Chris Sawyer, Todos os direitos reservados STR_ABOUT_VERSION :{BLACK}OpenTTD versão {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 A equipa do OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 A equipa do OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Taxa de fotograma +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Taxa de simulação: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Numero de quantidades de atraso no percurso simulados por segundo. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Taxa de fotogramas dos gráficos: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Número de fotogramas de video renderizados por segundo. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Factor de velocidade actual do jogo: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Quão rápido o jogo está a ser executado, comparado com a velocidade esperada na taxa de simulação normal. +STR_FRAMERATE_CURRENT :{WHITE}Actual +STR_FRAMERATE_AVERAGE :{WHITE}Média +STR_FRAMERATE_DATA_POINTS :{BLACK}Dados baseados em {COMMA} medições +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} fotograma/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} fotograma/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} fotograma/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :Total de loops no jogo +STR_FRAMERATE_GL_ECONOMY :{BLACK} Movimentação de carga: +STR_FRAMERATE_GL_TRAINS :{BLACK} Quantidade de atraso no percurso do Comboio: +STR_FRAMERATE_GL_ROADVEHS :{BLACK}Quantidade de atraso no percurso do veículo rodoviário: +STR_FRAMERATE_GL_SHIPS :{BLACK} Ship ticks: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Quantidade de atraso no percurso de Aeronave: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} World ticks: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Atraso no gráfico de ligação: +STR_FRAMERATE_DRAWING :{BLACK}Renderização gráfica: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Janelas de exibição do mundo: +STR_FRAMERATE_VIDEO :{BLACK}Saída de video: +STR_FRAMERATE_SOUND :{BLACK}Mistura de Som: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Loop de jogo +STR_FRAMETIME_CAPTION_GL_ECONOMY :Movimentação de carga +STR_FRAMETIME_CAPTION_GL_TRAINS :Quantidade de atraso no percurso do Comboio +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Quantidade de atraso no percurso do veículo rodoviário +STR_FRAMETIME_CAPTION_GL_SHIPS :Quantidade de atraso no percurso do barco +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Quantidade de atraso no percurso de Aeronave +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Quantidade de Atraso no Percurso Mundial +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Atraso no gráfico de ligação +STR_FRAMETIME_CAPTION_DRAWING :Renderização gráfica +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderização de janela de exibição do mundo +STR_FRAMETIME_CAPTION_VIDEO :Saída de video +STR_FRAMETIME_CAPTION_SOUND :Mistura de Som +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Guardar Jogo @@ -2716,6 +2779,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Detalhes STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Nenhuma informação disponível STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtro de sequência: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Substituir Ficheiro +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Tem a certeza que deseja substituir o ficheiro existente? STR_SAVELOAD_OSKTITLE :{BLACK}Introduza um nome para o jogo gravado @@ -2797,7 +2863,7 @@ STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Informa STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Ficheiros NewGRF activos STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Ficheiros NewGRF inactivos STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Seleccionar predefinição: -STR_NEWGRF_FILTER_TITLE :{ORANGE}Frase filtro: +STR_NEWGRF_FILTER_TITLE :{ORANGE}Filtro de sequência: STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Carrega a predefinição seleccionada STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Guardar STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Guarda a lista numa predefinição @@ -2833,7 +2899,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versão: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Versão mínima compatível: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Padrão (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Padrão (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Legacy (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Legacy (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parâmetros: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Nenhum STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Sem informação disponível STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Ficheiro correspondente não encontrado @@ -2914,6 +2985,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Leitura além d STR_NEWGRF_ERROR_GRM_FAILED :Recursos GRF pedidos não disponíveis (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} foi desactivado por {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Formato de Gráfico Inválido ou desconhecido (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Demasiados elementos na lista de valores de propriedade (sprite {3:NUM}, propriedade {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Revogação da produção industrial inválida (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Alerta! @@ -2978,6 +3051,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Introduz STR_TOWN_DIRECTORY_CAPTION :{WHITE}Cidades STR_TOWN_DIRECTORY_NONE :{ORANGE}- Nenhuma - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Cidade){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nomes das cidades - clique no nome para centrar a visualização na cidade. Ctrl+Clique abre um novo visualizador na localização da cidade STR_TOWN_POPULATION :{BLACK}População Mundial: {COMMA} @@ -2985,8 +3059,7 @@ STR_TOWN_POPULATION :{BLACK}Populaç STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Metrópole) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}População: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passageiros no último mês: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Correio no último mês: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} ultimo mês: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Mercadoria necessária para o seu desenvolvimento: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED}É necessário {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{BLACK}No inverno, é necessário {ORANGE}{STRING} @@ -3226,10 +3299,10 @@ STR_COMPANY_VIEW_VEHICLES_NONE :{WHITE}Nenhum STR_COMPANY_VIEW_COMPANY_VALUE :{GOLD}Valor da empresa: {WHITE}{CURRENCY_LONG} STR_COMPANY_VIEW_SHARES_OWNED_BY :{WHITE}({COMMA}% propriedade de {COMPANY}) STR_COMPANY_VIEW_INFRASTRUCTURE :{GOLD}Infraestrutura: -STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL :{WHITE}{COMMA} peça{P "" s} de caminho-de-ferro -STR_COMPANY_VIEW_INFRASTRUCTURE_ROAD :{WHITE}{COMMA} peça{P "" s} de estrada -STR_COMPANY_VIEW_INFRASTRUCTURE_WATER :{WHITE}{COMMA} quadrado{P "" s} de água -STR_COMPANY_VIEW_INFRASTRUCTURE_STATION :{WHITE}{COMMA} quadrado{P "" s} de estação +STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL :{WHITE}{COMMA} {P "secção" "secções" } de caminho-de-ferro +STR_COMPANY_VIEW_INFRASTRUCTURE_ROAD :{WHITE}{COMMA} {P "secção" "secções"} de estrada +STR_COMPANY_VIEW_INFRASTRUCTURE_WATER :{WHITE}{COMMA} bloco{P "" s} de água +STR_COMPANY_VIEW_INFRASTRUCTURE_STATION :{WHITE}{COMMA} bloco{P "" s} de estação STR_COMPANY_VIEW_INFRASTRUCTURE_AIRPORT :{WHITE}{COMMA} aeroporto{P "" s} STR_COMPANY_VIEW_INFRASTRUCTURE_NONE :{WHITE}Nenhum @@ -3263,15 +3336,15 @@ STR_BUY_COMPANY_MESSAGE :{WHITE}Estamos # Company infrastructure window STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Infraestrutura de {COMPANY} -STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Peças de caminho-de-ferro: +STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Secções de caminho-de-ferro: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Sinais -STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Peças de estrada: +STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Secções de estrada: STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD :{WHITE}Estrada STR_COMPANY_INFRASTRUCTURE_VIEW_TRAMWAY :{WHITE}Via para elétricos -STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Quadrados de água: +STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Blocos de água: STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Canais STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Estações: -STR_COMPANY_INFRASTRUCTURE_VIEW_STATIONS :{WHITE}Quadrados de estações +STR_COMPANY_INFRASTRUCTURE_VIEW_STATIONS :{WHITE}Blocos de estações STR_COMPANY_INFRASTRUCTURE_VIEW_AIRPORTS :{WHITE}Aeroportos STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENCY_LONG}/ano @@ -3291,21 +3364,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou encerramento iminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Necessário: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necessário: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Necessário: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requer: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} a aguardar{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Modificar produção (múltiplo de 8, até 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mudar o nível de produção (percentagem, até 800%) @@ -3358,6 +3424,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupos - STR_GROUP_CREATE_TOOLTIP :{BLACK}Clique para criar um grupo STR_GROUP_DELETE_TOOLTIP :{BLACK}Remover o grupo seleccionado STR_GROUP_RENAME_TOOLTIP :{BLACK}Mudar o nome do grupo seleccionado +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Alterar a imagem do grupo selecionado STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Clique para proteger este grupo da autosubstituição global STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Apagar Grupo @@ -3375,11 +3442,11 @@ STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Novos Veículos Ferroviários -STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :Novos comboios para carris electrificados +STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :Novos Veículos Ferroviários Elétricos STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Novos Veículos Monocarril STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Novos Veículos Maglev -STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Novos Veículos Sobre Carris +STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Novos Veículos Ferroviários STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Novos Veículos Rodoviários STR_BUY_VEHICLE_SHIP_CAPTION :Novos Barcos STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Nova Aeronave @@ -3401,6 +3468,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacida STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Vagões Motorizados: {GOLD}+{POWER}{BLACK} Peso: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Reconvertível para: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Todos os tipos de carga +STR_PURCHASE_INFO_NONE :Nenhum STR_PURCHASE_INFO_ALL_BUT :Todas menos {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Máx. Força de Tracção: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Alcance: {GOLD}{COMMA} quadrados @@ -3408,7 +3476,7 @@ STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK}Tipo de STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Lista de veículos ferroviários - clique num veículo para informações STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Lista de veículos rodoviários - clique num veículo para informações -STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Lista de selecção de navios. Clique num navio para informações. Ctrl+Clique para alternar/ocultar o tipo de navio +STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Lista de selecção de barcos. Clique num navio para informações. Ctrl+Clique para alternar/ocultar o tipo de barco STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Lista de aeronaves - clique na aeronave para informações STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Comprar Veículo @@ -3726,7 +3794,7 @@ STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}Nova cap STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}Nova capacidade: {GOLD}{CARGO_LONG}{}{BLACK}Lucro da conversão: {GREEN}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}Nova capacidade: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Custo da adaptação: {RED}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}Nova capacidade: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Lucro da conversão: {GREEN}{CURRENCY_LONG} -STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Selecionar os veículos a reaparelhar. Arrastando com o rato permite selecionar vários veículos. Clicando sobre um espaço vazio irá selecionar todo o veículo. Ctrl+Clique irá selecionar um veículo e composição +STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Selecionar os veículos a readaptar. Arrastando com o rato permite selecionar vários veículos. Clicando sobre um espaço vazio irá selecionar todo o veículo. Ctrl+Clique irá selecionar um veículo e composição STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Seleccionar tipo de carga do comboio STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Seleccione o tipo de carga para o veículo @@ -3800,6 +3868,7 @@ STR_ORDER_CONDITIONAL_AGE :Idade (anos) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Requer manutenção STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Sempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Tempo de vida restante (anos) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Máxima fiabilidade STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Como comparar os dados do veículo com o parâmetro passado STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :é igual a @@ -3974,7 +4043,7 @@ STR_AI_DEBUG_NAME_TOOLTIP :{BLACK}Nome do STR_AI_DEBUG_SETTINGS :{BLACK}Definições STR_AI_DEBUG_SETTINGS_TOOLTIP :{BLACK}Alterar as definições do script STR_AI_DEBUG_RELOAD :{BLACK}Recarregar IA -STR_AI_DEBUG_RELOAD_TOOLTIP :{BLACK}Terminar a IA, recarrega o script e reinicia a IA +STR_AI_DEBUG_RELOAD_TOOLTIP :{BLACK}Termina a IA, recarrega o script e reinicia a IA STR_AI_DEBUG_BREAK_STR_ON_OFF_TOOLTIP :{BLACK}Activar/desactivar paragem quando o registo da IA for igual à string de paragem STR_AI_DEBUG_BREAK_ON_LABEL :{BLACK}Parar em: STR_AI_DEBUG_BREAK_STR_OSKTITLE :{BLACK}Parar em @@ -4225,7 +4294,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Demasiad STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Demasiadas partes na estação ferroviária STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Demasiadas paragens de autocarro STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Demasiadas estações de carga -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Muito junto de uma estação/local de carga STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Muito perto de outra doca STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Demasiado perto de outro aeroporto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Não pode alterar o nome da estação... @@ -4233,6 +4301,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... esta STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... estrada orientada na direcção incorrecta STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... estações de passagem não podem ter curvas STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... estações de passagem não podem ter cruzamentos +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... estrada de sentido único ou bloqueada # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Não é possível remover parte da estação... @@ -4484,6 +4553,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sons originais STR_BASESOUNDS_WIN_DESCRIPTION :Sons originais da edição Windows de Transport Tycoon Deluxe. STR_BASESOUNDS_NONE_DESCRIPTION :Um conjunto de sons vazio. STR_BASEMUSIC_WIN_DESCRIPTION :Música original da edição Windows de Transport Tycoon Deluxe. +STR_BASEMUSIC_DOS_DESCRIPTION :Música original da edição DOS do Transport Tycoon Deluxe. +STR_BASEMUSIC_TTO_DESCRIPTION :Música original da edição DOS do Transport Tycoon (Original/Editor de Mundo) STR_BASEMUSIC_NONE_DESCRIPTION :Um conjunto de música vazio. ##id 0x2000 diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 43958ee5e5..5a86b952dc 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -10,7 +10,7 @@ ##grflangid 0x28 -# $Id: romanian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,15 +669,14 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Selectea STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Comutator pentru amestecarea melodiilor (pornit/oprit) STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Afişeaza fereastra pentru selecţia melodiilor -STR_ERROR_NO_SONGS :{WHITE}A fost selectat un set de muzică fără melodii. Nici o melodie nu va fi cântată - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Programare piese muzicale STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Lista melodiilor STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Şterge +STR_PLAYLIST_CHANGE_SET :{BLACK}Schimbă setul STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Şterge programul curent (doar pentru cele personale) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Schimbă selecția muzicală pe un alt set instalat STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Click pe o melodie pentru a o adăuga în programul personal curent STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Apasă pe melodie pentru a o elimina din programul actual (doar Custom1 sau Custom2) @@ -1000,6 +999,7 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecta STR_GAME_OPTIONS_BASE_MUSIC_STATUS :{RED}{NUM} fişier{P "" e} corupt{P "" e} STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informaţii adiţionale despre setul de muzică de bază +STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nu s-a putut obține lista de rezoluții suportate STR_ERROR_FULLSCREEN_FAILED :{WHITE}Comutarea pe întreg ecranul a eşuat # Custom currency window @@ -1115,6 +1115,7 @@ STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_MENU :Setări joc (st STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_INGAME :Setări joc (stocate în salvări; afectează doar jocul curent) STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_MENU :Setări companie (stocate în salvări; afectează doar jocurile noi) STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Setări compenia (stocate în salvări; afectează doar compania curentă) +STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Arată toate rezultatele de căutare setând{}{SILVER}Categoria {BLACK}în {WHITE}{STRING} STR_CONFIG_SETTINGS_NONE :{WHITE}- Nespecificat - STR_CONFIG_SETTING_OFF :Inactiv @@ -1248,6 +1249,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Schimbar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mentenanță infrastructură: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cand este activă, infrastructura necesita cheltuieli cu intreținerea. Costurile cresc proporțional cu rețeaua de transport, afectând companiile mari mai mult decât companiile mici + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroporturile nu expiră niciodată: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activarea acestei opțiuni determina ca fiecare tip de aeroport sa fie disponibil permanent, după ce a fost introdus. @@ -1288,6 +1290,7 @@ STR_CONFIG_SETTING_LAND_GENERATOR :Generator teren STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL :Original STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :TerraGenesis STR_CONFIG_SETTING_TERRAIN_TYPE :Tip teren: {STRING} +STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(Doar TerraGenesis) Frecvența dealurilor din peisaj STR_CONFIG_SETTING_INDUSTRY_DENSITY :Densitatea industriei: {STRING} STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Distanța maximă de la marginea hărții pentru rafinării: {STRING} STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Rafinăriile de petrol vor fi construite doar la marginea hărţii, sau pe coastă, în cazul harţilor insulare @@ -1304,6 +1307,7 @@ STR_CONFIG_SETTING_TREE_PLACER_HELPTEXT :Alegeți distri STR_CONFIG_SETTING_TREE_PLACER_NONE :Niciunul STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Îmbunătăţit +STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Alege banda pentru condus STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Rotaţie hartă înălţimi: {STRING} STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE :Spre stânga STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_CLOCKWISE :Spre dreapta @@ -1322,8 +1326,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Culoarea terenu STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde închis STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Mov -STR_CONFIG_SETTING_REVERSE_SCROLLING :Inversează direcţia de scroll: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Modul de funcționare in momentul folosirii butonului drept al mouse-ului pentru deplasare pe hartă. Când opțiunea este dezactivată, mouse-ul schimbă poziția camerei. La activare, mouse-ul desplasează harta. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Derulare uşoară ecran: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controlează modul de deplasare a imaginii din ecranul principal când se face click pe harta mică sau când se execută o comandă de deplasare către un obiect anume de pe hartă. Dacă este activată, imaginea se deplasează în mod fluid, altfel imaginea sare direct la zona dorită STR_CONFIG_SETTING_MEASURE_TOOLTIP :Arată o indicaţie de distanţă la folosirea uneltelor de construcţie: {STRING} @@ -1355,8 +1357,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Comandă+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Oprit -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Derulare ecran cu click-stânga: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Activează derularea hărții prin tragerea acesteia cu butonul stâng al mouse-ului. Această opțiune este în special utilă când se folosește un ecran tactil pentru deplasare STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Foloseşte formatul datei {STRING} pentru numele salvărilor @@ -1638,6 +1638,7 @@ STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :SI (m) STR_CONFIG_SETTING_LOCALISATION :{ORANGE}Localizare STR_CONFIG_SETTING_SOUND :{ORANGE}Efecte sonore STR_CONFIG_SETTING_INTERFACE :{ORANGE}Interfaţă +STR_CONFIG_SETTING_INTERFACE_GENERAL :{ORANGE}General STR_CONFIG_SETTING_INTERFACE_VIEWPORTS :{ORANGE}Câmpuri vizuale STR_CONFIG_SETTING_INTERFACE_CONSTRUCTION :{ORANGE}Construcţie STR_CONFIG_SETTING_ADVISORS :{ORANGE}Știri / Consilieri @@ -1771,7 +1772,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Schimbă STR_CHEAT_SETUP_PROD :{LTBLUE}Activează accesul la valorile de producţie: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Schemă de culori nouă +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Schemă de culori STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Afişează schemele generale de culori STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Arată schemele de culori pentru trenuri @@ -2332,7 +2333,7 @@ STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Semnal d STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Semnal de cale cu sens unic (electric){}Un semnal de cale permite trecerea simultană a mai multor trenuri prin blocurile de semnale, dacă trenul poate rezerva o cale până la un punct sigur de oprire. Semnalele de cale cu sens unic permit trecerea intr-un singur sens STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversie semnal{}Când este selectat, click-ul pe un semafor existent îl va converti în tipul şi varianta selectată de semnalizare. Ctrl+Click va comuta varianta existentă. Shift+Click afişează costul estimat al conversiei STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densitatea semnalelor plasate prin tragerea cu mouse-ul -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Scade densitatea semnalelor plasate prin tragerea cu mouse-ul +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Redu distanța semnalelor plasate prin tragerea cu mouse-ul STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Creşte densitatea semnalelor plasate prin tragerea cu mouse-ul # Bridge selection window @@ -2652,7 +2653,19 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Teren în propr STR_ABOUT_OPENTTD :{WHITE}Despre OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright original {COPYRIGHT} 1995 Chris Sawyer, Toate drepturile rezervate STR_ABOUT_VERSION :{BLACK}OpenTTD versiunea {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Echipa OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Echipa OpenTTD + +# Framerate display window +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Număr de evenimente de joc simulate per secundă. +STR_FRAMERATE_AVERAGE :{WHITE}Medie +STR_FRAMERATE_DATA_POINTS :{BLACK}Date bazate pe măsurători {COMMA} +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +############ Leave those lines in this order!! +STR_FRAMERATE_VIDEO :{BLACK}Ieșire video: +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Salvează joc @@ -2939,8 +2952,7 @@ STR_TOWN_POPULATION :{BLACK}Populaţ STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Metropolă) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Populaţia: {ORANGE}{COMMA}{BLACK} Locuinţe: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Călători luna trecută: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Colete poştale luna trecută: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} luna trecută: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Transporturi necesare dezvoltării oraşului: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} necesare STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} necesare iarna @@ -3244,18 +3256,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centreaz STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivelul producţiei: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industria a anunţat închiderea iminentă! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Are nevoie de: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Are nevoie de: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Are nevoie de: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Schimba productia (multiplu de 8, până la 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Modifică nivelul producţiei (procent, până la 800%) @@ -3308,15 +3310,18 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupuri STR_GROUP_CREATE_TOOLTIP :{BLACK}Click pentru a creea un grup STR_GROUP_DELETE_TOOLTIP :{BLACK}Şterge grupul selectat STR_GROUP_RENAME_TOOLTIP :{BLACK}Redenumeşte grupul selectat +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Schimbă uniforma grupului selectat STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Click aici pentru a proteja acest grup de la înlocuirile automate globale STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Şterge Grup +STR_GROUP_DELETE_QUERY_TEXT :{WHITE}Sigur dorești ștergerea grupului și a descendenților lui? STR_GROUP_ADD_SHARED_VEHICLE :Adaugă vehicule partajate STR_GROUP_REMOVE_ALL_VEHICLES :Elimină toate vehiculele STR_GROUP_RENAME_CAPTION :{BLACK}Redenumeşte un grup +STR_GROUP_OCCUPANCY :Utilizare curentă: # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Noi vehicule feroviare @@ -4159,7 +4164,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Prea mul STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Staţia are prea multe componente STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Prea multe staţii de autobuz STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Prea multe staţii de camion -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Prea aproape de altă staţie STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Prea aproape de alt port STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Prea aproape de un alt aeroport STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Nu se poate redenumi staţia... diff --git a/src/lang/russian.txt b/src/lang/russian.txt index e00a6c22f4..ed24128997 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -12,7 +12,7 @@ ##case m f n p nom gen dat acc abl pre -# $Id: russian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -315,6 +315,8 @@ STR_COLOUR_ORANGE :Оранжев STR_COLOUR_BROWN :Коричневый STR_COLOUR_GREY :Серый STR_COLOUR_WHITE :Белый +STR_COLOUR_RANDOM :Случайный +STR_COLOUR_DEFAULT :По умолчанию # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}мил{P я и ь}/ч @@ -601,6 +603,7 @@ STR_ABOUT_MENU_SCREENSHOT :Снимок э STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Снимок экрана в макс. приближении STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Снимок экрана в обычном масштабе STR_ABOUT_MENU_GIANT_SCREENSHOT :Снимок всей карты +STR_ABOUT_MENU_SHOW_FRAMERATE :Информация о скорости игры STR_ABOUT_MENU_ABOUT_OPENTTD :Об игре STR_ABOUT_MENU_SPRITE_ALIGNER :Выравнивание спрайтов STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Переключить ограничивающие рамки @@ -788,8 +791,9 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Музыкальное оформление недоступно STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}«{STRING}» -STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Дорожка +STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Трек STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Название STR_MUSIC_SHUFFLE :{TINY_FONT}{BLACK}Случ. выбор STR_MUSIC_PROGRAM :{TINY_FONT}{BLACK}Программа @@ -807,17 +811,17 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Выбо STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Вкл./Выкл. случайный выбор программы STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Показать окно выбора музыкальных треков -STR_ERROR_NO_SONGS :{WHITE}В выбранном музыкальном наборе отсутствует музыка. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Выбор программы воспроизведения +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Музыкальная программа - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} «{STRING}» STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Номер трека STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Программа - «{STRING}» STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Очистить +STR_PLAYLIST_CHANGE_SET :{BLACK}Изменить набор STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Очистка пользовательской программы +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Сменить выбор музыкального оформления на другой установленный набор STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Щёлкните по названию трека для добавления в пользовательскую программу -STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Выберите дорожку для удаления из пользовательского списка +STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Выберите трек для удаления из пользовательского списка # Highscore window STR_HIGHSCORE_TOP_COMPANIES_WHO_REACHED :{BIG_FONT}{BLACK}Крупнейшие компании, достигшие {NUM} года @@ -958,6 +962,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Директор) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}Компания «{STRING}» профинансировала основание города {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Основан новый город - {TOWN}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Новое предприятие! {STRING} стро{G 0 и и и я}тся возле г.{NBSP}{TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Новое предприятие! {STRING} заложен{G 0 "" а о ы} возле г.{NBSP}{TOWN}! @@ -1025,9 +1030,9 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Окно просмотра {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Скопировать в окно -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Скопировать текущую позицию в окно просмотра -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Вставить из окна +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Из основного окна +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Показать то, что отображается в основном окне +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}В основное окно STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Показать в основном окне # Game options window @@ -1070,15 +1075,17 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Южноафр STR_GAME_OPTIONS_CURRENCY_CUSTOM :Своя... STR_GAME_OPTIONS_CURRENCY_GEL :Грузинский лари (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Иранский риал (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Российский новый рубль (RUR) +STR_GAME_OPTIONS_CURRENCY_MXN :Мексиканский песо (MXN) ############ end of currency region -STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Направление движения -STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_TOOLTIP :{BLACK}По какой стороне дороги ездит автотранспорт -STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT :левостороннее -STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT :правостороннее +STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Движение автомобилей +STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_TOOLTIP :{BLACK}Сторона дороги, по которой ездит автотранспорт +STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT :Левостороннее +STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT :Правостороннее STR_GAME_OPTIONS_TOWN_NAMES_FRAME :{BLACK}Названия городов -STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP :{BLACK}На каком языке будут названы населённые пункты +STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP :{BLACK}Язык, который будет использоваться для выбора названий населённых пунктов ############ start of townname region STR_GAME_OPTIONS_TOWN_NAME_ORIGINAL_ENGLISH :Английские @@ -1173,7 +1180,7 @@ STR_CURRENCY_DECREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}Пере STR_CURRENCY_INCREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}Перейти на евро позже STR_CURRENCY_PREVIEW :{LTBLUE}Образец: {ORANGE}{CURRENCY_LONG} -STR_CURRENCY_CUSTOM_CURRENCY_PREVIEW_TOOLTIP :{BLACK}10000 англ. фунтов (£) в вашей валюте +STR_CURRENCY_CUSTOM_CURRENCY_PREVIEW_TOOLTIP :{BLACK}10{NBSP}000 фунтов стерлингов (£) в вашей валюте STR_CURRENCY_CHANGE_PARAMETER :{BLACK}Изменить параметр валюты STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS :{LTBLUE}Максимальное количество конкурентов: {ORANGE}{COMMA} @@ -1257,7 +1264,7 @@ STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Тип: STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Отображать в списке только настройки, соответствующие выбранной категории STR_CONFIG_SETTING_RESTRICT_BASIC :Основные настройки (только самые важные) STR_CONFIG_SETTING_RESTRICT_ADVANCED :Расширенные настройки (практически все) -STR_CONFIG_SETTING_RESTRICT_ALL :Специальные настройки (все, включая самые непонятные) +STR_CONFIG_SETTING_RESTRICT_ALL :Все настройки (включая самые непонятные) STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_DEFAULT :Настройки со значениями, отличающимися от значений по умолчанию STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_NEW :Настройки со значениями, отличающимися от настроек новой игры @@ -1406,6 +1413,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Изме STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Обслуживание инфраструктуры: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Включает затраты на содержание инфраструктуры. Стоимость непропорционально увеличивается с ростом транспортной сети, оказывая, таким образом, большее влияние на крупные компании, чем на малые. +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Фирменный цвет компании: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Выберите начальный фирменный цвет компании + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропорты не устаревают: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :При включении все типы аэропортов доступны для строительства в любое время после их первоначального появления @@ -1489,9 +1499,13 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Цвет лан STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :зелёный STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :тёмно-зелёный STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :фиолетовый -STR_CONFIG_SETTING_REVERSE_SCROLLING :Обратить направление перемещения обзора мышью: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Настройка смещения обзора правой кнопкой мыши.{}Если отключено, мышь двигает камеру.{}Если включено, мышь двигает карту. -STR_CONFIG_SETTING_SMOOTH_SCROLLING :Плавное смещение обзора: {STRING} +STR_CONFIG_SETTING_SCROLLMODE :Перемещение обзора: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Способ перемещения по игровому полю +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Перемещать с помощью ПКМ, зафиксировав курсор +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Перемещать с помощью ПКМ, зафиксировав курсор +STR_CONFIG_SETTING_SCROLLMODE_RMB :Перемещать с помощью ПКМ +STR_CONFIG_SETTING_SCROLLMODE_LMB :Перемещать с помощью ЛКМ +STR_CONFIG_SETTING_SMOOTH_SCROLLING :Плавное перемещение: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Настройка перемещения обзора в основном окне при щелчке по миникарте или по команде обзора какого-нибудь объекта. Если включено, то обзор смещается плавно; если отключено - то мгновенно. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Показывать замеры при строительстве: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Показывать расстояния и разницу высот при строительстве @@ -1500,8 +1514,8 @@ STR_CONFIG_SETTING_LIVERIES_HELPTEXT :Включит STR_CONFIG_SETTING_LIVERIES_NONE :нет STR_CONFIG_SETTING_LIVERIES_OWN :только для своей компании STR_CONFIG_SETTING_LIVERIES_ALL :для всех компаний -STR_CONFIG_SETTING_PREFER_TEAMCHAT :Открывать командный чат при нажатии Enter: {STRING} -STR_CONFIG_SETTING_PREFER_TEAMCHAT_HELPTEXT :Настроить внутрикорпоративный чат на клавишу «Enter», а общий - на «Ctrl+Enter» +STR_CONFIG_SETTING_PREFER_TEAMCHAT :Использовать Enter для командного чата: {STRING} +STR_CONFIG_SETTING_PREFER_TEAMCHAT_HELPTEXT :Использовать «Enter» для командного чата, а «Ctrl+Enter» - для общего STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING :Использовать колесо прокрутки: {STRING} STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT :Можно настроить смещение обзора с помощью качающегося колеса прокрутки STR_CONFIG_SETTING_SCROLLWHEEL_ZOOM :для масштабирования @@ -1522,8 +1536,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Команд. STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Контрол. STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Выкл. -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Смещение обзора по нажатию левой кнопки мыши: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Смещение обзора левой кнопкой мыши. Это удобно при использовании сенсорного экрана. STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Закрывать окна щелчком ПКМ: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Закрывать окно щелчком правой кнопкой мыши в его пределах. При этом отключается появление подсказок по правой кнопке. @@ -1778,7 +1790,7 @@ STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Чем выше STR_CONFIG_SETTING_DEMAND_DISTANCE :Зависимость спроса от расстояния: {STRING} STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :Если это значение больше 0, то количество груза, отправляемого с одной станции на другую, будет зависеть от расстояния между станциями. Чем выше это значение, тем больше груза будет отправляться к ближним станциям и меньше{NBSP}- к дальним. STR_CONFIG_SETTING_DEMAND_SIZE :Количество возвращаемого груза при симметричном распределении: {STRING} -STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Установка этого значения ниже 100% заставит распределение быть менее «симметричным»: количество возвращаемого груза сможет быть меньше, чем количество отправленного. Установка в 0% сделает распределение полностью несимметричным. +STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Установка этого значения ниже 100% заставит распределение быть менее «симметричным»: количество возвращаемого груза сможет быть меньше, чем количество отправленного. Установка в 0% сделает распределение полностью асимметричным. STR_CONFIG_SETTING_SHORT_PATH_SATURATION :Предел загрузки коротких маршрутов перед использованием вместительных: {STRING} STR_CONFIG_SETTING_SHORT_PATH_SATURATION_HELPTEXT :При наличии нескольких маршрутов между станциями алгоритм распределения грузов будет использовать кратчайший маршрут до его загрузки, потом следующий по длине и т.{NBSP}д. При избытке груза маршруты будут перегружаться начиная с самых производительных. Загрузка рассчитывается исходя из оценки пропускной способности (которая может быть неточной) и интенсивности использования. Эта настройка определяет, насколько загружать маршрут перед тем, как начать использовать следующий. Установите значение ниже 100% для того, чтобы избежать задержки груза, если пропускная способность маршрута будет переоценена алгоритмом. @@ -1961,7 +1973,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Изме STR_CHEAT_SETUP_PROD :{LTBLUE}Разрешить изменение производительности: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Новая цветовая схема +STR_LIVERY_CAPTION :{WHITE}Цвета компании «{COMPANY}» STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Настройка основной цветовой схемы STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Настройка цветовой схемы поездов @@ -2453,6 +2465,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Схем STR_LINKGRAPH_LEGEND_ALL :{BLACK}Все STR_LINKGRAPH_LEGEND_NONE :{BLACK}Нет STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Выберите компании для отображения +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}неиспольз. @@ -2545,9 +2558,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Комб STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Маршрутный светофор{}Позволяет нескольким поездам находиться в одном сигнальном блоке, если каждый из них может зарезервировать безопасный путь. Допускает следование поездов в обе стороны. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Односторонний маршрутн. светофор{}Позволяет нескольким поездам находиться в одном сигнальном блоке, если каждый из них может зарезервировать безопасный путь. Не допускает следования поездов в обратную сторону. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Изменение типа сигнала{}Когда кнопка нажата, щёлкните для преобразования существующего сигнала в сигнал выбранного типа и варианта, или щёлкните с нажатым Ctrl для перебора существующих вариантов. Shift+щелчок - оценка стоимости преобразования. -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Плотность расстановки сигналов при протягивании. -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Уменьшить плотность сигналов при протягивании -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Увеличить плотность сигналов при протягивании +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Расстояние между сигналами при протягивании. +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Уменьшить расстояние между сигналами при протягивании +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Увеличить расстояние между сигналами при протягивании # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Выберите железнодорожный мост @@ -2871,7 +2884,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Земля в STR_ABOUT_OPENTTD :{WHITE}Об OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Оригинальные авторские права {COPYRIGHT} 1995 Chris Sawyer. Все права защищены. STR_ABOUT_VERSION :{BLACK}OpenTTD версия {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Команда разработчиков OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Команда разработчиков OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Скорость игры +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Скорость расчёта игры: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Кол-во игровых циклов, рассчитываемых в секунду. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Вывод на экран: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Кол-во отображаемых кадров в секунду. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Текущая скорость игры: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Фактическая скорость игры +STR_FRAMERATE_CURRENT :{WHITE}Сейчас +STR_FRAMERATE_AVERAGE :{WHITE}В среднем +STR_FRAMERATE_DATA_POINTS :{BLACK}Данные по {COMMA} измерени{P ю ям ям} +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} мс +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} мс +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} мс +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} кадр{P "" а ов}/с +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} кадр{P "" а ов}/с +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} кадр{P "" а ов}/с +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} мс +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} с +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Расчёт игрового цикла: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Расчёт объёмов груза: +STR_FRAMERATE_GL_TRAINS :{BLACK} Движение поездов: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Движение автомобилей: +STR_FRAMERATE_GL_SHIPS :{BLACK} Движение кораблей: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Движение воздушных судов: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Изменения на карте: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Задержка графа распределения: +STR_FRAMERATE_DRAWING :{BLACK}Отрисовка изображения: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Дополнительные окна: +STR_FRAMERATE_VIDEO :{BLACK}Вывод на экран: +STR_FRAMERATE_SOUND :{BLACK}Обработка звука: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Расчёт игрового цикла +STR_FRAMETIME_CAPTION_GL_ECONOMY :Расчёт объёмов груза +STR_FRAMETIME_CAPTION_GL_TRAINS :Движение поездов +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Движение автомобилей +STR_FRAMETIME_CAPTION_GL_SHIPS :Движение кораблей +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Движение воздушных судов +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Расчёт изменений на карте +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Задержка графа распределения +STR_FRAMETIME_CAPTION_DRAWING :Отрисовка изображения +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Отрисовка изображения в доп. окнах +STR_FRAMETIME_CAPTION_VIDEO :Вывод на экран +STR_FRAMETIME_CAPTION_SOUND :Обработка звука +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Сохранить игру @@ -2895,6 +2958,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Инфо STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Нет информации. STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Фильтр: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Перезапись файла +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Перезаписать файл? STR_SAVELOAD_OSKTITLE :{BLACK}Введите название сохраняемой игры @@ -3012,7 +3078,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Верс STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Совместимо с версией не ниже: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Палитра: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Стандартная (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Стандартная (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Устаревшая (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Устаревшая (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Параметры: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Нет STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Нет доступной информации STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Файл не найден @@ -3093,6 +3164,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Чтение з STR_NEWGRF_ERROR_GRM_FAILED :Запрошенные ресурсы GRF недоступны (спрайт {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} был отключён из-за {2:STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Недопустимый/неизвестный формат расположения спрайтов (спрайт {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Слишком много элементов в списке значений (спрайт {3:NUM}, свойство {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Неверная обработка продукции предприятия (спрайт {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Осторожно! @@ -3157,15 +3230,15 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Введ STR_TOWN_DIRECTORY_CAPTION :{WHITE}Города STR_TOWN_DIRECTORY_NONE :{ORANGE}- Нет - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) -STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Список городов - щелчок по названию показывает город в основном окне. Ctrl+щелчок показывает в дополнительном окне. +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Мегаполис){BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Список городов. Щелчок по названию показывает город в основном окне. Ctrl+щелчок показывает в дополнительном окне. STR_TOWN_POPULATION :{BLACK}Население: {COMMA} # Town view window STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Мегаполис) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Население: {ORANGE}{COMMA}{BLACK} Зданий: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Пассажиров в прошлом месяце: {ORANGE}{COMMA}{BLACK}; макс.: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Почты в прошлом месяце: {ORANGE}{COMMA}{BLACK}; макс.: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} в прошлом месяце: {ORANGE}{COMMA}{BLACK} Макс.: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Груз, необходимый для роста города: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} требу{G 0 е е е ю}тся STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} требу{G 0 е е е ю}тся зимой @@ -3470,21 +3543,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Пока STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Производительность: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Предприятие скоро закрывается! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Требуется: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Требуется: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Требуется: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Требует: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Производит: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Требуется: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} ожидает{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Производит: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Производит: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Изменить производительность (кратно 8, до 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Изменить производительность (в процентах, до 800%) @@ -3537,6 +3603,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Щёлк STR_GROUP_CREATE_TOOLTIP :{BLACK}Создать группу STR_GROUP_DELETE_TOOLTIP :{BLACK}Удалить выбранную группу STR_GROUP_RENAME_TOOLTIP :{BLACK}Переименовать выбранную группу +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Изменить цвет выбранной группы STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Защита транспорта в группе от глобальной автозамены STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Удаление группы @@ -3580,6 +3647,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Ёмко STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Ведущие вагоны: {GOLD}+{POWER}{BLACK} Вес: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Может перевозить: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Все типы грузов +STR_PURCHASE_INFO_NONE :Нет STR_PURCHASE_INFO_ALL_BUT :Всё, кроме {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Макс. тяговое усилие: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Дальность: {GOLD}{COMMA} клет{P ка ки ок} @@ -3989,6 +4057,7 @@ STR_ORDER_CONDITIONAL_AGE :Возраст STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Требуется обслуживание STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Всегда STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Оставшийся срок службы (лет) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Максимальная надёжность STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Условие перехода STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :равно @@ -4414,7 +4483,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Слиш STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Слишком большая ж/д станция STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Слишком много автобусных остановок STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Слишком много грузовых терминалов -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Слишком близко к другой станции STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Слишком близко к другой пристани STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Слишком близко к другому аэропорту STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Невозможно переименовать станцию... @@ -4422,6 +4490,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... эт STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... неверное направление дороги STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... на проходных остановках нельзя делать повороты STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... на проходных остановках нельзя делать перекрёстки +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... дорога односторонняя или заблокирована # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Невозможно удалить часть станции... @@ -4490,7 +4559,7 @@ STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION :{WHITE}Недо STR_ERROR_MUST_REMOVE_SIGNALS_FIRST :{WHITE}Сначала удалите сигналы STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Нет подходящих рельсов STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Сначала удалите рельсы -STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Дорога односторонняя или блокирована +STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Дорога односторонняя или заблокирована STR_ERROR_CROSSING_DISALLOWED :{WHITE}Через этот вид рельсов запрещено строить переезды STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Здесь невозможно поставить сигнал... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Здесь невозможно проложить рельсы... @@ -4666,13 +4735,15 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Не у STR_DESKTOP_SHORTCUT_COMMENT :Экономический симулятор на основе игры «Transport Tycoon Deluxe» # Translatable descriptions in media/baseset/*.ob* files -STR_BASEGRAPHICS_DOS_DESCRIPTION :Оригинальная графика из Transport Tycoon Deluxe для DOS. -STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Оригинальная графика из немецкой версии Transport Tycoon Deluxe для DOS. -STR_BASEGRAPHICS_WIN_DESCRIPTION :Оригинальная графика из Transport Tycoon Deluxe для Windows. -STR_BASESOUNDS_DOS_DESCRIPTION :Оригинальный набор звукового оформления из игры Transport Tycoon Deluxe для DOS. -STR_BASESOUNDS_WIN_DESCRIPTION :Оригинальный набор звукового оформления из игры Transport Tycoon Deluxe для Windows. +STR_BASEGRAPHICS_DOS_DESCRIPTION :Графика из Transport Tycoon Deluxe для DOS. +STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Графика из немецкой версии Transport Tycoon Deluxe для DOS. +STR_BASEGRAPHICS_WIN_DESCRIPTION :Графика из Transport Tycoon Deluxe для Windows. +STR_BASESOUNDS_DOS_DESCRIPTION :Набор звукового оформления из игры Transport Tycoon Deluxe для DOS. +STR_BASESOUNDS_WIN_DESCRIPTION :Набор звукового оформления из игры Transport Tycoon Deluxe для Windows. STR_BASESOUNDS_NONE_DESCRIPTION :"Пустой" набор звукового оформления, не содержащий никаких звуков. -STR_BASEMUSIC_WIN_DESCRIPTION :Оригинальный набор музыкального оформления из игры Transport Tycoon Deluxe для Windows. +STR_BASEMUSIC_WIN_DESCRIPTION :Набор музыкального оформления из игры Transport Tycoon Deluxe для Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Набор музыкального оформления из игры Transport Tycoon Deluxe для DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Набор музыкального оформления из игры Transport Tycoon Deluxe для DOS. STR_BASEMUSIC_NONE_DESCRIPTION :"Пустой" набор музыкального оформления, не содержащий никакой музыки. ##id 0x2000 diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index 9805a1b2b5..de316db554 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -12,7 +12,7 @@ ##case nom big gen dat aku vok lok ins -# $Id: serbian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -838,6 +838,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT} {DKGREEN} Nije dostupna muzika STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Numera STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Naziv @@ -857,15 +858,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Izaberi STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Uključi/isključi nasumičan izbor pri puštanju STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Prikaži prozor za izbor muzičkih numera -STR_ERROR_NO_SONGS :{WHITE}Izabran je skup muzike bez ijedne numere. Neće biti puštena nikakva muzika - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Izbor muzičkog programa +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE} Muzički program - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Indeks numera STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Obriši +STR_PLAYLIST_CHANGE_SET :{BLACK}Promeni set STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Obriši tekući program (samo korisnički-definisani programi) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Promenite izbor muzike na drugi instalirani skup STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klik na numeru je dodaje u tekući program (samo za korisnički-definisane programe) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Pritisnite na muzičku numeru kako biste je uklonili sa trenutnog rasporeda (samo za Custom1 ili Custom2) @@ -1075,10 +1076,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Pogled{COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Premesti u pogled +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK} Kopiraj u prozor za pogled STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Premešta pogled na trenutnu poziciju glavnog pogleda -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Prebaci se -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Premešta glavni pogled na lokaciju na kojoj je ovaj pogled +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Promenite glavni prikaz +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Kopirajte lokaciju prozora za prikaz u glavnom prikazu # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opcije @@ -1449,6 +1450,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Promena STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Održavanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Ako je omogućeno, infrastruktura će imati troškove održavanja. Trošak raste brže sa porastom veličine putne mreže i time više pogađa veća preduzeća od manjih + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Nezastarevanje aerodroma: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Omogućavanje ovog podešavanja čini svaki tip aerodroma zauvek pristupan nakon njegovog uvođenja @@ -1532,8 +1534,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Boja terena na STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Zelena STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Tamno zelena STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Ljubičasta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Suprotan smer pomeranja prozora: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Ponašanje kod skrolovanja karte desnim dugmetom miša. Kada je isključeno, miš pomiče kameru. Kada je uključeno, miš pomiče kartu +STR_CONFIG_SETTING_SCROLLMODE :Ponašanje listanja pogleda: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Ponašanje prilikom skrolovanje mape +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Pomerite pogled sa desnim tasterom miša, položaj miša zaključan +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Pomerite mapu sa desnim tasterom miša, zaključajte položaj miša +STR_CONFIG_SETTING_SCROLLMODE_RMB :Pomerite mapu pomoću desne tipke miša +STR_CONFIG_SETTING_SCROLLMODE_LMB :Pomerite mapu pomoću levog miša STR_CONFIG_SETTING_SMOOTH_SCROLLING :Ravnomeran prelaz prozora: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Odredi kako se glavni prikaz pomiče na određeno mesto kada se klikne na malu kartu ili kada se daje naredba za pomicanje na određeni objekat na karti. Ako je omogućeno, prikaz se pomiče glatko, ako je onemogućeno, prikaz izravno skače na ciljano mesto STR_CONFIG_SETTING_MEASURE_TOOLTIP :Prikazivati mere dok se koriste alati za gradnju: {STRING} @@ -1565,8 +1571,8 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Nikakvo -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Pomeranje sa levim klikom: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Omogući skrolovanje po mapi povlačenjem mape sa levim dugmetom miša. Ovo je posebno korisno kod skrolovanja na ekranima na dodir +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Zatvori prozor pomoću desnog klika: {STRING} +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Zatvara prozor tako što klikne desnim klikom unutar nje. Onemogućava dodir sa desnim tasterom miša! STR_CONFIG_SETTING_AUTOSAVE :Autočuvanje: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Izbor vremenskog intervala između dve automatski sačuvane pozicije @@ -2001,7 +2007,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Promena STR_CHEAT_SETUP_PROD :{LTBLUE}Dozvoliti promenu količine proizvodnje: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nova šema boja STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Prikaži generalnu mustru boja STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Prikaži mustre boja vozova @@ -2477,6 +2482,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Sve STR_LINKGRAPH_LEGEND_NONE :{BLACK}Nema STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Odaberite preduzeća koja želite da se prikažu +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}neiskorišćen @@ -2784,6 +2790,7 @@ STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Naziv de STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Tovar prihvaćen: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) +STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Tip šine: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Najveća brzina na pruzi: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Ograničenje brzine: {LTBLUE}{VELOCITY} @@ -2796,29 +2803,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Polja STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Snegom prekrivena zemlja STR_LAI_CLEAR_DESCRIPTION_DESERT :Pustinja -STR_LAI_RAIL_DESCRIPTION_TRACK :Železnica kolosek -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Železnica kolosek sa blok signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Železnica kolosek sa predsignalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Železnica kolosek sa izlaznom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Železnica kolosek sa kombinovanom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Železnica kolosek sa putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Železnica kolosek sa jednosmernom putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Železnica kolosek sa blok i predsignalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Železnica kolosek sa blok i izlaznom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Železnica kolosek sa blok i kombinovanom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Železnica kolosek sa blok i putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Železnica kolosek sa blok i jednosmernom putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Železnica kolosek sa pred i izlaznom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Železnica kolosek sa pred i kombinovanom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Železnica kolosek sa pred i putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Železnica kolosek sa pred i jednosmernom putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Železnica kolosek sa izlaznom i kombinovanom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Železnica kolosek sa izlaznom i putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Železnica kolosek sa izlaznom i jednosmernom putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Železnica kolosek sa kombinovanom i putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Železnica kolosek sa kombinovanom i jednosmernom putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Železnica kolosek sa putnom i jednosmernom putnom signalizacijom -STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Železnica železnički depo +STR_LAI_RAIL_DESCRIPTION_TRACK :Željeznički put +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Željeznički put sa blok signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Željeznički put sa pred-signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Železnički put sa izlaznom signalizacijom +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Željeznički put sa kombinovanim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Železnički put sa putnom signalizacijom +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Železnički put sa jednosmernim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Železnički put sa blokom i pred-signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Željeznički put sa blokovnim i izlaznim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Željeznički put sa blokovnim i kombinovanim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Železnički put sa signalizacijom izlaza i puta +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Železnički put sa blokom i pred-signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Željeznički put sa pred-i izlaznim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Željeznički put sa pred- i kombo-signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Željeznički put sa pre- i putnom signalizacijom +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Željeznički put sa signalima pre i jednosmernog puta +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Železnički put sa izlaznim i kombo-signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Železnički put sa signalizacijom izlaza i puta +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Železnički put sa izlaznim i jednosmernim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Željeznički put sa kombinovanim i putnim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Željeznički put sa kombinovanim i jednosmernim signalima +STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Železnički put sa putnim i jednosmernim signalima +STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Vozni park željeznice STR_LAI_ROAD_DESCRIPTION_ROAD :Put STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Kolovoz sa uličnom rasvetom @@ -2882,7 +2889,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Zemljište u po STR_ABOUT_OPENTTD :{WHITE}O OpenTTD-u STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Originalni kopirajt {COPYRIGHT} 1995 Chris Sawyer, Sva prava zadržana STR_ABOUT_VERSION :{BLACK}OpenTTD verzija {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD tim +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD tim + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Sačuvaj poziciju @@ -3168,6 +3182,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Unos naz STR_TOWN_DIRECTORY_CAPTION :{WHITE}Naselja STR_TOWN_DIRECTORY_NONE :{ORANGE}- Prazno - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Imena naselja - klikom na ime se centrira glavni pogled na to naselje. Ctrl+Klik otvara novi pogled na lokaciju naselja STR_TOWN_POPULATION :{BLACK}Svetska populacija: {COMMA} @@ -3175,8 +3190,7 @@ STR_TOWN_POPULATION :{BLACK}Svetska STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Grad) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Populacija: {ORANGE}{COMMA}{BLACK} Zgrada: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Broj putnika tokom meseca: {ORANGE}{COMMA}{BLACK} najviše: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Količina pošte tokom meseca: {ORANGE}{COMMA}{BLACK} najviše: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} u poslednjem mesecu: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Tovar potreban za razvoj naselja: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} potrebno STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} potrebno zimi @@ -3481,17 +3495,10 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Prebacuj STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivo proizvodnje: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Fabrika je objavila da može svakog trenutka da se zatvori! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Potražuje: {YELLOW}{STRING.aku}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Potražuje: {YELLOW}{STRING.aku}{STRING}, {STRING.aku}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Potražuje: {YELLOW}{STRING.aku}{STRING}, {STRING.aku}{STRING}, {STRING.aku}{STRING} -############ range for requires ends - -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends +STR_INDUSTRY_VIEW_REQUIRES :{BLACK} Zahteva: +STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} +STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} čekaje {STRING} STR_CONFIG_GAME_PRODUCTION :{WHITE}Promena proizvodnje STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Promena nivoa proizvodnje (u procentima, do 800%) @@ -3555,6 +3562,10 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Ukloni sva vozi STR_GROUP_RENAME_CAPTION :{BLACK}Preimenuj grupu +STR_GROUP_PROFIT_THIS_YEAR :Dobit ove godine: +STR_GROUP_PROFIT_LAST_YEAR :Dobit prošle godine: +STR_GROUP_OCCUPANCY :Trenutna upotreba: +STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Nova Železnička Vozila @@ -3587,6 +3598,7 @@ STR_PURCHASE_INFO_ALL_TYPES :Sve vrste teret STR_PURCHASE_INFO_ALL_BUT :Sve sem {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Najveća vučna snaga: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Domet: {GOLD}{COMMA} pločica +STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK} Tip aviona: {GOLD} {STRING} STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Spisak probranih šinskih vozila - kliknite na vozilo za više podataka STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Spisak probranih drumskih vozila - kliknite na vozilo za više podataka @@ -3727,6 +3739,10 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE.aku :magnetnog žel. STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Cena: {CURRENCY_LONG} Težina: {WEIGHT_SHORT}{}Brzina: {VELOCITY} Snaga: {POWER}{}Cena Održavanja: {CURRENCY_LONG}/god.{}Nosivost: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Cena: {CURRENCY_LONG} Težina: {WEIGHT_SHORT}{}Brzina: {VELOCITY} Snaga: {POWER} Najveća vučna snaga: {6:FORCE}{}Cena Održavanja: {4:CURRENCY_LONG}/god{}Nosivost: {5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Cena: {CURRENCY_LONG} Najveća Brzina: {VELOCITY}{}Nosivost: {CARGO_LONG}{}Cena Održavanja: {CURRENCY_LONG}/god. +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :BLACK} Cena: {CURRENCY_LONG} Maks. Brzina: {VELOCITY}{} Tip aviona: {STRING}{} Kapacitet: {CARGO_LONG}, {CARGO_LONG}{}Pokretna cena: {CURRENCY_LONG}/godine. +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK} Cena: {CURRENCY_LONG} Maks. Brzina: {VELOCITY}{}Tip aviona: {STRING}{}Kapacitet: {CARGO_LONG}{}Pokretna cena: {CURRENCY_LONG}/god. +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK} Cena: {CURRENCY_LONG} Maks. Brzina: {VELOCITY}{} Tip aviona: {STRING} Domet: {COMMA} pločice{}Kapacitet: {CARGO_LONG}, {CARGO_LONG}{} Pokretni trošak: {CURRENCY_LONG} /god. +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :BLACK}Cena: {CURRENCY_LONG} Maks. Brzina: {VELOCITY}{}Tip aviona: {STRING} Opseg: {COMMA} pločice{}Kapacitet: {CARGO_LONG}{}Pokretni trošak: {CURRENCY_LONG}/god. # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Zameni {STRING} - {STRING} @@ -3766,6 +3782,7 @@ STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Pritisni STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Prebacuje između prikaza zamene lokomotiva i zamene vagona STR_REPLACE_ENGINES :Lokomotive STR_REPLACE_WAGONS :Vagoni +STR_REPLACE_ALL_RAILTYPE :Sve šinskih vozila STR_REPLACE_HELP_RAILTYPE :{BLACK}Izaberite vrstu pruge za koju želite zamenu kompozicije STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Prikazuje koja lokomotiva će se zameniti označenom sa leve strane, ako ih ima @@ -3858,6 +3875,8 @@ STR_VEHICLE_INFO_AGE :{COMMA} godin{P STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} godin{P a e a} ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Najveća brzina: {LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. brzina: {LTBLUE}{VELOCITY} {BLACK}Tip aviona: {LTBLUE}{STRING} +STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE :BLACK} Maks. brzina: {LTBLUE} {VELOCITY} {BLACK} Tip aviona: {LTBLUE} {STRING} {BLACK} Opseg: {LTBLUE} {COMMA} pločice STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Težina: {LTBLUE}{WEIGHT_SHORT} {BLACK}Snaga: {LTBLUE}{POWER}{BLACK} Najveća brzina: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Težina: {LTBLUE}{WEIGHT_SHORT} {BLACK}Snaga: {LTBLUE}{POWER}{BLACK} Najveća brzina: {LTBLUE}{VELOCITY} {BLACK} Najveća vučna snaga: {LTBLUE}{FORCE} @@ -4416,7 +4435,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Previše STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Previše delova železničke stanice STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Previše autobuskih stanica STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Previše tovarnih stanica -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Previše je blizu druge stanice STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Previše je blizu drugog pristaništa STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Previše je blizu drugog aerodroma STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Ova stanica ne može biti preimenovana... @@ -4424,6 +4442,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ova STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... ulica je okrenuta u drugom pravcu STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... stajalište ne može biti na krivini STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... stajalište ne može biti na raskrsnici +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... put je jednosmeran ili blokiran. # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Deo stanice se ne može ukloniti... @@ -4675,6 +4694,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Originalni skup STR_BASESOUNDS_WIN_DESCRIPTION :Originalni skup zvukova Transport Tycoon Deluxe Windows izdanja. STR_BASESOUNDS_NONE_DESCRIPTION :Prazan skup zvukova. STR_BASEMUSIC_WIN_DESCRIPTION :Originalni skup muzičkih numera Transport Tycoon Deluxe Windows izdanja. +STR_BASEMUSIC_DOS_DESCRIPTION :Originalna muzika za TTD za DOS izdanje. +STR_BASEMUSIC_TTO_DESCRIPTION :Originalna muzika TTD (Original / World Editor) DOS izdanja. STR_BASEMUSIC_NONE_DESCRIPTION :Prazan skup muzičkih numera. ##id 0x2000 diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 0704c8ee1a..f4fbf33813 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -10,7 +10,7 @@ ##grflangid 0x56 -# $Id: simplified_chinese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -475,6 +475,7 @@ STR_ABOUT_MENU_SCREENSHOT :屏幕截图 STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :高清截图 STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :默认缩放模式下的屏幕截图 STR_ABOUT_MENU_GIANT_SCREENSHOT :全地图截图 +STR_ABOUT_MENU_SHOW_FRAMERATE :显示帧率 STR_ABOUT_MENU_ABOUT_OPENTTD :关于 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite 对齐 STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :切换边界框 @@ -650,6 +651,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}没有可用的音乐包 STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}音轨 STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}乐曲主题 @@ -669,15 +671,14 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}选择 STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}开启/关闭 随机播放列表中的曲目 STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}打开音乐选单窗口 -STR_ERROR_NO_SONGS :{WHITE}选择了没有歌曲的音乐组。不会播放歌曲。 - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}音乐选单 STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}全部音轨列表 STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}当前选用'{STRING}'列表 STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}清除 +STR_PLAYLIST_CHANGE_SET :更改设置 STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}清除当前列表中曲目{}(仅限自定义1或自定义2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}选择另一种已安装的音乐 STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}点击音乐曲目以加入当前播放列表{}(仅限自定义1或自定义2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}点击音乐曲目以从当前播放列表中删除{}(仅限自定义1或自定义2) @@ -813,6 +814,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(总裁) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} 赞助了城镇 {TOWN} 的建设! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}一个名叫{TOWN}的城镇刚刚成立了! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}新 {STRING} 正在 {TOWN} 加紧建设! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}新 {STRING} 即将落户 {TOWN}! @@ -1254,6 +1256,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}当有 STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :加强版固定资产维护: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :固定资产会发生维护费用,“打开”本选项时,维护费用的增长会超过交通网络的增长规模,因而,对大公司影响更大。 + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :总允许建设小型机场: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :“打开”此选项,每种类型机场出现后一直是可用的 @@ -1337,8 +1340,9 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :设置缩略地 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :绿色 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :深绿色 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :紫色 -STR_CONFIG_SETTING_REVERSE_SCROLLING :拖动方向与屏幕移动方向相反:{STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :设置按下鼠标右键拖动时地图移动的方向,“关闭”鼠标拖动摄像机,“打开”时鼠标拖动地图。 +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :鼠标右键移动地图,鼠标指针不跟随移动 +STR_CONFIG_SETTING_SCROLLMODE_RMB :鼠标右键移动地图 +STR_CONFIG_SETTING_SCROLLMODE_LMB :鼠标左键移动地图 STR_CONFIG_SETTING_SMOOTH_SCROLLING :平滑视角滚动: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :设置在缩略图上点击或者发出转到特定目标的命令时主视角的转换方式,如果“打开”本选项,视角平缓滚动,“关闭”时直接跳转到目标位置 STR_CONFIG_SETTING_MEASURE_TOOLTIP :建设时显示测量数据:{STRING} @@ -1370,8 +1374,8 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :按住Command STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :按住Ctrl键 点击 STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :关闭 -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :左击滚动: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :可用按住鼠标左键再拖拉的方法来进行屏幕滚动. 这对于触摸屏设备特别有用 +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :右键关闭窗口: {STRING} +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :使用在窗口内按右键关闭该窗口,本功能与右键工具提示不能共存! STR_CONFIG_SETTING_AUTOSAVE :自动保存: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :选择自动存档时间间隔 @@ -1607,7 +1611,7 @@ STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :游戏开局时 STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :每 {STRING}{NBSP}天刷新一次分配图 STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :指定每次计算货物分配图之间的时间。由于每次重新计算只会处理一个货物分配图元件,因此本设定不代表“每若干日重新计算整个货物分配图”。{}如果此设定赋值越小,則系统需要使用更多处理器时间计算货物分配图。相反,如果此设定赋值越大,則货物被派往新路线所需的时间越长。 STR_CONFIG_SETTING_LINKGRAPH_TIME :容许系统用 {STRING}{NBSP}天时间刷新货物分配图 -STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :當刷新货物分配图时,系统會衍生一条线程。本设定的值即为线程的持续时间。{}这设定赋值越小,线程越有可能在应当停止的时候还未完成,游戏会暂停运作至线程完成工作。相反,这设定赋值越大,則货物分配功能需要较长时间反映线路网変动的影晌。 +STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :当刷新货物分配图时,系统会创建一条线程。此处设定的数值即该线程的持续时间。{}赋值越小,线程越有可能在应当停止的时候还未完成,游戏会暂停运作至线程完成工作。相反,赋值越大,则货物分配功能需要较长时间反映线路网变动的影晌。 STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :手动 STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :不对称 STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :对称 @@ -1616,7 +1620,7 @@ STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :假设有交通 STR_CONFIG_SETTING_DISTRIBUTION_MAIL :邮件分配方式:{STRING} STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的邮件数量與乙站往甲站的邮件数量大致相同。“不对称”指任何一站往另一站的邮件数量皆由系统随意决定。“手动”指系统不会自动分配邮件的目的地。 STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :装甲货物分配方式:{STRING} -STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :“装甲货物”包括溫带场景的“贵重品”、寒带场景的“金块”及沙漠场景的“钻石”。使用 NewGRF 可能会改変以上设置。{} 假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的货物数量與乙站往甲站的装甲货物数量大致相同。“不对称”指任何一站往另一站的装甲货物数量皆由系统随意决定。“手动”指系统不会自动分配装甲货物的目的地。{} 建议在溫带及沙漠场景使用“对称”,因为银行之间会相互发送贵重品或钻石;在寒带则应使用“不对称”,因为银行不会把金块送回金矿。 +STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :“装甲货物”包括温带场景的“贵重品”、寒带场景的“金块”及沙漠场景的“钻石”。使用 NewGRF 可能会改变以上设置。{} 假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的货物数量与乙站往甲站的装甲货物数量大致相同。“不对称”指任何一站往另一站的装甲货物数量皆由系统随意决定。“手动”指系统不会自动分配装甲货物的目的地。{} 建议在温带及沙漠场景使用“对称”,因为银行之间会相互发送贵重品或钻石;在寒带则应使用“不对称”,因为银行不会把金块送回金矿。 STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :其他货物分配方式:{STRING} STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :如为此设置赋值“不对称”,则任何一站往另一站的货物数量皆由系统随意决定。如为此设置赋值“手动”,则系统不会依据交通路线分配货物的目的地。 STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :分配精确度:{STRING} @@ -1806,7 +1810,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}改变 STR_CHEAT_SETUP_PROD :{LTBLUE}开启可调整产量模式:{ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}新色彩方案 STR_LIVERY_GENERAL_TOOLTIP :{BLACK}显示总体配色方案 STR_LIVERY_TRAIN_TOOLTIP :{BLACK}显示列车配色方案 @@ -2261,7 +2264,7 @@ STR_CONTENT_ERROR_COULD_NOT_EXTRACT :{WHITE}无法 STR_MISSING_GRAPHICS_SET_CAPTION :{WHITE}缺失图形组 STR_MISSING_GRAPHICS_SET_MESSAGE :{BLACK}OpenTTD 需要基础图形组用以绘制界面。您是否希望 OpenTTD 下载并安装以下图形组? -STR_MISSING_GRAPHICS_YES_DOWNLOAD :{BLACK}是的,下载之 +STR_MISSING_GRAPHICS_YES_DOWNLOAD :{BLACK}好,开始下载 STR_MISSING_GRAPHICS_NO_QUIT :{BLACK}不,退出OpenTTD # Transparency settings window @@ -2688,7 +2691,27 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :公司属地 STR_ABOUT_OPENTTD :{WHITE}关于 OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}原始版权由 {COPYRIGHT} 1995 Chris Sawyer 所有,保留一切权力。 STR_ABOUT_VERSION :{BLACK}OpenTTD 版本 {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD 团队 +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD 团队 + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}帧率 +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_BLITTER :{BLACK}帧率:{STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}每秒渲染更新的图像帧。 +STR_FRAMERATE_SPEED_FACTOR :{BLACK}当前游戏速度:{DECIMAL}x +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} fps +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} fps +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} fps +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +############ Leave those lines in this order!! +STR_FRAMERATE_VIDEO :{BLACK}视频输出: +STR_FRAMERATE_SOUND :{BLACK}混响: +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}保存游戏 @@ -2712,6 +2735,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}游戏 STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}无可用信息 STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}过滤字串: STR_SAVELOAD_OSKTITLE :{BLACK}为存档命名 @@ -2981,8 +3005,6 @@ STR_TOWN_POPULATION :{BLACK}所有 STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (都市) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}人口:{ORANGE}{COMMA}{BLACK} 房屋:{ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}上月旅客数量:{ORANGE}{COMMA}{BLACK} 最大值:{ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}上月邮包数量:{ORANGE}{COMMA}{BLACK} 最大值:{ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}城镇发展所必需的货物: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED} 需要: {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} 冬季的需求 @@ -3287,20 +3309,10 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}将屏 STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生产程度: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}此工业已经宣布即刻停业倒闭! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} 等待中{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}产出: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}产出: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}改变产量 STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}修改产量 (百分比, 最高 800%) @@ -3365,6 +3377,7 @@ STR_GROUP_RENAME_CAPTION :{BLACK}重命 STR_GROUP_PROFIT_THIS_YEAR :今年利润: STR_GROUP_PROFIT_LAST_YEAR :去年利润 +STR_GROUP_OCCUPANCY :当前使用量: STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window @@ -3533,7 +3546,10 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :磁悬浮机车 STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}售价:{CURRENCY_LONG} 重量:{WEIGHT_SHORT}{}速度:{VELOCITY} 功率:{POWER}{}运行费用:{CURRENCY_LONG}/年{}运载能力: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}售价:{CURRENCY_LONG} 重量:{WEIGHT_SHORT}{}速度:{VELOCITY} 功率:{POWER} 最大牵引力:{6:FORCE}{}运行费用{4:CURRENCY_LONG}/年{}运载能力:{5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}售价:{CURRENCY_LONG} 最大速度:{VELOCITY}{}运载能力:{CARGO_LONG}{}运行成本:{CURRENCY_LONG} /年 +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :{BLACK}售价:{CURRENCY_LONG} 最大速度:{VELOCITY}{}飞机类型:{STRING}{}运载能力:{CARGO_LONG}, {CARGO_LONG}{}运行成本: {CURRENCY_LONG}/年 +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}售价: {CURRENCY_LONG} 最大速度: {VELOCITY}{}飞机类型: {STRING}{}运载能力: {CARGO_LONG}{}运行成本: {CURRENCY_LONG}/年 STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}购买费用: {CURRENCY_LONG} 最大速度: {VELOCITY}{}飞机种类: {STRING} 最大航程: {COMMA} 格{}装载量: {CARGO_LONG}, {CARGO_LONG}{}运行费用: {CURRENCY_LONG}/年 +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}售价: {CURRENCY_LONG} 最大速度: {VELOCITY}{}飞机类型: {STRING} 续航里程: {COMMA} 格{}运载能力: {CARGO_LONG}{}运行成本: {CURRENCY_LONG}/年 # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}更新 {STRING} - {STRING} @@ -3656,6 +3672,7 @@ STR_VEHICLE_INFO_AGE :{COMMA} 年 ({C STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} 年 ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}最大速度:{LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}最高速度: {LTBLUE}{VELOCITY} {BLACK}飞机种类: {LTBLUE}{STRING} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}重量:{LTBLUE}{WEIGHT_SHORT} {BLACK}功率:{LTBLUE}{POWER}{BLACK} 最大速度:{LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}重量:{LTBLUE}{WEIGHT_SHORT} {BLACK}功率:{LTBLUE}{POWER}{BLACK} 最大速度:{LTBLUE}{VELOCITY} {BLACK}最大牵引力:{LTBLUE}{FORCE} @@ -4135,7 +4152,7 @@ STR_ERROR_NOT_ALLOWED_WHILE_PAUSED :{WHITE}暂停 STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS :{WHITE}{TOWN} 地方政府不批准此操作…… STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT :{WHITE}{TOWN}地方政府{}不同意在本市范围内再兴建一座机场 STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE :{WHITE}{TOWN} 考虑到噪音控制,地方当局拒绝修建机场。 -STR_ERROR_BRIBE_FAILED :{WHITE}您的桥梁修建计划受到了当地投资商的关注 +STR_ERROR_BRIBE_FAILED :{WHITE}您的贿赂行动被当地检察机关发现,赃款均已没收,您在本市评价已降为最低。 # Levelling errors STR_ERROR_CAN_T_RAISE_LAND_HERE :{WHITE}不能提高这里的地面…… @@ -4214,7 +4231,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}车站 STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}分体站台太多 STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}公共汽车站过多 STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}汽车货场过多 -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}距离另一车站过近 STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}距离另一码头过近 STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}距离另一机场过近 STR_ERROR_CAN_T_RENAME_STATION :{WHITE}不能重命名车站 @@ -4473,6 +4489,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :运输大亨DOS STR_BASESOUNDS_WIN_DESCRIPTION :Transport Tycoon Deluxe Windows (运输大亨Windows豪华版)的原版音效包. STR_BASESOUNDS_NONE_DESCRIPTION :一个空的音效包. STR_BASEMUSIC_WIN_DESCRIPTION :Transport Tycoon Deluxe(运输大亨Windows豪华版)的原版音乐包 +STR_BASEMUSIC_DOS_DESCRIPTION :运输大亨DOS豪华版原版音乐。 +STR_BASEMUSIC_TTO_DESCRIPTION :原版运输大亨(DOS版及地图编辑器扩展)音乐。 STR_BASEMUSIC_NONE_DESCRIPTION :一个没有实际内容的音乐包. ##id 0x2000 diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index 65863261ca..c87cbaa038 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -12,7 +12,7 @@ ##case g -# $Id: slovak.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -733,10 +733,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Zvoliť STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Prepnúť náhodný výber STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Zobraziť okno pre výber hudobných stôp -STR_ERROR_NO_SONGS :{WHITE}Bola zvolená sada hudby bez skladieb. Žiadne skladby nebudú hrať - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Výber hudobného programu STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Zoznam skladieb STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1322,6 +1319,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Zmena na STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Správa infraštruktúry: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Ak je zapnuté, infraštruktúra generuje výdavky na údržbu. Poplatky rastú proporcionálne s veľkosťou spoločnosti, čo ovplyvňuje viac veľké spoločnosti ako malé. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Letiská nikdy neexiprujú: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Povoluje zachovať vsetky typy letísk navzdy. @@ -1405,8 +1403,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Farby terénu n STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Zelená STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Tmavozelená STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Fialová -STR_CONFIG_SETTING_REVERSE_SCROLLING :Posúvať mapu opačným smerom: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Chovanie sa mapy keď je posúvaná pravým tlačítkom myši. Ak je vypnuté posúva sa kamera, ak je zapnuté posúva sa mapa. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Plynulé posúvanie pohľadu: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Nastaví ako bude reagovať posúvanie na špecifickú pozíciu po kliknutí na minimapu, alebo po zadaní príkazu na presun na zadaný objekt. Ak je zapnuté, pohľad sa presúva plynulo. Ak je vypnuté, pohľad skočí priamo na zadané miesto/objekt. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Zobraziť údaje o rozmeroch pri výstavbe: {STRING} @@ -1438,8 +1434,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Príkaz + klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :CTRL + klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Žiadna -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Posúvať pohľad ľavým tlačidlom myši: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Povolí posúvanie mapy ĽAVÝM tlačítkom myši. Toto je obzvlášť užitočné pri použití dotykového displeja. STR_CONFIG_SETTING_AUTOSAVE :Automatické ukladanie: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Vyberte interval pre automatické ukladanie hry @@ -1874,7 +1868,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Zmeniť STR_CHEAT_SETUP_PROD :{LTBLUE}Povoliť zmenu objemu výroby: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nová farebná schéma STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Zobraziť všeobecné farebné schémy STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Zobraziť farebné schémy pre vlaky @@ -2755,7 +2748,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Spoločnosťou STR_ABOUT_OPENTTD :{WHITE}OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Pôvodný copyright: {COPYRIGHT} 1995 Chris Sawyer, všetky práva vyhradené STR_ABOUT_VERSION :{BLACK}OpenTTD verzia {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 team OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 team OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Uložiť hru @@ -3048,8 +3048,6 @@ STR_TOWN_POPULATION :{BLACK}Svetová STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Mesto) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Obyvateľstvo: {ORANGE}{COMMA}{BLACK} Domov: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Cestujúci posledný mesiac: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Pošta posledný mesiac: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Tovar potrebný k rozrastu mesta: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} potrebný STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} potrebné v zime @@ -3354,18 +3352,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vycentro STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Úroveň produkcie: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Priemysel oznámil blížiace sa uzatvorenie! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Zmeniť produkciu (násobky 8, až do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Zmeniť úroveň produkcie (percentuálne, až do 800%) @@ -4273,7 +4261,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Príliš STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Veľa častí vlakovej stanice STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Príliš veľa autobusových zastávok STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Príliš veľa zastávok nákladných automobilov -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Príliš blízko inej stanice/vykládky STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Príliš blízko iného prístavu STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Príliš blízko iného letiska STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Stanica sa nedá premenovať... diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index 3f85ef3418..aa79c4a8d9 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -11,7 +11,7 @@ ##case r d t -# $Id: slovenian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -822,10 +822,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Izberi g STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Preklapljaj mešan program vključeno/izključeno STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Prikaži okno z izborom glasbe -STR_ERROR_NO_SONGS :{WHITE}Izbran je bil komplet glasbe brez skladb. Nobena skladba ne bo predvajana - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Izbor glasbenega programa STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Kazalo skladb STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1407,6 +1404,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Sprememb STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Vzdrževanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Če je omogočeno, infrastruktura upošteva vzdrževalne stroške, ki rastejo skozi čas proporcionalno z velikostjo omrežja. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Letališča nikoli ne potečejo: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Če je omogočeno, bo vsak tip letališča ostal omogočen vedno po uvedbi. @@ -1490,8 +1488,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Barva ozemlja n STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Zelena STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Temno zelena STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Vijolična -STR_CONFIG_SETTING_REVERSE_SCROLLING :Obrni smer premika okna: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Sistem delovanja avtomatskega pomika z miško na robu. Onemogočeno - miška premika pogled, omogočeno - miška premika zemljevid. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Gladek premik pogleda: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Način pomika pogleda na določen objekt majhnega zemljevida (centriranje pogleda). Omogočeno - pogled drsi, onemogočeno - pogled preskoči. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Prikaz merilnega nasveta med uporabo gradbenih orodij: {STRING} @@ -1523,8 +1519,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Ukaz-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Kontrola-klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Izklop -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Premik slike z levim klikom: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Omogoči pomik pogleda z levim klikom miške in vlečenjem. Primerno za dotične zaslone. STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Zapri okno z desnim klikom: {STRING} STR_CONFIG_SETTING_AUTOSAVE :Samodejno shrani: {STRING} @@ -1960,7 +1954,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Spremeni STR_CHEAT_SETUP_PROD :{LTBLUE}Omogoči spreminjanje proizvodnih vrednosti: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nova barvna shema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Prikaz glavnih barvnih shem STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Prikaz barvnih shem vlakov @@ -2841,7 +2834,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Ozemlje v lasti STR_ABOUT_OPENTTD :{WHITE}O OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Prvotne avtorske pravice {COPYRIGHT} 1995 Chris Sawyer, vse pravice pridržane STR_ABOUT_VERSION :{BLACK}OpenTTD različica {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 ekipa OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 ekipa OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Shrani igro @@ -3134,8 +3134,6 @@ STR_TOWN_POPULATION :{BLACK}Svetovno STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Mesto) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Prebivalstvo: {ORANGE}{COMMA}{BLACK} Število stavb: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Potnikov prejšnji mesec: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Pošte prejšnji mesec: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Količina potrebnega tovora za rast mesta: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} potrebno STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} je potreben pozimi @@ -3440,18 +3438,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Osredoto STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivo proizvodnje: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrija je napovedala zaprtje! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Proizvaja: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Proizvaja: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Spremeni proizvodnjo (večkratnik 8, do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Spremeni nivo proizvodnje (odstotki, do 800%) @@ -4360,7 +4348,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Preveč STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Preveč delov železniške postaje STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Preveč avtobusnih postaj STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Preveč tovornih postaj -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Preblizu druge postaje STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Preblizu drugemu pristanišču STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Preblizu sosednjemu letališču STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Ni mogoče preimenovati postaje diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index c3f6dfa899..d13421cc77 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -11,7 +11,7 @@ ##gender m f -# $Id: spanish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -190,6 +190,7 @@ STR_COLOUR_ORANGE :Naranja STR_COLOUR_BROWN :Marrón STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Blanco +STR_COLOUR_RANDOM :Aleatorio # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -374,7 +375,7 @@ STR_SCENEDIT_FILE_MENU_QUIT :Salir ############ range for settings menu starts STR_SETTINGS_MENU_GAME_OPTIONS :Opciones de juego STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE :Configuración -STR_SETTINGS_MENU_SCRIPT_SETTINGS :Configuración de scripts +STR_SETTINGS_MENU_SCRIPT_SETTINGS :Configuración de Scripts STR_SETTINGS_MENU_NEWGRF_SETTINGS :Configuración NewGRF STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS :Opciones de transparencia STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Ver nombres de municipios @@ -476,6 +477,7 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de pant STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Captura con zoom de cerca STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Captura con zoom por defecto STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de mapa completo +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar fotogramas por segundo - FPS STR_ABOUT_MENU_ABOUT_OPENTTD :Acerca de 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Alineador de sprites STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Activar cajas delimitadoras @@ -574,7 +576,7 @@ STR_GRAPH_OPERATING_PROFIT_CAPTION :{WHITE}Gráfico STR_GRAPH_INCOME_CAPTION :{WHITE}Gráfico de Ingresos STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unidades de carga entregadas STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Calificaciones de actuación de empresas (tasa máxima=1000) -STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Valores de las empresas +STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Valor de la empresa STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tasas de pago por carga STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Días en tránsito @@ -651,6 +653,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}No hay música disponible STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Pista STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Título @@ -670,17 +673,17 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Seleccio STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Encender/apagar mezclador STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Mostrar ventana de selección de pistas musicales -STR_ERROR_NO_SONGS :{WHITE}Se ha seleccionado un conjunto de música sin canciones. No se reproducirá música - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Selección del programa de música +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programación Musical - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Índice de pistas STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Borrar -STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Borrar programa actual (solo Personal 1 y Personal 2) -STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Pulse en la pista de música para añadirla al programa actual (solo Personal 1 y 2) -STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Pulsa sobre la canción para quitarla del programa actual (Solo Personalizado1 y Personalizado2) +STR_PLAYLIST_CHANGE_SET :{BLACK}Cambiar set +STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Borrar programa actual (solo Personalizado1 y 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Cambia la selección musical a otro set instalado +STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Pulse en la pista de música para añadirla al programa actual (solo Personalizado1 y 2) +STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Pulsa sobre la canción para quitarla del programa actual (solo Personalizado1 y 2) # Highscore window STR_HIGHSCORE_TOP_COMPANIES_WHO_REACHED :{BIG_FONT}{BLACK}Top de empresas que han alcanzado {NUM} @@ -814,6 +817,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Presidente) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}¡{STRING} patrocina la construcción del nuevo municipio {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}¡Un nuevo municipio, llamado: {TOWN}, ha sido construido! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}¡Nuev{G o a} {STRING} en construcción cerca de {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}¡Nuev{G o a} {STRING} está siendo plantad{G o a} cerca de {TOWN}! @@ -881,10 +885,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Vista {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copiar punto de vista +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Cambiar punto de vista STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copia la localización de la vista principal a este punto de vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Pegar punto de vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Pega la localización de este punto de vista a la principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Cambiar vista principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copia la localización de este punto de vista en la vista principal # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opciones del juego @@ -926,6 +930,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand sudafrican STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personalizada... STR_GAME_OPTIONS_CURRENCY_GEL :Lari Georgiano (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iraní (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nuevo Rublo Ruso (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso mexicano (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vehículos de carretera @@ -1068,7 +1074,7 @@ STR_RIVERS_FEW :Pocos STR_RIVERS_MODERATE :Medio STR_RIVERS_LOT :Muchos -STR_DISASTER_NONE :Ninguna +STR_DISASTER_NONE :Ninguno STR_DISASTER_REDUCED :Reducidas STR_DISASTER_NORMAL :Normales @@ -1255,6 +1261,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Cambiar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantenimiento de infraestructuras: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cuando se activa, las infraestructuras tienen costes de mantenimiento. Los costes de la infraestructura aumentan con el tamaño de la red, con lo cual afectan a compañías grandes en mayor grado que a las pequeñas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeropuertos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Permite a todos los aeropuertos estar disponibles permanentemente una vez han sido introducidos @@ -1338,8 +1345,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Color a usar pa STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde oscuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violeta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Desplazamiento de vista invertido: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Comportamiento del juego al arrastrar el mapa con el botón derecho. Si se desactiva, el ratón mueve la cámara. Si se activa, el ratón mueve el mapa STR_CONFIG_SETTING_SMOOTH_SCROLLING :Desplazamiento de vista suavizado: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla la forma en la que la vista principal se mueve a una posición específica como resultado de hacer click en el mapa o al enviar la orden de moverse a un objeto determinado del mapa. Si se activa, la vista se mueve de forma suave. Si se desactiva, la vista se mueve directamente al destino STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostrar medidas usando las herramientas de construcción: {STRING} @@ -1371,8 +1376,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Desactivado -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Desplazamiento con botón izquierdo: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Activa el deslizamiento del mapa al arrastrarlo con el botón izquierdo. Esto es especialmente útil al usar pantallas táctiles STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Cerrar ventana con click derecho: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Cierra una ventana al hacer click derecho dentro. ¡Quita la información al hacer click derecho! @@ -1497,11 +1500,11 @@ STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE_HELPTEXT :Mostrar noticia STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES :Cambios en la economía: {STRING} STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES_HELPTEXT :Mostrar noticias sobre cambios globales a la economía STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY :Cambios de producción en industrias atendidas por la empresa: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY_HELPTEXT :Mostrar una noticia cuando el nivel de producción de una industria que está servida por tu compañía cambia +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY_HELPTEXT :Mostrar una noticia cuando el nivel de producción de una industria, servida por tu compañía, cambia STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER :Cambios de producción en las industrias servidas por los competidores: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Mostrar una noticia cuando el nivel de producción de una industria que está servida por compañías competidoras cambia +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Mostrar una noticia cuando el nivel de producción de una industria, servida por tus competidores, cambia STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED :Cambios de producción de otras industrias: {STRING} -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED_HELPTEXT :Mostrar una noticia cuando el nivel de producción de una industria que no está servida por tu compañía o competidores cambia +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED_HELPTEXT :Mostrar una noticia cuando el nivel de producción de una industria, no servida por tu compañía o competidores, cambia STR_CONFIG_SETTING_NEWS_ADVICE :Aviso / información de los vehículos de la empresa: {STRING} STR_CONFIG_SETTING_NEWS_ADVICE_HELPTEXT :Mostrar mensajes sobre vehículos que requieren atención STR_CONFIG_SETTING_NEWS_NEW_VEHICLES :Nuevos vehículos: {STRING} @@ -1527,7 +1530,7 @@ STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Cuando se activ STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Porcentaje del beneficio total a pagar en transferencias: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Porcentaje de los beneficios dados a los transportes intermedios en sistemas de transferencias, dando un mayor control sobre el beneficio de cada vehículo STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Al arrastrar, colocar señales cada: {STRING} -STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT :Fija la distancia de separación entre señales al construir señales hasta el próximo obstáculo al arrastrar el ratón +STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT :Fija la distancia a la que se construirán las señales hasta el próximo obstáculo (señal, cruce), si estas son arrastradas STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_VALUE :{COMMA} casilla{P 0 "" s} STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE :Al arrastrar, mantener distancia fija entre señales: {STRING} STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE_HELPTEXT :Fija el comportamiento de la construcción de señales cuando se usa Ctrl+Arrastrar. Si se deshabilita, se colocan señales cerca de túneles y puentes para evitar largos trozos de vía sin señales. Si se activa, se colocan señales cada N casillas, haciendo que el alineamiento de vías paralelas sea más sencillo @@ -1595,7 +1598,7 @@ STR_CONFIG_SETTING_ZOOM_LVL_OUT_4X :4x STR_CONFIG_SETTING_ZOOM_LVL_OUT_8X :8x STR_CONFIG_SETTING_TOWN_GROWTH :Velocidad crecimiento población: {STRING} STR_CONFIG_SETTING_TOWN_GROWTH_HELPTEXT :Velocidad de crecimiento de los municipios -STR_CONFIG_SETTING_TOWN_GROWTH_NONE :Ninguna +STR_CONFIG_SETTING_TOWN_GROWTH_NONE :Ninguno STR_CONFIG_SETTING_TOWN_GROWTH_SLOW :Lenta STR_CONFIG_SETTING_TOWN_GROWTH_NORMAL :Normal STR_CONFIG_SETTING_TOWN_GROWTH_FAST :Rápida @@ -1607,10 +1610,10 @@ STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :Ninguna STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Multiplicador inicial del tamaño de ciudad: {STRING} STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Tamaño medio de las ciudades en relación a los pueblos normales al comienzo de la partida -STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :Actualizar el grafo de distribución cada {STRING}{NBSP}día{P 0:2 "" s} -STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :Periodo de tiempo entre cálculos del grafo de distribución consecutivos. Esta opción se refiere a los cálculos para cada uno de los componentes del grafo, por lo cual fijar un valor no quiere decir que el grafo completo se actualizará tras ese número de días. Cuanto menor sea, mayor tiempo de CPU será necesario para calcular el grafo de distribución. Cuanto mayor sea, más tardará el grafo de distribución en adaptarse a nuevas rutas -STR_CONFIG_SETTING_LINKGRAPH_TIME :Usar {STRING}{NBSP}día{P 0:2 "" s} para el cálculo del grafo de distribución -STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Tiempo a emplear en el cálculo de cada uno de los componentes del grafo de distribución. Cuanto menor sea este valor, más probable es que se produzca ralentización en el juego. Cuanto mayor sea, más tiempo tardará la distribución en actualizarse cuando se producen cambios en las rutas +STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :Actualizar el gráfico de distribución cada {STRING}{NBSP}día{P 0:2 "" s} +STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :Periodo de tiempo entre cálculos del gráfico de distribución consecutivos. Esta opción se refiere a los cálculos para cada uno de los componentes del gráfico, por lo cual fijar un valor no quiere decir que el gráfico completo se actualizará tras ese número de días. Cuanto menor sea, mayor tiempo de CPU será necesario para calcular el gráfico de distribución. Cuanto mayor sea, más tardará el gráfico de distribución en adaptarse a nuevas rutas. +STR_CONFIG_SETTING_LINKGRAPH_TIME :Usar {STRING}{NBSP}día{P 0:2 "" s} para el cálculo del gráfico de distribución +STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Tiempo a emplear en el cálculo de cada uno de los componentes del gráfico de distribución. Cuanto menor sea este valor, más probable es que se produzca ralentización en el juego. Cuanto mayor sea, más tiempo tardará la distribución en actualizarse cuando se producen cambios en las rutas. STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimétrico STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :simétrico @@ -1623,7 +1626,7 @@ STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :La clase de car STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Modo de distribución para otras clases de carga: {STRING} STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asimétrico" significa que se pueden mover cantidades arbitrarias de carga en ambas direcciones. "Manual" significa que no habrá distribución automática para estos tipos de carga. STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Precisión de la distribución: {STRING} -STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Este valor determina el tiempo de CPU empleado en calcular el grafo de distribución. Si es demasiado elevado puede producir ralentización en el juego. Si es demasiado bajo la distribución puede ser poco precisa, causando que ocasionalmente se produzcan errores en los lugares a los que va la carga +STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Este valor determina el tiempo de CPU empleado en calcular el gráfico de distribución. Si es demasiado elevado puede producir ralentización en el juego. Si es demasiado bajo la distribución puede ser poco precisa, causando que ocasionalmente se produzcan errores en los lugares a los que va la carga. STR_CONFIG_SETTING_DEMAND_DISTANCE :Efecto de la distancia en la demanda: {STRING} STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :Si se fija a un valor superior a 0, la distancia entre la estación origen A de cierta carga y un posible destino B afectará a la cantidad de carga que se enviará de A a B. Cuanto más lejos esté B de A, menos carga se enviará. Cuanto mayor sea el valor de esta opción, menos carga se enviará a estaciones distantes en favor de estaciones cercanas STR_CONFIG_SETTING_DEMAND_SIZE :Cantidad de carga a devolver en modo simétrico: {STRING} @@ -1810,7 +1813,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Cambiar STR_CHEAT_SETUP_PROD :{LTBLUE}Permitir modificación de los valores de producción: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nuevo Esquema de Color +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Esquema de Color STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Mostrar esquema de colores general STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Ver esquema de color de los trenes @@ -1868,7 +1871,7 @@ STR_FACE_FACECODE :{BLACK}Cara del STR_FACE_FACECODE_TOOLTIP :{BLACK}Ver y/o asignar número de cara de presidente STR_FACE_FACECODE_CAPTION :{WHITE}Ver y/o asignar número de cara de presidente STR_FACE_FACECODE_SET :{WHITE}Nuevo código de cara ha sido asignado -STR_FACE_FACECODE_ERR :{WHITE}No se puede asignar número de cara de presidente - ¡debe ser un número entre 0 y 4,294,967,295! +STR_FACE_FACECODE_ERR :{WHITE}No se puede asignar número de cara de presidente - ¡Ha de ser un número entre 0 y 4,294,967,295! STR_FACE_SAVE :{BLACK}Guardar STR_FACE_SAVE_TOOLTIP :{BLACK}Guardar cara favorita STR_FACE_SAVE_DONE :{WHITE}Esta cara ha sido guardada como tu favorita en el fichero de configuración @@ -2286,6 +2289,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Leyenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Todas STR_LINKGRAPH_LEGEND_NONE :{BLACK}Ninguna STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Seleccione las compañías a mostrar +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}sin uso @@ -2370,9 +2374,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Señal c STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Señal de ruta (eléctrica){}Una señal de ruta permite a más de un tren entrar a un bloque de señales a la vez, si el tren puede reservar una ruta hasta un lugar seguro. Pueden ser traspasadas desde atrás STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Señal de ruta de un sentido (eléctrica){}Una señal de ruta permite a más de un tren entrar a un bloque de señales a la vez, si el tren puede reservar una ruta hasta un lugar seguro. No pueden ser traspasadas desde atrás STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Convertir señal{}Cuando es seleccionado, pulsar sobre una señal existente la convierte en el tipo y variante indicados. Pulsar Ctrl+Click permite cambiar de variante. Shift+Click muestra una estimación del precio de conversión -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densidad de arrastre de señales -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reducir arrastre de intensidad de señales -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Incrementar arrastre de intensidad de señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distancia del arrastre de señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reducir distancia del arrastre de señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Incrementar distancia del arrastre de señales # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Seleccione Puente de Ferrocarril @@ -2692,7 +2696,40 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terreno propied STR_ABOUT_OPENTTD :{WHITE}Acerca de OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright Original {COPYRIGHT} 1995 Chris Sawyer, Todos los derechos reservados STR_ABOUT_VERSION :{BLACK}OpenTTD versión {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 El equipo OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 El equipo OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Fotogramas por segundo - FPS +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Número de fotogramas renderizados por segundo. +STR_FRAMERATE_CURRENT :{WHITE}Actual +STR_FRAMERATE_AVERAGE :{WHITE}Medio +STR_FRAMERATE_DATA_POINTS :{BLACK}Datos basados en {COMMA} medidas +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} frames/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} frames/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} frames/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GL_TRAINS :{BLACK} Ticks de trenes: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Ticks de vehículos de carretera: +STR_FRAMERATE_GL_SHIPS :{BLACK} Ticks de barcos: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Ticks de aeronaves: +STR_FRAMERATE_DRAWING :{BLACK}Renderizado gráfico: +STR_FRAMERATE_VIDEO :{BLACK}Salida de vídeo: +STR_FRAMERATE_SOUND :{BLACK}Mezcla de sonido: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_TRAINS :Ticks de trenes +STR_FRAMETIME_CAPTION_GL_SHIPS :Ticks de barcos +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Ticks de aeronaves +STR_FRAMETIME_CAPTION_DRAWING :Renderizado gráfico +STR_FRAMETIME_CAPTION_VIDEO :Salida de vídeo +STR_FRAMETIME_CAPTION_SOUND :Mezcla de sonido +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Guardar Juego @@ -2716,6 +2753,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Detalles STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No hay información disponible STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Patrón de filtrado: STR_SAVELOAD_OSKTITLE :{BLACK}Introduce un nombre para el juego guardado @@ -2782,7 +2820,7 @@ STR_GENERATION_ABORT_MESSAGE :{YELLOW}¿Desea STR_GENERATION_PROGRESS :{WHITE}{NUM}% completado STR_GENERATION_PROGRESS_NUM :{BLACK}{NUM} / {NUM} STR_GENERATION_WORLD_GENERATION :{BLACK}Generación de mundo -STR_GENERATION_RIVER_GENERATION :{BLACK}Generación de Ríos +STR_GENERATION_RIVER_GENERATION :{BLACK}Generación de ríos STR_GENERATION_TREE_GENERATION :{BLACK}Generación de árboles STR_GENERATION_OBJECT_GENERATION :{BLACK}Generación de inamovibles STR_GENERATION_CLEARING_TILES :{BLACK}Generación de áreas ásperas o rocosas @@ -2833,7 +2871,10 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versión STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Mín. versión compatible: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Por Defecto (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Por Defecto (D) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parámetros: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Ninguno STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}No hay información disponible STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Archivo no encontrado @@ -2914,6 +2955,7 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Lectura más al STR_NEWGRF_ERROR_GRM_FAILED :Recursos GRF solicitados no disponibles (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} fue desactivado por {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Formato de colocación de sprites inválido o desconocido (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Demasiados elementos en la lista de valores de propiedad (sprite {3:NUM}, propiedad {4:HEX}) # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}¡Precaución! @@ -2978,6 +3020,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Introduc STR_TOWN_DIRECTORY_CAPTION :{WHITE}Municipios STR_TOWN_DIRECTORY_NONE :{ORANGE}- Ninguna - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Ciudad){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nombres de los municipios - click sobre un nombre para centrar la vista principal en él. Ctrl+Click abre una ventana de visualización en dicha posición STR_TOWN_POPULATION :{BLACK}Población mundial: {COMMA} @@ -2985,8 +3028,7 @@ STR_TOWN_POPULATION :{BLACK}Poblaci STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Ciudad) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Habitantes: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Pasajeros último mes: {ORANGE}{COMMA}{BLACK} Máx.: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Correo último mes: {ORANGE}{COMMA}{BLACK} Máx.: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} último mes: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Carga necesaria para crecimiento del municipio: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} requeridos STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} requerido en invierno @@ -2994,7 +3036,7 @@ STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED_GENERAL :{ORANGE}{STRING STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{RED} (todavía requerido) STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{GREEN} (entregado) STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}El municipio crece cada {ORANGE}{COMMA}{BLACK}{NBSP}día{P "" s} -STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}El municipio crece cada {ORANGE}{COMMA}{BLACK}{NBSP}días{P "" s} (edificios fundados) +STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}El municipio crece cada {ORANGE}{COMMA}{BLACK}{NBSP}día{P "" s} (edificios fundados) STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}El municipio {RED}no{BLACK} está creciendo STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Nivel de ruido en municipio: {ORANGE}{COMMA}{BLACK} Máx.: {ORANGE}{COMMA} STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centrar vista sobre el municipio. Ctrl+Click abre un punto de vista en dicha posición @@ -3291,21 +3333,13 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La industria ha anunciado su cierre inminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necesita: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Necesita: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} esperando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambiar producción (múltiplo de 8, máximo 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambiar nivel de producción (porcentaje, hasta un máximo de 800%) @@ -3800,6 +3834,7 @@ STR_ORDER_CONDITIONAL_AGE :Edad (años) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Requiere mantenimiento STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Siempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Tiempo de vida restante (años) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Fiabilidad máxima STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Como comparar los datos del vehículo al valor dado STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :es igual a @@ -3989,11 +4024,11 @@ STR_AI_GAME_SCRIPT_TOOLTIP :{BLACK}Comproba STR_ERROR_AI_NO_AI_FOUND :No se encontró IA apropiada para cargar.{}Ésta es una IA por defecto que no realiza acción alguna.{}Puedes descargar nuevas IA mediante el sistema de 'Contenido Online' STR_ERROR_AI_PLEASE_REPORT_CRASH :{WHITE}Uno de los scripts ejecutados ha fallado. Por favor, informe del fallo al autor del script con una captura de la ventana de depuración de Script / IA -STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}La ventana de depuración de scripts solo está disponible para el servidor +STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}La ventana de depuración de Scripts solo está disponible para el servidor # AI configuration window STR_AI_CONFIG_CAPTION :{WHITE}Configuración de Scripts de Juego / IA -STR_AI_CONFIG_GAMELIST_TOOLTIP :{BLACK}Script de Juego que será cargada en la próxima partida +STR_AI_CONFIG_GAMELIST_TOOLTIP :{BLACK}Script de Juego que será cargado en la próxima partida STR_AI_CONFIG_AILIST_TOOLTIP :{BLACK}IAs que serán cargadas en la próxima partida STR_AI_CONFIG_HUMAN_PLAYER :Jugador Humano STR_AI_CONFIG_RANDOM_AI :IA aleatoria @@ -4178,7 +4213,7 @@ STR_ERROR_PROTECTED :{WHITE}Esta emp STR_ERROR_CAN_T_GENERATE_TOWN :{WHITE}No se puede construir ningún municipio STR_ERROR_CAN_T_RENAME_TOWN :{WHITE}No se puede renombrar el municipio... STR_ERROR_CAN_T_FOUND_TOWN_HERE :{WHITE}No se puede construir un municipio aquí... -STR_ERROR_CAN_T_EXPAND_TOWN :{WHITE}No se puede expandir municipio... +STR_ERROR_CAN_T_EXPAND_TOWN :{WHITE}No se puede expandir este municipio... STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP_SUB :{WHITE}... demasiado cercano al borde del mapa STR_ERROR_TOO_CLOSE_TO_ANOTHER_TOWN :{WHITE}... demasiado cercano a otro municipio STR_ERROR_TOO_MANY_TOWNS :{WHITE}... demasiados municipios @@ -4225,7 +4260,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Demasiad STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Demasiadas partes de estación de tren STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Demasiadas paradas de autobús STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Demasiadas paradas de camión -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Demasiado cerca de otra estación/zona de carga STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Demasiado cerca de otro muelle STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Demasiado cerca de otro aeropuerto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}No se puede renombrar estación... @@ -4233,6 +4267,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... esta STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... carretera en la dirección incorrecta STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... las estaciones de autobús de paso no pueden tener esquinas STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... las estaciones de autobús de paso no pueden tener intersecciones +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... carretera de un solo sentido o bloqueada # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}No se puede retirar parte de la estación... @@ -4477,13 +4512,15 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}No se pu STR_DESKTOP_SHORTCUT_COMMENT :Un juego de simulación basado en Transport Tycoon Deluxe # Translatable descriptions in media/baseset/*.ob* files -STR_BASEGRAPHICS_DOS_DESCRIPTION :Gráficos originales de Transport Tycoon Deluxe versión DOS. -STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Gráficos originales de Transport Tycoon Deluxe versión DOS (Alemán). -STR_BASEGRAPHICS_WIN_DESCRIPTION :Gráficos originales de Transport Tycoon Deluxe versión Windows. -STR_BASESOUNDS_DOS_DESCRIPTION :Sonidos originales de Transport Tycoon Deluxe versión DOS. -STR_BASESOUNDS_WIN_DESCRIPTION :Sonidos originales de Transport Tycoon Deluxe versión Windows. +STR_BASEGRAPHICS_DOS_DESCRIPTION :Gráficos originales de Transport Tycoon Deluxe, versión DOS. +STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Gráficos originales de Transport Tycoon Deluxe, versión DOS (Alemán). +STR_BASEGRAPHICS_WIN_DESCRIPTION :Gráficos originales de Transport Tycoon Deluxe, versión Windows. +STR_BASESOUNDS_DOS_DESCRIPTION :Sonidos originales de Transport Tycoon Deluxe, versión DOS. +STR_BASESOUNDS_WIN_DESCRIPTION :Sonidos originales de Transport Tycoon Deluxe, versión Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Un conjunto de sonidos vacío. -STR_BASEMUSIC_WIN_DESCRIPTION :Música original de Transport Tycoon Deluxe versión Windows. +STR_BASEMUSIC_WIN_DESCRIPTION :Música original de Transport Tycoon Deluxe, versión Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Música original de Transport Tycoon Deluxe, versión DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Música original de Transport Tycoon (Original/Editor de Mundos), versión DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Un conjunto de música vacío. ##id 0x2000 diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 8eaf61b27b..34493d885b 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -11,7 +11,7 @@ ##gender m f -# $Id: spanish_MX.txt 27991 2018-03-14 18:45:37Z translators $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -190,6 +190,8 @@ STR_COLOUR_ORANGE :Naranja STR_COLOUR_BROWN :Café STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Blanco +STR_COLOUR_RANDOM :Aleatorio +STR_COLOUR_DEFAULT :Predefinido # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -283,7 +285,7 @@ STR_SORT_BY_CAPTION_DATE :{BLACK}Fecha STR_SORT_BY_NAME :Nombre STR_SORT_BY_PRODUCTION :Producción STR_SORT_BY_TYPE :Tipo -STR_SORT_BY_TRANSPORTED :Entregado +STR_SORT_BY_TRANSPORTED :Transportado STR_SORT_BY_NUMBER :Número STR_SORT_BY_PROFIT_LAST_YEAR :Utilidad año pasado STR_SORT_BY_PROFIT_THIS_YEAR :Utilidad este año @@ -301,7 +303,7 @@ STR_SORT_BY_WAITING_TOTAL :Cargamento tota STR_SORT_BY_WAITING_AVAILABLE :Cargamento disponible en espera STR_SORT_BY_RATING_MAX :Valoración más alta de cargamento STR_SORT_BY_RATING_MIN :Valoración más baja de cargamento -STR_SORT_BY_ENGINE_ID :EngineID (classic sort)Id. locomotora (orden clásico) +STR_SORT_BY_ENGINE_ID :Id. locomotora (orden clásico) STR_SORT_BY_COST :Costo STR_SORT_BY_POWER :Potencia STR_SORT_BY_TRACTIVE_EFFORT :Fuerza de tracción @@ -317,7 +319,7 @@ STR_SORT_BY_RATING :Evaluación STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Poner en pausa STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Avance rápido STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Opciones -STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Guardar partida, retirarse, salir +STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Guardar partida, salir STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Mostrar mapa, ventana de vista adicional o lista de carteles STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Mostrar guía de pueblos STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Mostrar subsidios @@ -391,7 +393,7 @@ STR_SETTINGS_MENU_TRANSPARENT_SIGNS :Carteles transp ############ range for file menu starts STR_FILE_MENU_SAVE_GAME :Guardar partida STR_FILE_MENU_LOAD_GAME :Cargar partida -STR_FILE_MENU_QUIT_GAME :Retirarse de la partida +STR_FILE_MENU_QUIT_GAME :Salir de la partida STR_FILE_MENU_SEPARATOR : STR_FILE_MENU_EXIT :Salir ############ range ends here @@ -476,6 +478,7 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de pant STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Captura con acercamiento completo STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Captura con acercamiento predeterminado STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de mapa completo +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar FPS STR_ABOUT_MENU_ABOUT_OPENTTD :Acerca de 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Alineador de sprites STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Activar cajas delimitadoras @@ -651,6 +654,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}No hay música disponible STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Pista STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Título @@ -670,15 +674,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Elegir p STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Encender o apagar mezclador STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Mostrar ventana de selección de pistas musicales -STR_ERROR_NO_SONGS :{WHITE}Se eligió una colección vacía. No se reproducirá música - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Selección del programa musical +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programa musical - "{STRING}" STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Lista de reproducción STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa: '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Eliminar +STR_PLAYLIST_CHANGE_SET :{BLACK}Cambiar lista musical STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Eliminar programa actual (solo Personal 1 y Personal 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Cambiar la selección musical a otra lista instalada STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Clic en la pista de música para añadirla al programa actual (solo Personal 1 y 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Clic en la pista de música para quitarla del programa actual (solo Personal 1 y 2) @@ -814,6 +818,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Presidente) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}¡{STRING} patrocina la creación del nuevo pueblo de {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}¡El nuevo pueblo de {TOWN} ha sido formado! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}¡Nuev{G o a} {STRING} en construcción cerca de {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}¡Nuev{G o a} {STRING} fundad{G o a} cerca de {TOWN}! @@ -881,10 +886,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Vista {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copiar ventana de vista +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Cambiar ventana de vista STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copiar la vista principal a esta ventana de vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Pegar ventana de vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Pegar esta ventana de vista en la principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Cambiar vista principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copiar ubicación en esta vista a la principal # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opciones de juego @@ -926,6 +931,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand sudafrican STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personalizada... STR_GAME_OPTIONS_CURRENCY_GEL :Lari georgiano (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial iraní (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Nuevo rublo ruso (RUR) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso mexicano (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vehículos de carretera @@ -1255,6 +1262,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}No se pu STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantenimiento de infraestructura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cuando se activa, la infraestructura tiene costo de mantenimiento, el cual aumenta en relación con el tamaño de la red de transporte. Esto afecta en mayor medida a las empresas grandes que a las pequeñas +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Color inicial de la empresa: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Elegir el color inicial de la empresa + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeropuertos siempre disponibles: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Los tipos de aeropuertos estarán disponibles todo el tiempo tras haber sido introducidos @@ -1302,7 +1312,7 @@ STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Número de indu STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Distancia máxima de refinerías de petróleo con los bordes del mapa: {STRING} STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Las refinerías de petróleo se construyen cerca del borde del mapa, el cual es costa en mapas con borde marítimo STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Nivel de inicio de nieve: {STRING} -STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :En los mapas de clima Subártico, la elevación a la cual la nieve comienza. La nieve también afecta a la generación de industrias y a los requisitos de crecimiento de los pueblos +STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :En los mapas de clima Subártico, la elevación a la cual la nieve comienza. La nieve también afecta la generación de industrias y los requisitos de crecimiento de los pueblos STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Irregularidad del terreno: {STRING} STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_HELPTEXT :(Solo TerraGenesis) Cantidad de colinas: los terrenos más planos tienen menos colinas, aunque suelen ser más extensas. Los terrenos más accidentados tienen múltiples colinas, lo cual puede resultar repetitivo STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :Muy suave @@ -1338,14 +1348,18 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Color para el t STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde oscuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violeta -STR_CONFIG_SETTING_REVERSE_SCROLLING :Desplazamiento de vista invertido: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Efecto al arrastrar el mapa con el botón derecho. Si se desactiva, el ratón mueve la cámara. Si se activa, el ratón mueve el mapa +STR_CONFIG_SETTING_SCROLLMODE :Desplazamiento de vista: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Modo de recorrer la vista sobre el mapa +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Desplazar la vista con clic derecho, ratón en posición fija +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Recorrer mapa con clic derecho, ratón en posición fija +STR_CONFIG_SETTING_SCROLLMODE_RMB :Recorrer mapa con clic derecho +STR_CONFIG_SETTING_SCROLLMODE_LMB :Recorrer mapa con clic izquierdo STR_CONFIG_SETTING_SMOOTH_SCROLLING :Desplazamiento de vista suavizado: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Forma en la que la vista principal se mueve a una ubicación específica al hacer clic en el minimapa o tras una orden de moverse a un objeto determinado del mapa. Si se activa, la vista se mueve de forma suave. Si se desactiva, la vista se mueve instantáneamente al sitio indicado STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostrar información de medidas al usar las herramientas de construcción: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Mostrar distancias en número de casillas y las diferencias de altura cuando se realicen labores de construcción -STR_CONFIG_SETTING_LIVERIES :Mostrar diseño de colores según el tipo de vehículo: {STRING} -STR_CONFIG_SETTING_LIVERIES_HELPTEXT :Controlar el uso de diseños de colores específicos para vehículos en lugar de los específicos de cada empresa +STR_CONFIG_SETTING_LIVERIES :Mostrar cromáticas por tipo de vehículo: {STRING} +STR_CONFIG_SETTING_LIVERIES_HELPTEXT :Controlar el uso de cromáticas por vehículo y no por empresa STR_CONFIG_SETTING_LIVERIES_NONE :Ninguno STR_CONFIG_SETTING_LIVERIES_OWN :Mi empresa STR_CONFIG_SETTING_LIVERIES_ALL :Todas las empresas @@ -1371,8 +1385,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Ninguno -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Desplazamiento con botón izquierdo: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Activar el desplazamiento del mapa al arrastrar con el botón izquierdo. Esto es especialmente útil al usar pantallas táctiles STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Cerrar ventana con clic derecho: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Cerrar la ventana haciendo clic derecho sobre ella. ¡Desactiva los mensajes de ayuda con clic derecho! @@ -1537,12 +1549,12 @@ STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :Activar interfa STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI_HELPTEXT :Mostrar una ventana para elegir los tipos de señales a instalar. Si no se activa, se instalan las señales y se selecciona un tipo determinado mediante Ctrl+Clic, sin que aparezca ninguna interfaz STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE :Tipo de señal predeterminada a instalar: {STRING} STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Tipo de señal predeterminada a utilizar -STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Señales de bloqueo +STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Señales de tramo STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBS :Señales de ruta STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBSOWAY :Señales de ruta de un sentido STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Cambiar entre tipos de señales: {STRING} STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Elegir entre qué señales se debe cambiar al usar Ctrl+Clic con la herramienta de señales -STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Solo señales de bloqueo +STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Solo señales de tramo STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Solo señales de ruta STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :Todas @@ -1786,8 +1798,8 @@ STR_OSNAME_OS2 :OS/2 STR_OSNAME_SUNOS :SunOS # Abandon game -STR_ABANDON_GAME_CAPTION :{WHITE}Retirarse de la partida -STR_ABANDON_GAME_QUERY :{YELLOW}¿Estás seguro de que deseas retirarte de esta partida? +STR_ABANDON_GAME_CAPTION :{WHITE}Salir de la partida +STR_ABANDON_GAME_QUERY :{YELLOW}¿Estás seguro de que deseas salir de esta partida? STR_ABANDON_SCENARIO_QUERY :{YELLOW}¿Estás seguro de que deseas salir de este mapa? # Cheat window @@ -1810,7 +1822,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Cambiar STR_CHEAT_SETUP_PROD :{LTBLUE}Permitir cambiar los valores de producción: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nueva cromática +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Cromática STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Mostrar cromática general STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Mostrar cromáticas para trenes @@ -2286,6 +2298,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Leyenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Todas STR_LINKGRAPH_LEGEND_NONE :{BLACK}Ninguna STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Elegir las empresas a mostrar +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}sin uso @@ -2319,7 +2332,7 @@ STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Construi STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Construir depósito de trenes (para comprar y dar mantenimiento a trenes). Mayús muestra una estimación del precio STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Construir punto guía sobre vías férreas. Ctrl activa la unión de puntos guías. Mayús muestra una estimación del precio STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Construir estación de ferrocarril. Ctrl activa la ampliación de estaciones. Mayús muestra una estimación del precio -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Instalar señales de ferrocarril. Ctrl cambia entre señales mecánicas y eléctricas{}Al arrastrar sobre las vías se instalan señales a lo largo de un tramo recto elegido. Ctrl instala señales hasta el siguiente desvío u otra señal{}Ctrl+Clic cambia a la herramienta de selección de señales. Mayús muestra una estimación del precio +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Poner señales. Ctrl intercambia señales mecánicas y eléctricas{}Arrastrar sobre un tramo recto permite poner señales intercaladas. Ctrl pone señales hasta un desvío u otra señal{}Ctrl+Clic cambia al modo de selección de señales. Mayús muestra una estimación del precio STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Construir puente de ferrocarril. Mayús muestra una estimación del precio STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Construir túnel de ferrocarril. Mayús muestra una estimación del precio STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Quitar vías férreas, señales, estaciones y puntos guías. Al mantener pulsado Ctrl se quitan también las vías al retirar estaciones o puntos guías @@ -2357,22 +2370,22 @@ STR_STATION_CLASS_WAYP :Puntos guías # Signal window STR_BUILD_SIGNAL_CAPTION :{WHITE}Selección de señales -STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Señal de bloqueo (mecánica){}Es el tipo de señal más básico que permite a un único tren ocupar al mismo tiempo un tramo de vía entre dos señales -STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Señal de entrada (mecánica){}Abierta si existe una o más señales de salida en el siguiente tramo, de lo contrario se mostrará cerrada -STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Señal de salida (mecánica){}Igual que una señal de bloqueo pero es necesaria para activar la posición correcta de las señales de entrada y combo -STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Señal de combo (mecánica){}La señal hace lo mismo que una señal de entrada y salida a la vez, lo que permite construir grandes "árboles" de señales condicionales -STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Señal de ruta (mecánica){}Una señal de ruta permite a más de un tren entrar al mismo tiempo en un tramo de vía con señales, en tanto que el tren pueda reservar una ruta hasta un lugar seguro. Puede ser pasada por detrás +STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Señal de tramo (mecánica){}Es la señal más básica. Permite a un solo tren ocupar un tramo de vía entre dos señales +STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Señal de entrada (mecánica){}Se abre si existe una o más señales de salida en el siguiente tramo, de lo contrario se mostrará cerrada +STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Señal de salida (mecánica){}Igual que una señal de tramo pero es necesaria para activar la posición correcta de las señales de entrada y combo +STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Señal combo (mecánica){}Hace lo mismo que las señales de entrada y de salida, lo que permite construir amplios "árboles" de señales condicionales +STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Señal de ruta (mecánica){}Permite a más de un tren entrar al mismo tiempo en un tramo de vía con señales, en tanto que el tren pueda reservar una ruta hasta un lugar seguro. Puede ser pasada por detrás STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Señal de ruta de un sentido (mecánica){}Igual que una señal de ruta pero no puede ser pasada por detrás -STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Señal de bloqueo (eléctrica){}Es el tipo de señal más básico que permite a un único tren ocupar al mismo tiempo un tramo de vía entre dos señales -STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Señal de entrada (eléctrica){}Verde si existe una o más señales de salida en el siguiente tramo, de lo contrario se mostrará en rojo -STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Señal de salida (eléctrica){}Igual que una señal de bloqueo pero es necesaria para activar el color correcto de las señales de entrada y combo -STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Señal combo (eléctrica){}La señal hace lo mismo que una señal de entrada y salida a la vez, lo que permite construir grandes "árboles" de señales condicionales -STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Señal de ruta (eléctrica){}Una señal de ruta permite a más de un tren entrar al mismo tiempo en un tramo de vía con señales, en tanto que el tren pueda reservar una ruta hasta un lugar seguro. Puede ser pasada por detrás +STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Señal de tramo (eléctrica){}Es la señal más básica. Permite a un solo tren ocupar un tramo de vía entre dos señales +STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Señal de entrada (eléctrica){}En verde si existe una o más señales de salida en el siguiente tramo, de lo contrario se mostrará en rojo +STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Señal de salida (eléctrica){}Igual que una señal de tramo pero es necesaria para activar el color correcto de las señales de entrada y combo +STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Señal combo (eléctrica){}Hace lo mismo que las señales de entrada y de salida, lo que permite construir amplios "árboles" de señales condicionales +STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Señal de ruta (eléctrica){}Permite a más de un tren entrar al mismo tiempo en un tramo de vía con señales, en tanto que el tren pueda reservar una ruta hasta un lugar seguro. Puede ser pasada por detrás STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Señal de ruta de un sentido (eléctrica){}Igual que una señal de ruta pero no puede ser pasada por detrás STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversión de señal{}Activar para pulsar sobre una señal existente y convertirla en el tipo y variante elegidos. Ctrl+Clic permite cambiar entre variantes de señales. Mayús+Clic muestra una estimación del precio de conversión -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Cantidad de señales instaladas al arrastrar -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Más -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Menos +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distancia entre señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reducir distancia entre señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar distancia entre señales # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selección de puente de ferrocarril @@ -2563,7 +2576,7 @@ STR_INDUSTRY_CARGOES_HOUSES :{WHITE}Casas STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP :{BLACK}Clic en la industria para ver sus industrias proveedoras y receptoras STR_INDUSTRY_CARGOES_CARGO_TOOLTIP :{BLACK}{STRING}{}Clic en el cargamento para ver sus industrias proveedoras y receptoras STR_INDUSTRY_DISPLAY_CHAIN :{BLACK}Mostrar cadena -STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP :{BLACK}Mostrar las industrias que proveen y reciben el cargamento +STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP :{BLACK}Mostrar las industrias que proveen y aceptan el cargamento STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP :{BLACK}Ver en minimapa STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP :{BLACK}Elegir y ver en el minimapa las industrias mostradas en el mapa principal STR_INDUSTRY_CARGOES_SELECT_CARGO :{BLACK}Elegir cargamento @@ -2591,7 +2604,7 @@ STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Tipo de STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Nombre del aeropuerto: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Nombre de casilla del aeropuerto: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Cargamento recibido: {LTBLUE} +STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Cargamento aceptado: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Tipo de vía: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Límite de velocidad de ferrocarril: {LTBLUE}{VELOCITY} @@ -2692,7 +2705,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Terreno propied STR_ABOUT_OPENTTD :{WHITE}Acerca de OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright original {COPYRIGHT} 1995 Chris Sawyer, Todos los derechos reservados STR_ABOUT_VERSION :{BLACK}OpenTTD versión {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018, el equipo de OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019, el equipo de OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}FPS +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Simulación: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Número de ticks simulados por segundo. +STR_FRAMERATE_RATE_BLITTER :{BLACK}FPS de gráficos: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Número de cuadros por segundo. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Factor de velocidad de juego actual: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Rapidez actual del juego comparada con la esperada durante una simulación normal. +STR_FRAMERATE_CURRENT :{WHITE}Actual +STR_FRAMERATE_AVERAGE :{WHITE}Promedio +STR_FRAMERATE_DATA_POINTS :{BLACK}Información de {COMMA} mediciones +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} cuadros/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} cuadros/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} cuadros/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Bucles de juego totales: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Manejo de cargamento: +STR_FRAMERATE_GL_TRAINS :{BLACK} Ticks de trenes: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Ticks de vehículos de carretera: +STR_FRAMERATE_GL_SHIPS :{BLACK} Ticks de barcos: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Ticks de aeronaves: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Ticks de mapa: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Retraso en gráfica de distribución: +STR_FRAMERATE_DRAWING :{BLACK}Presentación de gráficos: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Ventanas de vista generales: +STR_FRAMERATE_VIDEO :{BLACK}Salida de video: +STR_FRAMERATE_SOUND :{BLACK}Mezcla de sonido: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Bucle de juego +STR_FRAMETIME_CAPTION_GL_ECONOMY :Manejo de cargamento +STR_FRAMETIME_CAPTION_GL_TRAINS :Ticks de trenes +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Ticks de vehículos de carretera +STR_FRAMETIME_CAPTION_GL_SHIPS :Ticks de barcos +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Ticks de areonaves +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Ticks de mapa +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Retraro en gráfica de distribución +STR_FRAMETIME_CAPTION_DRAWING :Presentación de gráficos +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Presentación de ventanas de vista generales +STR_FRAMETIME_CAPTION_VIDEO :Salida de video +STR_FRAMETIME_CAPTION_SOUND :Mezcla de sonido +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Guardar partida @@ -2716,6 +2779,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Detalles STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No hay información disponible STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtrar palabras: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Sobrescribir archivo +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}¿Estás seguro de sobrescribir el archivo? STR_SAVELOAD_OSKTITLE :{BLACK}Indicar un nombre para la partida a guardar @@ -2833,7 +2899,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versión STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Mín. versión compatible: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Por defecto (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Por defecto (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Tradicional (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Tradicional (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parámetros: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Ninguna STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}No hay información disponible STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Archivo no encontrado @@ -2914,6 +2985,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :La lectura exce STR_NEWGRF_ERROR_GRM_FAILED :Recursos GRF solicitados no disponibles (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} fue desactivado por {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Formato de colocación de sprites no válido o desconocido (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Demasiados elementos en la lista de valores de propiedad (sprite {3:NUM}, property {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Llamada de producción de industria no válida (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}¡Precaución! @@ -2978,6 +3051,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Indicar STR_TOWN_DIRECTORY_CAPTION :{WHITE}Pueblos STR_TOWN_DIRECTORY_NONE :{ORANGE}- Ninguno - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (ciudad){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nombres de pueblos. Clic en un nombre para centrar la vista principal en el pueblo. Ctrl+Clic abre una ventana de vista en dicha ubicación STR_TOWN_POPULATION :{BLACK}Población mundial: {COMMA} @@ -2985,8 +3059,7 @@ STR_TOWN_POPULATION :{BLACK}Poblaci STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (ciudad) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Habitantes: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Pasajeros mes pasado: {ORANGE}{COMMA}{BLACK} Máx.: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Correo mes pasado: {ORANGE}{COMMA}{BLACK} Máx.: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} mes pasado: {ORANGE}{COMMA}{BLACK} máx.: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargamento necesario para crecimiento: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} requeridos STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} requerido en invierno @@ -3216,7 +3289,7 @@ STR_COMPANY_VIEW_CAPTION :{WHITE}{COMPANY STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE :{WHITE}{PRESIDENT_NAME}{}{GOLD}(Presidente) STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Inaugurada: {WHITE}{NUM} -STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Diseño de colores: +STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Cromática: STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Vehículos: STR_COMPANY_VIEW_TRAINS :{WHITE}{COMMA} tren{P "" es} STR_COMPANY_VIEW_ROAD_VEHICLES :{WHITE}{COMMA} vehículo{P "" s} de carretera @@ -3244,8 +3317,8 @@ STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}Ver info STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}Nueva cara STR_COMPANY_VIEW_NEW_FACE_TOOLTIP :{BLACK}Elegir nueva cara para el presidente -STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON :{BLACK}Diseño de colores -STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP :{BLACK}Cambiar el diseño de colores corporativos de la empresa +STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON :{BLACK}Cromática +STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP :{BLACK}Cambiar la cromática (colores corporativos) de los vehículos STR_COMPANY_VIEW_COMPANY_NAME_BUTTON :{BLACK}Nombre empresa STR_COMPANY_VIEW_COMPANY_NAME_TOOLTIP :{BLACK}Cambiar el nombre de la empresa STR_COMPANY_VIEW_PRESIDENT_NAME_BUTTON :{BLACK}Nombre presidente @@ -3278,34 +3351,27 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrias STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ninguna - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% entregado) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}, {CARGO_LONG}{STRING}){YELLOW} ({COMMA}%, {COMMA}% entregado) +STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportado) +STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}, {CARGO_LONG}{STRING}){YELLOW} ({COMMA}%, {COMMA}% transportado) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nombre de industria: Clic en un nombre para centrar la vista principal en la industria. Ctrl+Clic abre una ventana de vista en dicha ubicación # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producción mes pasado: -STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% entregado) +STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado) STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar la vista sobre la industria. Ctrl+Clic abre una ventana de vista en dicha ubicación STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}¡La industria ha anunciado su cierre inminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requiere: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} esperando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambiar producción (múltiplo de 8, máximo 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambiar nivel de producción (porcentaje, máximo 800%) @@ -3358,6 +3424,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupos: STR_GROUP_CREATE_TOOLTIP :{BLACK}Clic para crear un grupo STR_GROUP_DELETE_TOOLTIP :{BLACK}Eliminar el grupo seleccionado STR_GROUP_RENAME_TOOLTIP :{BLACK}Cambiar nombre del grupo seleccionado +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Cambiar cromática del grupo elegido STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Clic para evitar que los vehículos en este grupo se reemplacen automáticamente. STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Eliminar grupo @@ -3401,6 +3468,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacida STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Vagones con motor: {GOLD}+{POWER}{BLACK} Peso: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Reforma: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Todo tipo de carga +STR_PURCHASE_INFO_NONE :Ninguno STR_PURCHASE_INFO_ALL_BUT :Todo excepto {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Máx. fuerza de tracción: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Alcance: {GOLD}{COMMA} casillas @@ -3800,6 +3868,7 @@ STR_ORDER_CONDITIONAL_AGE :Edad (años) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Requiere mantenimiento STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Siempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Tiempo de vida restante (años) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Fabilidad máxima STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Comparación de los datos del vehículo respecto al valor dado STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :es igual a @@ -4225,7 +4294,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Demasiad STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Demasiadas partes de estación de tren STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Demasiadas paradas de autobuses STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Demasiadas estaciones de camiones -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Demasiado cerca de otra estación o zona de carga STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Demasiado cerca de otro muelle STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Demasiado cerca de otro aeropuerto STR_ERROR_CAN_T_RENAME_STATION :{WHITE}No se puede cambiar nombre de la estación... @@ -4233,6 +4301,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... esta STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... carretera en el sentido incorrecto STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... las estaciones y paradas intermedias no pueden ponerse sobre esquinas STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... las estaciones y paradas intermedias no pueden ponerse sobre intersecciones +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la carretera está bloqueada o es de un solo sentido # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}No se puede quitar parte de la estación... @@ -4484,6 +4553,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sonidos origina STR_BASESOUNDS_WIN_DESCRIPTION :Sonidos originales de Transport Tycoon Deluxe para Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Paquete de sonidos vacío STR_BASEMUSIC_WIN_DESCRIPTION :Música original de Transport Tycoon Deluxe para Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Música original de Transport Tycoon Deluxe para DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Música original de Transport Tycoon versión World Editor para DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Paquete de música vacío ##id 0x2000 diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index 33f18791db..2917b027c3 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -10,7 +10,7 @@ ##grflangid 0x2e -# $Id: swedish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -189,6 +189,8 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Brun STR_COLOUR_GREY :Grå STR_COLOUR_WHITE :Vit +STR_COLOUR_RANDOM :Slumpmässig +STR_COLOUR_DEFAULT :Standard # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -241,7 +243,7 @@ STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Fönster STR_TOOLTIP_SHADE :{BLACK}Dölj fönster - Visa bara namnlisten STR_TOOLTIP_DEBUG :{BLACK}Visa NewGRF felsökningsinformation STR_TOOLTIP_DEFSIZE :{BLACK}Återställ fönstret till standardstorlek. Ctrl-klicka för att sätta nuvarande storlek som ny standard -STR_TOOLTIP_STICKY :{BLACK}Markera att fönstret ska lämnas öppet när 'Stäng alla fönster'-knappen används. Ctrl+Click för att spara som default +STR_TOOLTIP_STICKY :{BLACK}Markera att fönstret ska lämnas öppet när 'Stäng alla fönster'-knappen används. Ctrl+klick för att spara som standardinställning STR_TOOLTIP_RESIZE :{BLACK}Klicka och dra för att förstora fönstret STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Växla stor/liten fönsterstorlek STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Rullningslist - rullar listan upp/ned @@ -475,6 +477,7 @@ STR_ABOUT_MENU_SCREENSHOT :Skärmdump STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Fullt inzoomad skärmdump STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Normalt inzoomad skärmdump STR_ABOUT_MENU_GIANT_SCREENSHOT :Skärmdump av hela kartan +STR_ABOUT_MENU_SHOW_FRAMERATE :Visa bildfrekvens STR_ABOUT_MENU_ABOUT_OPENTTD :Om 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Justering av spriteobjekt STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Slå av/på yttre gränser för grafiska element @@ -650,6 +653,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Ingen musik tillgänglig STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Spår STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Titel @@ -669,15 +673,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Välj sp STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Växla slumpning av/på STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Visa fönstret för val av musikspår -STR_ERROR_NO_SONGS :{WHITE}Ett musikpaket utan låtar har valts. Ingen musik kommer att spelas - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Konstruera spellista +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Musikprogram - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Spårindex STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Spellista - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Töm +STR_PLAYLIST_CHANGE_SET :{BLACK}Byt samling STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Töm aktuell spellista (enbart Personlig1 eller Personlig2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Ändra musikvalet till en annan installerad samling STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klicka på ett musikstycke för att lägga till det i spellistan (enbart Personlig1 eller Personlig2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klicka på ett musikstycke för att ta bort det från spellistan (endast Personlig1 och Personlig2) @@ -714,8 +718,8 @@ STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Visa god STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Visa transportrutter på kartan STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Visa vegetation på kartan STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Visa markägare på kartan -STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Klicka på en typ av industri för att växla om den visas. Ctrl+Klick visar inga andra typer av industrier. Ctrl+Klick igen visar alla typer av industrier. -STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Klicka på ett företag för att växla om det företagets egendomar visas. Ctrl+Klick visar inga företag utom det valda. Ctrl+Klick igen visar alla företag. +STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Klicka på en typ av industri för att växla om den visas. Ctrl+klick visar inga andra typer av industrier. Ctrl+klick igen visar alla typer av industrier. +STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Klicka på ett företag för att växla om det företagets egendomar visas. Ctrl+klick visar inga företag utom det valda. Ctrl+klick igen visar alla företag. STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Klicka på en godstyp för att växla visning av dess egenskap. Ctrl+klick stänger av alla godstyper utom den valda. Ctrl+klicka igen för att aktivera alla godstyper STR_SMALLMAP_LEGENDA_ROADS :{TINY_FONT}{BLACK}Vägar @@ -813,6 +817,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(VD) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} har sponsrat byggnationen av nya staden {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}En ny stad, kallad {TOWN}, har grundats! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Ny {STRING} under konstruktion nära {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Ny {STRING} planteras nära {TOWN}! @@ -826,7 +831,7 @@ STR_NEWS_BEGIN_OF_RECESSION :{BIG_FONT}{BLAC STR_NEWS_END_OF_RECESSION :{BIG_FONT}{BLACK}Lågkonjunkturen över!{}{}Uppsving i handeln ger tillförsikt till industrier när ekonomin stärks! STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_GENERAL :{BIG_FONT}{BLACK}{INDUSTRY} ökar produktionen! -STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_COAL :{BIG_FONT}{BLACK}Nytt lager av kol funnet vid {INDUSTRY}!{}Produktionen fördubblas! +STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_COAL :{BIG_FONT}{BLACK}Ny fyndighet av kol upptäckt vid {INDUSTRY}!{}Produktionen fördubblas! STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_OIL :{BIG_FONT}{BLACK}Nya oljereserver funna vid {INDUSTRY}!{}Produktionen fördubblas! STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_FARM :{BIG_FONT}{BLACK}Nya jordbruksmetoder vid {INDUSTRY} ger fördubblad produktion! STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_SMOOTH :{BIG_FONT}{BLACK}Produktionen av {STRING} vid {INDUSTRY} upp med {COMMA}%! @@ -880,10 +885,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Vyfönster {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Kopiera till vy +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Byt vy STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Kopiera huvudvyns position till detta vyfönster -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Klistra in vyn -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Flytta huvudvyns position till positionen i det här vyfönstret +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Byt huvudvy +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Kopiera denna vys position till huvudvyn # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Spelinställningar @@ -925,6 +930,8 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Sydafrikansk ra STR_GAME_OPTIONS_CURRENCY_CUSTOM :Egen... STR_GAME_OPTIONS_CURRENCY_GEL :Georgisk lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iransk rial (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Ny rysk rubel (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Mexikansk peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vägfordon @@ -971,13 +978,13 @@ STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_12_MONTHS :Var 12:e månad ############ end of autosave dropdown STR_GAME_OPTIONS_LANGUAGE :{BLACK}Språk -STR_GAME_OPTIONS_LANGUAGE_TOOLTIP :{BLACK}Välj språk att använda +STR_GAME_OPTIONS_LANGUAGE_TOOLTIP :{BLACK}Välj vilket språk som ska användas STR_GAME_OPTIONS_FULLSCREEN :{BLACK}Helskärm STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP :{BLACK}Kryssa i den här rutan för att spela OpenTTD i helskärmsläge STR_GAME_OPTIONS_RESOLUTION :{BLACK}Skärmupplösning -STR_GAME_OPTIONS_RESOLUTION_TOOLTIP :{BLACK}Välj skärmupplösning att använda +STR_GAME_OPTIONS_RESOLUTION_TOOLTIP :{BLACK}Välj vilken skärmupplösning som ska användas STR_GAME_OPTIONS_RESOLUTION_OTHER :annan STR_GAME_OPTIONS_GUI_ZOOM_FRAME :{BLACK}Gränssnittstorlek @@ -993,11 +1000,11 @@ STR_GAME_OPTIONS_BASE_GRF_STATUS :{RED}{NUM} sakn STR_GAME_OPTIONS_BASE_GRF_DESCRIPTION_TOOLTIP :{BLACK}Ytterligare information om basgrafik-set STR_GAME_OPTIONS_BASE_SFX :{BLACK}Grundljudspaket -STR_GAME_OPTIONS_BASE_SFX_TOOLTIP :{BLACK}Välj grundljudspaket att använda +STR_GAME_OPTIONS_BASE_SFX_TOOLTIP :{BLACK}Välj vilket grundljudspaket som ska användas STR_GAME_OPTIONS_BASE_SFX_DESCRIPTION_TOOLTIP :{BLACK}Ytterligare information om grundljudpaketet STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Musikpaket valt -STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Välj vilket musikpaket att använda +STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Välj vilket musikpaket som ska användas STR_GAME_OPTIONS_BASE_MUSIC_STATUS :{RED}{NUM} fil{P "" er} korrupt{P "" a} STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Yttligare information om musikpaketet @@ -1047,7 +1054,7 @@ STR_VARIETY_VERY_LOW :Väldigt låg STR_VARIETY_LOW :Låg STR_VARIETY_MEDIUM :Medium STR_VARIETY_HIGH :Hög -STR_VARIETY_VERY_HIGH :Väldigt Hög +STR_VARIETY_VERY_HIGH :Väldigt hög STR_AI_SPEED_VERY_SLOW :Väldigt långsam STR_AI_SPEED_SLOW :Långsam @@ -1254,6 +1261,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Det är STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Underhåll av infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Om det är aktiverat så kostar underhåll av infrastruktur. Kostnaden ökar mer än proportionellt mot nätverkets storlek, vilket innebär att större företag drabbas hårdare än små företag av underhållskostnader. +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Företagets startfärg: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Välj startfärg för företaget + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flygplatser blir aldrig gamla: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktivering av denna inställning gör så att alla flygplatstyper finns kvar i obegränsad tid efter att de blivit tillgängliga @@ -1290,7 +1300,7 @@ STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Linjernas bredd STR_CONFIG_SETTING_LANDSCAPE :Landskap: {STRING} STR_CONFIG_SETTING_LANDSCAPE_HELPTEXT :Landskap definiera grundläggande gameplay scenarier med olika last och krav stad tillväxt. NewGRF och Game skript tillåter finare kontroll. -STR_CONFIG_SETTING_LAND_GENERATOR :Land generator: {STRING} +STR_CONFIG_SETTING_LAND_GENERATOR :Landgenerator: {STRING} STR_CONFIG_SETTING_LAND_GENERATOR_HELPTEXT :Den ursprungliga generatorn beror på bas grafik set, och komponerar fasta landskapsformer. TerraGenesis är en Perlin buller baserad generator med finare inställningar kontroll STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL :Original STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :TerraGenesis @@ -1300,8 +1310,8 @@ STR_CONFIG_SETTING_INDUSTRY_DENSITY :Industritäthet STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Ange hur många industrier som ska genereras och vilken nivå som ska bibehållas under spelet STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maximalt avstånd mellan oljeraffinaderier och kartans kant: {STRING} STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Oljeraffinaderier byggs bara nära kartans kanter, alltså vid kusten om det är en ö-karta -STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Snölinjeshöjd: {STRING} -STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Kontroll på vilken höjd snön börjar i subarktiska landskapet. Snö påverkar också industrin generation och stad tillväxtkrav +STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Snögränsens höjd: {STRING} +STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Kontrollerar på vilken höjd snön börjar i det subarktiska landskapet. Snö påverkar även industrigeneration och städers tillväxtkrav STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Terrängens svårhetsgrad: {STRING} STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_HELPTEXT :(TerraGenesis endast) Välj frekvensen av kullar: Smooth landskap har färre, mer utbredda kullar. Rough landskap har många kullar, som kan se repetitiva STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :Väldigt lätt @@ -1337,8 +1347,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Terrängens fä STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grön STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Mörkgrön STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violett -STR_CONFIG_SETTING_REVERSE_SCROLLING :Omvänd scrollriktning: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Beteende för skrollning av kartan med den högra musknappen. När det är inaktiverat rör musen kameran. När det är aktiverat rör musen kartan +STR_CONFIG_SETTING_SCROLLMODE :Vyfönsters skrollningsbeteende: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Beteende vid scrollning av kartan +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Rör vyn med höger musknapp, musens position låst +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Rör kartan med höger musknapp, musens position låst +STR_CONFIG_SETTING_SCROLLMODE_RMB :Rör kartan med höger musknapp +STR_CONFIG_SETTING_SCROLLMODE_LMB :Rör kartan med vänster musknapp STR_CONFIG_SETTING_SMOOTH_SCROLLING :Mjuk scrollning av vy: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Kontrollera hur huvudvyn skrollar till en specifik position vid klick på minikartan eller när ett kommando används för att skrolla till ett specifikt objekt på kartan. Om det är aktiverat skrollar vyn mjukt, om det är inaktiverat hoppar den direkt till målet STR_CONFIG_SETTING_MEASURE_TOOLTIP :Visa måtthjälptext vid användning av byggverktyg: {STRING} @@ -1370,8 +1384,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command-klick STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control-klick STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Av -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Scrolla med vänster musknappsklick: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Aktivera skrollning av kartan genom att dra den med den vänstra musknappen. Detta är särskilt användbart för skrollning vid användning av en pekskärm STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Stäng fönster med högerklick: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Stänger fönster när man högerklickar inuti dem. Denna inställning inaktiverar tooltips vid högerklick! @@ -1402,7 +1414,7 @@ STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Visa ankomster STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Visa förväntade ankomst- och avgångstider i tidtabeller STR_CONFIG_SETTING_QUICKGOTO :Snabbskapande av fordonsorder: {STRING} STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT :Förvälj 'åk till'-pekaren när orderfönstret öppnas -STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE :Standard järnvägsräls (efter nytt/laddat spel): {STRING} +STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE :Standardspår-typ (efter nytt/laddat spel): {STRING} STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_HELPTEXT :Spårtyp som ska förväljas efter att ett spel startas eller laddas. 'Först tillgängliga' väljer den äldsta spårtypen, 'Senast tillgängliga' väljer den nyaste spårtypen och 'Mest använda' väljer den spårtyp som för närvarande är mest använd STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST :Först tillgängliga STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_LAST :Senast tillgängliga @@ -1499,7 +1511,7 @@ STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY :Produktionsför STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY_HELPTEXT :Visa nyhetstidning vid förändring av industriers produktionsnivåer för industrier som används av det egna företaget STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER :Produktionsförändring vid industri som motståndare betjänar: {STRING} STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Visa nyhetstidning vid förändring av industriers produktionsnivåer för industrier som används av motståndare -STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED :Andra produktionsförändringar vid industrier.: {STRING} +STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED :Andra produktionsförändringar vid industrier: {STRING} STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED_HELPTEXT :Visa nyhetstidning vid förändring av industriers produktionsnivåer för industrier som inte används av motståndare eller det egna företaget STR_CONFIG_SETTING_NEWS_ADVICE :Råd / information om företagets fordon: {STRING} STR_CONFIG_SETTING_NEWS_ADVICE_HELPTEXT :Visa meddelande ifall att ett fordon behöver uppmärksamhet @@ -1535,7 +1547,7 @@ STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Välj vilket å STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :Använd signal-GUI: {STRING} STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI_HELPTEXT :Visa ett fönster för att välja signaltyp att bygga, istället för enbart fönsterlös signaltyps-rotation genom Ctrl+klick på byggda signaler STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE :Standardsignal-typ: {STRING} -STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Signaltyp att använda som standard +STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Signaltyp som ska användas som standard STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Normal STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBS :Avancerad STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBSOWAY :Avancerad envägssignal @@ -1554,7 +1566,7 @@ STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :3x3 rutnät STR_CONFIG_SETTING_TOWN_LAYOUT_RANDOM :Slumpmässig STR_CONFIG_SETTING_ALLOW_TOWN_ROADS :Städer tillåts bygga vägar: {STRING} STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Tillåt städer att bygga vägar för att kunna växa. Stäng av för att hindra städernas lokala myndigheter från att själva bygga vägar -STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS :Städer är tillåtna att bygga plankorsningar: {STRING} +STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS :Städer tillåts bygga plankorsningar: {STRING} STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS_HELPTEXT :Om denna inställning aktiveras så blir det tillåtet för städer att bygga plankorsningar STR_CONFIG_SETTING_NOISE_LEVEL :Tillåt stadskontrollerade bullernivåer för flygplatser: {STRING} STR_CONFIG_SETTING_NOISE_LEVEL_HELPTEXT :Med denna inställning avstängd kan det finnas max två flygplatser i varje stad. Med inställningen påslagen begränsas antalet flygplatser i en stad istället av vilken bullernivå staden accepterar, vilket styrs av populationen, flygplatsens storlek och avstånd till staden @@ -1671,7 +1683,7 @@ STR_CONFIG_SETTING_GRAPHICS :{ORANGE}Grafik STR_CONFIG_SETTING_SOUND :{ORANGE}Ljud STR_CONFIG_SETTING_INTERFACE :{ORANGE}Gränssnitt STR_CONFIG_SETTING_INTERFACE_GENERAL :{ORANGE}Generelt -STR_CONFIG_SETTING_INTERFACE_VIEWPORTS :{ORANGE}Vyportar +STR_CONFIG_SETTING_INTERFACE_VIEWPORTS :{ORANGE}Vyfönster STR_CONFIG_SETTING_INTERFACE_CONSTRUCTION :{ORANGE}Konstruktion STR_CONFIG_SETTING_ADVISORS :{ORANGE} Nyheter / Rådgivare STR_CONFIG_SETTING_COMPANY :{ORANGE}Företag @@ -1768,7 +1780,7 @@ STR_INTRO_TRANSLATION :{BLACK}Den här # Quit window STR_QUIT_CAPTION :{WHITE}Avsluta -STR_QUIT_ARE_YOU_SURE_YOU_WANT_TO_EXIT_OPENTTD :{YELLOW}Vill du verkligen avsluta OpenTTD och återvända till {STRING}? +STR_QUIT_ARE_YOU_SURE_YOU_WANT_TO_EXIT_OPENTTD :{YELLOW}Är du säker på att du vill avsluta OpenTTD och återvända till {STRING}? STR_QUIT_YES :{BLACK}Ja STR_QUIT_NO :{BLACK}Nej @@ -1786,8 +1798,8 @@ STR_OSNAME_SUNOS :SunOS # Abandon game STR_ABANDON_GAME_CAPTION :{WHITE}Avsluta spelet -STR_ABANDON_GAME_QUERY :{YELLOW}Vill du verkligen avsluta spelet? -STR_ABANDON_SCENARIO_QUERY :{YELLOW}Vill du verkligen avsluta detta scenario? +STR_ABANDON_GAME_QUERY :{YELLOW}Är du säker på att du vill avsluta spelet? +STR_ABANDON_SCENARIO_QUERY :{YELLOW}Är du säker på att du vill avsluta detta scenario? # Cheat window STR_CHEATS :{WHITE}Fusk @@ -1809,7 +1821,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Ändra n STR_CHEAT_SETUP_PROD :{LTBLUE}Aktivera modifiering av produktionsvärden: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nytt färgval +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Färgschema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Visa generellt färgschema STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Visa färgscheman för tåg @@ -1818,7 +1830,7 @@ STR_LIVERY_SHIP_TOOLTIP :{BLACK}Visa fä STR_LIVERY_AIRCRAFT_TOOLTIP :{BLACK}Visa färgschema för flygplan STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Välj huvudfärg för det aktuella schemat. Ctrl+klick kommer att välja färgen för alla scheman STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Välj andravalsfärgen för det aktuella schemat. Ctrl+klick kommer att välja färgen för alla scheman -STR_LIVERY_PANEL_TOOLTIP :{BLACK}Välj ett färgschema att ändra eller välj flera genom CTRL+klick. Bocka för rutan för att använda scheman +STR_LIVERY_PANEL_TOOLTIP :{BLACK}Välj ett färgschema att ändra eller välj flera genom Ctrl+klick. Bocka för rutan för att använda scheman STR_LIVERY_DEFAULT :Normalt färgschema STR_LIVERY_STEAM :Ånglok @@ -1974,9 +1986,9 @@ STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Välj ma STR_NETWORK_START_SERVER_COMPANIES_SELECT :{BLACK}{NUM} företag{P y ies} STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES :{BLACK}Max antal företag: STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES_TOOLTIP :{BLACK}Begränsa antalet företag på servern -STR_NETWORK_START_SERVER_SPECTATORS_SELECT :{BLACK}{NUM} åskådare{P "" s} +STR_NETWORK_START_SERVER_SPECTATORS_SELECT :{BLACK}{NUM} åskådare STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS :{BLACK}Max antal åskådare: -STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS_TOOLTIP :{BLACK}Begränsa antalet observatörer på servern +STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS_TOOLTIP :{BLACK}Begränsa antalet åskådare på servern STR_NETWORK_START_SERVER_LANGUAGE_SPOKEN :{BLACK}Språk som talas: STR_NETWORK_START_SERVER_LANGUAGE_TOOLTIP :{BLACK}Andra spelare kommer vara medvetna vilket språk som talas på servern. @@ -2285,6 +2297,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legend f STR_LINKGRAPH_LEGEND_ALL :{BLACK}Alla STR_LINKGRAPH_LEGEND_NONE :{BLACK}Inga STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Välj företag att visa +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}oanvänd @@ -2330,8 +2343,8 @@ STR_RAIL_NAME_MONORAIL :Monorail STR_RAIL_NAME_MAGLEV :Maglev # Rail depot construction window -STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Riktning för depå -STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP :{BLACK}Välj riktning för depå +STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Riktning för tågdepå +STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP :{BLACK}Välj riktning för tågdepå # Rail waypoint construction window STR_WAYPOINT_CAPTION :{WHITE}Riktmärke @@ -2344,7 +2357,7 @@ STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP :{BLACK}Välj ri STR_STATION_BUILD_NUMBER_OF_TRACKS :{BLACK}Antal spår STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP :{BLACK}Välj antal plattformar för järnvägsstation STR_STATION_BUILD_PLATFORM_LENGTH :{BLACK}Längd på plattform -STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Välj längden på järnvägsstation +STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Välj längd på järnvägsstation STR_STATION_BUILD_DRAG_DROP :{BLACK}Drag & Släpp STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bygg en station genom att dra & släppa @@ -2396,7 +2409,7 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Bygg vä STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Bygg spårvägssektion. Ctrl växlar mellan att bygga/ta bort spårvagnssektion. Shift växlar mellan att bygga/visa beräknad kostnad STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Använd Automatvägläge för att bygga vägsektion. Ctrl växlar mellan att bygga/ta bort vägkonstruktion. Shift växlar mellan att bygga/visa beräknad kostnad STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Använd Automatspårläge för att bygga spårväg. Ctrl växlar mellan bygg/ta bort spårväg. Shift växlar mellan att bygga/visa beräknad kostnad -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Bygg bussgarage (för konstruktion eller service av vägfordon). Shift växlar mellan att bygga/visa beräknad kostnad +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Bygg vägfordonsdepå (för konstruktion och service av vägfordon). Shift växlar mellan att bygga/visa beräknad kostnad STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Bygg spårvagnsdepå (för konstruktion och service av fordon). Shift växlar mellan att bygga/visa beräknad kostnad STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Bygg busshållplats. Ctrl aktiverar sammansättning av stationer. Shift växlar mellan att bygga/visa beräknad kostnad STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Bygg passagerarspårvagnsstation. Ctrl aktiverar sammansättning av stationer. Shift växlar mellan att bygga/visa beräknad kostnad @@ -2411,10 +2424,10 @@ STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Växla m STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Växla mellan att bygga/riva spårväg # Road depot construction window -STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Riktning för bussgarage -STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Välj riktning för bussgarage -STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Spårvagnsdepåns orientering -STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Välj spårvagnsdepåns orientering +STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Riktning för vägfordonsdepå +STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Välj riktning för vägfordonsdepå +STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Riktning för spårvagnsdepå +STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Välj riktning för spårvagnsdepå # Road vehicle station construction window STR_STATION_BUILD_BUS_ORIENTATION :{WHITE}Riktining för busshållplats @@ -2422,9 +2435,9 @@ STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP :{BLACK}Välj ri STR_STATION_BUILD_TRUCK_ORIENTATION :{WHITE}Riktning för lastbrygga STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP :{BLACK}Välj riktning för lastbrygga STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION :{WHITE}Riktning för passagerarspårvagnsstation -STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP :{BLACK}Välj passagerarspårvagnsstationens orientering +STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP :{BLACK}Välj riktning för passagerarspårvagnsstation STR_STATION_BUILD_CARGO_TRAM_ORIENTATION :{WHITE}Riktning för godspårvagnsstation -STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Välj godsspårvagnsstationens orientering +STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Välj riktning för godsspårvagnsstation # Waterways toolbar (last two for SE only) STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Farledskonstruktion @@ -2439,8 +2452,8 @@ STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Definier STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Placera flod # Ship depot construction window -STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Orientering för Skeppsvarv -STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP :{BLACK}Välj skeppsvarvets orientering +STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Riktning för skeppsvarv +STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP :{BLACK}Välj riktning för skeppsvarv # Dock construction window STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Hamn @@ -2457,7 +2470,7 @@ STR_STATION_BUILD_AIRPORT_LAYOUT_NAME :{BLACK}Layout { STR_AIRPORT_SMALL :Liten flygplats STR_AIRPORT_CITY :Stad -STR_AIRPORT_METRO :Storstads-flygplats +STR_AIRPORT_METRO :Storstadsflygplats STR_AIRPORT_INTERNATIONAL :Internationell flygplats STR_AIRPORT_COMMUTER :Pendlare STR_AIRPORT_INTERCONTINENTAL :Interkontinental flygplats @@ -2632,7 +2645,7 @@ STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Järnvägsdepå STR_LAI_ROAD_DESCRIPTION_ROAD :Väg STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Väg med gatubelysning STR_LAI_ROAD_DESCRIPTION_TREE_LINED_ROAD :Väg kantad av träd -STR_LAI_ROAD_DESCRIPTION_ROAD_VEHICLE_DEPOT :Bussgarage +STR_LAI_ROAD_DESCRIPTION_ROAD_VEHICLE_DEPOT :Vägfordonsdepå STR_LAI_ROAD_DESCRIPTION_ROAD_RAIL_LEVEL_CROSSING :Väg-/Järnvägskorsning STR_LAI_ROAD_DESCRIPTION_TRAMWAY :Spårväg @@ -2691,7 +2704,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Mark som ägs a STR_ABOUT_OPENTTD :{WHITE}Om OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Ursprunglig upphovsrätt {COPYRIGHT} 1995 Chris Sawyer, Alla rättigheter hävdas STR_ABOUT_VERSION :{BLACK}OpenTTD-version {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD-teamet +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD-teamet + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Bildfrekvens +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Simulationsfrekvens: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Antal spel-tick som simuleras per sekund. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Bildfrekvens för grafik: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Antal bildrutor som återges per sekund. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Spelets nuvarande hastighetsfaktor: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Hur snabbt spelet för närvarande körs, jämfört med förväntad hastighet vid normal simulationsfrekvens. +STR_FRAMERATE_CURRENT :{WHITE}Nuvarande +STR_FRAMERATE_AVERAGE :{WHITE}Genomsnittlig +STR_FRAMERATE_DATA_POINTS :{BLACK}Data baseras på {COMMA} mätvärden +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} bildrutor/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} bildrutor/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} bildrutor/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Totalt för spel-loopen: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Godshantering: +STR_FRAMERATE_GL_TRAINS :{BLACK} Tåg-tick: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Vägfordons-tick: +STR_FRAMERATE_GL_SHIPS :{BLACK} Skepps-tick: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Flygplans-tick: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Världs-tick: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Länkgrafens fördröjning: +STR_FRAMERATE_DRAWING :{BLACK}Grafikåtergivning: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Vyfönster: +STR_FRAMERATE_VIDEO :{BLACK}Videoutmatning: +STR_FRAMERATE_SOUND :{BLACK}Ljudmixning: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Spel-loop +STR_FRAMETIME_CAPTION_GL_ECONOMY :Godshantering +STR_FRAMETIME_CAPTION_GL_TRAINS :Tåg-tick +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Vägfordons-tick +STR_FRAMETIME_CAPTION_GL_SHIPS :Skepps-tick +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Flygplans-tick +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Världs-tick +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Länkgrafens fördröjning +STR_FRAMETIME_CAPTION_DRAWING :Grafikåtergivning +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Återgivning av vyer +STR_FRAMETIME_CAPTION_VIDEO :Videoutmatning +STR_FRAMETIME_CAPTION_SOUND :Ljudmixning +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spara spel @@ -2715,11 +2778,14 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Speldeta STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Ingen information tillgänglig STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Sökfilter: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Skriv över fil +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Är du säker på att du vill skriva över den existerande filen? STR_SAVELOAD_OSKTITLE :{BLACK}Mata in ett namn för detta sparade spel # World generation -STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}Generera Värld +STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}Generera värld STR_MAPGEN_MAPSIZE :{BLACK}Kartstorlek: STR_MAPGEN_MAPSIZE_TOOLTIP :{BLACK}Ange kartans storlek i rutor. Antalet tillgängliga rutor kommer att bli något lägre STR_MAPGEN_BY :{BLACK}* @@ -2730,8 +2796,8 @@ STR_MAPGEN_MAX_HEIGHTLEVEL :{BLACK}Maximal STR_MAPGEN_MAX_HEIGHTLEVEL_UP :{BLACK}Öka maximal bergshöjd med ett STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN :{BLACK}Minska maximal bergshöjd med ett STR_MAPGEN_SNOW_LINE_HEIGHT :{BLACK}Snögränsens höjd: -STR_MAPGEN_SNOW_LINE_UP :{BLACK}Höj snögränsens höjd ett upp -STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Sänk snögränsens höjd ett ner +STR_MAPGEN_SNOW_LINE_UP :{BLACK}Höj snögränsens höjd ett steg +STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Sänk snögränsens höjd ett steg STR_MAPGEN_LAND_GENERATOR :{BLACK}Landgenerator: STR_MAPGEN_TREE_PLACER :{BLACK}Trädalgoritm: STR_MAPGEN_TERRAIN_TYPE :{BLACK}Terrängtyp: @@ -2769,7 +2835,7 @@ STR_SE_MAPGEN_FLAT_WORLD_TOOLTIP :{BLACK}Generera STR_SE_MAPGEN_RANDOM_LAND :{WHITE}Slumpat land STR_SE_MAPGEN_FLAT_WORLD_HEIGHT :{BLACK}Höjd av platt land: STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_DOWN :{BLACK}Sänk höjden av platt land ett ner -STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_UP :{BLACK}Öka höjden av platt land ett upp +STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_UP :{BLACK}Öka höjden av platt land ett steg STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT :{WHITE}Ändra höjd av platt land @@ -2780,10 +2846,10 @@ STR_GENERATION_ABORT_CAPTION :{WHITE}Avbryt g STR_GENERATION_ABORT_MESSAGE :{YELLOW}Vill du verkligen avbryta genereringen? STR_GENERATION_PROGRESS :{WHITE}{NUM}% färdigt STR_GENERATION_PROGRESS_NUM :{BLACK}{NUM} / {NUM} -STR_GENERATION_WORLD_GENERATION :{BLACK}Generera Värld +STR_GENERATION_WORLD_GENERATION :{BLACK}Generera värld STR_GENERATION_RIVER_GENERATION :{BLACK}Generera Flod STR_GENERATION_TREE_GENERATION :{BLACK}Generera Träd -STR_GENERATION_OBJECT_GENERATION :{BLACK}Generera Objekt +STR_GENERATION_OBJECT_GENERATION :{BLACK}Generera objekt STR_GENERATION_CLEARING_TILES :{BLACK}Svår och stenig markgenerering STR_GENERATION_SETTINGUP_GAME :{BLACK}Ställer in spel STR_GENERATION_PREPARING_TILELOOP :{BLACK}Kör tile-loop @@ -2832,7 +2898,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Version: STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Min. kompatibel version: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palett: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Standard (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Standard (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Äldre (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Äldre (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Paramerar: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Ingen STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Ingen information tillgänglig STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Matchande fil hittades ej @@ -2843,7 +2914,7 @@ STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}Ej kompati STR_SAVE_PRESET_CAPTION :{WHITE}Spara förinställning STR_SAVE_PRESET_LIST_TOOLTIP :{BLACK}Lista över tillgängliga förinställningar, väljer man att kopiera den till spara namn nedan STR_SAVE_PRESET_TITLE :{BLACK}Skriv in ett namn -STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}För tillfället vald namn för förinställningen att spara +STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}Nuvarande valt namn för förinställningen att spara STR_SAVE_PRESET_CANCEL :{BLACK}Avbryt STR_SAVE_PRESET_CANCEL_TOOLTIP :{BLACK}Ändra inte det förinställda STR_SAVE_PRESET_SAVE :{BLACK}Spara @@ -2886,7 +2957,7 @@ STR_SPRITE_ALIGNER_OFFSETS_REL :{BLACK}X offset STR_SPRITE_ALIGNER_PICKER_BUTTON :{BLACK}Välj objekt STR_SPRITE_ALIGNER_PICKER_TOOLTIP :{BLACK}Välj ett objekt på bildskärmen -STR_SPRITE_ALIGNER_GOTO_CAPTION :{WHITE}Gå till objekt +STR_SPRITE_ALIGNER_GOTO_CAPTION :{WHITE}Gå till spriteobjekt # NewGRF (self) generated warnings/errors STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{STRING} @@ -2906,17 +2977,19 @@ STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :För många New STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Att ladda {1:STRING} som statisk NewGRF med {STRING} kan orsaka desynkronisering STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Oväntat spriteobjekt (spriteobjekt {3:NUM}) STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Okänd Action 0-egenskap {4:HEX} (spriteobjekt {3:NUM}) -STR_NEWGRF_ERROR_INVALID_ID :Försökt att använda ett ogiltligt ID (spriteobjekt {3:NUM}) -STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} innehåller en skadad bild. Alla korrupta bilder kommer att visas som ett rött frågetecken (?) +STR_NEWGRF_ERROR_INVALID_ID :Försök att använda ett ogiltligt ID (spriteobjekt {3:NUM}) +STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} innehåller ett skadat spriteobjekt. Alla korrupta spriteobjekt kommer att visas som röda frågetecken (?) STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Innehåller flera Action 8 (spriteobjekt {3:NUM}) STR_NEWGRF_ERROR_READ_BOUNDS :Läste förbi slutet av pseudo-spriteobjekt (spriteobjekt {3:NUM}) STR_NEWGRF_ERROR_GRM_FAILED :Efterfrågade GRF-resurser är inte tillgängliga (spriteobjekt {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} har inaktiverats av {2:STRING} -STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Felaktig/okänd layout-format av spriteobjekt (spriteobjekt {3:NUM}) +STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Felaktigt/okänt layout-format av spriteobjekt (spriteobjekt {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :För många poster i listan med egenskapsvärden (spriteobjekt {3:NUM}, egenskap {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Ogiltig industriproduktions-callback (spriteobjekt {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Varning! -STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}Du håller på att göra ändringar i ett pågående spel; detta kan krascha OpenTTD eller orsaka andra fel i spelet.{}Skicka inte bugrapporter om sådana fel.{}Är du helt säker på detta? +STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}Du håller på att göra ändringar i ett pågående spel; detta kan krascha OpenTTD eller orsaka andra fel i spelet. Skicka inte buggrapporter om sådana fel.{}Är du helt säker på detta? STR_NEWGRF_DUPLICATE_GRFID :{WHITE}Kan inte lägga till filen: redan existerande GRF ID STR_NEWGRF_COMPATIBLE_LOADED :{ORANGE}Matchande fil saknas (kompatibel GRF laddad) @@ -2925,7 +2998,7 @@ STR_NEWGRF_TOO_MANY_NEWGRFS :{WHITE}Kan inte STR_NEWGRF_COMPATIBLE_LOAD_WARNING :{WHITE}Kompatibel GRF laddad för saknade filer STR_NEWGRF_DISABLED_WARNING :{WHITE}Saknad GRF-fil har stängts av STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Saknad(e) GRF-fil(er) -STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Avpausning kan krascha OpenTTD. Skicka ej igen bugg-rapport för möjlig krasch.{}Är du säker att du vill avpausa? +STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Avpausning kan krascha OpenTTD. Skicka ej bugg-rapporter för eventuella resulterande krascher.{}Är du säker på att du vill avpausa? # NewGRF status STR_NEWGRF_LIST_NONE :Inga @@ -2942,7 +3015,7 @@ STR_BROKEN_VEHICLE_LENGTH :{WHITE}Tåg '{V STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' ger felaktig information STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Last/återställnings information för '{1:ENGINE}' är skilld ifrån köp lista efter konstruktion. Detta kan leda till att utomatisk förnyelse/uppgradering misslyckas med att anpassa fordonen/vagnarna korrekt -STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' skapade en ändlös loop i en produktions-callback-funktion +STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' skapade en oändlig loop i en produktions-callback-funktion STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Callback-funktion {1:HEX} returnerade ett okänt/ogiltligt resultat {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs @@ -2977,6 +3050,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Mata in STR_TOWN_DIRECTORY_CAPTION :{WHITE}Städer STR_TOWN_DIRECTORY_NONE :{ORANGE}- Inga - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Stad){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Stadsnamn - klicka på ett namn för att centrera huvudvyn på staden. Ctrl+klick öppnar en ny vy över stadens läge STR_TOWN_POPULATION :{BLACK}Global folkmängd: {COMMA} @@ -2984,8 +3058,7 @@ STR_TOWN_POPULATION :{BLACK}Global f STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Stad) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Invånare: {ORANGE}{COMMA}{BLACK} Hus: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passagerare förra månaden: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post förra månaden: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} förra månaden: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Fraktgods behövs för ortens tillväxt: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} krävs STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} krävs under vintern @@ -3215,7 +3288,7 @@ STR_COMPANY_VIEW_CAPTION :{WHITE}{COMPANY STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE :{WHITE}{PRESIDENT_NAME}{}{GOLD}(VD) STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Etablerades: {WHITE}{NUM} -STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Färgval: +STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Färgschema: STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Fordon: STR_COMPANY_VIEW_TRAINS :{WHITE}{COMMA} tåg STR_COMPANY_VIEW_ROAD_VEHICLES :{WHITE}{COMMA} vägfordon @@ -3232,7 +3305,7 @@ STR_COMPANY_VIEW_INFRASTRUCTURE_STATION :{WHITE}{COMMA} STR_COMPANY_VIEW_INFRASTRUCTURE_AIRPORT :{WHITE}{COMMA} flygplats{P "" er} STR_COMPANY_VIEW_INFRASTRUCTURE_NONE :{WHITE}Inga -STR_COMPANY_VIEW_BUILD_HQ_BUTTON :{BLACK}Bygg Högkvarter +STR_COMPANY_VIEW_BUILD_HQ_BUTTON :{BLACK}Bygg högkvarter STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Bygg företagets huvudkontor STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}Visa högkvarter STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}Vy av företagets huvudkontor @@ -3243,8 +3316,8 @@ STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}Visa det STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}Nytt ansikte STR_COMPANY_VIEW_NEW_FACE_TOOLTIP :{BLACK}Välj nytt ansikte på VD:n -STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON :{BLACK}Färgval -STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP :{BLACK}Byt färg på företaget +STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON :{BLACK}Färgschema +STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP :{BLACK}Byt företagets färgschema STR_COMPANY_VIEW_COMPANY_NAME_BUTTON :{BLACK}Företagsnamn STR_COMPANY_VIEW_COMPANY_NAME_TOOLTIP :{BLACK}Byt företagets namn STR_COMPANY_VIEW_PRESIDENT_NAME_BUTTON :{BLACK}Namn på VD @@ -3290,26 +3363,19 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrera STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsnivå: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrin har annonserat att den snart kommer att stänga! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Producerar: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Kräver: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} väntar{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Producerar: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Producerar: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ändra produktion (produkt av 8, upp till 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ändra produktionsnivå (procent, upp till 800%) # Vehicle lists -STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} Tåg +STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} tåg STR_VEHICLE_LIST_ROAD_VEHICLE_CAPTION :{WHITE}{STRING} - {COMMA} Vägfordon STR_VEHICLE_LIST_SHIP_CAPTION :{WHITE}{STRING} - {COMMA} skepp STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING} - {COMMA} flygplan @@ -3327,20 +3393,20 @@ STR_VEHICLE_LIST_AVAILABLE_SHIPS :Tillgängliga s STR_VEHICLE_LIST_AVAILABLE_AIRCRAFT :Tillgängliga flyplan STR_VEHICLE_LIST_AVAILABLE_ENGINES_TOOLTIP :{BLACK}Se lista med tillgängliga motordesigner för denna fordonstyp -STR_VEHICLE_LIST_MANAGE_LIST :{BLACK}Behandlingslista +STR_VEHICLE_LIST_MANAGE_LIST :{BLACK}Hantera lista STR_VEHICLE_LIST_MANAGE_LIST_TOOLTIP :{BLACK}Skicka instruktioner till alla fordon på denna lista STR_VEHICLE_LIST_REPLACE_VEHICLES :Byt ut fordon -STR_VEHICLE_LIST_SEND_FOR_SERVICING :Skicka till Service +STR_VEHICLE_LIST_SEND_FOR_SERVICING :Skicka på service -STR_VEHICLE_LIST_SEND_TRAIN_TO_DEPOT :Skicka till Depå -STR_VEHICLE_LIST_SEND_ROAD_VEHICLE_TO_DEPOT :Skicka till Depå -STR_VEHICLE_LIST_SEND_SHIP_TO_DEPOT :Skicka till Depå -STR_VEHICLE_LIST_SEND_AIRCRAFT_TO_HANGAR :Skicka till Hangar +STR_VEHICLE_LIST_SEND_TRAIN_TO_DEPOT :Skicka till depå +STR_VEHICLE_LIST_SEND_ROAD_VEHICLE_TO_DEPOT :Skicka till depå +STR_VEHICLE_LIST_SEND_SHIP_TO_DEPOT :Skicka till depå +STR_VEHICLE_LIST_SEND_AIRCRAFT_TO_HANGAR :Skicka till hangar STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP :{BLACK}Klicka för att stoppa alla fordon i listan STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP :{BLACK}Klicka för att starta alla fordon i listan -STR_VEHICLE_LIST_SHARED_ORDERS_LIST_CAPTION :{WHITE}Delade instruktioner med {COMMA} Fordon{P "" s} +STR_VEHICLE_LIST_SHARED_ORDERS_LIST_CAPTION :{WHITE}Delade instruktioner med {COMMA} fordon # Group window STR_GROUP_ALL_TRAINS :Alla tåg @@ -3357,6 +3423,7 @@ STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupper STR_GROUP_CREATE_TOOLTIP :{BLACK}Klicka för att skapa en grupp STR_GROUP_DELETE_TOOLTIP :{BLACK}Ta bort vald grupp STR_GROUP_RENAME_TOOLTIP :{BLACK}Byt namn på vald grupp +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Byt färgschema på vald grupp STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Klicka för att skydda denna grupp mot allmän autoreplace STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Ta bort grupp @@ -3378,7 +3445,7 @@ STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :Nya elektriska STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Nytt monorailfordon STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Nytt maglevfordon -STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Nya Rälsfordon +STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Nya rälsfordon STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Nytt Vägfordon STR_BUY_VEHICLE_SHIP_CAPTION :Nytt skepp STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Nytt flygplan @@ -3400,6 +3467,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Kapacite STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Motoriserade vagnar: {GOLD}+{POWER}{BLACK} Vikt: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Anpassningsbar till: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Alla typer av last +STR_PURCHASE_INFO_NONE :Ingen STR_PURCHASE_INFO_ALL_BUT :Allt utom {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Maximal Dragkraft: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Räckvidd: {GOLD}{COMMA} rutor @@ -3411,7 +3479,7 @@ STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Skeppsli STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Flygplanslista. Klicka på flygplan för information. Ctrl+klick visar eller döljer flygplanstypen STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Köp fordon -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Köp Fordon +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Köp fordon STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Köp skepp STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Köp flygplan @@ -3458,7 +3526,7 @@ STR_DEPOT_RENAME_DEPOT_CAPTION :Byt namn på te STR_DEPOT_NO_ENGINE :{BLACK}- STR_DEPOT_VEHICLE_TOOLTIP :{BLACK}{ENGINE}{STRING} -STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} fordon{P "" s}{STRING} +STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} fordon{STRING} STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Tåg - drag vagn/lok för att lägga till/ta bort från tåg. Högerklicka på tåg för information. Håll Ctrl nedtryckt för att respektive funktion även ska gälla resten av tåget @@ -3484,7 +3552,7 @@ STR_DEPOT_AUTOREPLACE_SHIP_TOOLTIP :{BLACK}Byt ut a STR_DEPOT_AUTOREPLACE_AIRCRAFT_TOOLTIP :{BLACK}Byt ut alla flygplan i hangaren STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON :{BLACK}Nytt fordon -STR_DEPOT_ROAD_VEHICLE_NEW_VEHICLES_BUTTON :{BLACK}Nytt Fordon +STR_DEPOT_ROAD_VEHICLE_NEW_VEHICLES_BUTTON :{BLACK}Nytt fordon STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON :{BLACK}Nytt skepp STR_DEPOT_AIRCRAFT_NEW_VEHICLES_BUTTON :{BLACK}Nytt flygplan @@ -3504,14 +3572,14 @@ STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Köper e STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Köper en kopia av ett flygplan. Tryck på den här knappen och sedan på ett flygplan i eller utanför hangaren. Ctrl+klick gör så att de delar order. Shift+klick visar kostnad utan att köpa STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför depån. Ctrl+klick öppnar en ny vy över depåns läge -STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför bussgaraget. Ctrl+klick öppnar en ny vy över bussgaragets läge +STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför vägfordonsdepån. Ctrl+klick öppnar en ny vy över vägfordonsdepåns läge STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför skeppdepån. Ctrl+klick öppnar en ny vy över skeppdepåns läge STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför hangaren. Ctrl+klick öppnar en ny vy över hangarens läge -STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Ge en lista av alla tåg som har denna depå i dess körschema -STR_DEPOT_VEHICLE_ORDER_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Ge en lista av alla fordon som har denna depå i dess körschema -STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TOOLTIP :{BLACK}Ge en lista av alla fartyg som har denna depå i dess körschema -STR_DEPOT_VEHICLE_ORDER_LIST_AIRCRAFT_TOOLTIP :{BLACK}Ge en lista av alla flygplan som har denna flygplats-hangar i dess körschema +STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Visa en lista med alla tåg som har denna depå i sitt körschema +STR_DEPOT_VEHICLE_ORDER_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Visa en lista med alla vägfordon som har denna depå i sitt körschema +STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TOOLTIP :{BLACK}Visa en lista med alla fartyg som har denna depå i sitt körschema +STR_DEPOT_VEHICLE_ORDER_LIST_AIRCRAFT_TOOLTIP :{BLACK}Visa en lista med alla flygplan som har en hangar på denna flygplats i sitt körschema STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP :{BLACK}Klicka för att stanna alla tåg i depån STR_DEPOT_MASS_STOP_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Klicka för att stanna alla fordon i depån @@ -3521,7 +3589,7 @@ STR_DEPOT_MASS_STOP_HANGAR_TOOLTIP :{BLACK}Klicka f STR_DEPOT_MASS_START_DEPOT_TRAIN_TOOLTIP :{BLACK}Klicka för att starta alla tåg i depån STR_DEPOT_MASS_START_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Klicka för att starta alla fordon i depån STR_DEPOT_MASS_START_DEPOT_SHIP_TOOLTIP :{BLACK}Klicka för att starta alla skepp i depån -STR_DEPOT_MASS_START_HANGAR_TOOLTIP :{BLACK}Klicka för att starta alla skepp i depån +STR_DEPOT_MASS_START_HANGAR_TOOLTIP :{BLACK}Klicka för att starta alla flygplan i hangaren STR_DEPOT_SELL_CONFIRMATION_TEXT :{YELLOW}Du är på väg att sälja alla fordon i depån. Är du säker? @@ -3592,9 +3660,9 @@ STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Centrera STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför flygplanet. Ctrl+klick följer flygplanet i huvudvyn STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka tåg till depå. Ctrl+klick skickar tåget enbart på service -STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka fordon till depå. CTRL + klick servar endast -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka skepp till depå. CTRL + klick servar endast -STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka flygplan till hangar. CTRL + klick servar endast +STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka fordon till depå. Ctrl+klick servar endast +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka skepp till depå. Ctrl+klick servar endast +STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Skicka flygplan till hangar. Ctrl+klick servar endast STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Köper en kopia av tåget inklusive alla vagnar. Ctrl+klick gör så att de delar order. Shift+klick visar kostnad utan att köpa STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Köper en kopia av fordonet. Ctrl+klick gör så att de delar order. Shift+klick visar kostnad utan att köpa @@ -3672,7 +3740,7 @@ STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Vikt: {L STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Vinst detta år: {LTBLUE}{CURRENCY_LONG} (förra året: {CURRENCY_LONG}) STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Tillförlitlighet: {LTBLUE}{COMMA}% {BLACK}Motorstopp sedan senaste servicen: {LTBLUE}{COMMA} -STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Bygt: {LTBLUE}{NUM}{BLACK} Värde: {LTBLUE}{CURRENCY_LONG} +STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Byggt: {LTBLUE}{NUM}{BLACK} Värde: {LTBLUE}{CURRENCY_LONG} STR_VEHICLE_INFO_NO_CAPACITY :{BLACK}Kapacitet: {LTBLUE}Ingen{STRING} STR_VEHICLE_INFO_CAPACITY :{BLACK}Kapacitet: {LTBLUE}{CARGO_LONG}{3:STRING} STR_VEHICLE_INFO_CAPACITY_MULT :{BLACK}Kapacitet: {LTBLUE}{CARGO_LONG}{3:STRING} (x{4:NUM}) @@ -3713,7 +3781,7 @@ STR_VEHICLE_DETAIL_TAB_INFORMATION :{BLACK}Informat STR_VEHICLE_DETAILS_TRAIN_INFORMATION_TOOLTIP :{BLACK}Visa detaljer för tågfordon STR_VEHICLE_DETAIL_TAB_CAPACITIES :{BLACK}Kapaciteter STR_VEHICLE_DETAILS_TRAIN_CAPACITIES_TOOLTIP :{BLACK}Visa kapaciteter för varje fordon -STR_VEHICLE_DETAIL_TAB_TOTAL_CARGO :{BLACK}Gods Totalt +STR_VEHICLE_DETAIL_TAB_TOTAL_CARGO :{BLACK}Gods totalt STR_VEHICLE_DETAILS_TRAIN_TOTAL_CARGO_TOOLTIP :{BLACK}Visa tågets totala kapacitet, separera för typ av gods STR_VEHICLE_DETAILS_TRAIN_ARTICULATED_RV_CAPACITY :{BLACK}Kapacitet: {LTBLUE} @@ -3777,7 +3845,7 @@ STR_ORDER_DROP_NO_UNLOADING :Ej avlastning STR_ORDER_TOOLTIP_UNLOAD :{BLACK}Ändra avlastningsbeteende för markerad order STR_ORDER_REFIT :{BLACK}Anpassa -STR_ORDER_REFIT_TOOLTIP :{BLACK}Välj vilken godstyp anpassningen ska göras i denna order. Ctrl-klick för att ta bort anpassningsordern +STR_ORDER_REFIT_TOOLTIP :{BLACK}Välj vilken godstyp anpassningen ska göras till i denna order. Ctrl-klick för att ta bort anpassningsordern STR_ORDER_REFIT_AUTO :{BLACK}Auto-anpassning vid station STR_ORDER_REFIT_AUTO_TOOLTIP :{BLACK}Välj vilket lasttyp att auto-anpassa till i den här ordningen. Ctrl+klicka för att ta bort anpassningsinstruktionen. Auto-anpassning vid stationer kommer enbart att utföras om fordonet tillåter det STR_ORDER_DROP_REFIT_AUTO :Fast lasttyp @@ -3789,7 +3857,7 @@ STR_ORDER_DROP_SERVICE_DEPOT :Service vid beh STR_ORDER_DROP_HALT_DEPOT :Stanna STR_ORDER_SERVICE_TOOLTIP :{BLACK}Skippa den här ordern om service ej behövs -STR_ORDER_CONDITIONAL_VARIABLE_TOOLTIP :{BLACK}Fordonsdata att basera hoppning på +STR_ORDER_CONDITIONAL_VARIABLE_TOOLTIP :{BLACK}Fordonsdata att basera hopp på # Conditional order variables, must follow order of OrderConditionVariable enum STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE :Laddningsprocent @@ -3799,6 +3867,7 @@ STR_ORDER_CONDITIONAL_AGE :Ålder (år) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Behöver service STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Alltid STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Återstående livstid (år) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maximal tillförlitlighet STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Hur man jämför fordonsdata med givet värde STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :samma som @@ -3822,7 +3891,7 @@ STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Ta bort STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Sluta dela STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Sluta dela orderlistan. Ctrl+Klick tar även bort alla order för det här fordonet -STR_ORDERS_GO_TO_BUTTON :{BLACK}Åk Till +STR_ORDERS_GO_TO_BUTTON :{BLACK}Åk till STR_ORDER_GO_TO_NEAREST_DEPOT :Åk till närmsta depå STR_ORDER_GO_TO_NEAREST_HANGAR :Åk till närmsta hangar STR_ORDER_CONDITIONAL :Villkorat order-hopp @@ -3891,9 +3960,9 @@ STR_ORDER_STOP_LOCATION_FAR_END :[slutet] STR_ORDER_OUT_OF_RANGE :{RED} (Nästa destination är utanför räckvidden) -STR_ORDER_CONDITIONAL_UNCONDITIONAL :Skippa till order {COMMA} -STR_ORDER_CONDITIONAL_NUM :Skippa till order {COMMA} när {STRING} {STRING} {COMMA} -STR_ORDER_CONDITIONAL_TRUE_FALSE :Skippa till order {COMMA} när {STRING} {STRING} +STR_ORDER_CONDITIONAL_UNCONDITIONAL :Hoppa till order {COMMA} +STR_ORDER_CONDITIONAL_NUM :Hoppa till order {COMMA} när {STRING} {STRING} {COMMA} +STR_ORDER_CONDITIONAL_TRUE_FALSE :Hoppa till order {COMMA} när {STRING} {STRING} STR_INVALID_ORDER :{RED} (Ogiltig order) @@ -3917,7 +3986,7 @@ STR_TIMETABLE_AND_TRAVEL_FOR_ESTIMATED :(resor för {ST STR_TIMETABLE_STAY_FOR :och stanna i {STRING} STR_TIMETABLE_AND_TRAVEL_FOR :och res i {STRING} STR_TIMETABLE_DAYS :{COMMA}{NBSP}dag{P "" ar} -STR_TIMETABLE_TICKS :{COMMA}{NBSP}tick{P "" s} +STR_TIMETABLE_TICKS :{COMMA}{NBSP}tick STR_TIMETABLE_TOTAL_TIME :{BLACK}Den här tidtabellen kommer ta {STRING} att slutföra STR_TIMETABLE_TOTAL_TIME_INCOMPLETE :{BLACK}Denna tidtabell kommer att ta åtminstonde {STRING} att slutföra (allt är inte inlagt i en tidtabell) @@ -3931,7 +4000,7 @@ STR_TIMETABLE_STATUS_START_AT :{BLACK}Den här STR_TIMETABLE_STARTING_DATE :{BLACK}Startdatum STR_TIMETABLE_STARTING_DATE_TOOLTIP :{BLACK}Välj ett datum som startpunkt för den här tidtabellen. Om tidtabellen är fullt tidssatt så innebär Ctrl+klick att startpunkten sätts för denna tidtabell och att startpunkten för övriga fordon som delar dessa order fördelas ut jämt baserat på deras relativa ordning -STR_TIMETABLE_CHANGE_TIME :{BLACK}Ändra Tid +STR_TIMETABLE_CHANGE_TIME :{BLACK}Ändra tid STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Ändra hur lång tid den markerade ordern bör ta STR_TIMETABLE_CLEAR_TIME :{BLACK}Rensa tid @@ -3987,7 +4056,7 @@ STR_AI_GAME_SCRIPT :{BLACK}Spelskri STR_AI_GAME_SCRIPT_TOOLTIP :{BLACK}Visa debug-utskrifter för spelskript STR_ERROR_AI_NO_AI_FOUND :Ingen passande datorspelare hittades.{}Denna datorspelare är en test-datorspelare och kommer inte göra någonting.{}Du kan ladda ner nya datorspelare genom spelets 'Online-innehåll'-system -STR_ERROR_AI_PLEASE_REPORT_CRASH :{WHITE}Ett av scripten som körs har krachat. Vänligen raportera detta till datorspelarens skapare med en skärmdump på förstret 'Felsökning av datorspelare / spelskript' +STR_ERROR_AI_PLEASE_REPORT_CRASH :{WHITE}Ett av skripten som körs har kraschat. Vänligen rapportera detta till datorspelarens skapare med en skärmdump av förstret 'Felsökning av datorspelare / spelskript' STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}Felsökning av datorspelare / spelskript är bara tillgänglig för servern # AI configuration window @@ -4224,7 +4293,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}För må STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}För många delar på järnvägsstationen STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}För många busshållplatser STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}För många lastbryggor -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}För nära en annan station/hållplats STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}För nära en annan hamn STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}För nära en annan flygplats STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kan inte byta namn på station... @@ -4232,6 +4300,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... dett STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... vägen pekar i fel riktning STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... genomfartshållplatser kan inte ha gatuhörn STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... genomfartshållplatser kan inte ha korsningar +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... vägen är enkelriktad eller blockerad # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan ej ta bort del av station... @@ -4266,7 +4335,7 @@ STR_ERROR_BUOY_IS_IN_USE :{WHITE}... boje # Depot related errors STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT :{WHITE}Kan inte bygga depå här... -STR_ERROR_CAN_T_BUILD_ROAD_DEPOT :{WHITE}Kan inte bygga bussgarage här... +STR_ERROR_CAN_T_BUILD_ROAD_DEPOT :{WHITE}Kan inte bygga vägfordonsdepå här... STR_ERROR_CAN_T_BUILD_TRAM_DEPOT :{WHITE}Kan inte bygga spårvagnsdepå här... STR_ERROR_CAN_T_BUILD_SHIP_DEPOT :{WHITE}Kan inte bygga skeppsdepå här... @@ -4476,13 +4545,15 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Kan inte STR_DESKTOP_SHORTCUT_COMMENT :Ett simuleringsspel baserat på Transport Tycoon Deluxe # Translatable descriptions in media/baseset/*.ob* files -STR_BASEGRAPHICS_DOS_DESCRIPTION :Originalgrafiken från Transport Tycoon Deluxe, DOS-utgåvan. -STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Originalgrafiken från Transport Tycoon Deluxe, DOS-utgåvan (tyska). -STR_BASEGRAPHICS_WIN_DESCRIPTION :Originalgrafiken från Transport Tycoon Deluxe, Windows-utgåvan. -STR_BASESOUNDS_DOS_DESCRIPTION :Originalljuden från Transport Tycoon Deluxe, DOS-utgåvan. -STR_BASESOUNDS_WIN_DESCRIPTION :Originalljuden från Transport Tycoon Deluxe, Windows-utgåvan. +STR_BASEGRAPHICS_DOS_DESCRIPTION :Originalgrafiken från DOS-utgåvan av Transport Tycoon Deluxe. +STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Originalgrafiken från den tyska DOS-utgåvan av Transport Tycoon Deluxe. +STR_BASEGRAPHICS_WIN_DESCRIPTION :Originalgrafiken från Windows-utgåvan av Transport Tycoon Deluxe. +STR_BASESOUNDS_DOS_DESCRIPTION :Originalljuden från DOS-utgåvan av Transport Tycoon Deluxe. +STR_BASESOUNDS_WIN_DESCRIPTION :Originalljuden från Windows-utgåvan av Transport Tycoon Deluxe. STR_BASESOUNDS_NONE_DESCRIPTION :Ett ljudpaket utan några ljud. -STR_BASEMUSIC_WIN_DESCRIPTION :Originalmusiken från Transport Tycoon Deluxe, Windows-utgåvan. +STR_BASEMUSIC_WIN_DESCRIPTION :Originalmusiken från Windows-utgåvan av Transport Tycoon Deluxe. +STR_BASEMUSIC_DOS_DESCRIPTION :Originalmusiken från DOS-utgåvan av Transport Tycoon Deluxe. +STR_BASEMUSIC_TTO_DESCRIPTION :Originalmusiken från DOS-utgåvan av Transport Tycoon (Original/World Editor). STR_BASEMUSIC_NONE_DESCRIPTION :Ett musikpaket utan någon musik. ##id 0x2000 @@ -4500,11 +4571,11 @@ STR_TOWN_BUILDING_NAME_PARK_1 :Park STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_2 :Kontorslokaler STR_TOWN_BUILDING_NAME_SHOPS_AND_OFFICES_1 :Affärer och kontor STR_TOWN_BUILDING_NAME_MODERN_OFFICE_BUILDING_1 :Modern kontorsbyggnad -STR_TOWN_BUILDING_NAME_WAREHOUSE_1 :Varuhus +STR_TOWN_BUILDING_NAME_WAREHOUSE_1 :Lagerbyggnad STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_3 :Kontorsbyggnad STR_TOWN_BUILDING_NAME_STADIUM_1 :Arena STR_TOWN_BUILDING_NAME_OLD_HOUSES_1 :Gamla hus -STR_TOWN_BUILDING_NAME_COTTAGES_1 :Stuga +STR_TOWN_BUILDING_NAME_COTTAGES_1 :Stugor STR_TOWN_BUILDING_NAME_HOUSES_1 :Hus STR_TOWN_BUILDING_NAME_FLATS_1 :Lägenheter STR_TOWN_BUILDING_NAME_TALL_OFFICE_BLOCK_2 :Hög kontorsbyggnad @@ -4518,7 +4589,7 @@ STR_TOWN_BUILDING_NAME_CINEMA_1 :Biograf STR_TOWN_BUILDING_NAME_SHOPPING_MALL_1 :Shoppingcenter STR_TOWN_BUILDING_NAME_IGLOO_1 :Igloo STR_TOWN_BUILDING_NAME_TEPEES_1 :Kåtor -STR_TOWN_BUILDING_NAME_TEAPOT_HOUSE_1 :Tekanne-Hus +STR_TOWN_BUILDING_NAME_TEAPOT_HOUSE_1 :Tekanne-hus STR_TOWN_BUILDING_NAME_PIGGY_BANK_1 :Spargris ##id 0x4800 @@ -4576,29 +4647,29 @@ STR_SV_STNAME_NORTH :Norra {STRING} STR_SV_STNAME_SOUTH :Södra {STRING} STR_SV_STNAME_EAST :Östra {STRING} STR_SV_STNAME_WEST :Västra {STRING} -STR_SV_STNAME_CENTRAL :{STRING} Centralstation -STR_SV_STNAME_TRANSFER :{STRING} Övergång +STR_SV_STNAME_CENTRAL :{STRING} centralstation +STR_SV_STNAME_TRANSFER :{STRING} övergång STR_SV_STNAME_HALT :{STRING} hållplats -STR_SV_STNAME_VALLEY :{STRING} Dal +STR_SV_STNAME_VALLEY :{STRING} dal STR_SV_STNAME_HEIGHTS :{STRING} Höjder -STR_SV_STNAME_WOODS :{STRING} Skog -STR_SV_STNAME_LAKESIDE :{STRING} Sjöstrand +STR_SV_STNAME_WOODS :{STRING} skog +STR_SV_STNAME_LAKESIDE :{STRING} sjöstrand STR_SV_STNAME_EXCHANGE :{STRING} Växel -STR_SV_STNAME_AIRPORT :{STRING} Flygplats -STR_SV_STNAME_OILFIELD :{STRING} Oljefält -STR_SV_STNAME_MINES :{STRING} Gruva -STR_SV_STNAME_DOCKS :{STRING} Kaj +STR_SV_STNAME_AIRPORT :{STRING} flygplats +STR_SV_STNAME_OILFIELD :{STRING} oljefält +STR_SV_STNAME_MINES :{STRING} gruva +STR_SV_STNAME_DOCKS :{STRING} hamn STR_SV_STNAME_BUOY :{STRING} STR_SV_STNAME_WAYPOINT :{STRING} ##id 0x6020 -STR_SV_STNAME_ANNEXE :{STRING} Tillbyggnad -STR_SV_STNAME_SIDINGS :{STRING} Förort -STR_SV_STNAME_BRANCH :{STRING} Förgrening +STR_SV_STNAME_ANNEXE :{STRING} tillbyggnad +STR_SV_STNAME_SIDINGS :{STRING} förort +STR_SV_STNAME_BRANCH :{STRING} förgrening STR_SV_STNAME_UPPER :Övre {STRING} STR_SV_STNAME_LOWER :Nedre {STRING} -STR_SV_STNAME_HELIPORT :{STRING} Helikopterplats -STR_SV_STNAME_FOREST :{STRING} Skog -STR_SV_STNAME_FALLBACK :{STRING} Station #{NUM} +STR_SV_STNAME_HELIPORT :{STRING} helikopterplats +STR_SV_STNAME_FOREST :{STRING} skog +STR_SV_STNAME_FALLBACK :{STRING} station #{NUM} ############ end of savegame specific region! ##id 0x8000 @@ -4877,8 +4948,8 @@ STR_FORMAT_WAYPOINT_NAME_SERIAL :Riktmärke {TOW STR_FORMAT_DEPOT_NAME_TRAIN :{TOWN} Järnvägsdepå STR_FORMAT_DEPOT_NAME_TRAIN_SERIAL :{TOWN} Järnvägsterminal #{COMMA} -STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE :{TOWN} Vägfordonsdepå -STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE_SERIAL :{TOWN} Vägfordons terminal #{COMMA} +STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE :{TOWN} vägfordonsdepå +STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE_SERIAL :{TOWN} vägfordonsdepå #{COMMA} STR_FORMAT_DEPOT_NAME_SHIP :{TOWN} Hamnterminal STR_FORMAT_DEPOT_NAME_SHIP_SERIAL :{TOWN} Hamnterminal#{COMMA} STR_FORMAT_DEPOT_NAME_AIRCRAFT :{STATION} Hangar diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index cd9b7591e7..9ed9ccd8a1 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -10,7 +10,7 @@ ##grflangid 0x0a -# $Id: tamil.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -659,10 +659,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_1_USER_DEFINED :{BLACK}'பய STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}'பயனரால் மாற்றியமைக்கப்பட்ட 2' பிரோகிராமினைத் தேர்ந்தெடுக்கவும் STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}இசைத் த்டத்தினைத் தேர்ந்தெடுக்கும் திரையினைக் காட்டு -STR_ERROR_NO_SONGS :{WHITE}இசைத்தடமே இல்லாதப் பட்டியல் தேர்ந்தெடுக்கப்பட்டுள்ளது. எந்த பாட்டும் ஒலிக்காது - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}இசை பிரோகிராம் தேர்ந்தெடுத்தல் STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}இசைத்தடம் வரிசை STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}பிரோகிராம் - '{STRING}' @@ -1176,6 +1173,7 @@ STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :வழிசெ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}வாகனங்கள் இருக்கும் பொது இந்த அமைப்பினை மாற்ற இயலாது STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :கட்டட பராமரிப்பு: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :விமான நிலையங்கள் என்றும் காலாவதியாகாது: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :வாகனம் தொலைந்தால் எச்சரிக்கை செய்: {STRING} @@ -1231,7 +1229,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :சிறுப STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :பச்சை STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :கரும் பச்சை STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :ஊதா -STR_CONFIG_SETTING_REVERSE_SCROLLING :திருப்பப்பட்ட பக்கமுருட்டி திசை : {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :பார்படத்தின் இலகுவான பக்கமுருட்டல்: {STRING} STR_CONFIG_SETTING_LIVERIES :நிறுவன livery களைக் காட்டு: {STRING} STR_CONFIG_SETTING_LIVERIES_NONE :ஒன்றுமில்லை @@ -1571,7 +1568,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}நட STR_CHEAT_SETUP_PROD :{LTBLUE}தயாரிப்பு மதிப்புகளை மாற்ற முடியும்: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}புதிய நிற கோட்பாடு STR_LIVERY_GENERAL_TOOLTIP :{BLACK}பொதுவான நிற கோட்பாடுகளைக் காட்டவும் STR_LIVERY_TRAIN_TOOLTIP :{BLACK}இரயில் நிற கோட்பாடுகளைக் காட்டவும் @@ -2378,7 +2374,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :நிறுவ STR_ABOUT_OPENTTD :{WHITE}OpenTTD-ஐ பற்றி STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}அசல் உரிமைகள் {COPYRIGHT} 1995 கிறிஸ் சாயர், எல்லா உரிமைகளும் பதிவுசெய்யப்பட்டது STR_ABOUT_VERSION :{BLACK}OpenTTD பதிப்பு {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD குழுமம் +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD குழுமம் + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}ஆட்டத்தை பதிவு செய் @@ -2624,8 +2627,6 @@ STR_TOWN_POPULATION :{BLACK}உல STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (மாநகரம்) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}மக்கள்தொகை: {ORANGE}{COMMA}{BLACK} வீடுகள்: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}சென்ற மாத பயணிகள்: {ORANGE}{COMMA}{BLACK} அதிகம்: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}சென்ற மாத அஞ்சல்கள்: {ORANGE}{COMMA}{BLACK} அதிகம்: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}நகரத்தின் வளர்ச்சியிற்கு தேவையான சரக்குகள்: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} தேவை STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} குளிர்காலத்தில் தேவை @@ -2906,18 +2907,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}தயாரிப்பு அளவு: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}தொழிற்சாலை உடனடியாக மூடப்படும் என்று அறிவிக்கப்பட்டுள்ளது! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}தேவைப்படுகிறது: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}தேவைப்படுகிறது: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}தேவைப்படுகிறது: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}தயாரிப்பு: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}தயாரிக்கிறது: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}தயாரிப்பினை மாற்றவும் (8 இன் பெருக்கங்கள், 2040 வரை) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}தயாரிப்பு அளவினை மாற்றவும் (சதவிகிதம், 800% வரை) @@ -3756,7 +3747,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}மி STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}மிக அதிகமான இரயில்வே நிலைய பாகங்கள் STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}மிக அதிகமான பேருந்து நிறுத்தங்கள் STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}மிக அதிகமான லாரி நிலையங்கள் -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}மற்றொரு நிலையத்திற்கு மிக அருகில் உள்ளது STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}மற்றொரு துறைமுகத்திற்கு மிக அருகில் உள்ளது STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}மற்றொரு விமான நிலையத்தின் அருகாமையில் உள்ளது STR_ERROR_CAN_T_RENAME_STATION :{WHITE}நிறுத்தத்தின் பெயரை மாற்ற இயலாது... diff --git a/src/lang/thai.txt b/src/lang/thai.txt index 7af7a5b901..5f3742e85f 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -10,7 +10,7 @@ ##grflangid 0x42 -# $Id: thai.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -661,10 +661,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}เล STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}เปิด/ปิด Toggle programme shuffle on/off STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}แสดงหน้าต่างเลือกรายการเพลง -STR_ERROR_NO_SONGS :{WHITE}ชุดเพลงประกอบนี้ไม่มีการเลือกเพลงไว้ - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}รายการเลือกโปรแกรมเพลง STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}รายการเพลง STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}โปรแกรม - '{STRING}' @@ -1231,6 +1228,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}ไม STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :ค่าบำรุงรักษาโครงสร้างพื้นฐาน: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :เมื่อเปิดใช้งาน สาธารณูประโภคที่สร้างโดยบริษัทจะมีค่าบำรุงรักษา ยิ่งเครือข่ายยิ่งมากจะยิ่งเสียค่าใช้จ่ายมากขึ้น + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :ท่าอากาศยานไม่มีวันหมดอายุ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :เปิดใช้งานสิ่งนี้ จะทำให้สามารถสร้างท่าอากาศยานแบบเก่าๆได้แม้เวลาจะผ่านไปนานแล้วก็ตาม @@ -1300,8 +1298,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :สีของ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :สีเขียว STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :สีเขียวแก่ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :สีม่วง -STR_CONFIG_SETTING_REVERSE_SCROLLING :กลับทิศการเลื่อนหน้าจอ: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :เลือกลักษณะการเลื่อนแผนที่ เมื่อใช้ปุ่มคลิ๊กเมาส์ขวา หากเปิดการใช้งาน หน้าจอจะเคลื่อนที่ไปในทิศตรงกันข้ามกับการคลิ๊กเมาส์ค้างแล้วลากเมาส์ไป STR_CONFIG_SETTING_SMOOTH_SCROLLING :เลื่อนอย่างนิ่มนวลบนจอภาพ: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :ควบคุมการเคลื่อนที่ของจอภาพ เวลาคลิ๊กเลือกตำแหน่งในแผนที่ย่อ หากไม่เปิดใช้งาน ตำแหน่งของจอจะย้ายไปที่ตำแหน่งที่เลือกทันที แต่หากเปิดใช้งาน จะเคลื่อนที่ไปยังตำแหน่งอย่างนุ่มนวล STR_CONFIG_SETTING_MEASURE_TOOLTIP :แสดงบอลลูนข้อความแสดงระยะทางหรือข้อมูลอื่นๆ เมื่อใช่เครื่องมือสร้าง: {STRING} @@ -1333,8 +1329,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+คล STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :ปิด -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :เลื่อนหน้าจอด้วยการคลิ๊กเมาส์ซ้าย: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :เปิดใช้งานเพื่อให้สามารถใช้การคลิ๊กเมาส์ซ้ายในการเลื่อนภาพหน้าจอได้ STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :ใช้รูปแบบวันที่ {STRING} เป็นชื่อเซฟของเกม @@ -1755,7 +1749,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}เป STR_CHEAT_SETUP_PROD :{LTBLUE}เปิดใช้งานการแก้ไขปริมาณผลผลิต: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}สร้างแบบสีใหม่ STR_LIVERY_GENERAL_TOOLTIP :{BLACK}แสดงแบบสีทั่วไป STR_LIVERY_TRAIN_TOOLTIP :{BLACK}แสดงแบบสีรถไฟ @@ -2635,7 +2628,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :บริษั STR_ABOUT_OPENTTD :{WHITE}เกี่ยวกับ OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}ลิขสิทธิ์เดิม {COPYRIGHT} ค.ศ.1995 ของ Chris Sawyer, สงวนลิขสิทธิ์ STR_ABOUT_VERSION :{BLACK}OpenTTD รุ่นที่ {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}ลิขสิทธิ์ OpenTTD {COPYRIGHT}2002-2018 ของ The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}ลิขสิทธิ์ OpenTTD {COPYRIGHT}2002-2019 ของ The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}บันทึกเกม @@ -2912,8 +2912,6 @@ STR_TOWN_POPULATION :{BLACK}ปร STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}นคร {TOWN} STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}จำนวนประชากร: {ORANGE}{COMMA}{BLACK} จำนวนอาคาร: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}ผู้โดยสารเมื่อเดือนที่แล้ว: {ORANGE}{COMMA}{BLACK} จำนวนสูงสุด: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}ไปรษณีย์ภัณฑ์เมื่อเดือนที่แล้ว: {ORANGE}{COMMA}{BLACK} จำนวนสูงสุด: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}ความต้องการสินค้าสำหรับการขยายตัวของเมือง: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} required STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} ต้องการหิมะ @@ -3218,18 +3216,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}กด STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}ระดับการผลิต: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}อุตสาหกรรมนี้ได้มีการประกาศปิดตัวลงอย่างเป็นทางการ! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}มีความต้องการ: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}มีความต้องการ: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}มีความต้องการ: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}ผลผลิต: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}ผลผลิต: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}ปรับเปลี่ยนปริมาณผลผลิต (ระหว่าง 8 ถึง 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}เปลี่ยนระดับการผลิต (เปอร์เซ็นต์เพิ่มมากสุดถึง 800%) @@ -4118,7 +4106,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}มี STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}ชิ้นส่วนสถานีมากเกินไป STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}ป้ายรถเมล์มากเกินไป STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}มีจุดขนถ่ายสินค้ามากเกินไป -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}ใกล้กับสถานี/จุดขนถ่ายสินค้าอื่นเกินไป STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}ใกล้กับท่าเทียบเรืออื่นมากเกินไป STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}ใกล้กับท่าอากาศยานอื่นมากเกินไป STR_ERROR_CAN_T_RENAME_STATION :{WHITE}ไม่สามารถเปลี่ยนชื่อได้... diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index e847108d86..2046b5d1f2 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -10,7 +10,7 @@ ##grflangid 0x0c -# $Id: traditional_chinese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,10 +669,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}選擇 STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}開關播放清單亂序播放 STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}於選擇視窗顯示樂軌 -STR_ERROR_NO_SONGS :{WHITE}已選擇不含音樂的音樂集,不會播放任何音樂 - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}背景音樂播放清單選擇 STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM}「{STRING}」 STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}音軌索引 STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}播放清單 - 「{STRING}」 @@ -1254,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}當有 STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :基礎建設維護: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :如啟用此選項,基礎建設會產生維護成本。該成本的增長會根據公司基礎建設的規模而加倍增大,因此該設定對大公司的影響比對小公司更大 + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :機場永不過期:{STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :如啟用此選項,所有機場一經面世,就永遠可以選擇建設 @@ -1337,8 +1335,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :設定在小地 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :綠 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :暗綠 STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :紫 -STR_CONFIG_SETTING_REVERSE_SCROLLING :反轉捲軸方向:{STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :設定在右撳拖曳滑鼠時的系統反應。如停用此選項,移動滑鼠時會移動顯示範圍 (即影像的移動方向與滑鼠的移動方向相反)。如啟用此選項,移動滑鼠時會移動顯示地圖 (即影像的移動方向與滑鼠的移動方向相同) STR_CONFIG_SETTING_SMOOTH_SCROLLING :視野平滑移動:{STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :設定在小地圖中點選一個位置時,主視野的顯示反應。如啟用此選項,影像會移動直至到達點選的位置;否則影像會直接跳到點選的位置 STR_CONFIG_SETTING_MEASURE_TOOLTIP :使用某些建設工具時顯示度量提示:{STRING} @@ -1370,8 +1366,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command 鍵 STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Control 鍵 STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :無 -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :滑鼠左鍵捲動:{STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :容許以左撳並拖曳滑鼠捲動地圖。此選項對使用觸控螢幕進行捲動動作很有幫助 STR_CONFIG_SETTING_AUTOSAVE :自動儲存: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :選擇自動存檔的週期 @@ -1806,7 +1800,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}變更 STR_CHEAT_SETUP_PROD :{LTBLUE}允許修改產量:{ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}新配色 STR_LIVERY_GENERAL_TOOLTIP :{BLACK}顯示通用配色 STR_LIVERY_TRAIN_TOOLTIP :{BLACK}顯示列車配色 @@ -2687,7 +2680,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :公司所有土 STR_ABOUT_OPENTTD :{WHITE}關於 OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}原著作權為 {COPYRIGHT} 1995 Chris Sawyer,保留所有權利 STR_ABOUT_VERSION :{BLACK}OpenTTD 版本 {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD 開發小組 +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD 開發小組 + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}儲存遊戲 @@ -2980,8 +2980,6 @@ STR_TOWN_POPULATION :{BLACK}世界 STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (城市) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}人口:{ORANGE}{COMMA}{BLACK} 房屋:{ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}上月乘客數字:{ORANGE}{COMMA}{BLACK} 紀錄最高:{ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}上月郵件數量:{ORANGE}{COMMA}{BLACK} 紀錄最高:{ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}市鎮成長所需貨物: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED}需要 {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} 必須是冬天 @@ -3286,18 +3284,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}將工 STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}產出等級:{YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}該工業已宣佈關閉! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING},{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING},{STRING}{STRING},{STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}產出:{YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}產出:{YELLOW}{STRING}{STRING},{STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}修改產量 (以 8 為倍數增減,最大為 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}變更產出等級 (百分比,最高可到800%) @@ -4205,7 +4193,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}太多 STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}太多火車站元件 STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}太多公車站 STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}太多貨運站 -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}太接近另一個車站/載貨區 STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}太接近另一個碼頭 STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}太接近另一個機場 STR_ERROR_CAN_T_RENAME_STATION :{WHITE}無法修改車站名稱... diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index 109b572172..1aef2bc8ff 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -11,7 +11,7 @@ ##case tamlanan -# $Id: turkish.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -670,10 +670,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}'Özel 2 STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Rastgele programı aç/kapa STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Şarkı seçim penceresini göster -STR_ERROR_NO_SONGS :{WHITE}Şarkısız bir müzik kümesi seçildi. Hiçbir şarkı çalınmayacak - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Müzik Program Seçimi STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Parça Listesi STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1255,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Araçlar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Altyapı bakımları: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Etkinleştirildiğinde; altyapı, bakım giderine neden olur. Maliyet ağ büyüklüğüne göre daha hızlı yükselir, dolayısıyla büyük şirketleri küçüklere göre daha çok etkiler + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Havalimanlarının süresi asla dolmasın: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bu ayarı etkinleştirmek her havaalanı türünün, tanıtımından sonra sürekli olarak kullanılabilir kalmasını sağlar. @@ -1338,8 +1336,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Küçük harita STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Yeşil STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Koyu yeşil STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Mor -STR_CONFIG_SETTING_REVERSE_SCROLLING :Fareyle kaydırma hareketini ters çevir: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Haritayı sağ fare tuşuyla kaydırırken davranış biçimi. Etkisiz kılındığında, fare kamerayı hareket ettirir. Etkinleştirildiğinde ise fare haritayı hareket ettirir. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Düzgün viewport kaydırması: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Küçük haritaya tıklandığında veya harita üzerindeki belli bir nesneye gidilmesi için komut verildiğinde ana görüntünün nasıl kaydırılacağını kontrol eder. Etkinleştirildiğinde harita kayarak ilerler, kapatıldığında ise doğrudan hedeflenen noktaya atlama yapar. STR_CONFIG_SETTING_MEASURE_TOOLTIP :İnşa araçları kullanılırken ölçüm ipucu göster: {STRING} @@ -1371,8 +1367,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Komut-tıklama STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Kontrol-tıklama STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Kapalı -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Sol tık ile ekran kaydır: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Sol fare tuşuyla sürükleyerek harita kaydırma özelliğini etkinleştir. Özellikle dokunmatik-ekran kullanırken kaydırma yapmak için kullanılabilir. STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Sağ tıklama ile pencereyi kapat: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :İçerisinde sağ tıklandığında pencereyi kapatır. Sağ tıklandığında ipuçları gösterimini devre dışı bırakır! @@ -1810,7 +1804,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Yılı d STR_CHEAT_SETUP_PROD :{LTBLUE}Üretim değerlerini değiştir: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Yeni Renk STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Genel renk şemalarını göster STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Tren renk düzenlerini göster @@ -2692,7 +2685,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Satın alınmı STR_ABOUT_OPENTTD :{WHITE}OpenTTD Hakkında STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Telif hakkı {COPYRIGHT} 1995 Chris Sawyer, Her hakkı saklıdır STR_ABOUT_VERSION :{BLACK}OpenTTD sürüm {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 OpenTTD ekibi +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD ekibi + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Oyunu Kaydet @@ -2985,8 +2985,6 @@ STR_TOWN_POPULATION :{BLACK}Dünya n STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Şehir) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Nüfus: {ORANGE}{COMMA}{BLACK} Ev: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Geçen ayki yolcu: {ORANGE}{COMMA}{BLACK} azami: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Geçen ayki posta: {ORANGE}{COMMA}{BLACK} azami: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Kasaba büyümesi için gerekli kargo: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} gerekli STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} kışın gerekir @@ -3291,21 +3289,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Görünt STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Üretim seviyesi: %{YELLOW}{COMMA} STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Fabrika çok yakında kapanacağını duyurdu! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}İstenen: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}İstenenler: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}İstenenler: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Gereken: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} bekliyor{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Üretir: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Üretir: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Üretimi değiştir (8'in katı, 2040'a kadar) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Üretim seviyesini değiştir (yüzde olarak, %800'e kadar) @@ -4225,7 +4213,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Haritada STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Çok fazla demiryolu istasyon parçası var STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Çok fazla durak var STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Çok fazla kamyon yükleme yeri var -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Başka bir istasyona çok yakın STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Başka bir limana çok yakın STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Başka bir havalimanına çok yakın STR_ERROR_CAN_T_RENAME_STATION :{WHITE}İsim değiştirilemiyor... diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index 13f7161df7..e7a4856d0f 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -12,7 +12,7 @@ ##case r d z -# $Id: ukrainian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -797,10 +797,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Вибр STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Вкл./відкл. випадкову програму STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Показує вікно вибору музичної програми -STR_ERROR_NO_SONGS :{WHITE}Був обраний музичний набір без пісень. Пісні не будуть програватись - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Вибір музичної програми STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Назва доріжки STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Програма - '{STRING}' @@ -1382,6 +1379,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Цю н STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Витрати на утримання інфраструктури: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :При включенні інфраструктура потребує коштів для утримання. Витрати збільшуються не пропорційно з ростом розміру мережі, більше впливаючи на великі компанії ніж на малі + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аеропорти не застарівають: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :При включенні кожен аеропорт буде доступним для будівництва безстроково після його впровадження. @@ -1465,8 +1463,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Колір по STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :зелений STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :темнозелений STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :фіолетовий -STR_CONFIG_SETTING_REVERSE_SCROLLING :Змінити напрямок прокрутки: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Налаштування переміщення по карті правою кнопкою миші. При включенні переміщується карта. При виключенні - камера. STR_CONFIG_SETTING_SMOOTH_SCROLLING :Плавна прокрутка у вікні: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Налаштування способу прокрутки основного екрану при клацанні мишою по зменшенній карті, або інших діях, що призводять до переміщення по карті (кнопки "Оглянути", тощо). При включенні опції переміщення карти відбувається плавно. При виключенні - відбувається моментальне переміщення в необхідну точку STR_CONFIG_SETTING_MEASURE_TOOLTIP :Показувати підказки про розміри під час будівництва: {STRING} @@ -1498,8 +1494,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Команда+ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+клац мишою STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :не емулювати -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Прокрутка по лівому клацу миші: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Дозволяє "тягати" карту утримуючи ліву кнопку миші, що дає можливість використовувати сенсорні екрани природнім способом.. STR_CONFIG_SETTING_AUTOSAVE :Автозбереження: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Оберіть проміжок між автоматичними збереженнями гри @@ -1934,7 +1928,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Змін STR_CHEAT_SETUP_PROD :{LTBLUE}Дозволити зміну рівня виробництва: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Нова кольорова схема STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Показати загальне фарбування STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Показати фарбування поїздів @@ -2818,7 +2811,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Ця ділян STR_ABOUT_OPENTTD :{WHITE}Про OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Авторське право {COPYRIGHT} 1995 Кріс Сойєр, Всі права захищені STR_ABOUT_VERSION :{BLACK}OpenTTD версія {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 команда OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 команда OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Зберегти гру @@ -3111,8 +3111,6 @@ STR_TOWN_POPULATION :{BLACK}Насе STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (місто) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Населення: {ORANGE}{COMMA}{BLACK} Будинки: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Пасажирів за місяць: {ORANGE}{COMMA}{BLACK} найбільше: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Пошти за місяць: {ORANGE}{COMMA}{BLACK} найбільше: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Вантаж, потрібний для зростання міста: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} потрібно STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} потрібно взимку @@ -3417,18 +3415,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Пока STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Обсяг виробництва: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Підприємство оголосило про близьке закриття! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Потребує: {YELLOW}{STRING.z}{STRING.z} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Потребує: {YELLOW}{STRING.z}{STRING.z}, {STRING.z}{STRING.z} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Потребує: {YELLOW}{STRING.z}{STRING.z}, {STRING.z}{STRING.z}, {STRING.z}{STRING.z} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Продукція: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Продукція: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Змінити виробництво (кратне 8, до 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Змінити обсяг виробництва (до 800%) @@ -4336,7 +4324,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Дуже STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Забагато частин залізничної станції STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Дуже багато зупинок STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Дуже багато вантажних станцій -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Дуже близько до іншої станції STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Дуже близько до іншого порту STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Дуже близько до іншого аеропорту STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Неможливо перейменувати станцію... diff --git a/src/lang/unfinished/chuvash.txt b/src/lang/unfinished/chuvash.txt index c853324d62..5598dd1da0 100644 --- a/src/lang/unfinished/chuvash.txt +++ b/src/lang/unfinished/chuvash.txt @@ -10,7 +10,7 @@ ##grflangid 0x0b -# $Id: chuvash.txt 27824 2017-03-24 18:45:45Z translators $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -403,7 +403,6 @@ STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKG STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Кӗвӗ STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Ят - # Playlist window STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Тасат @@ -574,6 +573,7 @@ STR_CONFIG_SETTING_HORIZONTAL_POS_RIGHT :Сылтӑмр STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE :ҫук STR_CONFIG_SETTING_PLANE_CRASHES_NONE :ҫук + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропорт кивел мар: {STRING} @@ -971,6 +971,13 @@ STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE :Маяк # About OpenTTD window STR_ABOUT_VERSION :{BLACK}OpenTTD верси {REV} +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + + # Save/load game/scenario @@ -1109,13 +1116,8 @@ STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ҫу # Industry view -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists diff --git a/src/lang/unfinished/frisian.txt b/src/lang/unfinished/frisian.txt index 86a4a7fa21..aea0f9a5c7 100644 --- a/src/lang/unfinished/frisian.txt +++ b/src/lang/unfinished/frisian.txt @@ -10,7 +10,7 @@ ##grflangid 0x32 -# $Id: frisian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,10 +669,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Selektea STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Set musyk mjokselje oan/út STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Lit musykseleksjeskerm sjen. -STR_ERROR_NO_SONGS :{WHITE}In musykset sûnder nûmers is selektearre. Gjin nûmers sille spile wurden - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Musykprogramseleksje STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Nûmeryndeks STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Program - '{STRING}' @@ -1252,6 +1249,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}At der f STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Ynfrastruktuerûnderhâld: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :By ynskeakeljen binne der koster ferbûn oan it ûnderhâld fan ynfrastruktuer. De kosten wurde heger by gruttere netwurken wêrtoch gruttere bedriuwen hjir mear lêst fan hawwe + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Fleanfjilden ferrinne nea: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :By ynskeakeljen bliuwe alle fleanfjildtypes foar ivich beskikber @@ -1329,8 +1327,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Kleur fan it l STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Grien STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Donker grien STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Fiolet -STR_CONFIG_SETTING_REVERSE_SCROLLING :Draai scrollrjochtig om: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :By útskeakeljen beweecht de mûs de kamera. By ynskeakeljen beweecht de mûs de kaart STR_CONFIG_SETTING_SMOOTH_SCROLLING :Loaitsfinster floeiend scrolle : {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Bepaalt hoe it haadfinster scrollt. By ynskeakeljen sil dit floeiend wêze. By útskeakeljen ljept it byld direktst nei de selektearre lokaasje STR_CONFIG_SETTING_MEASURE_TOOLTIP :Under it gebrûk fan de ferskate bou-arken diminsjes sjen litte: {STRING} @@ -1362,8 +1358,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Kommando+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Klik STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Ut -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Scrolle mei lofter mûsknop: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Skeakel scrollen mei de lofter mûsknop oan. Dit is brûksum foar scollen op oanreitsskermen STR_CONFIG_SETTING_AUTOSAVE :Automatysk bewarje: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Selektearje de tiid tusken automatysk bewarje fan it spul @@ -1738,7 +1732,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Wizigje STR_CHEAT_SETUP_PROD :{LTBLUE}Stea oanpassen fan produksje ta: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Nei Kleurenskema STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Lit gewoane kleurskemas sjen STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Lit kleurskema sjen fan treinen @@ -2475,7 +2468,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Lân fan bedriu STR_ABOUT_OPENTTD :{WHITE}Oer OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Orizjineel copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD-ferzje {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 It OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 It OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spul Opslaan @@ -2754,8 +2754,6 @@ STR_TOWN_POPULATION :{BLACK}Wrâldpo STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Ynwenners: {ORANGE}{COMMA}{BLACK} Hûzen: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passazjiers lêste moanne: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post lêste moanne: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Guod nedich foar stêdsgroei: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} ferplichte STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} ferplichte yn de winter @@ -3037,18 +3035,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Sintrear STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksje nivo: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Yndustry kundicht drigend sluten oan! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Nedich: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Nedich: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Nedich: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produseart: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produseart: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Feroaring produksje nivo (percentage, up to 800%) # Vehicle lists @@ -3758,7 +3746,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Te folle STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Te folle stasjonsdielen STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Te folle bushaltes STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Te folle frachtstasjons -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Te ticht by in oar stasjon STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Te ticht by in oare haven STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Te ticht by in oar fleanfjild STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Kin namme fan stasjon net feroarje diff --git a/src/lang/unfinished/ido.txt b/src/lang/unfinished/ido.txt index f273a74320..4f353acaaf 100644 --- a/src/lang/unfinished/ido.txt +++ b/src/lang/unfinished/ido.txt @@ -10,7 +10,7 @@ ##grflangid 0x06 -# $Id: ido.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -377,7 +377,6 @@ STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKG STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" - # Playlist window # Highscore window @@ -534,6 +533,7 @@ STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :normala + STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verda STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Obskur-verda STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violkolora @@ -776,7 +776,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS :Stabeyo di komp # About OpenTTD window STR_ABOUT_VERSION :{BLACK}OpenTTD versiono {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 La kruo OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 La kruo OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Ludo Detali @@ -918,13 +925,8 @@ STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Vehili: # Industry view -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} Tren{P o i} diff --git a/src/lang/unfinished/macedonian.txt b/src/lang/unfinished/macedonian.txt index 0737c38877..af62c00a81 100644 --- a/src/lang/unfinished/macedonian.txt +++ b/src/lang/unfinished/macedonian.txt @@ -10,7 +10,7 @@ ##grflangid 0x26 -# $Id: macedonian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -641,10 +641,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Избе STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Вклучи/исклучи мешање за програм STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Прикажи диалог за избор на песна -STR_ERROR_NO_SONGS :{WHITE}Музички сет без песни е избран. Не песни ќе се одигра - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Избор на музички програм STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Индекс на песната STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Програм - '{STRING}' @@ -846,6 +843,7 @@ STR_CONFIG_SETTING_SMOKE_AMOUNT :Износ на STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Инфраструктура за одржување: {STRING} + STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Дебелина на линии во графици: {STRING} @@ -1202,7 +1200,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Компани STR_ABOUT_OPENTTD :{WHITE}За OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Оригинален copyright {COPYRIGHT} 1995 Chris Sawyer, Сите права се задржани STR_ABOUT_VERSION :{BLACK}OpenTTD верзија {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 OpenTTD тимот +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 OpenTTD тимот + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_LOAD_BUTTON :{BLACK}Оптоварување @@ -1409,13 +1414,8 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry view STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Производство ниво: {YELLOW}{COMMA}% -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Промена на производство на ниво (процент, до 800%) # Vehicle lists diff --git a/src/lang/unfinished/maltese.txt b/src/lang/unfinished/maltese.txt index a7fa1dd02e..ac07641452 100644 --- a/src/lang/unfinished/maltese.txt +++ b/src/lang/unfinished/maltese.txt @@ -10,7 +10,7 @@ ##grflangid 0x09 -# $Id: maltese.txt 27824 2017-03-24 18:45:45Z translators $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -346,7 +346,6 @@ STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKG STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" - # Playlist window # Highscore window @@ -461,6 +460,7 @@ STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Iddeċiedi kemm + STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avza jekk jintilef il-vehikolu: {STRING} @@ -683,6 +683,13 @@ STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Aghzel i # About OpenTTD window +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + + # Save/load game/scenario @@ -815,13 +822,8 @@ STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURREN # Industry view -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists diff --git a/src/lang/unfinished/marathi.txt b/src/lang/unfinished/marathi.txt index 0a8fbd9665..b6a39a168d 100644 --- a/src/lang/unfinished/marathi.txt +++ b/src/lang/unfinished/marathi.txt @@ -10,7 +10,7 @@ ##grflangid 0x11 -# $Id: marathi.txt 27824 2017-03-24 18:45:45Z translators $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -628,10 +628,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}'कस STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}कार्यक्रम चुळबूळ - प्रारंभ / बंद STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}संगीत ट्रॅक निवड दाखवा -STR_ERROR_NO_SONGS :{WHITE}संगीत न संगीत संच निवडले गेले आहे. एकही गाणी खेळला जाईल. - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}संगीत कार्यक्रम निवड. STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}गाणे क्रमांक STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}कार्यक्रम - '{STRING}' @@ -799,6 +796,7 @@ STR_CONFIG_SETTING_REALISTIC :खरेखु STR_CONFIG_SETTING_SMOKE_AMOUNT :वाहनांचा धूर/ठिणग्या: {STRING} + STR_CONFIG_SETTING_WARN_LOST_VEHICLE : वाहन हरवल्यास सूचित करा: {STRING} @@ -1110,6 +1108,13 @@ STR_LAI_WATER_DESCRIPTION_RIVER :नदी # About OpenTTD window STR_ABOUT_OPENTTD :{WHITE}ओपेन टीटीडी बद्दल +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + + # Save/load game/scenario STR_SAVELOAD_BYTES_FREE :{BLACK}{BYTES} मोकळ STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} @@ -1273,18 +1278,8 @@ STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUST # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}लाग्त: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}लाग्त: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}लाग्त: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}बनव्त: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}बनव्त: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - # Vehicle lists STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING} - {COMMA} विमान diff --git a/src/lang/unfinished/persian.txt b/src/lang/unfinished/persian.txt index 2dbed20b00..2e2b23764d 100644 --- a/src/lang/unfinished/persian.txt +++ b/src/lang/unfinished/persian.txt @@ -10,7 +10,7 @@ ##grflangid 0x62 -# $Id: persian.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -658,10 +658,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}انتخ STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}پخش به صورت لیست برهم ریخته STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}نمایش پنجره لیست آهنگهای انتخابی -STR_ERROR_NO_SONGS :{WHITE}در مجموعه موسیقی آهنگی انتخاب نشده است. هیچ آهنگی پخش نخواهد شد - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}انتخاب برنامه پخش موسیقی STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}شماره ی آهنگ STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}برنامه - '{STRING}' @@ -1170,6 +1167,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :اجازه اس STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}تغییر دادن این تنظیم هنگامی که خودرو وجود دارد ممکن نیست STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :تعمیر و نگهداری زیرساخت ها: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :فرودگاه‌ها هیچ‌گاه از کار نیافتند: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :اعلام هشدار هنگام گم شدن وسیله نقلیه: {STRING} @@ -1227,7 +1225,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR :رنگ استف STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :سبز STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :سبز تیره STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :بنفش -STR_CONFIG_SETTING_REVERSE_SCROLLING :برعکس کردن جهت حرکت کردن صفحه: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING :تصویر صاف در نمای اضافه: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP :نمایش متن کمکی وقتی از چندین ابزار استفاده می شود: {STRING} STR_CONFIG_SETTING_LIVERIES :نمایش طراحی مخصوص وسیله نقلیه : {STRING} @@ -1247,7 +1244,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :دستور+کل STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :کنترل+کلیک STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :خاموش -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :حرکت در نقشه با کلیک چپ:: {STRING} STR_CONFIG_SETTING_AUTOSAVE :ذخیره خودکار: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :انتخاب فاصله زمانی بین ذخیره کردن های خودکار @@ -1519,7 +1515,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}تغیی STR_CHEAT_SETUP_PROD :{LTBLUE}قابلیت تغییر سطح تولید صنایع: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}طرح رنگ جدید STR_LIVERY_GENERAL_TOOLTIP :{BLACK}نمایش طرح رنگهای اصلی STR_LIVERY_TRAIN_TOOLTIP :{BLACK}نمایش طرح رنگهای قطار @@ -2389,7 +2384,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :زمین خری STR_ABOUT_OPENTTD :{WHITE}OpenTTD در باره ی STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD ویرایش {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 The OpenTTD team +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 The OpenTTD team + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}ذخیره ی بازی @@ -2663,8 +2665,6 @@ STR_TOWN_POPULATION :{BLACK}جمعی STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (شهر) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}جمعیت: {ORANGE}{COMMA}{BLACK} خانه ها: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}مسافران در ماه گذشته: {ORANGE}{COMMA}{BLACK} حداکثر: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}نامه ها در ماه گذشته: {ORANGE}{COMMA}{BLACK} حداکثر: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}نوع بار برای رشد شهر: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} ضروری STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} در زمستان ضروری است @@ -2902,18 +2902,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}مرکز تصویر را روی کارخانه قرار بده.Ctrl+Click کنید تا پنجره نمایی از کارخانه نمایش داده شود STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}این کارخانه اعلام کرده است که به زودی بسته خواهد شد! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}مواد اولیه: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}مواد اولیه: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}مواد اولیه: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}محصولات: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}محصولات: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - # Vehicle lists STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} قطار @@ -3412,7 +3402,6 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}نمی STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}ایستگاه زیادی پراکنده شده است STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}تعداد محوطه های بارگیری/ایستگاه بسیار زیاد شده -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}به محوطه ی بارگیری/ایستگاه دیگری بسیار نزدیک است STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}به بندر دیگری بسییار نزدیک است STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}به فرودگاه دیگری بسیار نزدیک شده STR_ERROR_CAN_T_RENAME_STATION :{WHITE}نام این ایستگاه را نمی شود تغییر داد diff --git a/src/lang/unfinished/urdu.txt b/src/lang/unfinished/urdu.txt index b77669dd4b..752e471ef5 100644 --- a/src/lang/unfinished/urdu.txt +++ b/src/lang/unfinished/urdu.txt @@ -11,7 +11,7 @@ ##gender m f -# $Id: urdu.txt 27824 2017-03-24 18:45:45Z translators $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -649,10 +649,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}'اپن STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}پروگرام ہلانے کی تدویم کیجئیے STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}گانا چننے کا اختیار دینے والی ونڈو دکھائیں -STR_ERROR_NO_SONGS :{WHITE}کوئی گانا دستیاب نہیں ہے - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}موسیقی کے پروگرام کا انتخاب کریں STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}گانوں کی فہرست STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}پروگرام - '{STRING}' @@ -1116,6 +1113,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :مد مقابل STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}جب گاڑیاں موجود ہوں تو یہ سیٹنگ بدلنا ممکن نہیں STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :انفراسٹرکچر کی بحالی: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :ہوائی اڈوں کی معیاد کبھی ختم نہ ہو: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :اگر گاڑی کھو جاے تو انتباہ کیجئیے: {STRING} @@ -1414,7 +1412,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}موجو STR_CHEAT_SETUP_PROD :{LTBLUE}پیداوار میں تبدیلی کو فعال کریں: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}نئے رنگوں کا انتخاب STR_LIVERY_GENERAL_TOOLTIP :{BLACK}رنگوں کا عام انتخاب دکھائیں STR_LIVERY_TRAIN_TOOLTIP :{BLACK}ریل گاڑیوں کے رنگوں کا انتخاب دکھائیں @@ -2129,6 +2126,13 @@ STR_FOUND_TOWN_SELECT_LAYOUT_RANDOM :{G=f}{BLACK}ک STR_ABOUT_OPENTTD :{WHITE}اوپن ٹی ٹی ڈی کے متعلق STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} ٢٠٠٢ - ٢٠١٦ OpenTTD ٹیم +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + + # Save/load game/scenario @@ -2287,9 +2291,6 @@ STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURREN # Company view -STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL :{WHITE}{COMMA}پٹڑی { "کا" "کے" P} { "ٹکڑا" "ٹکڑے" P} -STR_COMPANY_VIEW_INFRASTRUCTURE_ROAD :{WHITE}{COMMA} سڑک { "کا" "کے" P} { "ٹکڑا" "ٹکڑے" P} -STR_COMPANY_VIEW_INFRASTRUCTURE_WATER :{WHITE}{COMMA} پانی { "کا" "کے" P} { "ٹکڑا" "ٹکڑے" P} STR_COMPANY_VIEW_INFRASTRUCTURE_STATION :{WHITE}{COMMA} اسٹیشن کی ٹائلیں STR_COMPANY_VIEW_INFRASTRUCTURE_AIRPORT :{COMMA}{WHITE} ہوائی اڈے STR_COMPANY_VIEW_INFRASTRUCTURE_NONE :{WHITE}کوئی نہیں @@ -2318,13 +2319,8 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry view STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}گزشتہ ماہ کی پیداوار: -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index 5813c06efa..b74c0e9a8e 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -10,7 +10,7 @@ ##grflangid 0x54 -# $Id: vietnamese.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -475,6 +475,7 @@ STR_ABOUT_MENU_SCREENSHOT :Ảnh chụp m STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Phóng to đầy đủ ảnh chụp màn hình STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Phóng to mặc định ảnh chụp màn hình STR_ABOUT_MENU_GIANT_SCREENSHOT :Ảnh màn hình toàn bản đồ +STR_ABOUT_MENU_SHOW_FRAMERATE :Hiển thị tốc độ khung hình STR_ABOUT_MENU_ABOUT_OPENTTD :Giới thiệu 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Trình điều chỉnh sprite STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Bật/tắt hiển thị khối nhà @@ -650,6 +651,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Không sẵn có nhạc nền STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Bài Nhạc STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Tên @@ -669,15 +671,15 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Chọn k STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Bật/tắt chơi nhạc ngẫu nhiên STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Hiện cửa số chọn bài nhạc -STR_ERROR_NO_SONGS :{WHITE}Đã chọn gói nhạc chuẩn nhưng không có bài nào. Không có bài nào để chơi - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Chọn Kiểu Chơi Nhạc +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Danh sách nhạc - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Bảng Bài Nhạc STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Chương Trình - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Xóa +STR_PLAYLIST_CHANGE_SET :{BLACK}Tập danh sách thay đổi STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Xóa chương trình đang chọn ("Tự chọn 1" và "Tự chọn 2") +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Thay đổi lựa chọn danh sách nhạc khác STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Click vào bài nhạc để thêm vào chương trình hiện tại (cho "Tự chọn 1" hay "Tự chọn 2") STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Click vào bài nhạc để xóa khỏi chương trình hiện tại (cho "Tự chọn 1" hay "Tự chọn 2") @@ -813,6 +815,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Giám Đốc) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} Tài trợ xây dựng Thị Xã mới {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Một đô thị mới vừa được xây dựng, có tên là {TOWN}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}{STRING} mới đang được xây dựng gần {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}{STRING} được lên kế hoạch xây gần {TOWN}! @@ -880,10 +883,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Cửa sổ {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Nhìn ở cửa sổ lớn +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Đổi khung nhìn STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Nhìn vị trí này ở cửa sổ lớn chính -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Chuyển về cửa sổ nhỏ -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Chuyển vị trí từ cửa sổ lớn về cửa sổ nhỏ +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Chuyển về cửa sổ chính +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Sao chép vị trí từ cửa sổ này về cửa sổ lớn # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Cấu Hình Trò Chơi @@ -925,6 +928,7 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand Nam Phi (Z STR_GAME_OPTIONS_CURRENCY_CUSTOM :Tùy chọn... STR_GAME_OPTIONS_CURRENCY_GEL :Lari Georgia (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iran (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Đồng Rúp Nga mới (RUB) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Xe cộ @@ -1254,6 +1258,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Không t STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Phí bảo trì cơ sở hạ tầng: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Khi mở, thì hạ tầng công ty sẽ sinh ra chi phí bảo trì. Chi phí sẽ tăng theo mạng lưới giao thông bạn xây dựng, và sẽ tiêu tốn của công ty lớn nhiều hơn công ty nhỏ + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Sân bay không bao giờ thành đồ cổ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bật tùy chọn này cho phép tất cả các loại sân bay không bị lỗi thời @@ -1337,8 +1342,12 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Màu sắc củ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Lục STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Lục tối STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Tím -STR_CONFIG_SETTING_REVERSE_SCROLLING :Đảo ngược hướng cuộn: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Phản ứng khi cuộn bản đồ bằng nút chuột phải. Nếu tắt, thì chuột di chuyển theo vùng nhìn. Nếu bật thì chuột di chuyển theo bản đồ +STR_CONFIG_SETTING_SCROLLMODE :Kiểu cuộn khung nhìn: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Hành xử khi kéo, cuộn bản đồ +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Kéo cuộn khung nhìn kiểu RMB, khoá vị trí con trỏ chuột +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Kéo cuộn kiểu RMB, khoá vị trí con trỏ chuột +STR_CONFIG_SETTING_SCROLLMODE_RMB :Kéo cuộn bản đồ kiểu RMB +STR_CONFIG_SETTING_SCROLLMODE_LMB :Kéo cuộn bản đồ kiểu LMB STR_CONFIG_SETTING_SMOOTH_SCROLLING :Cuộn uyển chuyển cửa sổ: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Điều khiển cách màn hình chính cuộn tới vị trí cụ thể khi nháy chuột vào bản đồ nhỏ hoặc khi gõ lệnh cuộn tới đối tượng trên bản đồ. Nếu bật, thì sẽ cuộn trượt, nếu tắt thì nhảy thẳng tới vị trí đó. STR_CONFIG_SETTING_MEASURE_TOOLTIP :Hiện bảng chú giải đo lường khi dùng các công cụ xây dựng: {STRING} @@ -1370,8 +1379,6 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Tắt -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Cuộn chuột trái: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Cho phép cuộn bản đồ bằng cách kéo với nút trái chuột. Tùy chọn này sẽ hữu ích khi dùng màn hình cảm ứng STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Đóng cửa số khi click chuột phải: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Đóng cửa sổ bằng cách bấm chuột phải vào đó. Ngăn tooltip bằng cách bấm phải! @@ -1809,7 +1816,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Thay đ STR_CHEAT_SETUP_PROD :{LTBLUE}Cho phép khả năng sửa giá trị sản xuất: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Cách Phối Màu Mới STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Hiển thị phối màu chung STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Hiển thị phối màu tàu hỏa @@ -2285,6 +2291,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Ghi chú STR_LINKGRAPH_LEGEND_ALL :{BLACK}Tất cả STR_LINKGRAPH_LEGEND_NONE :{BLACK}Không STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Lựa chọn công ty nào sẽ được hiển thị +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}không sử dụng @@ -2691,7 +2698,57 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Đất công ty STR_ABOUT_OPENTTD :{WHITE}Về OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Nguyên tác bản quyền {COPYRIGHT} 1995 Chris Sawyer, All rights reserved STR_ABOUT_VERSION :{BLACK}OpenTTD phiên bản {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 Nhóm OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 Nhóm OpenTTD + +# Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Tốc độ khung hình +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Tốc độ khung giả lập game: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Số nhịp đếm giả lập trong mỗi giây +STR_FRAMERATE_RATE_BLITTER :{WHITE}Tốc độ khung hình: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Số khu hình vẽ lại mỗi giây. +STR_FRAMERATE_SPEED_FACTOR :{WHITE}Chỉ số vận tốc game hiện tại: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Tốc độ chạy game hiện tại, so với tốc độ bình thường +STR_FRAMERATE_CURRENT :{WHITE}Hiện tại +STR_FRAMERATE_AVERAGE :{WHITE}Trung bình +STR_FRAMERATE_DATA_POINTS :{WHITE}Dữ liệu được tính theo số đo {COMMA} +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL}{WHITE} khung/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE} khung/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE} khung/s +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s +############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{WHITE}Tổng vòng lặp khung hình game: +STR_FRAMERATE_GL_ECONOMY :{WHITE} Xử lý bốc dỡ hàng: +STR_FRAMERATE_GL_TRAINS :{WHITE} Nhịp của tàu hoả: +STR_FRAMERATE_GL_ROADVEHS :{WHITE} Nhịp của xe ô-tô +STR_FRAMERATE_GL_SHIPS :{WHITE} Số nhịp của tàu thủy: +STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Số nhịp của máy bay: +STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Nhịp của bản đồ game: +STR_FRAMERATE_GL_LINKGRAPH :{WHITE} Độ trễ tính toán đồ thị: +STR_FRAMERATE_DRAWING :{WHITE}Cách vẽ đồ hoạ game: +STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Khung nhìn toàn bản đồ: +STR_FRAMERATE_VIDEO :Nguồn xuất hình: +STR_FRAMERATE_SOUND :{WHITE}Trộn âm thanh: +############ End of leave-in-this-order +############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Vòng lặp khung hình game +STR_FRAMETIME_CAPTION_GL_ECONOMY :Bốc dỡ hàng +STR_FRAMETIME_CAPTION_GL_TRAINS :Nhịp cho tàu hoả +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Số nhịp xe ôtô +STR_FRAMETIME_CAPTION_GL_SHIPS :Nhịp của tàu thủy +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Nhịp cho máy bay +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Nhịp của bản đồ +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Độ trễ tính toán đồ thị +STR_FRAMETIME_CAPTION_DRAWING :Cách vẽ đồ hoạ game +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Khung vẽ cả bản đồ game +STR_FRAMETIME_CAPTION_VIDEO :Ngõ xuất hình +STR_FRAMETIME_CAPTION_SOUND :Trộn âm thanh +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Lưu Ván Chơi @@ -2977,6 +3034,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Nhập t STR_TOWN_DIRECTORY_CAPTION :{WHITE}Đô Thị STR_TOWN_DIRECTORY_NONE :{ORANGE}- Không Có - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (đô thị){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Tên các đô thị - nháy vào tên để xem trung tâm đô thị. Ctrl+Click mở cửa sổ mới về vị trí đô thị STR_TOWN_POPULATION :{BLACK}Dân số thế giới: {COMMA} @@ -2984,8 +3042,7 @@ STR_TOWN_POPULATION :{BLACK}Dân s STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Thành Phố) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Dân số: {ORANGE}{COMMA}{BLACK} Toà nhà: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Du khách tháng trước: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Bưu kiện tháng trước: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} tháng trước: {ORANGE}{COMMA}{BLACK} tối đa: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Hàng hoá cần để đô thị tăng trưởng: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} được yêu cầu STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} Yêu cầu trong mùa đông @@ -3290,21 +3347,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Xem vị STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Mức sản lượng: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nhà máy này đã thông báo sắp đóng cửa! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Cần cung cấp: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} đang chờ{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Sản xuất: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Sản xuất: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Thay đổi sản lượng (bội số của 8, max 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Thay đổi mức sản lượng (theo phần trăm, cao nhất 800%) @@ -4224,7 +4271,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Quá nhi STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Quá nhiều mảnh của ga tàu hoả STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Quá nhiều điểm đừng xe buýt STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Quá nhiều trạm bốc dỡ hàng xe tải -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Quá sát với một bến khác STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Quá sát với hải cảng khác STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Quá sát với sân bay khác STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Không thể đổi tên ga, bến,cảng... @@ -4232,6 +4278,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... đâ STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... đường quay mặt sai hướng STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... đi qua điểm dừng không thể đi qua góc STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... đi qua điểm dừng không thể có ngã rẽ +STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... đường 1 chiều hoặc bị chặn # Station destruction related errors STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Không thể xoá bỏ một phần của ga... @@ -4483,6 +4530,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Âm thanh gốc STR_BASESOUNDS_WIN_DESCRIPTION :Âm thanh gốc từ phiên bản Transport Tycoon Deluxe trên Windows STR_BASESOUNDS_NONE_DESCRIPTION :Gói âm thanh này không có âm thanh nào. STR_BASEMUSIC_WIN_DESCRIPTION :Nhạc gốc từ phiên bản Transport Tycoon Deluxe trên Windows +STR_BASEMUSIC_DOS_DESCRIPTION :Nhạc của nguyên bản Transport Tycoon Deluxe cho DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Nhạc của nguyên bản Transport Tycoon (Original/World Editor) cho DOS. STR_BASEMUSIC_NONE_DESCRIPTION :Gói âm nhạc này không có nhạc nào. ##id 0x2000 diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 57b18e3bc8..92dd920509 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -10,7 +10,7 @@ ##grflangid 0x0f -# $Id: welsh.txt 27980 2018-03-11 12:24:32Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -669,10 +669,7 @@ STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Dewis y STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Toglu cymysgu trefn rhaglen ymlaen neu i ffwrdd STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Dangos y ffenestr dewis traciau cerddoriaeth -STR_ERROR_NO_SONGS :{WHITE}Dewiswyd set caneuon heb ganeuon ynddo. Ni chwaraeir unrhyw ganeuon - # Playlist window -STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Dewisiadau Rhaglen Gerddoriaeth STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Indecs Traciau STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Rhaglen - '{STRING}' @@ -1254,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Nid yw'n STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Cynnal a chadw tanadeiledd: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Pan fo wedi'i alluogi, mae tanadeiledd yn creu costau cynnal a chadw. Mae'r cost yn codi'n gyflymach na'i gyfradd gyda thŵf y rhwydwaith, gan effeithio'n fwy ar gwmniau mawr na rhai bychan + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Maes awyr ddim yn dibennu: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Mae galluogi'r dewis yma'n peri i bob math o faes awyr aros ar gael am byth wedi ei gyflwyniad gyntaf @@ -1337,8 +1335,6 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Lliw y tirwedd STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Gwyrdd STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Gwyrdd tywyll STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Fioled -STR_CONFIG_SETTING_REVERSE_SCROLLING :Gwrthdroi'r cyfeiriad sgrolio: {STRING} -STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Ymddygiad pan yn sgrolio gyda botwm dde y llygoden. Pan yr analluogir, bydd y llygoden yn symyd y camera. Pan y galluogir, bydd y llygoden yn symyd y map STR_CONFIG_SETTING_SMOOTH_SCROLLING :Sgrolio prif ffenestr llyfn: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Rheoli syt y mae'r prif olygfa'n sgrolio at leoliad penodol pan yn clicio ar y map bychan neu yn rhoi gorchymyn i sgrolio at wrthrych penodol STR_CONFIG_SETTING_MEASURE_TOOLTIP :Dangos cymorth mesur wrth ddefnyddio'r offer adeiladu amrywiol: {STRING} @@ -1370,8 +1366,8 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command-clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Clic STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :I ffwrdd -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Sgrolio Clic-chwith: {STRING} -STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Galluogi sgrolio ar y map drwy ei lusgo gyda botwm chwith y llygoden. Mae hyn yn arbennig o ddefnyddiol pan yn defnyddio sgrin-gyffwrdd ar gyfer sgrolio +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Cau ffenest wrth dde-glicio: {STRING} +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Cau ffenest wrth dde-glicio tu fewn iddo. Mae hyn yn analluogi dangos gwybodaeth ar dde-clicio! STR_CONFIG_SETTING_AUTOSAVE :Awtogadw: {STRING} STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Dewis pa mor aml y dylid awtogadw gemau @@ -1761,6 +1757,7 @@ STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Gwirio a STR_INTRO_TOOLTIP_SCRIPT_SETTINGS :{BLACK}Dangos gosodiadau AI a sgript Gêm STR_INTRO_TOOLTIP_QUIT :{BLACK}Gadael 'OpenTTD' +STR_INTRO_BASESET :{BLACK}Mae {NUM} corlun ar goll o'r set raffeg sylfaenol a ddewiswyd. Gwiriwch am ddiweddariadau i'r set raffeg. STR_INTRO_TRANSLATION :{BLACK}Mae'r cyfieithiad yma'n brin o {NUM} llinyn. Helpwch wella OpenTTD drwy ymaelodi fel cyfieithydd. Gweler readme.txt am fanylion. # Quit window @@ -1806,7 +1803,6 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Newid y STR_CHEAT_SETUP_PROD :{LTBLUE}Galluogi newid graddfeydd cynhyrchu: {ORANGE}{STRING} # Livery window -STR_LIVERY_CAPTION :{WHITE}Cynllun Lliw Newydd STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Dangos cynllun lliw cyffredinol STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Dangos cynllun lliw trenau @@ -2688,7 +2684,14 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Tir cwmni STR_ABOUT_OPENTTD :{WHITE}Gwybodaeth am OpenTTD STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Hawlfraint Wreiddiol {COPYRIGHT} 1995 Chris Sawyer, Holl cedwir pob hawl STR_ABOUT_VERSION :{BLACK}fersiwn OpenTTD {REV} -STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 Y tîm OpenTTD +STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 Y tîm OpenTTD + +# Framerate display window +############ Leave those lines in this order!! +############ End of leave-in-this-order +############ Leave those lines in this order!! +############ End of leave-in-this-order + # Save/load game/scenario STR_SAVELOAD_SAVE_CAPTION :{WHITE}Cadw Gêm @@ -2981,8 +2984,6 @@ STR_TOWN_POPULATION :{BLACK}Poblogae STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Dinas) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Poblogaeth: {ORANGE}{COMMA}{BLACK} Tai: {ORANGE}{COMMA} -STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Teithwyr mis diwethaf: {ORANGE}{COMMA}{BLACK} uchafswm: {ORANGE}{COMMA} -STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Post mis diwethaf: {ORANGE}{COMMA}{BLACK} uchafswm: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Nwyddau angenrheidiol ar gyfer tyfiant y dref: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{RED}Angen {ORANGE}{STRING} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} ei angen yn y gaeaf @@ -3100,7 +3101,7 @@ STR_STATION_LIST_STATION :{YELLOW}{STATIO STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} STR_STATION_LIST_NONE :{YELLOW}- Dim - STR_STATION_LIST_SELECT_ALL_FACILITIES :{BLACK}Dewis pob cyfleuster -STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}Dewis pob math llwyth (gan gynnwys llwythi dim aros) +STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}Dewis pob math llwyth (gan gynnwys llwythi lle nad oes dim yn disgwyl) STR_STATION_LIST_NO_WAITING_CARGO :{BLACK}Nid oes llwyth o unrhyw fath yn disgwyl # Station view window @@ -3287,17 +3288,10 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Canoli'r STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Lefel cynhyrchu: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Mae'r diwydiant wedi datgan ei fod ar fin cau! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Angen: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Angen: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Angen: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends - -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Cynhyrchu: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Cynhyrchu: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends +STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Angen: +STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} +STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} yn disgwyl{STRING} STR_CONFIG_GAME_PRODUCTION :{WHITE}Newid cynnyrch (lluosrif o 8, hyd at 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Newid y lefel cynhyrchu (canran, hyd at 800%) @@ -3361,6 +3355,10 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Dileu pob cerby STR_GROUP_RENAME_CAPTION :{BLACK}Ailenwi grŵp +STR_GROUP_PROFIT_THIS_YEAR :Elw eleni: +STR_GROUP_PROFIT_LAST_YEAR :Elw llynedd: +STR_GROUP_OCCUPANCY :Defnydd presennol: +STR_GROUP_OCCUPANCY_VALUE :{NUM}% # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Cerbydau Rheilffordd Newydd @@ -3393,6 +3391,7 @@ STR_PURCHASE_INFO_ALL_TYPES :Pob math o lwyt STR_PURCHASE_INFO_ALL_BUT :Popeth ond{CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Grym Tynnu Uchaf: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Pellter cyrhaeddiad: {GOLD}{COMMA} teil +STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK}Math awyren: {GOLD}{STRING} STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Rhestr dewis trenau. Cliciwch ar gerbyd am wybodaeth. Mae Ctrl+Clicio'n toglu cuddio'r math cerbyd STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Rhestr dewis cerbydau ffordd. Cliciwch ar gerbyd am wybodaeth. Mae Ctrl+Clicio'n toglu cuddio'r math cerbyd @@ -3527,6 +3526,10 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :trên maglef STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Côst: {CURRENCY_LONG} Pwysau: {WEIGHT_SHORT}{}Cyflymder: {VELOCITY} Pŵer: {POWER}{}Côst Rhedeg: {CURRENCY_LONG}/bl{}Gallu cludo: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Cost: {CURRENCY_LONG} Pwysau: {WEIGHT_SHORT}{}Cyflymder: {VELOCITY} Pŵer: {POWER} Grym Uchaf: {6:FORCE}{}Cost Rhedeg: {4:CURRENCY_LONG}/bl{}Cynhwysedd: {5:CARGO_LONG} STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Cyflym. Uchaf: {VELOCITY}{}Cynhwysedd: {CARGO_LONG}{}Cost Rhedeg: {CURRENCY_LONG}/bl +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Cyflym. Uchaf: {VELOCITY}{}Math awyren: {STRING}{}Cynhwysedd: {CARGO_LONG}, {CARGO_LONG}{}Cost rhedeg: {CURRENCY_LONG}/bl +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Cyflym. Uchaf: {VELOCITY}{}Math awyren: {STRING}{}Cynhwysedd: {CARGO_LONG}{}Cost Rhedeg: {CURRENCY_LONG}/bl +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Cyflym. Uchaf: {VELOCITY}{}Math awyren: {STRING} Pellter hedfan: {COMMA} teil{}Cynhwysedd: {CARGO_LONG}, {CARGO_LONG}{}Cost Rhedeg: {CURRENCY_LONG}/bl +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Cyflym. Uchaf: {VELOCITY}{}Math awyren: {STRING} Pellter hedfan: {COMMA} teil{}Cynhwysedd: {CARGO_LONG}{}Cost Rhedeg: {CURRENCY_LONG}/bl # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Disodli {STRING} - {STRING} @@ -3649,6 +3652,8 @@ STR_VEHICLE_INFO_AGE :{COMMA} blwyddy STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} blwyddyn ({COMMA}) STR_VEHICLE_INFO_MAX_SPEED :{BLACK}cyflymder uchaf: {LTBLUE}{VELOCITY} +STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Cyflym. uchaf: {LTBLUE}{VELOCITY} {BLACK}Math awyren: {LTBLUE}{STRING} +STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE :{BLACK}Cyflym. uchaf: {LTBLUE}{VELOCITY} {BLACK}Math awyren: {LTBLUE}{STRING} {BLACK}Pellter hedfan: {LTBLUE}{COMMA} teil STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Pwys: {LTBLUE}{WEIGHT_SHORT} {BLACK}Pŵer: {LTBLUE}{POWER}{BLACK} Cyflym. Max: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Pwys: {LTBLUE}{WEIGHT_SHORT} {BLACK}Pŵer: {LTBLUE}{POWER}{BLACK} Cyflym. Max: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE} @@ -4207,7 +4212,6 @@ STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Gormod o STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Mae gan yr orsaf ormod o rannau STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Gormod o arosfannau bysus STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Gormod o orsafoedd lorïau -STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Rhy agos i orsaf/ardal lwytho STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Rhy agos i ddoc arall STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Rhy agos i faes awyr arall STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Methu ailenwi gorsaf... diff --git a/src/language.h b/src/language.h index 9130e25f48..ec241dbd8c 100644 --- a/src/language.h +++ b/src/language.h @@ -1,4 +1,4 @@ -/* $Id: language.h 27756 2017-02-26 19:40:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -105,7 +105,7 @@ extern LanguageList _languages; extern const LanguageMetadata *_current_language; #ifdef WITH_ICU_SORT -extern Collator *_current_collator; +extern icu::Collator *_current_collator; #endif /* WITH_ICU_SORT */ bool ReadLanguagePack(const LanguageMetadata *lang); diff --git a/src/linkgraph/demands.cpp b/src/linkgraph/demands.cpp index f4afbabf0a..f1b714820b 100644 --- a/src/linkgraph/demands.cpp +++ b/src/linkgraph/demands.cpp @@ -115,7 +115,6 @@ public: * Check if there is any acceptance left for this node. In asymmetric distribution * nodes always accept as long as their demand > 0. * @param to The node to be checked. - * @param to_anno Unused. */ inline bool HasDemandLeft(const Node &to) { return to.Demand() > 0; } }; diff --git a/src/linkgraph/demands.h b/src/linkgraph/demands.h index c3d9dc7cda..8a639b8b15 100644 --- a/src/linkgraph/demands.h +++ b/src/linkgraph/demands.h @@ -30,7 +30,7 @@ public: /** * Call the demand calculator on the given component. - * @param graph Component to calculate the demands for. + * @param job Component to calculate the demands for. */ virtual void Run(LinkGraphJob &job) const { DemandCalculator c(job); } diff --git a/src/linkgraph/flowmapper.cpp b/src/linkgraph/flowmapper.cpp index 0687bd1132..b78b30335e 100644 --- a/src/linkgraph/flowmapper.cpp +++ b/src/linkgraph/flowmapper.cpp @@ -1,4 +1,4 @@ -/* $Id: flowmapper.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -16,7 +16,7 @@ /** * Map the paths generated by the MCF solver into flows associated with nodes. - * @param component the link graph component to be used. + * @param job the link graph component to be used. */ void FlowMapper::Run(LinkGraphJob &job) const { diff --git a/src/linkgraph/flowmapper.h b/src/linkgraph/flowmapper.h index 36ef7afa6d..6f874e5b30 100644 --- a/src/linkgraph/flowmapper.h +++ b/src/linkgraph/flowmapper.h @@ -1,4 +1,4 @@ -/* $Id: flowmapper.h 26166 2013-12-20 14:57:44Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraph.cpp b/src/linkgraph/linkgraph.cpp index c810862c21..34b3a4aa09 100644 --- a/src/linkgraph/linkgraph.cpp +++ b/src/linkgraph/linkgraph.cpp @@ -1,4 +1,4 @@ -/* $Id: linkgraph.cpp 26646 2014-06-14 13:35:39Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -252,8 +252,6 @@ void LinkGraph::Node::RemoveEdge(NodeID to) * least the given capacity and usage, otherwise add the capacity and usage. * In any case set the respective update timestamp(s), according to the given * mode. - * @param from Start node of the edge. - * @param to End node of the edge. * @param capacity Capacity to be added/updated. * @param usage Usage to be added. * @param mode Update mode to be applied. diff --git a/src/linkgraph/linkgraph.h b/src/linkgraph/linkgraph.h index 26e76b71a4..799f22c780 100644 --- a/src/linkgraph/linkgraph.h +++ b/src/linkgraph/linkgraph.h @@ -1,4 +1,4 @@ -/* $Id: linkgraph.h 26646 2014-06-14 13:35:39Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraph_base.h b/src/linkgraph/linkgraph_base.h index 4232766831..6e56af9a9c 100644 --- a/src/linkgraph/linkgraph_base.h +++ b/src/linkgraph/linkgraph_base.h @@ -1,4 +1,4 @@ -/* $Id: linkgraph_base.h 25354 2013-06-09 12:58:37Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index 04d9908cfb..7923fc26c8 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: linkgraph_gui.cpp 26891 2014-09-21 16:19:52Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -125,12 +125,67 @@ inline bool LinkGraphOverlay::IsPointVisible(Point pt, const DrawPixelInfo *dpi, */ inline bool LinkGraphOverlay::IsLinkVisible(Point pta, Point ptb, const DrawPixelInfo *dpi, int padding) const { - return !((pta.x < dpi->left - padding && ptb.x < dpi->left - padding) || - (pta.y < dpi->top - padding && ptb.y < dpi->top - padding) || - (pta.x > dpi->left + dpi->width + padding && - ptb.x > dpi->left + dpi->width + padding) || - (pta.y > dpi->top + dpi->height + padding && - ptb.y > dpi->top + dpi->height + padding)); + const int left = dpi->left - padding; + const int right = dpi->left + dpi->width + padding; + const int top = dpi->top - padding; + const int bottom = dpi->top + dpi->height + padding; + + /* + * This method is an implementation of the Cohen-Sutherland line-clipping algorithm. + * See: https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm + */ + + const uint8 INSIDE = 0; // 0000 + const uint8 LEFT = 1; // 0001 + const uint8 RIGHT = 2; // 0010 + const uint8 BOTTOM = 4; // 0100 + const uint8 TOP = 8; // 1000 + + int x0 = pta.x; + int y0 = pta.y; + int x1 = ptb.x; + int y1 = ptb.y; + + auto out_code = [&](int x, int y) -> uint8 { + uint8 out = INSIDE; + if (x < left) { + out |= LEFT; + } else if (x > right) { + out |= RIGHT; + } + if (y < top) { + out |= TOP; + } else if (y > bottom) { + out |= BOTTOM; + } + return out; + }; + + uint8 c0 = out_code(x0, y0); + uint8 c1 = out_code(x1, y1); + + while (true) { + if (c0 == 0 || c1 == 0) return true; + if ((c0 & c1) != 0) return false; + + if (c0 & TOP) { // point 0 is above the clip window + x0 = x0 + (int)(((int64) (x1 - x0)) * ((int64) (top - y0)) / ((int64) (y1 - y0))); + y0 = top; + } else if (c0 & BOTTOM) { // point 0 is below the clip window + x0 = x0 + (int)(((int64) (x1 - x0)) * ((int64) (bottom - y0)) / ((int64) (y1 - y0))); + y0 = bottom; + } else if (c0 & RIGHT) { // point 0 is to the right of clip window + y0 = y0 + (int)(((int64) (y1 - y0)) * ((int64) (right - x0)) / ((int64) (x1 - x0))); + x0 = right; + } else if (c0 & LEFT) { // point 0 is to the left of clip window + y0 = y0 + (int)(((int64) (y1 - y0)) * ((int64) (left - x0)) / ((int64) (x1 - x0))); + x0 = left; + } + + c0 = out_code(x0, y0); + } + + NOT_REACHED(); } /** @@ -298,7 +353,7 @@ Point LinkGraphOverlay::GetStationMiddle(const Station *st) const * Set a new cargo mask and rebuild the cache. * @param cargo_mask New cargo mask. */ -void LinkGraphOverlay::SetCargoMask(uint32 cargo_mask) +void LinkGraphOverlay::SetCargoMask(CargoTypes cargo_mask) { this->cargo_mask = cargo_mask; this->RebuildCache(); @@ -319,7 +374,7 @@ void LinkGraphOverlay::SetCompanyMask(uint32 company_mask) /** Make a number of rows with buttons for each company for the linkgraph legend window. */ NWidgetBase *MakeCompanyButtonRowsLinkGraphGUI(int *biggest_index) { - return MakeCompanyButtonRows(biggest_index, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST, 3, STR_LINKGRAPH_LEGEND_SELECT_COMPANIES); + return MakeCompanyButtonRows(biggest_index, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST, 3, STR_NULL); } NWidgetBase *MakeSaturationLegendLinkGraphGUI(int *biggest_index) @@ -425,7 +480,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number /** * Set the overlay belonging to this menu and import its company/cargo settings. - * @params overlay New overlay for this menu. + * @param overlay New overlay for this menu. */ void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) { this->overlay = overlay; @@ -435,7 +490,7 @@ void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) { this->SetWidgetLoweredState(WID_LGL_COMPANY_FIRST + c, HasBit(companies, c)); } } - uint32 cargoes = this->overlay->GetCargoMask(); + CargoTypes cargoes = this->overlay->GetCargoMask(); for (uint c = 0; c < NUM_CARGO; c++) { if (!this->IsWidgetDisabled(WID_LGL_CARGO_FIRST + c)) { this->SetWidgetLoweredState(WID_LGL_CARGO_FIRST + c, HasBit(cargoes, c)); @@ -496,10 +551,48 @@ void LinkGraphLegendWindow::DrawWidget(const Rect &r, int widget) const if (this->IsWidgetDisabled(widget)) return; CargoSpec *cargo = CargoSpec::Get(widget - WID_LGL_CARGO_FIRST); GfxFillRect(r.left + 2, r.top + 2, r.right - 2, r.bottom - 2, cargo->legend_colour); - DrawString(r.left, r.right, (r.top + r.bottom + 1 - FONT_HEIGHT_SMALL) / 2, cargo->abbrev, TC_BLACK, SA_HOR_CENTER); + DrawString(r.left, r.right, (r.top + r.bottom + 1 - FONT_HEIGHT_SMALL) / 2, cargo->abbrev, GetContrastColour(cargo->legend_colour, 73), SA_HOR_CENTER); } } +bool LinkGraphLegendWindow::OnHoverCommon(Point pt, int widget, TooltipCloseCondition close_cond) +{ + if (IsInsideMM(widget, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST + 1)) { + if (this->IsWidgetDisabled(widget)) { + GuiShowTooltips(this, STR_LINKGRAPH_LEGEND_SELECT_COMPANIES, 0, NULL, close_cond); + } else { + uint64 params[2]; + CompanyID cid = (CompanyID)(widget - WID_LGL_COMPANY_FIRST); + params[0] = STR_LINKGRAPH_LEGEND_SELECT_COMPANIES; + params[1] = cid; + GuiShowTooltips(this, STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP, 2, params, close_cond); + } + return true; + } + if (IsInsideMM(widget, WID_LGL_CARGO_FIRST, WID_LGL_CARGO_LAST + 1)) { + if (this->IsWidgetDisabled(widget)) return false; + CargoSpec *cargo = CargoSpec::Get(widget - WID_LGL_CARGO_FIRST); + uint64 params[1]; + params[0] = cargo->name; + GuiShowTooltips(this, STR_BLACK_STRING, 1, params, close_cond); + return true; + } + return false; +} + +void LinkGraphLegendWindow::OnHover(Point pt, int widget) +{ + this->OnHoverCommon(pt, widget, TCC_HOVER); +} + +bool LinkGraphLegendWindow::OnRightClick(Point pt, int widget) +{ + if (_settings_client.gui.hover_delay_ms == 0) { + return this->OnHoverCommon(pt, widget, TCC_RIGHT_CLICK); + } + return false; +} + /** * Update the overlay with the new company selection. */ @@ -519,7 +612,7 @@ void LinkGraphLegendWindow::UpdateOverlayCompanies() */ void LinkGraphLegendWindow::UpdateOverlayCargoes() { - uint32 mask = 0; + CargoTypes mask = 0; for (uint c = 0; c < NUM_CARGO; c++) { if (this->IsWidgetDisabled(c + WID_LGL_CARGO_FIRST)) continue; if (!this->IsWidgetLowered(c + WID_LGL_CARGO_FIRST)) continue; diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h index 5a254382e9..a933bfc683 100644 --- a/src/linkgraph/linkgraph_gui.h +++ b/src/linkgraph/linkgraph_gui.h @@ -1,4 +1,4 @@ -/* $Id: linkgraph_gui.h 27887 2017-07-11 19:34:21Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,7 @@ #include "../company_func.h" #include "../station_base.h" #include "../widget_type.h" +#include "../window_gui.h" #include "linkgraph_base.h" #include #include @@ -51,17 +52,17 @@ public: * @param company_mask Bitmask of companies to be shown. * @param scale Desired thickness of lines and size of station dots. */ - LinkGraphOverlay(const Window *w, uint wid, uint32 cargo_mask, uint32 company_mask, uint scale) : + LinkGraphOverlay(const Window *w, uint wid, CargoTypes cargo_mask, uint32 company_mask, uint scale) : window(w), widget_id(wid), cargo_mask(cargo_mask), company_mask(company_mask), scale(scale) {} void RebuildCache(); void Draw(const DrawPixelInfo *dpi) const; - void SetCargoMask(uint32 cargo_mask); + void SetCargoMask(CargoTypes cargo_mask); void SetCompanyMask(uint32 company_mask); /** Get a bitmask of the currently shown cargoes. */ - uint32 GetCargoMask() { return this->cargo_mask; } + CargoTypes GetCargoMask() { return this->cargo_mask; } /** Get a bitmask of the currently shown companies. */ uint32 GetCompanyMask() { return this->company_mask; } @@ -69,7 +70,7 @@ public: protected: const Window *window; ///< Window to be drawn into. const uint widget_id; ///< ID of Widget in Window to be drawn to. - uint32 cargo_mask; ///< Bitmask of cargos to be displayed. + CargoTypes cargo_mask; ///< Bitmask of cargos to be displayed. uint32 company_mask; ///< Bitmask of companies to be displayed. LinkMap cached_links; ///< Cache for links to reduce recalculation. StationSupplyList cached_stations; ///< Cache for stations to be drawn. @@ -101,6 +102,8 @@ public: virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize); virtual void DrawWidget(const Rect &r, int widget) const; + virtual void OnHover(Point pt, int widget); + virtual bool OnRightClick(Point pt, int widget); virtual void OnClick(Point pt, int widget, int click_count); virtual void OnInvalidateData(int data = 0, bool gui_scope = true); @@ -109,6 +112,7 @@ private: void UpdateOverlayCompanies(); void UpdateOverlayCargoes(); + bool OnHoverCommon(Point pt, int widget, TooltipCloseCondition close_cond); }; #endif /* LINKGRAPH_GUI_H */ diff --git a/src/linkgraph/linkgraph_type.h b/src/linkgraph/linkgraph_type.h index 198e37604b..6a3239b089 100644 --- a/src/linkgraph/linkgraph_type.h +++ b/src/linkgraph/linkgraph_type.h @@ -1,4 +1,4 @@ -/* $Id: linkgraph_type.h 26549 2014-05-01 14:50:52Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index 0e104b24ee..537303cf35 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -1,4 +1,4 @@ -/* $Id: linkgraphjob.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index d57f78dd6a..b4587a7842 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -1,4 +1,4 @@ -/* $Id: linkgraphjob.h 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraphjob_base.h b/src/linkgraph/linkgraphjob_base.h index b6eef38a77..0a29166ee9 100644 --- a/src/linkgraph/linkgraphjob_base.h +++ b/src/linkgraph/linkgraphjob_base.h @@ -1,4 +1,4 @@ -/* $Id: linkgraphjob_base.h 25371 2013-06-09 13:18:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp index 447347b7b6..8c508d8173 100644 --- a/src/linkgraph/linkgraphschedule.cpp +++ b/src/linkgraph/linkgraphschedule.cpp @@ -1,4 +1,4 @@ -/* $Id: linkgraphschedule.cpp 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,7 @@ #include "demands.h" #include "mcf.h" #include "flowmapper.h" +#include "../framerate_type.h" #include "../safeguards.h" @@ -151,6 +152,7 @@ void OnTick_LinkGraph() if (offset == 0) { LinkGraphSchedule::instance.SpawnNext(); } else if (offset == _settings_game.linkgraph.recalc_interval / 2) { + PerformanceMeasurer framerate(PFE_GL_LINKGRAPH); LinkGraphSchedule::instance.JoinNext(); } } diff --git a/src/linkgraph/linkgraphschedule.h b/src/linkgraph/linkgraphschedule.h index 63f4a63067..ec22be3161 100644 --- a/src/linkgraph/linkgraphschedule.h +++ b/src/linkgraph/linkgraphschedule.h @@ -1,4 +1,4 @@ -/* $Id: linkgraphschedule.h 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/mcf.cpp b/src/linkgraph/mcf.cpp index ecdf792afe..544584ef61 100644 --- a/src/linkgraph/mcf.cpp +++ b/src/linkgraph/mcf.cpp @@ -193,7 +193,7 @@ public: * Determines if an extension to the given Path with the given parameters is * better than this path. * @param base Other path. - * @param cap Capacity of the new edge to be added to base. + * @param free_cap Capacity of the new edge to be added to base. * @param dist Distance of the new edge. * @return True if base + the new edge would be better than the path associated * with this annotation. @@ -227,7 +227,7 @@ bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint cap, * Determines if an extension to the given Path with the given parameters is * better than this path. * @param base Other path. - * @param cap Capacity of the new edge to be added to base. + * @param free_cap Capacity of the new edge to be added to base. * @param dist Distance of the new edge. * @return True if base + the new edge would be better than the path associated * with this annotation. diff --git a/src/linkgraph/refresh.cpp b/src/linkgraph/refresh.cpp index 89ad3ce740..501f063520 100644 --- a/src/linkgraph/refresh.cpp +++ b/src/linkgraph/refresh.cpp @@ -1,4 +1,4 @@ -/* $Id: refresh.cpp 27614 2016-07-10 12:17:00Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index edd692e9eb..42067ebcf9 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -1,4 +1,4 @@ -/* $Id: refresh.h 27614 2016-07-10 12:17:00Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/livery.h b/src/livery.h index f932f40993..d6ed5bfdc7 100644 --- a/src/livery.h +++ b/src/livery.h @@ -1,4 +1,4 @@ -/* $Id: livery.h 22411 2011-05-02 17:42:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -69,12 +69,16 @@ enum LiveryClass { LC_ROAD, LC_SHIP, LC_AIRCRAFT, + LC_GROUP_RAIL, + LC_GROUP_ROAD, + LC_GROUP_SHIP, + LC_GROUP_AIRCRAFT, LC_END }; /** Information about a particular livery. */ struct Livery { - bool in_use; ///< Set if this livery should be used instead of the default livery. + byte in_use; ///< Bit 0 set if this livery should override the default livery first colour, Bit 1 for the second colour. byte colour1; ///< First colour, for all vehicles. byte colour2; ///< Second colour, for vehicles with 2CC support. }; diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 64002fc2d6..856b2df512 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: main_gui.cpp 27571 2016-05-22 10:07:48Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,6 +32,7 @@ #include "linkgraph/linkgraph_gui.h" #include "tilehighlight_func.h" #include "hotkeys.h" +#include "guitimer_func.h" #include "saveload/saveload.h" @@ -236,10 +237,11 @@ enum { struct MainWindow : Window { - uint refresh; + GUITimer refresh; - static const uint LINKGRAPH_REFRESH_PERIOD = 0xff; - static const uint LINKGRAPH_DELAY = 0xf; + /* Refresh times in milliseconds */ + static const uint LINKGRAPH_REFRESH_PERIOD = 7650; + static const uint LINKGRAPH_DELAY = 450; MainWindow(WindowDesc *desc) : Window(desc) { @@ -251,14 +253,14 @@ struct MainWindow : Window nvp->InitializeViewport(this, TileXY(32, 32), ZOOM_LVL_VIEWPORT); this->viewport->overlay = new LinkGraphOverlay(this, WID_M_VIEWPORT, 0, 0, 3); - this->refresh = LINKGRAPH_DELAY; + this->refresh.SetInterval(LINKGRAPH_DELAY); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->refresh > 0) return; + if (!this->refresh.Elapsed(delta_ms)) return; - this->refresh = LINKGRAPH_REFRESH_PERIOD; + this->refresh.SetInterval(LINKGRAPH_REFRESH_PERIOD); if (this->viewport->overlay->GetCargoMask() == 0 || this->viewport->overlay->GetCompanyMask() == 0) { @@ -439,12 +441,12 @@ struct MainWindow : Window this->viewport->scrollpos_y += ScaleByZoom(delta.y, this->viewport->zoom); this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x; this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y; - this->refresh = LINKGRAPH_DELAY; + this->refresh.SetInterval(LINKGRAPH_DELAY); } virtual void OnMouseWheel(int wheel) { - if (_settings_client.gui.scrollwheel_scrolling == 0) { + if (_settings_client.gui.scrollwheel_scrolling != 2) { ZoomInOrOutToCursorWindow(wheel < 0, this); } } @@ -454,7 +456,7 @@ struct MainWindow : Window if (this->viewport != NULL) { NWidgetViewport *nvp = this->GetWidget(WID_M_VIEWPORT); nvp->UpdateViewportCoordinates(this); - this->refresh = LINKGRAPH_DELAY; + this->refresh.SetInterval(LINKGRAPH_DELAY); } } diff --git a/src/map.cpp b/src/map.cpp index 709e249990..85590c3e88 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1,4 +1,4 @@ -/* $Id: map.cpp 26503 2014-04-24 18:49:24Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -87,7 +87,7 @@ TileIndex TileAdd(TileIndex tile, TileIndexDiff add, seprintf(buf, lastof(buf), "TILE_ADD(%s) when adding 0x%.4X and 0x%.4X failed", exp, tile, add); -#if !defined(_MSC_VER) || defined(WINCE) +#if !defined(_MSC_VER) fprintf(stderr, "%s:%d %s\n", file, line, buf); #else _assert(buf, (char*)file, line); @@ -269,7 +269,7 @@ bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, v /* If tile test is not successful, get one tile up, * ready for a test in first circle around center tile */ - *tile = TILE_ADD(*tile, TileOffsByDir(DIR_N)); + *tile = TileAddByDir(*tile, DIR_N); return CircularTileSearch(tile, size / 2, 1, 1, proc, user_data); } else { return CircularTileSearch(tile, size / 2, 0, 0, proc, user_data); diff --git a/src/map_func.h b/src/map_func.h index 83ae75ce7c..21d69b1382 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -1,4 +1,4 @@ -/* $Id: map_func.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -147,7 +147,7 @@ static inline uint ScaleByMapSize1D(uint n) * An offset value between to tiles. * * This value is used for the difference between - * to tiles. It can be added to a tileindex to get + * two tiles. It can be added to a tileindex to get * the resulting tileindex of the start tile applied * with this saved difference. * @@ -362,6 +362,18 @@ static inline TileIndexDiff TileOffsByDir(Direction dir) return ToTileIndexDiff(_tileoffs_by_dir[dir]); } +/** + * Adds a Direction to a tile. + * + * @param tile The current tile + * @param dir The direction in which we want to step + * @return the moved tile + */ +static inline TileIndex TileAddByDir(TileIndex tile, Direction dir) +{ + return TILE_ADD(tile, TileOffsByDir(dir)); +} + /** * Adds a DiagDir to a tile. * diff --git a/src/map_type.h b/src/map_type.h index 0350be4327..0c57d37700 100644 --- a/src/map_type.h +++ b/src/map_type.h @@ -1,4 +1,4 @@ -/* $Id: map_type.h 27132 2015-02-01 12:25:51Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -33,8 +33,9 @@ assert_compile(sizeof(Tile) == 8); * Look at docs/landscape.html for the exact meaning of the members. */ struct TileExtended { - byte m6; ///< General purpose - byte m7; ///< Primarily used for newgrf support + byte m6; ///< General purpose + byte m7; ///< Primarily used for newgrf support + uint16 m8; ///< General purpose }; /** @@ -70,7 +71,7 @@ static const uint MAX_MAP_SIZE = 1 << MAX_MAP_SIZE_BITS; ///< Maximal map s * Approximation of the length of a straight track, relative to a diagonal * track (ie the size of a tile side). * - * #defined instead of const so it can + * \#defined instead of const so it can * stay integer. (no runtime float operations) Is this needed? * Watch out! There are _no_ brackets around here, to prevent intermediate * rounding! Be careful when using this! diff --git a/src/misc.cpp b/src/misc.cpp index 4ca208b31c..f26d8e4909 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -1,4 +1,4 @@ -/* $Id: misc.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -42,6 +42,7 @@ void InitializeRailGui(); void InitializeRoadGui(); void InitializeAirportGui(); void InitializeDockGui(); +void InitializeGraphGui(); void InitializeObjectGui(); void InitializeIndustries(); void InitializeObjects(); @@ -87,6 +88,7 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin InitializeRoadGui(); InitializeAirportGui(); InitializeDockGui(); + InitializeGraphGui(); InitializeObjectGui(); InitializeAIGui(); InitializeTrees(); diff --git a/src/misc/array.hpp b/src/misc/array.hpp index 02958b6a32..c49f2afc44 100644 --- a/src/misc/array.hpp +++ b/src/misc/array.hpp @@ -1,4 +1,4 @@ -/* $Id: array.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp index 9d3623f087..5bd2b794ac 100644 --- a/src/misc/binaryheap.hpp +++ b/src/misc/binaryheap.hpp @@ -1,4 +1,4 @@ -/* $Id: binaryheap.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp index 7afb72619d..b1a5b667df 100644 --- a/src/misc/blob.hpp +++ b/src/misc/blob.hpp @@ -1,4 +1,4 @@ -/* $Id: blob.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/countedobj.cpp b/src/misc/countedobj.cpp index 7f9a289504..837d1c1770 100644 --- a/src/misc/countedobj.cpp +++ b/src/misc/countedobj.cpp @@ -1,4 +1,4 @@ -/* $Id: countedobj.cpp 27379 2015-08-10 20:04:31Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/countedptr.hpp b/src/misc/countedptr.hpp index 7fe9694870..e7b28a6267 100644 --- a/src/misc/countedptr.hpp +++ b/src/misc/countedptr.hpp @@ -1,4 +1,4 @@ -/* $Id: countedptr.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp index 83c1dd1064..22ccfa3464 100644 --- a/src/misc/dbg_helpers.cpp +++ b/src/misc/dbg_helpers.cpp @@ -1,4 +1,4 @@ -/* $Id: dbg_helpers.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -117,7 +117,7 @@ void DumpTarget::WriteIndent() } } -/** Write a line with indent at the beginning and at the end. */ +/** Write a line with indent at the beginning and \ at the end. */ void DumpTarget::WriteLine(const char *format, ...) { WriteIndent(); @@ -143,7 +143,7 @@ void DumpTarget::WriteTile(const char *name, TileIndex tile) } /** - * Open new structure (one level deeper than the current one) 'name = {'. + * Open new structure (one level deeper than the current one) 'name = {\'. */ void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr) { @@ -167,7 +167,7 @@ void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr) } /** - * Close structure '}'. + * Close structure '}\'. */ void DumpTarget::EndStruct() { diff --git a/src/misc/dbg_helpers.h b/src/misc/dbg_helpers.h index 313ec282cb..acc1437d09 100644 --- a/src/misc/dbg_helpers.h +++ b/src/misc/dbg_helpers.h @@ -1,4 +1,4 @@ -/* $Id: dbg_helpers.h 27362 2015-08-08 10:06:24Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp index a27e57dcce..c694ff7a17 100644 --- a/src/misc/fixedsizearray.hpp +++ b/src/misc/fixedsizearray.hpp @@ -1,4 +1,4 @@ -/* $Id: fixedsizearray.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/getoptdata.cpp b/src/misc/getoptdata.cpp index 829033fbe8..7859594dd9 100644 --- a/src/misc/getoptdata.cpp +++ b/src/misc/getoptdata.cpp @@ -1,4 +1,4 @@ -/* $Id: getoptdata.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc/getoptdata.h b/src/misc/getoptdata.h index a4b1d75e2b..4ce916aa1e 100644 --- a/src/misc/getoptdata.h +++ b/src/misc/getoptdata.h @@ -1,4 +1,4 @@ -/* $Id: getoptdata.h 23245 2011-11-17 21:18:24Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -34,7 +34,7 @@ struct GetOptData { int numleft; ///< Number of arguments left in #argv. char **argv; ///< Remaining command line arguments. const OptionData *options; ///< Command line option descriptions. - char *cont; ///< Next call to #MyGetOpt should start here (in the middle of an argument). + char *cont; ///< Next call to #GetOpt should start here (in the middle of an argument). /** * Constructor of the data store. diff --git a/src/misc/hashtable.hpp b/src/misc/hashtable.hpp index a2705789a7..1078f1861d 100644 --- a/src/misc/hashtable.hpp +++ b/src/misc/hashtable.hpp @@ -1,4 +1,4 @@ -/* $Id: hashtable.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -161,12 +161,10 @@ protected: /** static helper - return hash for the given key modulo number of slots */ inline static int CalcHash(const Tkey &key) { - int32 hash = key.CalcHash(); - if ((8 * Thash_bits) < 32) hash ^= hash >> (min(8 * Thash_bits, 31)); - if ((4 * Thash_bits) < 32) hash ^= hash >> (min(4 * Thash_bits, 31)); - if ((2 * Thash_bits) < 32) hash ^= hash >> (min(2 * Thash_bits, 31)); - if ((1 * Thash_bits) < 32) hash ^= hash >> (min(1 * Thash_bits, 31)); - hash &= (1 << Thash_bits) - 1; + uint32 hash = key.CalcHash(); + hash -= (hash >> 17); // hash * 131071 / 131072 + hash -= (hash >> 5); // * 31 / 32 + hash &= (1 << Thash_bits) - 1; // modulo slots return hash; } diff --git a/src/misc/str.hpp b/src/misc/str.hpp index a03c50fecc..1d9802288c 100644 --- a/src/misc/str.hpp +++ b/src/misc/str.hpp @@ -1,4 +1,4 @@ -/* $Id: str.hpp 27362 2015-08-08 10:06:24Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 688ceace44..e7da13c7aa 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: misc_cmd.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 05f24970ce..38ba761cf2 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: misc_gui.cpp 27995 2018-03-21 19:34:17Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -27,6 +27,7 @@ #include "newgrf_debug.h" #include "newgrf_cargo.h" #include "zoom_func.h" +#include "guitimer_func.h" #include "widgets/misc_widget.h" @@ -155,6 +156,7 @@ public: DEBUG(misc, LANDINFOD_LEVEL, "m5 = %#x", _m[tile].m5); DEBUG(misc, LANDINFOD_LEVEL, "m6 = %#x", _me[tile].m6); DEBUG(misc, LANDINFOD_LEVEL, "m7 = %#x", _me[tile].m7); + DEBUG(misc, LANDINFOD_LEVEL, "m8 = %#x", _me[tile].m8); #undef LANDINFOD_LEVEL } @@ -217,11 +219,8 @@ public: StringID str = STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A; Company *c = Company::GetIfValid(_local_company); if (c != NULL) { - Money old_money = c->money; - c->money = INT64_MAX; assert(_current_company == _local_company); - CommandCost costclear = DoCommand(tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR); - c->money = old_money; + CommandCost costclear = DoCommand(tile, 0, 0, DC_QUERY_COST, CMD_LANDSCAPE_CLEAR); if (costclear.Succeeded()) { Money cost = costclear.GetCost(); if (cost < 0) { @@ -344,10 +343,7 @@ public: for (CargoID i = 0; i < NUM_CARGO; ++i) { if (acceptance[i] > 0) { /* Add a comma between each item. */ - if (found) { - *strp++ = ','; - *strp++ = ' '; - } + if (found) strp = strecpy(strp, ", ", lastof(this->landinfo_data[LAND_INFO_MULTICENTER_LINE])); found = true; /* If the accepted value is less than 8, show it in 1/8:ths */ @@ -453,6 +449,7 @@ static const char * const _credits[] = { " Christoph Elsenhans (frosch) - General coding (since 0.6)", " Lo\xC3\xAF""c Guilloux (glx) - General / Windows Expert (since 0.4.5)", " Michael Lutz (michi_cc) - Path based signals (since 0.7)", + " Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)", " Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)", " Peter Nelson (peter1138) - Spiritual descendant from NewGRF gods (since 0.4.5)", " Ingo von Borstel (planetmaker) - General, Support (since 1.1)", @@ -490,7 +487,6 @@ static const char * const _credits[] = { " Mike Ragsdale - OpenTTD installer", " Christian Rosentreter (tokai) - MorphOS / AmigaOS port", " Richard Kempton (richK) - additional airports, initial TGP implementation", - " Emperor Jake - titlegame", "", " Alberto Demichelis - Squirrel scripting language \xC2\xA9 2003-2008", " L. Peter Deutsch - MD5 implementation \xC2\xA9 1999, 2000, 2002", @@ -508,16 +504,18 @@ static const char * const _credits[] = { struct AboutWindow : public Window { int text_position; ///< The top of the scrolling text - byte counter; ///< Used to scroll the text every 5 ticks int line_height; ///< The height of a single line static const int num_visible_lines = 19; ///< The number of lines visible simultaneously + static const uint TIMER_INTERVAL = 150; ///< Scrolling interval in ms + GUITimer timer; + AboutWindow() : Window(&_about_desc) { this->InitNested(WN_GAME_OPTIONS_ABOUT); - this->counter = 5; this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y; + this->timer.SetInterval(TIMER_INTERVAL); } virtual void SetStringParameters(int widget) const @@ -556,11 +554,11 @@ struct AboutWindow : public Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->counter == 0) { - this->counter = 5; - this->text_position--; + uint count = this->timer.CountElapsed(delta_ms); + if (count > 0) { + this->text_position -= count; /* If the last text has scrolled start a new from the start */ if (this->text_position < (int)(this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y - lengthof(_credits) * this->line_height)) { this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y; @@ -709,7 +707,7 @@ struct TooltipsWindow : public Window this->string_id = str; assert_compile(sizeof(this->params[0]) == sizeof(params[0])); assert(paramcount <= lengthof(this->params)); - memcpy(this->params, params, sizeof(this->params[0]) * paramcount); + if (paramcount > 0) memcpy(this->params, params, sizeof(this->params[0]) * paramcount); this->paramcount = paramcount; this->close_cond = close_tooltip; @@ -787,7 +785,7 @@ struct TooltipsWindow : public Window * @param str String to be displayed * @param paramcount number of params to deal with * @param params (optional) up to 5 pieces of additional information that may be added to a tooltip - * @param use_left_mouse_button close the tooltip when the left (true) or right (false) mouse button is released + * @param close_tooltip when the left (true) or right (false) mouse button is released */ void GuiShowTooltips(Window *parent, StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_tooltip) { @@ -1123,7 +1121,7 @@ void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *paren */ struct QueryWindow : public Window { QueryCallbackProc *proc; ///< callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise - uint64 params[10]; ///< local copy of _decode_parameters + uint64 params[10]; ///< local copy of #_global_string_params StringID message; ///< message shown for query window StringID caption; ///< title of window diff --git a/src/mixer.cpp b/src/mixer.cpp index d5ff3a4a85..6014f6082e 100644 --- a/src/mixer.cpp +++ b/src/mixer.cpp @@ -1,4 +1,4 @@ -/* $Id: mixer.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,8 +12,10 @@ #include "stdafx.h" #include #include "core/math_func.hpp" +#include "framerate_type.h" #include "safeguards.h" +#include "mixer.h" struct MixerChannel { bool active; @@ -37,6 +39,7 @@ struct MixerChannel { static MixerChannel _channels[8]; static uint32 _play_rate = 11025; static uint32 _max_size = UINT_MAX; +static MxStreamCallback _music_stream = NULL; /** * The theoretical maximum volume for a single sound sample. Multiple sound @@ -138,11 +141,21 @@ static void MxCloseChannel(MixerChannel *mc) void MxMixSamples(void *buffer, uint samples) { + PerformanceMeasurer framerate(PFE_SOUND); + static uint last_samples = 0; + if (samples != last_samples) { + framerate.SetExpectedRate((double)_play_rate / samples); + last_samples = samples; + } + MixerChannel *mc; /* Clear the buffer */ memset(buffer, 0, sizeof(int16) * 2 * samples); + /* Fetch music if a sampled stream is available */ + if (_music_stream) _music_stream((int16*)buffer, samples); + /* Mix each channel */ for (mc = _channels; mc != endof(_channels); mc++) { if (mc->active) { @@ -207,6 +220,17 @@ void MxSetChannelVolume(MixerChannel *mc, uint volume, float pan) void MxActivateChannel(MixerChannel *mc) { mc->active = true; +} + +/** + * Set source of PCM music + * @param music_callback Function that will be called to fill sample buffers with music data. + * @return Sample rate of mixer, which the buffers supplied to the callback must be rendered at. + */ +uint32 MxSetMusicSource(MxStreamCallback music_callback) +{ + _music_stream = music_callback; + return _play_rate; } @@ -214,5 +238,6 @@ bool MxInitialize(uint rate) { _play_rate = rate; _max_size = UINT_MAX / _play_rate; + _music_stream = NULL; /* rate may have changed, any music source is now invalid */ return true; } diff --git a/src/mixer.h b/src/mixer.h index e1894cbea7..9766682d6b 100644 --- a/src/mixer.h +++ b/src/mixer.h @@ -1,4 +1,4 @@ -/* $Id: mixer.h 19332 2010-03-06 11:08:31Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,14 @@ struct MixerChannel; +/** + * Type of callback functions for supplying PCM music. + * A music decoder/renderer implements this function and installs it with MxSetMusicSource, which also returns the sample rate used. + * @param buffer Pointer to interleaved 2-channel signed 16 bit PCM data buffer, guaranteed to be 0-initialized. + * @param samples number of samples that must be filled into \c buffer. + */ +typedef void(*MxStreamCallback)(int16 *buffer, size_t samples); + bool MxInitialize(uint rate); void MxMixSamples(void *buffer, uint samples); @@ -22,4 +30,6 @@ void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, size_t size, uint rate, boo void MxSetChannelVolume(MixerChannel *mc, uint volume, float pan); void MxActivateChannel(MixerChannel*); +uint32 MxSetMusicSource(MxStreamCallback music_callback); + #endif /* MIXER_H */ diff --git a/src/music.cpp b/src/music.cpp index 9222dc660f..3d0e40bf9b 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -1,4 +1,4 @@ -/* $Id: music.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -11,11 +11,69 @@ #include "stdafx.h" + /** The type of set we're replacing */ #define SET_TYPE "music" #include "base_media_func.h" #include "safeguards.h" +#include "fios.h" + + +/** + * Read the name of a music CAT file entry. + * @param filename Name of CAT file to read from + * @param entrynum Index of entry whose name to read + * @return Pointer to string, caller is responsible for freeing memory, + * NULL if entrynum does not exist. + */ +char *GetMusicCatEntryName(const char *filename, size_t entrynum) +{ + if (!FioCheckFileExists(filename, BASESET_DIR)) return NULL; + + FioOpenFile(CONFIG_SLOT, filename, BASESET_DIR); + uint32 ofs = FioReadDword(); + size_t entry_count = ofs / 8; + if (entrynum < entry_count) { + FioSeekTo(entrynum * 8, SEEK_SET); + FioSeekTo(FioReadDword(), SEEK_SET); + byte namelen = FioReadByte(); + char *name = MallocT(namelen + 1); + FioReadBlock(name, namelen); + name[namelen] = '\0'; + return name; + } + return NULL; +} + +/** + * Read the full data of a music CAT file entry. + * @param filename Name of CAT file to read from. + * @param entrynum Index of entry to read + * @param[out] entrylen Receives length of data read + * @return Pointer to buffer with data read, caller is responsible for freeind memory, + * NULL if entrynum does not exist. + */ +byte *GetMusicCatEntryData(const char *filename, size_t entrynum, size_t &entrylen) +{ + entrylen = 0; + if (!FioCheckFileExists(filename, BASESET_DIR)) return NULL; + + FioOpenFile(CONFIG_SLOT, filename, BASESET_DIR); + uint32 ofs = FioReadDword(); + size_t entry_count = ofs / 8; + if (entrynum < entry_count) { + FioSeekTo(entrynum * 8, SEEK_SET); + size_t entrypos = FioReadDword(); + entrylen = FioReadDword(); + FioSeekTo(entrypos, SEEK_SET); + FioSkipBytes(FioReadByte()); + byte *data = MallocT(entrylen); + FioReadBlock(data, entrylen); + return data; + } + return NULL; +} INSTANTIATE_BASE_MEDIA_METHODS(BaseMedia, MusicSet) @@ -66,34 +124,73 @@ bool MusicSet::FillSetDetails(IniFile *ini, const char *path, const char *full_f if (ret) { this->num_available = 0; IniGroup *names = ini->GetGroup("names"); - for (uint i = 0, j = 1; i < lengthof(this->song_name); i++) { + IniGroup *catindex = ini->GetGroup("catindex"); + IniGroup *timingtrim = ini->GetGroup("timingtrim"); + uint tracknr = 1; + for (uint i = 0; i < lengthof(this->songinfo); i++) { const char *filename = this->files[i].filename; - if (names == NULL || StrEmpty(filename)) { - this->song_name[i][0] = '\0'; + if (names == NULL || StrEmpty(filename) || this->files[i].check_result == MD5File::CR_NO_FILE) { + this->songinfo[i].songname[0] = '\0'; continue; } - IniItem *item = NULL; + this->songinfo[i].filename = filename; // non-owned pointer + + IniItem *item = catindex->GetItem(_music_file_names[i], false); + if (item != NULL && !StrEmpty(item->value)) { + /* Song has a CAT file index, assume it's MPS MIDI format */ + this->songinfo[i].filetype = MTT_MPSMIDI; + this->songinfo[i].cat_index = atoi(item->value); + char *songname = GetMusicCatEntryName(filename, this->songinfo[i].cat_index); + if (songname == NULL) { + DEBUG(grf, 0, "Base music set song missing from CAT file: %s/%d", filename, this->songinfo[i].cat_index); + this->songinfo[i].songname[0] = '\0'; + continue; + } + strecpy(this->songinfo[i].songname, songname, lastof(this->songinfo[i].songname)); + free(songname); + } else { + this->songinfo[i].filetype = MTT_STANDARDMIDI; + } + + const char *trimmed_filename = filename; /* As we possibly add a path to the filename and we compare * on the filename with the path as in the .obm, we need to * keep stripping path elements until we find a match. */ - for (const char *p = filename; p != NULL; p = strchr(p, PATHSEPCHAR)) { + for (; trimmed_filename != NULL; trimmed_filename = strchr(trimmed_filename, PATHSEPCHAR)) { /* Remove possible double path separator characters from * the beginning, so we don't start reading e.g. root. */ - while (*p == PATHSEPCHAR) p++; + while (*trimmed_filename == PATHSEPCHAR) trimmed_filename++; - item = names->GetItem(p, false); + item = names->GetItem(trimmed_filename, false); if (item != NULL && !StrEmpty(item->value)) break; } - if (item == NULL || StrEmpty(item->value)) { - DEBUG(grf, 0, "Base music set song name missing: %s", filename); - return false; + if (this->songinfo[i].filetype == MTT_STANDARDMIDI) { + if (item != NULL && !StrEmpty(item->value)) { + strecpy(this->songinfo[i].songname, item->value, lastof(this->songinfo[i].songname)); + } else { + DEBUG(grf, 0, "Base music set song name missing: %s", filename); + return false; + } + } + this->num_available++; + + /* Number the theme song (if any) track 0, rest are normal */ + if (i == 0) { + this->songinfo[i].tracknr = 0; + } else { + this->songinfo[i].tracknr = tracknr++; } - strecpy(this->song_name[i], item->value, lastof(this->song_name[i])); - this->track_nr[i] = j++; - this->num_available++; + item = timingtrim->GetItem(trimmed_filename, false); + if (item != NULL && !StrEmpty(item->value)) { + const char *endpos = strchr(item->value, ':'); + if (endpos != NULL) { + this->songinfo[i].override_start = atoi(item->value); + this->songinfo[i].override_end = atoi(endpos + 1); + } + } } } return ret; diff --git a/src/music/allegro_m.cpp b/src/music/allegro_m.cpp index 95c8737432..906aec84fc 100644 --- a/src/music/allegro_m.cpp +++ b/src/music/allegro_m.cpp @@ -1,4 +1,4 @@ -/* $Id: allegro_m.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,7 @@ #include "../stdafx.h" #include "../debug.h" #include "allegro_m.h" +#include "midifile.hpp" #include #include "../safeguards.h" @@ -58,11 +59,17 @@ void MusicDriver_Allegro::Stop() if (--_allegro_instance_count == 0) allegro_exit(); } -void MusicDriver_Allegro::PlaySong(const char *filename) +void MusicDriver_Allegro::PlaySong(const MusicSongInfo &song) { + std::string filename = MidiFile::GetSMFFile(song); + if (_midi != NULL) destroy_midi(_midi); - _midi = load_midi(filename); - play_midi(_midi, false); + if (!filename.empty()) { + _midi = load_midi(filename.c_str()); + play_midi(_midi, false); + } else { + _midi = NULL; + } } void MusicDriver_Allegro::StopSong() diff --git a/src/music/allegro_m.h b/src/music/allegro_m.h index d436ce0257..65d8ab811d 100644 --- a/src/music/allegro_m.h +++ b/src/music/allegro_m.h @@ -1,4 +1,4 @@ -/* $Id: allegro_m.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/bemidi.cpp b/src/music/bemidi.cpp index e1c7f90bba..ff56d787f1 100644 --- a/src/music/bemidi.cpp +++ b/src/music/bemidi.cpp @@ -1,4 +1,4 @@ -/* $Id: bemidi.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,6 +12,8 @@ #include "../stdafx.h" #include "../openttd.h" #include "bemidi.h" +#include "../base_media_base.h" +#include "midifile.hpp" /* BeOS System Includes */ #include @@ -34,13 +36,17 @@ void MusicDriver_BeMidi::Stop() midiSynthFile.UnloadFile(); } -void MusicDriver_BeMidi::PlaySong(const char *filename) +void MusicDriver_BeMidi::PlaySong(const MusicSongInfo &song) { + std::string filename = MidiFile::GetSMFFile(song); + this->Stop(); - entry_ref midiRef; - get_ref_for_path(filename, &midiRef); - midiSynthFile.LoadFile(&midiRef); - midiSynthFile.Start(); + if (!filename.empty()) { + entry_ref midiRef; + get_ref_for_path(filename.c_str(), &midiRef); + midiSynthFile.LoadFile(&midiRef); + midiSynthFile.Start(); + } } void MusicDriver_BeMidi::StopSong() diff --git a/src/music/bemidi.h b/src/music/bemidi.h index 9e895c73cf..7c546525d2 100644 --- a/src/music/bemidi.h +++ b/src/music/bemidi.h @@ -1,4 +1,4 @@ -/* $Id: bemidi.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/cocoa_m.cpp b/src/music/cocoa_m.cpp index 935d7bd2f1..2416cade0f 100644 --- a/src/music/cocoa_m.cpp +++ b/src/music/cocoa_m.cpp @@ -1,4 +1,4 @@ -/* $Id: cocoa_m.cpp 27675 2016-10-31 19:29:01Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,15 +18,13 @@ #include "../stdafx.h" #include "../os/macosx/macos.h" #include "cocoa_m.h" +#include "midifile.hpp" #include "../debug.h" +#include "../base_media_base.h" -#define Rect OTTDRect -#define Point OTTDPoint #include #include #include -#undef Rect -#undef Point #include "../safeguards.h" @@ -141,11 +139,13 @@ void MusicDriver_Cocoa::Stop() /** * Starts playing a new song. * - * @param filename Path to a MIDI file. + * @param song Description of music to load and play */ -void MusicDriver_Cocoa::PlaySong(const char *filename) +void MusicDriver_Cocoa::PlaySong(const MusicSongInfo &song) { - DEBUG(driver, 2, "cocoa_m: trying to play '%s'", filename); + std::string filename = MidiFile::GetSMFFile(song); + + DEBUG(driver, 2, "cocoa_m: trying to play '%s'", filename.c_str()); this->StopSong(); if (_sequence != NULL) { @@ -153,12 +153,14 @@ void MusicDriver_Cocoa::PlaySong(const char *filename) _sequence = NULL; } + if (filename.empty()) return; + if (NewMusicSequence(&_sequence) != noErr) { DEBUG(driver, 0, "cocoa_m: Failed to create music sequence"); return; } - const char *os_file = OTTD2FS(filename); + const char *os_file = OTTD2FS(filename.c_str()); CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8*)os_file, strlen(os_file), false); #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) @@ -218,7 +220,7 @@ void MusicDriver_Cocoa::PlaySong(const char *filename) if (MusicPlayerStart(_player) != noErr) return; _playing = true; - DEBUG(driver, 3, "cocoa_m: playing '%s'", filename); + DEBUG(driver, 3, "cocoa_m: playing '%s'", filename.c_str()); } diff --git a/src/music/cocoa_m.h b/src/music/cocoa_m.h index caca2ae097..fdb10b84e6 100644 --- a/src/music/cocoa_m.h +++ b/src/music/cocoa_m.h @@ -1,4 +1,4 @@ -/* $Id: cocoa_m.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -20,7 +20,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index 974bf483e8..fece709fda 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -1,4 +1,4 @@ -/* $Id: dmusic.cpp 27380 2015-08-10 20:21:29Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,87 +19,1099 @@ #include "../debug.h" #include "../os/windows/win32.h" #include "../core/mem_func.hpp" +#include "../thread/thread.h" +#include "../fileio_func.h" +#include "../base_media_base.h" #include "dmusic.h" +#include "midifile.hpp" +#include "midi.h" #include -#undef FACILITY_DIRECTMUSIC // Needed for newer Windows SDK version. #include -#include #include -#include +#include #include "../safeguards.h" -static FMusicDriver_DMusic iFMusicDriver_DMusic; +#if defined(_MSC_VER) +# pragma comment(lib, "ole32.lib") +#endif /* defined(_MSC_VER) */ -/** the direct music object manages buffers and ports */ -static IDirectMusic *music = NULL; - -/** the performance object controls manipulation of the segments */ -static IDirectMusicPerformance *performance = NULL; - -/** the loader object can load many types of DMusic related files */ -static IDirectMusicLoader *loader = NULL; - -/** the segment object is where the MIDI data is stored for playback */ -static IDirectMusicSegment *segment = NULL; - -static bool seeking = false; +static const int MS_TO_REFTIME = 1000 * 10; ///< DirectMusic time base is 100 ns. +static const int MIDITIME_TO_REFTIME = 10; ///< Time base of the midi file reader is 1 us. -#define M(x) x "\0" -static const char ole_files[] = - M("ole32.dll") - M("CoCreateInstance") - M("CoInitialize") - M("CoUninitialize") - M("") -; -#undef M +#define FOURCC_INFO mmioFOURCC('I','N','F','O') +#define FOURCC_fmt mmioFOURCC('f','m','t',' ') +#define FOURCC_data mmioFOURCC('d','a','t','a') -struct ProcPtrs { - unsigned long (WINAPI * CoCreateInstance)(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv); - HRESULT (WINAPI * CoInitialize)(LPVOID pvReserved); - void (WINAPI * CoUninitialize)(); +/** A DLS file. */ +struct DLSFile { + /** An instrument region maps a note range to wave data. */ + struct DLSRegion { + RGNHEADER hdr; + WAVELINK wave; + WSMPL wave_sample; + + std::vector wave_loops; + std::vector articulators; + }; + + /** Instrument definition read from a DLS file. */ + struct DLSInstrument { + INSTHEADER hdr; + + std::vector articulators; + std::vector regions; + }; + + /** Wave data definition from a DLS file. */ + struct DLSWave { + long file_offset; + + PCMWAVEFORMAT fmt; + std::vector data; + + WSMPL wave_sample; + std::vector wave_loops; + + bool operator ==(long offset) const { + return this->file_offset == offset; + } + }; + + std::vector instruments; + std::vector pool_cues; + std::vector waves; + + /** Try loading a DLS file into memory. */ + bool LoadFile(const TCHAR *file); + +private: + /** Load an articulation structure from a DLS file. */ + bool ReadDLSArticulation(FILE *f, DWORD list_length, std::vector &out); + /** Load a list of regions from a DLS file. */ + bool ReadDLSRegionList(FILE *f, DWORD list_length, DLSInstrument &instrument); + /** Load a single region from a DLS file. */ + bool ReadDLSRegion(FILE *f, DWORD list_length, std::vector &out); + /** Load a list of instruments from a DLS file. */ + bool ReadDLSInstrumentList(FILE *f, DWORD list_length); + /** Load a single instrument from a DLS file. */ + bool ReadDLSInstrument(FILE *f, DWORD list_length); + /** Load a list of waves from a DLS file. */ + bool ReadDLSWaveList(FILE *f, DWORD list_length); + /** Load a single wave from a DLS file. */ + bool ReadDLSWave(FILE *f, DWORD list_length, long offset); }; -static ProcPtrs proc; +/** A RIFF chunk header. */ +PACK_N(struct ChunkHeader { + FOURCC type; ///< Chunk type. + DWORD length; ///< Length of the chunk, not including the chunk header itself. +}, 2); + +/** Buffer format for a DLS wave download. */ +PACK_N(struct WAVE_DOWNLOAD { + DMUS_DOWNLOADINFO dlInfo; + ULONG ulOffsetTable[2]; + DMUS_WAVE dmWave; + DMUS_WAVEDATA dmWaveData; +}, 2); + +struct PlaybackSegment { + uint32 start, end; + size_t start_block; + bool loop; +}; + +static struct { + bool shutdown; ///< flag to indicate playback thread shutdown + bool playing; ///< flag indicating that playback is active + bool do_start; ///< flag for starting playback of next_file at next opportunity + bool do_stop; ///< flag for stopping playback at next opportunity + + int preload_time; ///< preload time for music blocks. + byte new_volume; ///< volume setting to change to + + MidiFile next_file; ///< upcoming file to play + PlaybackSegment next_segment; ///< segment info for upcoming file +} _playback; + +/** Handle to our worker thread. */ +static ThreadObject *_dmusic_thread = NULL; +/** Event to signal the thread that it should look at a state change. */ +static HANDLE _thread_event = NULL; +/** Lock access to playback data that is not thread-safe. */ +static ThreadMutex *_thread_mutex = NULL; + +/** The direct music object manages buffers and ports. */ +static IDirectMusic *_music = NULL; +/** The port object lets us send MIDI data to the synthesizer. */ +static IDirectMusicPort *_port = NULL; +/** The buffer object collects the data to sent. */ +static IDirectMusicBuffer *_buffer = NULL; +/** List of downloaded DLS instruments. */ +static std::vector _dls_downloads; + + +static FMusicDriver_DMusic iFMusicDriver_DMusic; + + +bool DLSFile::ReadDLSArticulation(FILE *f, DWORD list_length, std::vector &out) +{ + while (list_length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_ART1) { + CONNECTIONLIST conns; + if (fread(&conns, sizeof(conns), 1, f) != 1) return false; + fseek(f, conns.cbSize - sizeof(conns), SEEK_CUR); + + /* Read all defined articulations. */ + for (ULONG i = 0; i < conns.cConnections; i++) { + CONNECTION con; + if (fread(&con, sizeof(con), 1, f) != 1) return false; + out.push_back(con); + } + } else { + fseek(f, chunk.length, SEEK_CUR); + } + } + + return true; +} + +bool DLSFile::ReadDLSRegion(FILE *f, DWORD list_length, std::vector &out) +{ + out.push_back(DLSRegion()); + DLSRegion ®ion = out.back(); + + /* Set default values. */ + region.wave_sample.cbSize = 0; + + while (list_length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + /* Unwrap list header. */ + if (fread(&chunk.type, sizeof(chunk.type), 1, f) != 1) return false; + chunk.length -= sizeof(chunk.type); + } + + switch (chunk.type) { + case FOURCC_RGNH: + if (fread(®ion.hdr, sizeof(region.hdr), 1, f) != 1) return false; + break; + + case FOURCC_WSMP: + if (fread(®ion.wave_sample, sizeof(region.wave_sample), 1, f) != 1) return false; + fseek(f, region.wave_sample.cbSize - sizeof(region.wave_sample), SEEK_CUR); + + /* Read all defined sample loops. */ + for (ULONG i = 0; i < region.wave_sample.cSampleLoops; i++) { + WLOOP loop; + if (fread(&loop, sizeof(loop), 1, f) != 1) return false; + region.wave_loops.push_back(loop); + } + break; + + case FOURCC_WLNK: + if (fread(®ion.wave, sizeof(region.wave), 1, f) != 1) return false; + break; + + case FOURCC_LART: // List chunk + if (!this->ReadDLSArticulation(f, chunk.length, region.articulators)) return false; + break; + + case FOURCC_INFO: + /* We don't care about info stuff. */ + fseek(f, chunk.length, SEEK_CUR); + break; + + default: + DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + break; + } + } + + return true; +} + +bool DLSFile::ReadDLSRegionList(FILE *f, DWORD list_length, DLSInstrument &instrument) +{ + while (list_length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + FOURCC list_type; + if (fread(&list_type, sizeof(list_type), 1, f) != 1) return false; + + if (list_type == FOURCC_RGN) { + this->ReadDLSRegion(f, chunk.length - sizeof(list_type), instrument.regions); + } else { + DEBUG(driver, 7, "DLS: Ignoring unkown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); + fseek(f, chunk.length - sizeof(list_type), SEEK_CUR); + } + } else { + DEBUG(driver, 7, "DLS: Ignoring chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + } + } + + return true; +} + +bool DLSFile::ReadDLSInstrument(FILE *f, DWORD list_length) +{ + this->instruments.push_back(DLSInstrument()); + DLSInstrument &instrument = this->instruments.back(); + + while (list_length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + /* Unwrap list header. */ + if (fread(&chunk.type, sizeof(chunk.type), 1, f) != 1) return false; + chunk.length -= sizeof(chunk.type); + } + + switch (chunk.type) { + case FOURCC_INSH: + if (fread(&instrument.hdr, sizeof(instrument.hdr), 1, f) != 1) return false; + break; + + case FOURCC_LART: // List chunk + if (!this->ReadDLSArticulation(f, chunk.length, instrument.articulators)) return false; + break; + + case FOURCC_LRGN: // List chunk + if (!this->ReadDLSRegionList(f, chunk.length, instrument)) return false; + break; + + case FOURCC_INFO: + /* We don't care about info stuff. */ + fseek(f, chunk.length, SEEK_CUR); + break; + + default: + DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + break; + } + } + + return true; +} + +bool DLSFile::ReadDLSInstrumentList(FILE *f, DWORD list_length) +{ + while (list_length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + FOURCC list_type; + if (fread(&list_type, sizeof(list_type), 1, f) != 1) return false; + + if (list_type == FOURCC_INS) { + DEBUG(driver, 6, "DLS: Reading instrument %d", (int)instruments.size()); + + if (!this->ReadDLSInstrument(f, chunk.length - sizeof(list_type))) return false; + } else { + DEBUG(driver, 7, "DLS: Ignoring unkown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); + fseek(f, chunk.length - sizeof(list_type), SEEK_CUR); + } + } else { + DEBUG(driver, 7, "DLS: Ignoring chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + } + } + + return true; +} + +bool DLSFile::ReadDLSWave(FILE *f, DWORD list_length, long offset) +{ + this->waves.push_back(DLSWave()); + DLSWave &wave = this->waves.back(); + + /* Set default values. */ + MemSetT(&wave.wave_sample, 0); + wave.wave_sample.cbSize = sizeof(WSMPL); + wave.wave_sample.usUnityNote = 60; + wave.file_offset = offset; // Store file offset so we can resolve the wave pool table later on. + + while (list_length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + /* Unwrap list header. */ + if (fread(&chunk.type, sizeof(chunk.type), 1, f) != 1) return false; + chunk.length -= sizeof(chunk.type); + } + + switch (chunk.type) { + case FOURCC_fmt: + if (fread(&wave.fmt, sizeof(wave.fmt), 1, f) != 1) return false; + if (chunk.length > sizeof(wave.fmt)) fseek(f, chunk.length - sizeof(wave.fmt), SEEK_CUR); + break; + + case FOURCC_WSMP: + if (fread(&wave.wave_sample, sizeof(wave.wave_sample), 1, f) != 1) return false; + fseek(f, wave.wave_sample.cbSize - sizeof(wave.wave_sample), SEEK_CUR); + + /* Read all defined sample loops. */ + for (ULONG i = 0; i < wave.wave_sample.cSampleLoops; i++) { + WLOOP loop; + if (fread(&loop, sizeof(loop), 1, f) != 1) return false; + wave.wave_loops.push_back(loop); + } + break; + + case FOURCC_data: + wave.data.resize(chunk.length); + if (fread(&wave.data[0], sizeof(BYTE), wave.data.size(), f) != wave.data.size()) return false; + break; + + case FOURCC_INFO: + /* We don't care about info stuff. */ + fseek(f, chunk.length, SEEK_CUR); + break; + + default: + DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + break; + } + } + + return true; +} + +bool DLSFile::ReadDLSWaveList(FILE *f, DWORD list_length) +{ + long base_offset = ftell(f); + + while (list_length > 0) { + long chunk_offset = ftell(f); + + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + list_length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + FOURCC list_type; + if (fread(&list_type, sizeof(list_type), 1, f) != 1) return false; + + if (list_type == FOURCC_wave) { + DEBUG(driver, 6, "DLS: Reading wave %d", (int)waves.size()); + + if (!this->ReadDLSWave(f, chunk.length - sizeof(list_type), chunk_offset - base_offset)) return false; + } else { + DEBUG(driver, 7, "DLS: Ignoring unkown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); + fseek(f, chunk.length - sizeof(list_type), SEEK_CUR); + } + } else { + DEBUG(driver, 7, "DLS: Ignoring chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + } + } + + return true; +} + +bool DLSFile::LoadFile(const TCHAR *file) +{ + DEBUG(driver, 2, "DMusic: Try to load DLS file %s", FS2OTTD(file)); + + FILE *f = _tfopen(file, _T("rb")); + if (f == NULL) return false; + + FileCloser f_scope(f); + + /* Check DLS file header. */ + ChunkHeader hdr; + FOURCC dls_type; + if (fread(&hdr, sizeof(hdr), 1, f) != 1) return false; + if (fread(&dls_type, sizeof(dls_type), 1, f) != 1) return false; + if (hdr.type != FOURCC_RIFF || dls_type != FOURCC_DLS) return false; + + hdr.length -= sizeof(FOURCC); + + DEBUG(driver, 2, "DMusic: Parsing DLS file"); + + DLSHEADER header; + MemSetT(&header, 0); + + /* Iterate over all chunks in the file. */ + while (hdr.length > 0) { + ChunkHeader chunk; + if (fread(&chunk, sizeof(chunk), 1, f) != 1) return false; + hdr.length -= chunk.length + sizeof(chunk); + + if (chunk.type == FOURCC_LIST) { + /* Unwrap list header. */ + if (fread(&chunk.type, sizeof(chunk.type), 1, f) != 1) return false; + chunk.length -= sizeof(chunk.type); + } + + switch (chunk.type) { + case FOURCC_COLH: + if (fread(&header, sizeof(header), 1, f) != 1) return false; + break; + + case FOURCC_LINS: // List chunk + if (!this->ReadDLSInstrumentList(f, chunk.length)) return false; + break; + + case FOURCC_WVPL: // List chunk + if (!this->ReadDLSWaveList(f, chunk.length)) return false; + break; + + case FOURCC_PTBL: + POOLTABLE ptbl; + if (fread(&ptbl, sizeof(ptbl), 1, f) != 1) return false; + fseek(f, ptbl.cbSize - sizeof(ptbl), SEEK_CUR); + + /* Read all defined cues. */ + for (ULONG i = 0; i < ptbl.cCues; i++) { + POOLCUE cue; + if (fread(&cue, sizeof(cue), 1, f) != 1) return false; + this->pool_cues.push_back(cue); + } + break; + + case FOURCC_INFO: + /* We don't care about info stuff. */ + fseek(f, chunk.length, SEEK_CUR); + break; + + default: + DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + fseek(f, chunk.length, SEEK_CUR); + break; + } + } + + /* Have we read as many instruments as indicated? */ + if (header.cInstruments != this->instruments.size()) return false; + + /* Resolve wave pool table. */ + for (std::vector::iterator cue = this->pool_cues.begin(); cue != this->pool_cues.end(); cue++) { + std::vector::iterator w = std::find(this->waves.begin(), this->waves.end(), cue->ulOffset); + if (w != this->waves.end()) { + cue->ulOffset = (ULONG)(w - this->waves.begin()); + } else { + cue->ulOffset = 0; + } + } + + return true; +} + + +static byte ScaleVolume(byte original, byte scale) +{ + return original * scale / 127; +} + +static void TransmitChannelMsg(IDirectMusicBuffer *buffer, REFERENCE_TIME rt, byte status, byte p1, byte p2 = 0) +{ + if (buffer->PackStructured(rt, 0, status | (p1 << 8) | (p2 << 16)) == E_OUTOFMEMORY) { + /* Buffer is full, clear it and try again. */ + _port->PlayBuffer(buffer); + buffer->Flush(); + + buffer->PackStructured(rt, 0, status | (p1 << 8) | (p2 << 16)); + } +} + +static void TransmitSysex(IDirectMusicBuffer *buffer, REFERENCE_TIME rt, byte *&msg_start, size_t &remaining) +{ + /* Find end of message. */ + byte *msg_end = msg_start; + while (*msg_end != MIDIST_ENDSYSEX) msg_end++; + msg_end++; // Also include SysEx end byte. + + if (buffer->PackUnstructured(rt, 0, msg_end - msg_start, msg_start) == E_OUTOFMEMORY) { + /* Buffer is full, clear it and try again. */ + _port->PlayBuffer(buffer); + buffer->Flush(); + + buffer->PackUnstructured(rt, 0, msg_end - msg_start, msg_start); + } + + /* Update position in buffer. */ + remaining -= msg_end - msg_start; + msg_start = msg_end; +} + +static void TransmitSysexConst(IDirectMusicBuffer *buffer, REFERENCE_TIME rt, byte *msg_start, size_t length) +{ + TransmitSysex(buffer, rt, msg_start, length); +} + +/** Transmit 'Note off' messages to all MIDI channels. */ +static void TransmitNotesOff(IDirectMusicBuffer *buffer, REFERENCE_TIME block_time, REFERENCE_TIME cur_time) +{ + for (int ch = 0; ch < 16; ch++) { + TransmitChannelMsg(_buffer, block_time + 10, MIDIST_CONTROLLER | ch, MIDICT_MODE_ALLNOTESOFF, 0); + TransmitChannelMsg(_buffer, block_time + 10, MIDIST_CONTROLLER | ch, MIDICT_SUSTAINSW, 0); + TransmitChannelMsg(_buffer, block_time + 10, MIDIST_CONTROLLER | ch, MIDICT_MODE_RESETALLCTRL, 0); + } + /* Explicitly flush buffer to make sure the note off messages are processed + * before we send any additional control messages. */ + _port->PlayBuffer(_buffer); + _buffer->Flush(); + + /* Some songs change the "Pitch bend range" registered parameter. If + * this doesn't get reset, everything else will start sounding wrong. */ + for (int ch = 0; ch < 16; ch++) { + /* Running status, only need status for first message + * Select RPN 00.00, set value to 02.00, and de-select again */ + TransmitChannelMsg(_buffer, block_time + 10, MIDIST_CONTROLLER | ch, MIDICT_RPN_SELECT_LO, 0x00); + TransmitChannelMsg(_buffer, block_time + 10, MIDICT_RPN_SELECT_HI, 0x00); + TransmitChannelMsg(_buffer, block_time + 10, MIDICT_DATAENTRY, 0x02); + TransmitChannelMsg(_buffer, block_time + 10, MIDICT_DATAENTRY_LO, 0x00); + TransmitChannelMsg(_buffer, block_time + 10, MIDICT_RPN_SELECT_LO, 0x7F); + TransmitChannelMsg(_buffer, block_time + 10, MIDICT_RPN_SELECT_HI, 0x7F); + + _port->PlayBuffer(_buffer); + _buffer->Flush(); + } + + /* Wait until message time has passed. */ + Sleep(Clamp((block_time - cur_time) / MS_TO_REFTIME, 5, 1000)); +} + +static void MidiThreadProc(void *) +{ + DEBUG(driver, 2, "DMusic: Entering playback thread"); + + REFERENCE_TIME last_volume_time = 0; // timestamp of the last volume change + REFERENCE_TIME block_time = 0; // timestamp of the last block sent to the port + REFERENCE_TIME playback_start_time; // timestamp current file began playback + MidiFile current_file; // file currently being played from + PlaybackSegment current_segment; // segment info for current playback + size_t current_block = 0; // next block index to send + byte current_volume = 0; // current effective volume setting + byte channel_volumes[16]; // last seen volume controller values in raw data + + /* Get pointer to the reference clock of our output port. */ + IReferenceClock *clock; + _port->GetLatencyClock(&clock); + + REFERENCE_TIME cur_time; + clock->GetTime(&cur_time); + + /* Standard "Enable General MIDI" message */ + static byte gm_enable_sysex[] = { 0xF0, 0x7E, 0x00, 0x09, 0x01, 0xF7 }; + TransmitSysexConst(_buffer, cur_time, &gm_enable_sysex[0], sizeof(gm_enable_sysex)); + /* Roland-specific reverb room control, used by the original game */ + static byte roland_reverb_sysex[] = { 0xF0, 0x41, 0x10, 0x42, 0x12, 0x40, 0x01, 0x30, 0x02, 0x04, 0x00, 0x40, 0x40, 0x00, 0x00, 0x09, 0xF7 }; + TransmitSysexConst(_buffer, cur_time, &roland_reverb_sysex[0], sizeof(roland_reverb_sysex)); + + _port->PlayBuffer(_buffer); + _buffer->Flush(); + + DWORD next_timeout = 1000; + while (true) { + /* Wait for a signal from the GUI thread or until the time for the next event has come. */ + DWORD wfso = WaitForSingleObject(_thread_event, next_timeout); + + if (_playback.shutdown) { + _playback.playing = false; + break; + } + + if (_playback.do_stop) { + DEBUG(driver, 2, "DMusic thread: Stopping playback"); + + /* Turn all notes off and wait a bit to allow the messages to be handled. */ + clock->GetTime(&cur_time); + TransmitNotesOff(_buffer, block_time, cur_time); + + _playback.playing = false; + _playback.do_stop = false; + block_time = 0; + next_timeout = 1000; + continue; + } + + if (wfso == WAIT_OBJECT_0) { + if (_playback.do_start) { + DEBUG(driver, 2, "DMusic thread: Starting playback"); + { + /* New scope to limit the time the mutex is locked. */ + ThreadMutexLocker lock(_thread_mutex); + + current_file.MoveFrom(_playback.next_file); + std::swap(_playback.next_segment, current_segment); + current_segment.start_block = 0; + current_block = 0; + _playback.playing = true; + _playback.do_start = false; + } + + /* Turn all notes off in case we are seeking between music titles. */ + clock->GetTime(&cur_time); + TransmitNotesOff(_buffer, block_time, cur_time); + + MemSetT(channel_volumes, 127, lengthof(channel_volumes)); + + /* Take the current time plus the preload time as the music start time. */ + clock->GetTime(&playback_start_time); + playback_start_time += _playback.preload_time * MS_TO_REFTIME; + } + } + + if (_playback.playing) { + /* skip beginning of file? */ + if (current_segment.start > 0 && current_block == 0 && current_segment.start_block == 0) { + /* find first block after start time and pretend playback started earlier + * this is to allow all blocks prior to the actual start to still affect playback, + * as they may contain important controller and program changes */ + size_t preload_bytes = 0; + for (size_t bl = 0; bl < current_file.blocks.size(); bl++) { + MidiFile::DataBlock &block = current_file.blocks[bl]; + preload_bytes += block.data.Length(); + if (block.ticktime >= current_segment.start) { + if (current_segment.loop) { + DEBUG(driver, 2, "DMusic: timer: loop from block %d (ticktime %d, realtime %.3f, bytes %d)", (int)bl, (int)block.ticktime, ((int)block.realtime) / 1000.0, (int)preload_bytes); + current_segment.start_block = bl; + break; + } else { + /* Skip the transmission delay compensation performed in the Win32 MIDI driver. + * The DMusic driver will most likely be used with the MS softsynth, which is not subject to transmission delays. + */ + DEBUG(driver, 2, "DMusic: timer: start from block %d (ticktime %d, realtime %.3f, bytes %d)", (int)bl, (int)block.ticktime, ((int)block.realtime) / 1000.0, (int)preload_bytes); + playback_start_time -= block.realtime * MIDITIME_TO_REFTIME; + break; + } + } + } + } + + /* Get current playback timestamp. */ + REFERENCE_TIME current_time; + clock->GetTime(¤t_time); + + /* Check for volume change. */ + if (current_volume != _playback.new_volume) { + if (current_time - last_volume_time > 10 * MS_TO_REFTIME) { + DEBUG(driver, 2, "DMusic thread: volume change"); + current_volume = _playback.new_volume; + last_volume_time = current_time; + for (int ch = 0; ch < 16; ch++) { + int vol = ScaleVolume(channel_volumes[ch], current_volume); + TransmitChannelMsg(_buffer, block_time + 1, MIDIST_CONTROLLER | ch, MIDICT_CHANVOLUME, vol); + } + _port->PlayBuffer(_buffer); + _buffer->Flush(); + } + } + + while (current_block < current_file.blocks.size()) { + MidiFile::DataBlock &block = current_file.blocks[current_block]; + + /* check that block isn't at end-of-song override */ + if (current_segment.end > 0 && block.ticktime >= current_segment.end) { + if (current_segment.loop) { + DEBUG(driver, 2, "DMusic thread: Looping song"); + current_block = current_segment.start_block; + playback_start_time = current_time - current_file.blocks[current_block].realtime * MIDITIME_TO_REFTIME; + } else { + _playback.do_stop = true; + } + next_timeout = 0; + break; + } + /* check that block is not in the future */ + REFERENCE_TIME playback_time = current_time - playback_start_time; + if (block.realtime * MIDITIME_TO_REFTIME > playback_time + 3 *_playback.preload_time * MS_TO_REFTIME) { + /* Stop the thread loop until we are at the preload time of the next block. */ + next_timeout = Clamp(((int64)block.realtime * MIDITIME_TO_REFTIME - playback_time) / MS_TO_REFTIME - _playback.preload_time, 0, 1000); + DEBUG(driver, 9, "DMusic thread: Next event in %lu ms (music %u, ref " OTTD_PRINTF64 ")", next_timeout, block.realtime * MIDITIME_TO_REFTIME, playback_time); + break; + } + + /* Timestamp of the current block. */ + block_time = playback_start_time + block.realtime * MIDITIME_TO_REFTIME; + DEBUG(driver, 9, "DMusic thread: Streaming block " PRINTF_SIZE " (cur=" OTTD_PRINTF64 ", block=" OTTD_PRINTF64 ")", current_block, (long long)(current_time / MS_TO_REFTIME), (long long)(block_time / MS_TO_REFTIME)); + + byte *data = block.data.Begin(); + size_t remaining = block.data.Length(); + byte last_status = 0; + while (remaining > 0) { + /* MidiFile ought to have converted everything out of running status, + * but handle it anyway just to be safe */ + byte status = data[0]; + if (status & 0x80) { + last_status = status; + data++; + remaining--; + } else { + status = last_status; + } + switch (status & 0xF0) { + case MIDIST_PROGCHG: + case MIDIST_CHANPRESS: + /* 2 byte channel messages */ + TransmitChannelMsg(_buffer, block_time, status, data[0]); + data++; + remaining--; + break; + case MIDIST_NOTEOFF: + case MIDIST_NOTEON: + case MIDIST_POLYPRESS: + case MIDIST_PITCHBEND: + /* 3 byte channel messages */ + TransmitChannelMsg(_buffer, block_time, status, data[0], data[1]); + data += 2; + remaining -= 2; + break; + case MIDIST_CONTROLLER: + /* controller change */ + if (data[0] == MIDICT_CHANVOLUME) { + /* volume controller, adjust for user volume */ + channel_volumes[status & 0x0F] = data[1]; + int vol = ScaleVolume(data[1], current_volume); + TransmitChannelMsg(_buffer, block_time, status, data[0], vol); + } else { + /* handle other controllers normally */ + TransmitChannelMsg(_buffer, block_time, status, data[0], data[1]); + } + data += 2; + remaining -= 2; + break; + case 0xF0: + /* system messages */ + switch (status) { + case MIDIST_SYSEX: /* system exclusive */ + TransmitSysex(_buffer, block_time, data, remaining); + break; + case MIDIST_TC_QFRAME: /* time code quarter frame */ + case MIDIST_SONGSEL: /* song select */ + data++; + remaining--; + break; + case MIDIST_SONGPOSPTR: /* song position pointer */ + data += 2; + remaining -= 2; + break; + default: /* remaining have no data bytes */ + break; + } + break; + } + } + + current_block++; + } + + /* Anything in the playback buffer? Send it down the port. */ + DWORD used_buffer = 0; + _buffer->GetUsedBytes(&used_buffer); + if (used_buffer > 0) { + _port->PlayBuffer(_buffer); + _buffer->Flush(); + } + + /* end? */ + if (current_block == current_file.blocks.size()) { + if (current_segment.loop) { + current_block = current_segment.start_block; + playback_start_time = block_time - current_file.blocks[current_block].realtime * MIDITIME_TO_REFTIME; + } else { + _playback.do_stop = true; + } + next_timeout = 0; + } + } + } + + DEBUG(driver, 2, "DMusic: Exiting playback thread"); + + /* Turn all notes off and wait a bit to allow the messages to be handled by real hardware. */ + clock->GetTime(&cur_time); + TransmitNotesOff(_buffer, block_time, cur_time); + Sleep(_playback.preload_time * 4); + + clock->Release(); +} + +static void * DownloadArticulationData(int base_offset, void *data, const std::vector &artic) +{ + DMUS_ARTICULATION2 *art = (DMUS_ARTICULATION2 *)data; + art->ulArtIdx = base_offset + 1; + art->ulFirstExtCkIdx = 0; + art->ulNextArtIdx = 0; + + CONNECTIONLIST *con_list = (CONNECTIONLIST *)(art + 1); + con_list->cbSize = sizeof(CONNECTIONLIST); + con_list->cConnections = (ULONG)artic.size(); + MemCpyT((CONNECTION *)(con_list + 1), &artic.front(), artic.size()); + + return (CONNECTION *)(con_list + 1) + artic.size(); +} + +static const char *LoadDefaultDLSFile(const char *user_dls) +{ + DMUS_PORTCAPS caps; + MemSetT(&caps, 0); + caps.dwSize = sizeof(DMUS_PORTCAPS); + _port->GetCaps(&caps); + + /* Nothing to unless it is a synth with instrument download that doesn't come with GM voices by default. */ + if ((caps.dwFlags & (DMUS_PC_DLS | DMUS_PC_DLS2)) != 0 && (caps.dwFlags & DMUS_PC_GMINHARDWARE) == 0) { + DLSFile dls_file; + + if (user_dls == NULL) { + /* Try loading the default GM DLS file stored in the registry. */ + HKEY hkDM; + if (SUCCEEDED(RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\DirectMusic"), 0, KEY_READ, &hkDM))) { + TCHAR dls_path[MAX_PATH]; + DWORD buf_size = sizeof(dls_path); // Buffer size as to be given in bytes! + if (SUCCEEDED(RegQueryValueEx(hkDM, _T("GMFilePath"), NULL, NULL, (LPBYTE)dls_path, &buf_size))) { + TCHAR expand_path[MAX_PATH * 2]; + ExpandEnvironmentStrings(dls_path, expand_path, lengthof(expand_path)); + if (!dls_file.LoadFile(expand_path)) DEBUG(driver, 1, "Failed to load default GM DLS file from registry"); + } + RegCloseKey(hkDM); + } + + /* If we couldn't load the file from the registry, try again at the default install path of the GM DLS file. */ + if (dls_file.instruments.size() == 0) { + static const TCHAR *DLS_GM_FILE = _T("%windir%\\System32\\drivers\\gm.dls"); + TCHAR path[MAX_PATH]; + ExpandEnvironmentStrings(DLS_GM_FILE, path, lengthof(path)); + + if (!dls_file.LoadFile(path)) return "Can't load GM DLS collection"; + } + } else { + if (!dls_file.LoadFile(OTTD2FS(user_dls))) return "Can't load GM DLS collection"; + } + + /* Get download port and allocate download IDs. */ + IDirectMusicPortDownload *download_port = NULL; + if (FAILED(_port->QueryInterface(IID_IDirectMusicPortDownload, (LPVOID *)&download_port))) return "Can't get download port"; + + DWORD dlid_wave = 0, dlid_inst = 0; + if (FAILED(download_port->GetDLId(&dlid_wave, (DWORD)dls_file.waves.size())) || FAILED(download_port->GetDLId(&dlid_inst, (DWORD)dls_file.instruments.size()))) { + download_port->Release(); + return "Can't get enough DLS ids"; + } + + DWORD dwAppend = 0; + download_port->GetAppend(&dwAppend); + + /* Download wave data. */ + for (DWORD i = 0; i < dls_file.waves.size(); i++) { + IDirectMusicDownload *dl_wave = NULL; + if (FAILED(download_port->AllocateBuffer((DWORD)(sizeof(WAVE_DOWNLOAD) + dwAppend * dls_file.waves[i].fmt.wf.nBlockAlign + dls_file.waves[i].data.size()), &dl_wave))) { + download_port->Release(); + return "Can't allocate wave download buffer"; + } + + WAVE_DOWNLOAD *wave; + DWORD wave_size = 0; + if (FAILED(dl_wave->GetBuffer((LPVOID *)&wave, &wave_size))) { + dl_wave->Release(); + download_port->Release(); + return "Can't get wave download buffer"; + } + + /* Fill download data. */ + MemSetT(wave, 0); + wave->dlInfo.dwDLType = DMUS_DOWNLOADINFO_WAVE; + wave->dlInfo.cbSize = wave_size; + wave->dlInfo.dwDLId = dlid_wave + i; + wave->dlInfo.dwNumOffsetTableEntries = 2; + wave->ulOffsetTable[0] = offsetof(WAVE_DOWNLOAD, dmWave); + wave->ulOffsetTable[1] = offsetof(WAVE_DOWNLOAD, dmWaveData); + wave->dmWave.ulWaveDataIdx = 1; + MemCpyT((PCMWAVEFORMAT *)&wave->dmWave.WaveformatEx, &dls_file.waves[i].fmt, 1); + wave->dmWaveData.cbSize = (DWORD)dls_file.waves[i].data.size(); + MemCpyT(wave->dmWaveData.byData, &dls_file.waves[i].data[0], dls_file.waves[i].data.size()); + + _dls_downloads.push_back(dl_wave); + if (FAILED(download_port->Download(dl_wave))) { + download_port->Release(); + return "Downloading DLS wave failed"; + } + } + + /* Download instrument data. */ + for (DWORD i = 0; i < dls_file.instruments.size(); i++) { + DWORD offsets = 1 + (DWORD)dls_file.instruments[i].regions.size(); + + /* Calculate download size for the instrument. */ + size_t i_size = sizeof(DMUS_DOWNLOADINFO) + sizeof(DMUS_INSTRUMENT); + if (dls_file.instruments[i].articulators.size() > 0) { + /* Articulations are stored as two chunks, one containing meta data and one with the actual articulation data. */ + offsets += 2; + i_size += sizeof(DMUS_ARTICULATION2) + sizeof(CONNECTIONLIST) + sizeof(CONNECTION) * dls_file.instruments[i].articulators.size(); + } + + for (std::vector::iterator rgn = dls_file.instruments[i].regions.begin(); rgn != dls_file.instruments[i].regions.end(); rgn++) { + if (rgn->articulators.size() > 0) { + offsets += 2; + i_size += sizeof(DMUS_ARTICULATION2) + sizeof(CONNECTIONLIST) + sizeof(CONNECTION) * rgn->articulators.size(); + } + + /* Region size depends on the number of wave loops. The size of the + * declared structure already accounts for one loop. */ + if (rgn->wave_sample.cbSize != 0) { + i_size += sizeof(DMUS_REGION) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * rgn->wave_loops.size(); + } else { + i_size += sizeof(DMUS_REGION) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * dls_file.waves[dls_file.pool_cues[rgn->wave.ulTableIndex].ulOffset].wave_loops.size(); + } + } + + i_size += offsets * sizeof(ULONG); + + /* Allocate download buffer. */ + IDirectMusicDownload *dl_inst = NULL; + if (FAILED(download_port->AllocateBuffer((DWORD)i_size, &dl_inst))) { + download_port->Release(); + return "Can't allocate instrument download buffer"; + } + + void *instrument; + DWORD inst_size = 0; + if (FAILED(dl_inst->GetBuffer((LPVOID *)&instrument, &inst_size))) { + dl_inst->Release(); + download_port->Release(); + return "Can't get instrument download buffer"; + } + char *inst_base = (char *)instrument; + + /* Fill download header. */ + DMUS_DOWNLOADINFO *d_info = (DMUS_DOWNLOADINFO *)instrument; + d_info->dwDLType = DMUS_DOWNLOADINFO_INSTRUMENT2; + d_info->cbSize = inst_size; + d_info->dwDLId = dlid_inst + i; + d_info->dwNumOffsetTableEntries = offsets; + instrument = d_info + 1; + + /* Download offset table; contains the offsets of all chunks relative to the buffer start. */ + ULONG *offset_table = (ULONG *)instrument; + instrument = offset_table + offsets; + int last_offset = 0; + + /* Instrument header. */ + DMUS_INSTRUMENT *inst_data = (DMUS_INSTRUMENT *)instrument; + MemSetT(inst_data, 0); + offset_table[last_offset++] = (char *)inst_data - inst_base; + inst_data->ulPatch = (dls_file.instruments[i].hdr.Locale.ulBank & F_INSTRUMENT_DRUMS) | ((dls_file.instruments[i].hdr.Locale.ulBank & 0x7F7F) << 8) | (dls_file.instruments[i].hdr.Locale.ulInstrument & 0x7F); + instrument = inst_data + 1; + + /* Write global articulations. */ + if (dls_file.instruments[i].articulators.size() > 0) { + inst_data->ulGlobalArtIdx = last_offset; + offset_table[last_offset++] = (char *)instrument - inst_base; + offset_table[last_offset++] = (char *)instrument + sizeof(DMUS_ARTICULATION2) - inst_base; + + instrument = DownloadArticulationData(inst_data->ulGlobalArtIdx, instrument, dls_file.instruments[i].articulators); + assert((char *)instrument - inst_base <= (ptrdiff_t)inst_size); + } + + /* Write out regions. */ + inst_data->ulFirstRegionIdx = last_offset; + for (uint j = 0; j < dls_file.instruments[i].regions.size(); j++) { + DLSFile::DLSRegion &rgn = dls_file.instruments[i].regions[j]; + + DMUS_REGION *inst_region = (DMUS_REGION *)instrument; + offset_table[last_offset++] = (char *)inst_region - inst_base; + inst_region->RangeKey = rgn.hdr.RangeKey; + inst_region->RangeVelocity = rgn.hdr.RangeVelocity; + inst_region->fusOptions = rgn.hdr.fusOptions; + inst_region->usKeyGroup = rgn.hdr.usKeyGroup; + inst_region->ulFirstExtCkIdx = 0; + + ULONG wave_id = dls_file.pool_cues[rgn.wave.ulTableIndex].ulOffset; + inst_region->WaveLink = rgn.wave; + inst_region->WaveLink.ulTableIndex = wave_id + dlid_wave; + + /* The wave sample data will be taken from the region, if defined, otherwise from the wave itself. */ + if (rgn.wave_sample.cbSize != 0) { + inst_region->WSMP = rgn.wave_sample; + if (rgn.wave_loops.size() > 0) MemCpyT(inst_region->WLOOP, &rgn.wave_loops.front(), rgn.wave_loops.size()); + + instrument = (char *)(inst_region + 1) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * rgn.wave_loops.size(); + } else { + inst_region->WSMP = rgn.wave_sample; + if (dls_file.waves[wave_id].wave_loops.size() > 0) MemCpyT(inst_region->WLOOP, &dls_file.waves[wave_id].wave_loops.front(), dls_file.waves[wave_id].wave_loops.size()); + + instrument = (char *)(inst_region + 1) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * dls_file.waves[wave_id].wave_loops.size(); + } + + /* Write local articulator data. */ + if (rgn.articulators.size() > 0) { + inst_region->ulRegionArtIdx = last_offset; + offset_table[last_offset++] = (char *)instrument - inst_base; + offset_table[last_offset++] = (char *)instrument + sizeof(DMUS_ARTICULATION2) - inst_base; + + instrument = DownloadArticulationData(inst_region->ulRegionArtIdx, instrument, rgn.articulators); + } else { + inst_region->ulRegionArtIdx = 0; + } + assert((char *)instrument - inst_base <= (ptrdiff_t)inst_size); + + /* Link to the next region unless this was the last one.*/ + inst_region->ulNextRegionIdx = j < dls_file.instruments[i].regions.size() - 1 ? last_offset : 0; + } + + _dls_downloads.push_back(dl_inst); + if (FAILED(download_port->Download(dl_inst))) { + download_port->Release(); + return "Downloading DLS instrument failed"; + } + } + + download_port->Release(); + } + + return NULL; +} const char *MusicDriver_DMusic::Start(const char * const *parm) { - if (performance != NULL) return NULL; - - if (proc.CoCreateInstance == NULL) { - if (!LoadLibraryList((Function*)&proc, ole_files)) { - return "ole32.dll load failed"; - } - } - /* Initialize COM */ - if (FAILED(proc.CoInitialize(NULL))) { - return "COM initialization failed"; - } + if (FAILED(CoInitializeEx(NULL, COINITBASE_MULTITHREADED))) return "COM initialization failed"; - /* create the performance object */ - if (FAILED(proc.CoCreateInstance( - CLSID_DirectMusicPerformance, + /* Create the DirectMusic object */ + if (FAILED(CoCreateInstance( + CLSID_DirectMusic, NULL, CLSCTX_INPROC, - IID_IDirectMusicPerformance, - (LPVOID*)&performance + IID_IDirectMusic, + (LPVOID*)&_music ))) { - return "Failed to create the performance object"; + return "Failed to create the music object"; } - /* initialize it */ - if (FAILED(performance->Init(&music, NULL, NULL))) { - return "Failed to initialize performance object"; - } + /* Assign sound output device. */ + if (FAILED(_music->SetDirectSound(NULL, NULL))) return "Can't set DirectSound interface"; - int port = GetDriverParamInt(parm, "port", -1); + /* MIDI events need to be send to the synth in time before their playback time + * has come. By default, we try send any events at least 50 ms before playback. */ + _playback.preload_time = GetDriverParamInt(parm, "preload", 50); -#ifndef NO_DEBUG_MESSAGES + int pIdx = GetDriverParamInt(parm, "port", -1); if (_debug_driver_level > 0) { /* Print all valid output ports. */ char desc[DMUS_MAX_DESCRIPTION]; @@ -109,70 +1121,56 @@ const char *MusicDriver_DMusic::Start(const char * const *parm) caps.dwSize = sizeof(DMUS_PORTCAPS); DEBUG(driver, 1, "Detected DirectMusic ports:"); - for (int i = 0; music->EnumPort(i, &caps) == S_OK; i++) { + for (int i = 0; _music->EnumPort(i, &caps) == S_OK; i++) { if (caps.dwClass == DMUS_PC_OUTPUTCLASS) { /* Description is UNICODE even for ANSI build. */ - DEBUG(driver, 1, " %d: %s%s", i, convert_from_fs(caps.wszDescription, desc, lengthof(desc)), i == port ? " (selected)" : ""); + DEBUG(driver, 1, " %d: %s%s", i, convert_from_fs(caps.wszDescription, desc, lengthof(desc)), i == pIdx ? " (selected)" : ""); } } } -#endif - IDirectMusicPort *music_port = NULL; // NULL means 'use default port'. - - if (port >= 0) { + GUID guidPort; + if (pIdx >= 0) { /* Check if the passed port is a valid port. */ DMUS_PORTCAPS caps; MemSetT(&caps, 0); caps.dwSize = sizeof(DMUS_PORTCAPS); - if (FAILED(music->EnumPort(port, &caps))) return "Supplied port parameter is not a valid port"; + if (FAILED(_music->EnumPort(pIdx, &caps))) return "Supplied port parameter is not a valid port"; if (caps.dwClass != DMUS_PC_OUTPUTCLASS) return "Supplied port parameter is not an output port"; - - /* Create new port. */ - DMUS_PORTPARAMS params; - MemSetT(¶ms, 0); - params.dwSize = sizeof(DMUS_PORTPARAMS); - params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS; - params.dwChannelGroups = 1; - - if (FAILED(music->CreatePort(caps.guidPort, ¶ms, &music_port, NULL))) { - return "Failed to create port"; - } - - /* Activate port. */ - if (FAILED(music_port->Activate(TRUE))) { - music_port->Release(); - return "Failed to activate port"; - } + guidPort = caps.guidPort; + } else { + if (FAILED(_music->GetDefaultPort(&guidPort))) return "Can't query default music port"; } - /* Add port to performance. */ - if (FAILED(performance->AddPort(music_port))) { - if (music_port != NULL) music_port->Release(); - return "AddPort failed"; - } + /* Create new port. */ + DMUS_PORTPARAMS params; + MemSetT(¶ms, 0); + params.dwSize = sizeof(DMUS_PORTPARAMS); + params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS; + params.dwChannelGroups = 1; + if (FAILED(_music->CreatePort(guidPort, ¶ms, &_port, NULL))) return "Failed to create port"; + /* Activate port. */ + if (FAILED(_port->Activate(TRUE))) return "Failed to activate port"; - /* Assign a performance channel block to the performance if we added - * a custom port to the performance. */ - if (music_port != NULL) { - if (FAILED(performance->AssignPChannelBlock(0, music_port, 1))) { - music_port->Release(); - return "Failed to assign PChannel block"; - } - /* We don't need the port anymore. */ - music_port->Release(); - } + /* Create playback buffer. */ + DMUS_BUFFERDESC desc; + MemSetT(&desc, 0); + desc.dwSize = sizeof(DMUS_BUFFERDESC); + desc.guidBufferFormat = KSDATAFORMAT_SUBTYPE_DIRECTMUSIC; + desc.cbBuffer = 1024; + if (FAILED(_music->CreateMusicBuffer(&desc, &_buffer, NULL))) return "Failed to create music buffer"; - /* create the loader object; this will be used to load the MIDI file */ - if (FAILED(proc.CoCreateInstance( - CLSID_DirectMusicLoader, - NULL, - CLSCTX_INPROC, - IID_IDirectMusicLoader, - (LPVOID*)&loader - ))) { - return "Failed to create loader object"; - } + /* On soft-synths (e.g. the default DirectMusic one), we might need to load a wavetable set to get music. */ + const char *dls = LoadDefaultDLSFile(GetDriverParam(parm, "dls")); + if (dls != NULL) return dls; + + /* Create playback thread and synchronization primitives. */ + _thread_event = CreateEvent(NULL, FALSE, FALSE, NULL); + if (_thread_event == NULL) return "Can't create thread shutdown event"; + _thread_mutex = ThreadMutex::New(); + if (_thread_mutex == NULL) return "Can't create thread mutex"; + + if (!ThreadObject::New(&MidiThreadProc, this, &_dmusic_thread, "ottd:dmusic")) return "Can't create MIDI output thread"; return NULL; } @@ -186,114 +1184,82 @@ MusicDriver_DMusic::~MusicDriver_DMusic() void MusicDriver_DMusic::Stop() { - seeking = false; - - if (performance != NULL) performance->Stop(NULL, NULL, 0, 0); - - if (segment != NULL) { - segment->SetParam(GUID_Unload, 0xFFFFFFFF, 0, 0, performance); - segment->Release(); - segment = NULL; + if (_dmusic_thread != NULL) { + _playback.shutdown = true; + SetEvent(_thread_event); + _dmusic_thread->Join(); } - if (music != NULL) { - music->Release(); - music = NULL; + /* Unloaded any instruments we loaded. */ + if (_dls_downloads.size() > 0) { + IDirectMusicPortDownload *download_port = NULL; + _port->QueryInterface(IID_IDirectMusicPortDownload, (LPVOID *)&download_port); + + /* Instruments refer to waves. As the waves are at the beginning of the download list, + * do the unload from the back so that references are cleared properly. */ + for (std::vector::reverse_iterator i = _dls_downloads.rbegin(); download_port != NULL && i != _dls_downloads.rend(); i++) { + download_port->Unload(*i); + (*i)->Release(); + } + _dls_downloads.clear(); + + if (download_port != NULL) download_port->Release(); } - if (performance != NULL) { - performance->CloseDown(); - performance->Release(); - performance = NULL; + if (_buffer != NULL) { + _buffer->Release(); + _buffer = NULL; } - if (loader != NULL) { - loader->Release(); - loader = NULL; + if (_port != NULL) { + _port->Activate(FALSE); + _port->Release(); + _port = NULL; } - proc.CoUninitialize(); + if (_music != NULL) { + _music->Release(); + _music = NULL; + } + + CloseHandle(_thread_event); + delete _thread_mutex; + + CoUninitialize(); } -void MusicDriver_DMusic::PlaySong(const char *filename) +void MusicDriver_DMusic::PlaySong(const MusicSongInfo &song) { - /* set up the loader object info */ - DMUS_OBJECTDESC obj_desc; - ZeroMemory(&obj_desc, sizeof(obj_desc)); - obj_desc.dwSize = sizeof(obj_desc); - obj_desc.guidClass = CLSID_DirectMusicSegment; - obj_desc.dwValidData = DMUS_OBJ_CLASS | DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH; - MultiByteToWideChar( - CP_ACP, MB_PRECOMPOSED, - filename, -1, - obj_desc.wszFileName, lengthof(obj_desc.wszFileName) - ); + ThreadMutexLocker lock(_thread_mutex); - /* release the existing segment if we have any */ - if (segment != NULL) { - segment->Release(); - segment = NULL; - } + if (!_playback.next_file.LoadSong(song)) return; - /* make a new segment */ - if (FAILED(loader->GetObject( - &obj_desc, IID_IDirectMusicSegment, (LPVOID*)&segment - ))) { - DEBUG(driver, 0, "DirectMusic: GetObject failed"); - return; - } + _playback.next_segment.start = song.override_start; + _playback.next_segment.end = song.override_end; + _playback.next_segment.loop = song.loop; - /* tell the segment what kind of data it contains */ - if (FAILED(segment->SetParam( - GUID_StandardMIDIFile, 0xFFFFFFFF, 0, 0, performance - ))) { - DEBUG(driver, 0, "DirectMusic: SetParam (MIDI file) failed"); - return; - } - - /* tell the segment to 'download' the instruments */ - if (FAILED(segment->SetParam(GUID_Download, 0xFFFFFFFF, 0, 0, performance))) { - DEBUG(driver, 0, "DirectMusic: failed to download instruments"); - return; - } - - /* start playing the MIDI file */ - if (FAILED(performance->PlaySegment(segment, 0, 0, NULL))) { - DEBUG(driver, 0, "DirectMusic: PlaySegment failed"); - return; - } - - seeking = true; + _playback.do_start = true; + SetEvent(_thread_event); } void MusicDriver_DMusic::StopSong() { - if (FAILED(performance->Stop(segment, NULL, 0, 0))) { - DEBUG(driver, 0, "DirectMusic: StopSegment failed"); - } - seeking = false; + _playback.do_stop = true; + SetEvent(_thread_event); } bool MusicDriver_DMusic::IsSongPlaying() { - /* Not the nicest code, but there is a short delay before playing actually - * starts. OpenTTD makes no provision for this. */ - if (performance->IsPlaying(segment, NULL) == S_OK) { - seeking = false; - return true; - } else { - return seeking; - } + return _playback.playing || _playback.do_start; } void MusicDriver_DMusic::SetVolume(byte vol) { - long db = vol * 2000 / 127 - 2000; ///< 0 - 127 -> -2000 - 0 - performance->SetGlobalParam(GUID_PerfMasterVolume, &db, sizeof(db)); + _playback.new_volume = vol; } diff --git a/src/music/dmusic.h b/src/music/dmusic.h index ca59d033f4..527e064e49 100644 --- a/src/music/dmusic.h +++ b/src/music/dmusic.h @@ -1,4 +1,4 @@ -/* $Id: dmusic.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,7 +23,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp index 84ccf4907e..9d07761b73 100644 --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -1,4 +1,4 @@ -/* $Id: extmidi.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,6 +17,8 @@ #include "../video/video_driver.hpp" #include "../gfx_func.h" #include "extmidi.h" +#include "../base_media_base.h" +#include "midifile.hpp" #include #include #include @@ -83,10 +85,13 @@ void MusicDriver_ExtMidi::Stop() this->DoStop(); } -void MusicDriver_ExtMidi::PlaySong(const char *filename) +void MusicDriver_ExtMidi::PlaySong(const MusicSongInfo &song) { - strecpy(this->song, filename, lastof(this->song)); - this->DoStop(); + std::string filename = MidiFile::GetSMFFile(song); + if (!filename.empty()) { + strecpy(this->song, filename.c_str(), lastof(this->song)); + this->DoStop(); + } } void MusicDriver_ExtMidi::StopSong() diff --git a/src/music/extmidi.h b/src/music/extmidi.h index bc17adf970..e174dc9b08 100644 --- a/src/music/extmidi.h +++ b/src/music/extmidi.h @@ -1,4 +1,4 @@ -/* $Id: extmidi.h 27834 2017-03-29 17:36:46Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,7 +28,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/fluidsynth.cpp b/src/music/fluidsynth.cpp new file mode 100644 index 0000000000..d1088f4bc4 --- /dev/null +++ b/src/music/fluidsynth.cpp @@ -0,0 +1,155 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file fluidsynth.cpp Playing music via the fluidsynth library. */ + +#include "../stdafx.h" +#include "../openttd.h" +#include "../sound_type.h" +#include "../debug.h" +#include "fluidsynth.h" +#include "midifile.hpp" +#include +#include "../mixer.h" + +static struct { + fluid_settings_t* settings; ///< FluidSynth settings handle + fluid_synth_t* synth; ///< FluidSynth synthesizer handle + fluid_player_t* player; ///< FluidSynth MIDI player handle +} _midi; ///< Metadata about the midi we're playing. + +/** Factory for the FluidSynth driver. */ +static FMusicDriver_FluidSynth iFMusicDriver_FluidSynth; + +/** List of sound fonts to try by default. */ +static const char *default_sf[] = { + /* Debian/Ubuntu/OpenSUSE preferred */ + "/usr/share/sounds/sf2/FluidR3_GM.sf2", + + /* RedHat/Fedora/Arch preferred */ + "/usr/share/soundfonts/FluidR3_GM.sf2", + + /* Debian/Ubuntu/OpenSUSE alternatives */ + "/usr/share/sounds/sf2/TimGM6mb.sf2", + "/usr/share/sounds/sf2/FluidR3_GS.sf2", + + NULL +}; + +static void RenderMusicStream(int16 *buffer, size_t samples) +{ + if (!_midi.synth || !_midi.player) return; + fluid_synth_write_s16(_midi.synth, samples, buffer, 0, 2, buffer, 1, 2); +} + +const char *MusicDriver_FluidSynth::Start(const char * const *param) +{ + const char *sfont_name = GetDriverParam(param, "soundfont"); + int sfont_id; + + DEBUG(driver, 1, "Fluidsynth: sf %s", sfont_name); + + /* Create the settings. */ + _midi.settings = new_fluid_settings(); + if (!_midi.settings) return "Could not create midi settings"; + + /* Create the synthesizer. */ + _midi.synth = new_fluid_synth(_midi.settings); + if (!_midi.synth) return "Could not open synth"; + + /* Load a SoundFont and reset presets (so that new instruments + * get used from the SoundFont) */ + if (!sfont_name) { + int i; + sfont_id = FLUID_FAILED; + for (i = 0; default_sf[i]; i++) { + if (!fluid_is_soundfont(default_sf[i])) continue; + sfont_id = fluid_synth_sfload(_midi.synth, default_sf[i], 1); + if (sfont_id != FLUID_FAILED) break; + } + if (sfont_id == FLUID_FAILED) return "Could not open any sound font"; + } else { + sfont_id = fluid_synth_sfload(_midi.synth, sfont_name, 1); + if (sfont_id == FLUID_FAILED) return "Could not open sound font"; + } + + _midi.player = NULL; + + uint32 samplerate = MxSetMusicSource(RenderMusicStream); + fluid_synth_set_sample_rate(_midi.synth, samplerate); + DEBUG(driver, 1, "Fluidsynth: samplerate %.0f", (float)samplerate); + + return NULL; +} + +void MusicDriver_FluidSynth::Stop() +{ + MxSetMusicSource(NULL); + this->StopSong(); + delete_fluid_synth(_midi.synth); + delete_fluid_settings(_midi.settings); +} + +void MusicDriver_FluidSynth::PlaySong(const MusicSongInfo &song) +{ + std::string filename = MidiFile::GetSMFFile(song); + + this->StopSong(); + + if (filename.empty()) { + return; + } + + _midi.player = new_fluid_player(_midi.synth); + if (!_midi.player) { + DEBUG(driver, 0, "Could not create midi player"); + return; + } + + if (fluid_player_add(_midi.player, filename.c_str()) != FLUID_OK) { + DEBUG(driver, 0, "Could not open music file"); + delete_fluid_player(_midi.player); + _midi.player = NULL; + return; + } + if (fluid_player_play(_midi.player) != FLUID_OK) { + DEBUG(driver, 0, "Could not start midi player"); + delete_fluid_player(_midi.player); + _midi.player = NULL; + return; + } +} + +void MusicDriver_FluidSynth::StopSong() +{ + if (!_midi.player) return; + + fluid_player_stop(_midi.player); + if (fluid_player_join(_midi.player) != FLUID_OK) { + DEBUG(driver, 0, "Could not join player"); + } + delete_fluid_player(_midi.player); + fluid_synth_system_reset(_midi.synth); + _midi.player = NULL; +} + +bool MusicDriver_FluidSynth::IsSongPlaying() +{ + if (!_midi.player) return false; + + return fluid_player_get_status(_midi.player) == FLUID_PLAYER_PLAYING; +} + +void MusicDriver_FluidSynth::SetVolume(byte vol) +{ + /* Allowed range of synth.gain is 0.0 to 10.0 */ + if (fluid_settings_setnum(_midi.settings, "synth.gain", 1.0 * vol / 128.0) != 1) { + DEBUG(driver, 0, "Could not set volume"); + } +} diff --git a/src/music/fluidsynth.h b/src/music/fluidsynth.h new file mode 100644 index 0000000000..171128a8e9 --- /dev/null +++ b/src/music/fluidsynth.h @@ -0,0 +1,41 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file fluidsynth.h Base for FluidSynth music playback. */ + +#ifndef MUSIC_FLUIDSYNTH_H +#define MUSIC_FLUIDSYNTH_H + +#include "music_driver.hpp" + +/** Music driver making use of FluidSynth. */ +class MusicDriver_FluidSynth : public MusicDriver { +public: + /* virtual */ const char *Start(const char * const *param); + + /* virtual */ void Stop(); + + /* virtual */ void PlaySong(const MusicSongInfo &song); + + /* virtual */ void StopSong(); + + /* virtual */ bool IsSongPlaying(); + + /* virtual */ void SetVolume(byte vol); + /* virtual */ const char *GetName() const { return "fluidsynth"; } +}; + +/** Factory for the fluidsynth driver. */ +class FMusicDriver_FluidSynth : public DriverFactoryBase { +public: + FMusicDriver_FluidSynth() : DriverFactoryBase(Driver::DT_MUSIC, 5, "fluidsynth", "FluidSynth MIDI Driver") {} + /* virtual */ Driver *CreateInstance() const { return new MusicDriver_FluidSynth(); } +}; + +#endif /* MUSIC_FLUIDSYNTH_H */ diff --git a/src/music/libtimidity.cpp b/src/music/libtimidity.cpp index 70b86bf0a6..42c1e3c155 100644 --- a/src/music/libtimidity.cpp +++ b/src/music/libtimidity.cpp @@ -1,4 +1,4 @@ -/* $Id: libtimidity.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,8 @@ #include "../sound_type.h" #include "../debug.h" #include "libtimidity.h" +#include "midifile.hpp" +#include "../base_media_base.h" #include #include #include @@ -22,9 +24,6 @@ #include #include #include -#if defined(PSP) -#include -#endif /* PSP */ #include "../safeguards.h" @@ -44,16 +43,6 @@ static struct { uint32 song_position; } _midi; ///< Metadata about the midi we're playing. -#if defined(PSP) -static void AudioOutCallback(void *buf, unsigned int _reqn, void *userdata) -{ - memset(buf, 0, _reqn * PSP_NUM_AUDIO_CHANNELS); - if (_midi.status == MIDI_PLAYING) { - mid_song_read_wave(_midi.song, buf, _reqn * PSP_NUM_AUDIO_CHANNELS); - } -} -#endif /* PSP */ - /** Factory for the libtimidity driver. */ static FMusicDriver_LibTimidity iFMusicDriver_LibTimidity; @@ -75,17 +64,7 @@ const char *MusicDriver_LibTimidity::Start(const char * const *param) _midi.options.rate = 44100; _midi.options.format = MID_AUDIO_S16LSB; _midi.options.channels = 2; -#if defined(PSP) - _midi.options.buffer_size = PSP_NUM_AUDIO_SAMPLES; -#else _midi.options.buffer_size = _midi.options.rate; -#endif - -#if defined(PSP) - pspAudioInit(); - pspAudioSetChannelCallback(_midi.options.channels, &AudioOutCallback, NULL); - pspAudioSetVolume(_midi.options.channels, PSP_VOLUME_MAX, PSP_VOLUME_MAX); -#endif /* PSP */ return NULL; } @@ -96,11 +75,14 @@ void MusicDriver_LibTimidity::Stop() mid_exit(); } -void MusicDriver_LibTimidity::PlaySong(const char *filename) +void MusicDriver_LibTimidity::PlaySong(const MusicSongInfo &song) { - this->StopSong(); + std::string filename = MidiFile::GetSMFFile(song); - _midi.stream = mid_istream_open_file(filename); + this->StopSong(); + if (filename.empty()) return; + + _midi.stream = mid_istream_open_file(filename.c_str()); if (_midi.stream == NULL) { DEBUG(driver, 0, "Could not open music file"); return; diff --git a/src/music/libtimidity.h b/src/music/libtimidity.h index 085d27ffe5..badb05bab2 100644 --- a/src/music/libtimidity.h +++ b/src/music/libtimidity.h @@ -1,4 +1,4 @@ -/* $Id: libtimidity.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/midi.h b/src/music/midi.h new file mode 100644 index 0000000000..473f7f18bb --- /dev/null +++ b/src/music/midi.h @@ -0,0 +1,144 @@ +/* $Id$ */ + +/* +* This file is part of OpenTTD. +* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . +*/ + +/* @file midi.h Declarations for MIDI data */ + +#ifndef MUSIC_MIDI_H +#define MUSIC_MIDI_H + +#include "../stdafx.h" + +/** Header of a Stanard MIDI File */ +struct SMFHeader { + uint16 format; + uint16 tracks; + uint16 tickdiv; +}; + +/** MIDI status byte codes */ +enum MidiStatus { + /* Bytes with top bit unset are data bytes i.e. not status bytes */ + /* Channel status messages, require channel number in lower nibble */ + MIDIST_NOTEOFF = 0x80, + MIDIST_NOTEON = 0x90, + MIDIST_POLYPRESS = 0xA0, + MIDIST_CONTROLLER = 0xB0, + MIDIST_PROGCHG = 0xC0, + MIDIST_CHANPRESS = 0xD0, + MIDIST_PITCHBEND = 0xE0, + /* Full byte status messages */ + MIDIST_SYSEX = 0xF0, + MIDIST_TC_QFRAME = 0xF1, + MIDIST_SONGPOSPTR = 0xF2, + MIDIST_SONGSEL = 0xF3, + /* not defined: 0xF4, */ + /* not defined: 0xF5, */ + MIDIST_TUNEREQ = 0xF6, + MIDIST_ENDSYSEX = 0xF7, ///< only occurs in realtime data + MIDIST_SMF_ESCAPE = 0xF7, ///< only occurs in SMF data + MIDIST_RT_CLOCK = 0xF8, + /* not defined: 0xF9, */ + MIDIST_RT_START = 0xFA, + MIDIST_RT_CONTINUE = 0xFB, + MIDIST_RT_STOP = 0xFC, + /* not defined: 0xFD, */ + MIDIST_RT_ACTSENS = 0xFE, + MIDIST_SYSRESET = 0xFF, ///< only occurs in realtime data + MIDIST_SMF_META = 0xFF, ///< only occurs in SMF data +}; + +/** + * MIDI controller numbers. + * Complete list per General MIDI, missing values are not defined. + */ +enum MidiController { + /* Standard continuous controllers (MSB control) */ + MIDICT_BANKSELECT = 0, + MIDICT_MODWHEEL = 1, + MIDICT_BREATH = 2, + MIDICT_FOOT = 4, + MIDICT_PORTAMENTO = 5, + MIDICT_DATAENTRY = 6, + MIDICT_CHANVOLUME = 7, + MIDICT_BALANCE = 8, + MIDICT_PAN = 10, + MIDICT_EXPRESSION = 11, + MIDICT_EFFECT1 = 12, + MIDICT_EFFECT2 = 13, + MIDICT_GENERAL1 = 16, + MIDICT_GENERAL2 = 17, + MIDICT_GENERAL3 = 18, + MIDICT_GENERAL4 = 19, + /* Offset from MSB to LSB of continuous controllers */ + MIDICTOFS_HIGHRES = 32, + /* Stanard continuous controllers (LSB control) */ + MIDICT_BANKSELECT_LO = MIDICTOFS_HIGHRES + MIDICT_BANKSELECT, + MIDICT_MODWHEEL_LO = MIDICTOFS_HIGHRES + MIDICT_MODWHEEL, + MIDICT_BREATH_LO = MIDICTOFS_HIGHRES + MIDICT_BREATH, + MIDICT_FOOT_LO = MIDICTOFS_HIGHRES + MIDICT_FOOT, + MIDICT_PORTAMENTO_LO = MIDICTOFS_HIGHRES + MIDICT_PORTAMENTO, + MIDICT_DATAENTRY_LO = MIDICTOFS_HIGHRES + MIDICT_DATAENTRY, + MIDICT_CHANVOLUME_LO = MIDICTOFS_HIGHRES + MIDICT_CHANVOLUME, + MIDICT_BALANCE_LO = MIDICTOFS_HIGHRES + MIDICT_BALANCE, + MIDICT_PAN_LO = MIDICTOFS_HIGHRES + MIDICT_PAN, + MIDICT_EXPRESSION_LO = MIDICTOFS_HIGHRES + MIDICT_EXPRESSION, + MIDICT_EFFECT1_LO = MIDICTOFS_HIGHRES + MIDICT_EFFECT1, + MIDICT_EFFECT2_LO = MIDICTOFS_HIGHRES + MIDICT_EFFECT2, + MIDICT_GENERAL1_LO = MIDICTOFS_HIGHRES + MIDICT_GENERAL1, + MIDICT_GENERAL2_LO = MIDICTOFS_HIGHRES + MIDICT_GENERAL2, + MIDICT_GENERAL3_LO = MIDICTOFS_HIGHRES + MIDICT_GENERAL3, + MIDICT_GENERAL4_LO = MIDICTOFS_HIGHRES + MIDICT_GENERAL4, + /* Switch controllers */ + MIDICT_SUSTAINSW = 64, + MIDICT_PORTAMENTOSW = 65, + MIDICT_SOSTENUTOSW = 66, + MIDICT_SOFTPEDALSW = 67, + MIDICT_LEGATOSW = 68, + MIDICT_HOLD2SW = 69, + /* Standard low-resolution controllers */ + MIDICT_SOUND1 = 70, + MIDICT_SOUND2 = 71, + MIDICT_SOUND3 = 72, + MIDICT_SOUND4 = 73, + MIDICT_SOUND5 = 74, + MIDICT_SOUND6 = 75, + MIDICT_SOUND7 = 76, + MIDICT_SOUND8 = 77, + MIDICT_SOUND9 = 78, + MIDICT_SOUND10 = 79, + MIDICT_GENERAL5 = 80, + MIDICT_GENERAL6 = 81, + MIDICT_GENERAL7 = 82, + MIDICT_GENERAL8 = 83, + MIDICT_PORTAMENTOCTL = 84, + MIDICT_PRF_HIGHRESVEL = 88, + MIDICT_EFFECTS1 = 91, + MIDICT_EFFECTS2 = 92, + MIDICT_EFFECTS3 = 93, + MIDICT_EFFECTS4 = 94, + MIDICT_EFFECTS5 = 95, + /* Registered/unregistered parameters control */ + MIDICT_DATA_INCREMENT = 96, + MIDICT_DATA_DECREMENT = 97, + MIDICT_NRPN_SELECT_LO = 98, + MIDICT_NRPN_SELECT_HI = 99, + MIDICT_RPN_SELECT_LO = 100, + MIDICT_RPN_SELECT_HI = 101, + /* Channel mode messages */ + MIDICT_MODE_ALLSOUNDOFF = 120, + MIDICT_MODE_RESETALLCTRL = 121, + MIDICT_MODE_LOCALCTL = 122, + MIDICT_MODE_ALLNOTESOFF = 123, + MIDICT_MODE_OMNI_OFF = 124, + MIDICT_MODE_OMNI_ON = 125, + MIDICT_MODE_MONO = 126, + MIDICT_MODE_POLY = 127, +}; + +#endif /* MUSIC_MIDI_H */ diff --git a/src/music/midifile.cpp b/src/music/midifile.cpp new file mode 100644 index 0000000000..91f83c529d --- /dev/null +++ b/src/music/midifile.cpp @@ -0,0 +1,1127 @@ +/* $Id$ */ + +/* +* This file is part of OpenTTD. +* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . +*/ + +/* @file midifile.cpp Parser for standard MIDI files */ + +#include "midifile.hpp" +#include "../fileio_func.h" +#include "../fileio_type.h" +#include "../string_func.h" +#include "../core/endian_func.hpp" +#include "../base_media_base.h" +#include "midi.h" +#include + +#include "../console_func.h" +#include "../console_internal.h" + + +/* SMF reader based on description at: http://www.somascape.org/midi/tech/mfile.html */ + + +static MidiFile *_midifile_instance = NULL; + +/** + * Owning byte buffer readable as a stream. + * RAII-compliant to make teardown in error situations easier. + */ +class ByteBuffer { + byte *buf; + size_t buflen; + size_t pos; +public: + /** + * Construct buffer from data in a file. + * If file does not have sufficient bytes available, the object is constructed + * in an error state, that causes all further function calls to fail. + * @param file file to read from at current position + * @param len number of bytes to read + */ + ByteBuffer(FILE *file, size_t len) + { + this->buf = MallocT(len); + if (fread(this->buf, 1, len, file) == len) { + this->buflen = len; + this->pos = 0; + } else { + /* invalid state */ + this->buflen = 0; + } + } + + /** + * Destructor, frees the buffer. + */ + ~ByteBuffer() + { + free(this->buf); + } + + /** + * Return whether the buffer was constructed successfully. + * @return true is the buffer contains data + */ + bool IsValid() const + { + return this->buflen > 0; + } + + /** + * Return whether reading has reached the end of the buffer. + * @return true if there are no more bytes available to read + */ + bool IsEnd() const + { + return this->pos >= this->buflen; + } + + /** + * Read a single byte from the buffer. + * @param[out] b returns the read value + * @return true if a byte was available for reading + */ + bool ReadByte(byte &b) + { + if (this->IsEnd()) return false; + b = this->buf[this->pos++]; + return true; + } + + /** + * Read a MIDI file variable length value. + * Each byte encodes 7 bits of the value, most-significant bits are encoded first. + * If the most significant bit in a byte is set, there are further bytes encoding the value. + * @param[out] res returns the read value + * @return true if there was data available + */ + bool ReadVariableLength(uint32 &res) + { + res = 0; + byte b = 0; + do { + if (this->IsEnd()) return false; + b = this->buf[this->pos++]; + res = (res << 7) | (b & 0x7F); + } while (b & 0x80); + return true; + } + + /** + * Read bytes into a buffer. + * @param[out] dest buffer to copy info + * @param length number of bytes to read + * @return true if the requested number of bytes were available + */ + bool ReadBuffer(byte *dest, size_t length) + { + if (this->IsEnd()) return false; + if (this->buflen - this->pos < length) return false; + memcpy(dest, this->buf + this->pos, length); + this->pos += length; + return true; + } + + /** + * Skip over a number of bytes in the buffer. + * @param count number of bytes to skip over + * @return true if there were enough bytes available + */ + bool Skip(size_t count) + { + if (this->IsEnd()) return false; + if (this->buflen - this->pos < count) return false; + this->pos += count; + return true; + } + + /** + * Go a number of bytes back to re-read. + * @param count number of bytes to go back + * @return true if at least count bytes had been read previously + */ + bool Rewind(size_t count) + { + if (count > this->pos) return false; + this->pos -= count; + return true; + } +}; + +static bool ReadTrackChunk(FILE *file, MidiFile &target) +{ + byte buf[4]; + + const byte magic[] = { 'M', 'T', 'r', 'k' }; + if (fread(buf, sizeof(magic), 1, file) != 1) { + return false; + } + if (memcmp(magic, buf, sizeof(magic)) != 0) { + return false; + } + + /* Read chunk length and then the whole chunk */ + uint32 chunk_length; + if (fread(&chunk_length, 1, 4, file) != 4) { + return false; + } + chunk_length = FROM_BE32(chunk_length); + + ByteBuffer chunk(file, chunk_length); + if (!chunk.IsValid()) { + return false; + } + + target.blocks.push_back(MidiFile::DataBlock()); + MidiFile::DataBlock *block = &target.blocks.back(); + + byte last_status = 0; + bool running_sysex = false; + while (!chunk.IsEnd()) { + /* Read deltatime for event, start new block */ + uint32 deltatime = 0; + if (!chunk.ReadVariableLength(deltatime)) { + return false; + } + if (deltatime > 0) { + target.blocks.push_back(MidiFile::DataBlock(block->ticktime + deltatime)); + block = &target.blocks.back(); + } + + /* Read status byte */ + byte status; + if (!chunk.ReadByte(status)) { + return false; + } + + if ((status & 0x80) == 0) { + /* High bit not set means running status message, status is same as last + * convert to explicit status */ + chunk.Rewind(1); + status = last_status; + goto running_status; + } else if ((status & 0xF0) != 0xF0) { + /* Regular channel message */ + last_status = status; + running_status: + byte *data; + switch (status & 0xF0) { + case MIDIST_NOTEOFF: + case MIDIST_NOTEON: + case MIDIST_POLYPRESS: + case MIDIST_CONTROLLER: + case MIDIST_PITCHBEND: + /* 3 byte messages */ + data = block->data.Append(3); + data[0] = status; + if (!chunk.ReadBuffer(&data[1], 2)) { + return false; + } + break; + case MIDIST_PROGCHG: + case MIDIST_CHANPRESS: + /* 2 byte messages */ + data = block->data.Append(2); + data[0] = status; + if (!chunk.ReadByte(data[1])) { + return false; + } + break; + default: + NOT_REACHED(); + } + } else if (status == MIDIST_SMF_META) { + /* Meta event, read event type byte and data length */ + if (!chunk.ReadByte(buf[0])) { + return false; + } + uint32 length = 0; + if (!chunk.ReadVariableLength(length)) { + return false; + } + switch (buf[0]) { + case 0x2F: + /* end of track, no more data (length != 0 is illegal) */ + return (length == 0); + case 0x51: + /* tempo change */ + if (length != 3) return false; + if (!chunk.ReadBuffer(buf, 3)) return false; + target.tempos.push_back(MidiFile::TempoChange(block->ticktime, buf[0] << 16 | buf[1] << 8 | buf[2])); + break; + default: + /* unimportant meta event, skip over it */ + if (!chunk.Skip(length)) { + return false; + } + break; + } + } else if (status == MIDIST_SYSEX || (status == MIDIST_SMF_ESCAPE && running_sysex)) { + /* System exclusive message */ + uint32 length = 0; + if (!chunk.ReadVariableLength(length)) { + return false; + } + byte *data = block->data.Append(length + 1); + data[0] = 0xF0; + if (!chunk.ReadBuffer(data + 1, length)) { + return false; + } + if (data[length] != 0xF7) { + /* Engage Casio weirdo mode - convert to normal sysex */ + running_sysex = true; + *block->data.Append() = 0xF7; + } else { + running_sysex = false; + } + } else if (status == MIDIST_SMF_ESCAPE) { + /* Escape sequence */ + uint32 length = 0; + if (!chunk.ReadVariableLength(length)) { + return false; + } + byte *data = block->data.Append(length); + if (!chunk.ReadBuffer(data, length)) { + return false; + } + } else { + /* Messages undefined in standard midi files: + * 0xF1 - MIDI time code quarter frame + * 0xF2 - Song position pointer + * 0xF3 - Song select + * 0xF4 - undefined/reserved + * 0xF5 - undefined/reserved + * 0xF6 - Tune request for analog synths + * 0xF8..0xFE - System real-time messages + */ + return false; + } + } + + NOT_REACHED(); +} + +template +bool TicktimeAscending(const T &a, const T &b) +{ + return a.ticktime < b.ticktime; +} + +static bool FixupMidiData(MidiFile &target) +{ + /* Sort all tempo changes and events */ + std::sort(target.tempos.begin(), target.tempos.end(), TicktimeAscending); + std::sort(target.blocks.begin(), target.blocks.end(), TicktimeAscending); + + if (target.tempos.size() == 0) { + /* No tempo information, assume 120 bpm (500,000 microseconds per beat */ + target.tempos.push_back(MidiFile::TempoChange(0, 500000)); + } + /* Add sentinel tempo at end */ + target.tempos.push_back(MidiFile::TempoChange(UINT32_MAX, 0)); + + /* Merge blocks with identical tick times */ + std::vector merged_blocks; + uint32 last_ticktime = 0; + for (size_t i = 0; i < target.blocks.size(); i++) { + MidiFile::DataBlock &block = target.blocks[i]; + if (block.data.Length() == 0) { + continue; + } else if (block.ticktime > last_ticktime || merged_blocks.size() == 0) { + merged_blocks.push_back(block); + last_ticktime = block.ticktime; + } else { + byte *datadest = merged_blocks.back().data.Append(block.data.Length()); + memcpy(datadest, block.data.Begin(), block.data.Length()); + } + } + std::swap(merged_blocks, target.blocks); + + /* Annotate blocks with real time */ + last_ticktime = 0; + uint32 last_realtime = 0; + size_t cur_tempo = 0, cur_block = 0; + while (cur_block < target.blocks.size()) { + MidiFile::DataBlock &block = target.blocks[cur_block]; + MidiFile::TempoChange &tempo = target.tempos[cur_tempo]; + MidiFile::TempoChange &next_tempo = target.tempos[cur_tempo+1]; + if (block.ticktime <= next_tempo.ticktime) { + /* block is within the current tempo */ + int64 tickdiff = block.ticktime - last_ticktime; + last_ticktime = block.ticktime; + last_realtime += uint32(tickdiff * tempo.tempo / target.tickdiv); + block.realtime = last_realtime; + cur_block++; + } else { + /* tempo change occurs before this block */ + int64 tickdiff = next_tempo.ticktime - last_ticktime; + last_ticktime = next_tempo.ticktime; + last_realtime += uint32(tickdiff * tempo.tempo / target.tickdiv); // current tempo until the tempo change + cur_tempo++; + } + } + + return true; +} + +/** + * Read the header of a standard MIDI file. + * @param[in] filename name of file to read from + * @param[out] header filled with data read + * @return true if the file could be opened and contained a header with correct format + */ +bool MidiFile::ReadSMFHeader(const char *filename, SMFHeader &header) +{ + FILE *file = FioFOpenFile(filename, "rb", Subdirectory::BASESET_DIR); + if (!file) return false; + bool result = ReadSMFHeader(file, header); + FioFCloseFile(file); + return result; +} + +/** + * Read the header of a standard MIDI file. + * The function will consume 14 bytes from the current file pointer position. + * @param[in] file open file to read from (should be in binary mode) + * @param[out] header filled with data read + * @return true if a header in correct format could be read from the file + */ +bool MidiFile::ReadSMFHeader(FILE *file, SMFHeader &header) +{ + /* Try to read header, fixed size */ + byte buffer[14]; + if (fread(buffer, sizeof(buffer), 1, file) != 1) { + return false; + } + + /* Check magic, 'MThd' followed by 4 byte length indicator (always = 6 in SMF) */ + const byte magic[] = { 'M', 'T', 'h', 'd', 0x00, 0x00, 0x00, 0x06 }; + if (MemCmpT(buffer, magic, sizeof(magic)) != 0) { + return false; + } + + /* Read the parameters of the file */ + header.format = (buffer[8] << 8) | buffer[9]; + header.tracks = (buffer[10] << 8) | buffer[11]; + header.tickdiv = (buffer[12] << 8) | buffer[13]; + return true; +} + +/** + * Load a standard MIDI file. + * @param filename name of the file to load + * @returns true if loaded was successful + */ +bool MidiFile::LoadFile(const char *filename) +{ + _midifile_instance = this; + + this->blocks.clear(); + this->tempos.clear(); + this->tickdiv = 0; + + bool success = false; + FILE *file = FioFOpenFile(filename, "rb", Subdirectory::BASESET_DIR); + if (file == NULL) return false; + + SMFHeader header; + if (!ReadSMFHeader(file, header)) goto cleanup; + + /* Only format 0 (single-track) and format 1 (multi-track single-song) are accepted for now */ + if (header.format != 0 && header.format != 1) goto cleanup; + /* Doesn't support SMPTE timecode files */ + if ((header.tickdiv & 0x8000) != 0) goto cleanup; + + this->tickdiv = header.tickdiv; + + for (; header.tracks > 0; header.tracks--) { + if (!ReadTrackChunk(file, *this)) { + goto cleanup; + } + } + + success = FixupMidiData(*this); + +cleanup: + FioFCloseFile(file); + return success; +} + + +/** + * Decoder for "MPS MIDI" format data. + * This format for MIDI music is also used in a few other Microprose games contemporary with Transport Tycoon. + * + * The song data are usually packed inside a CAT file, with one CAT chunk per song. The song titles are used as names for the CAT chunks. + * + * Unlike the Standard MIDI File format, which is based on the IFF structure, the MPS MIDI format is best described as two linked lists of sub-tracks, + * the first list contains a number of reusable "segments", and the second list contains the "master tracks". Each list is prefixed with a byte + * giving the number of elements in the list, and the actual list is just a byte count (BE16 format) for the segment/track followed by the actual data, + * there is no index as such, so the entire data must be seeked through to build an index. + * + * The actual MIDI data inside each track is almost standard MIDI, prefixing every event with a delay, encoded using the same variable-length format + * used in SMF. A few status codes have changed meaning in MPS MIDI: 0xFE changes control from master track to a segment, 0xFD returns from a segment + * to the master track, and 0xFF is used to end the song. (In Standard MIDI all those values must only occur in real-time data.) + * + * As implemented in the original decoder, there is no support for recursively calling segments from segments, i.e. code 0xFE must only occur in + * a master track, and code 0xFD must only occur in a segment. There are no checks made for this, it's assumed that the only input data will ever + * be the original game music, not music from other games, or new productions. + * + * Additionally, some program change and controller events are given special meaning, see comments in the code. + */ +struct MpsMachine { + /** Starting parameter and playback status for one channel/track */ + struct Channel { + byte cur_program; ///< program selected, used for velocity scaling (lookup into programvelocities array) + byte running_status; ///< last midi status code seen + uint16 delay; ///< frames until next command + uint32 playpos; ///< next byte to play this channel from + uint32 startpos; ///< start position of master track + uint32 returnpos; ///< next return position after playing a segment + Channel() : cur_program(0xFF), running_status(0), delay(0), playpos(0), startpos(0), returnpos(0) { } + }; + Channel channels[16]; ///< playback status for each MIDI channel + std::vector segments; ///< pointers into songdata to repeatable data segments + int16 tempo_ticks; ///< ticker that increments when playing a frame, decrements before playing a frame + int16 current_tempo; ///< threshold for actually playing a frame + int16 initial_tempo; ///< starting tempo of song + bool shouldplayflag; ///< not-end-of-song flag + + static const int TEMPO_RATE; + static const byte programvelocities[128]; + + const byte *songdata; ///< raw data array + size_t songdatalen; ///< length of song data + MidiFile ⌖ ///< recipient of data + + /** Overridden MIDI status codes used in the data format */ + enum MpsMidiStatus { + MPSMIDIST_SEGMENT_RETURN = 0xFD, ///< resume playing master track from stored position + MPSMIDIST_SEGMENT_CALL = 0xFE, ///< store current position of master track playback, and begin playback of a segment + MPSMIDIST_ENDSONG = 0xFF, ///< immediately end the song + }; + + static void AddMidiData(MidiFile::DataBlock &block, byte b1, byte b2) + { + *block.data.Append() = b1; + *block.data.Append() = b2; + } + static void AddMidiData(MidiFile::DataBlock &block, byte b1, byte b2, byte b3) + { + *block.data.Append() = b1; + *block.data.Append() = b2; + *block.data.Append() = b3; + } + + /** + * Construct a TTD DOS music format decoder. + * @param data Buffer of song data from CAT file, ownership remains with caller + * @param length Length of the data buffer in bytes + * @param target MidiFile object to add decoded data to + */ + MpsMachine(const byte *data, size_t length, MidiFile &target) + : songdata(data), songdatalen(length), target(target) + { + uint32 pos = 0; + int loopmax; + int loopidx; + + /* First byte is the initial "tempo" */ + this->initial_tempo = this->songdata[pos++]; + + /* Next byte is a count of callable segments */ + loopmax = this->songdata[pos++]; + for (loopidx = 0; loopidx < loopmax; loopidx++) { + /* Segments form a linked list in the stream, + * first two bytes in each is an offset to the next. + * Two bytes between offset to next and start of data + * are unaccounted for. */ + this->segments.push_back(pos + 4); + pos += FROM_LE16(*(const int16 *)(this->songdata + pos)); + } + + /* After segments follows list of master tracks for each channel, + * also prefixed with a byte counting actual tracks. */ + loopmax = this->songdata[pos++]; + for (loopidx = 0; loopidx < loopmax; loopidx++) { + /* Similar structure to segments list, but also has + * the MIDI channel number as a byte before the offset + * to next track. */ + byte ch = this->songdata[pos++]; + this->channels[ch].startpos = pos + 4; + pos += FROM_LE16(*(const int16 *)(this->songdata + pos)); + } + } + + /** + * Read an SMF-style variable length value (note duration) from songdata. + * @param pos Position to read from, updated to point to next byte after the value read + * @return Value read from data stream + */ + uint16 ReadVariableLength(uint32 &pos) + { + byte b = 0; + uint16 res = 0; + do { + b = this->songdata[pos++]; + res = (res << 7) + (b & 0x7F); + } while (b & 0x80); + return res; + } + + /** + * Prepare for playback from the beginning. Resets the song pointer for every track to the beginning. + */ + void RestartSong() + { + for (int ch = 0; ch < 16; ch++) { + Channel &chandata = this->channels[ch]; + if (chandata.startpos != 0) { + /* Active track, set position to beginning */ + chandata.playpos = chandata.startpos; + chandata.delay = this->ReadVariableLength(chandata.playpos); + } else { + /* Inactive track, mark as such */ + chandata.playpos = 0; + chandata.delay = 0; + } + } + } + + /** + * Play one frame of data from one channel + */ + uint16 PlayChannelFrame(MidiFile::DataBlock &outblock, int channel) + { + uint16 newdelay = 0; + byte b1, b2; + Channel &chandata = this->channels[channel]; + + do { + /* Read command/status byte */ + b1 = this->songdata[chandata.playpos++]; + + /* Command 0xFE, call segment from master track */ + if (b1 == MPSMIDIST_SEGMENT_CALL) { + b1 = this->songdata[chandata.playpos++]; + chandata.returnpos = chandata.playpos; + chandata.playpos = this->segments[b1]; + newdelay = this->ReadVariableLength(chandata.playpos); + if (newdelay == 0) { + continue; + } + return newdelay; + } + + /* Command 0xFD, return from segment to master track */ + if (b1 == MPSMIDIST_SEGMENT_RETURN) { + chandata.playpos = chandata.returnpos; + chandata.returnpos = 0; + newdelay = this->ReadVariableLength(chandata.playpos); + if (newdelay == 0) { + continue; + } + return newdelay; + } + + /* Command 0xFF, end of song */ + if (b1 == MPSMIDIST_ENDSONG) { + this->shouldplayflag = false; + return 0; + } + + /* Regular MIDI channel message status byte */ + if (b1 >= 0x80) { + /* Save the status byte as running status for the channel + * and read another byte for first parameter to command */ + chandata.running_status = b1; + b1 = this->songdata[chandata.playpos++]; + } + + switch (chandata.running_status & 0xF0) { + case MIDIST_NOTEOFF: + case MIDIST_NOTEON: + b2 = this->songdata[chandata.playpos++]; + if (b2 != 0) { + /* Note on, read velocity and scale according to rules */ + int16 velocity; + if (channel == 9) { + /* Percussion channel, fixed velocity scaling not in the table */ + velocity = (int16)b2 * 0x50; + } else { + /* Regular channel, use scaling from table */ + velocity = b2 * programvelocities[chandata.cur_program]; + } + b2 = (velocity / 128) & 0x00FF; + AddMidiData(outblock, MIDIST_NOTEON + channel, b1, b2); + } else { + /* Note off */ + AddMidiData(outblock, MIDIST_NOTEON + channel, b1, 0); + } + break; + case MIDIST_CONTROLLER: + b2 = this->songdata[chandata.playpos++]; + if (b1 == MIDICT_MODE_MONO) { + /* Unknown what the purpose of this is. + * Occurs in "Can't get There from Here" and in "Aliens Ate my Railway" a few times each. + * Possibly intended to give hints to other (non-GM) music drivers decoding the song. + */ + break; + } else if (b1 == 0) { + /* Standard MIDI controller 0 is "bank select", override meaning to change tempo. + * This is not actually used in any of the original songs. */ + if (b2 != 0) { + this->current_tempo = ((int)b2) * 48 / 60; + } + break; + } else if (b1 == MIDICT_EFFECTS1) { + /* Override value of this controller, default mapping is Reverb Send Level according to MMA RP-023. + * Unknown what the purpose of this particular value is. */ + b2 = 30; + } + AddMidiData(outblock, MIDIST_CONTROLLER + channel, b1, b2); + break; + case MIDIST_PROGCHG: + if (b1 == 0x7E) { + /* Program change to "Applause" is originally used + * to cause the song to loop, but that gets handled + * separately in the output driver here. + * Just end the song. */ + this->shouldplayflag = false; + break; + } + /* Used for note velocity scaling lookup */ + chandata.cur_program = b1; + /* Two programs translated to a third, this is likely to + * provide three different velocity scalings of "brass". */ + if (b1 == 0x57 || b1 == 0x3F) { + b1 = 0x3E; + } + AddMidiData(outblock, MIDIST_PROGCHG + channel, b1); + break; + case MIDIST_PITCHBEND: + b2 = this->songdata[chandata.playpos++]; + AddMidiData(outblock, MIDIST_PITCHBEND + channel, b1, b2); + break; + default: + break; + } + + newdelay = this->ReadVariableLength(chandata.playpos); + } while (newdelay == 0); + + return newdelay; + } + + /** + * Play one frame of data into a block. + */ + bool PlayFrame(MidiFile::DataBlock &block) + { + /* Update tempo/ticks counter */ + this->tempo_ticks -= this->current_tempo; + if (this->tempo_ticks > 0) { + return true; + } + this->tempo_ticks += TEMPO_RATE; + + /* Look over all channels, play those active */ + for (int ch = 0; ch < 16; ch++) { + Channel &chandata = this->channels[ch]; + if (chandata.playpos != 0) { + if (chandata.delay == 0) { + chandata.delay = this->PlayChannelFrame(block, ch); + } + chandata.delay--; + } + } + + return this->shouldplayflag; + } + + /** + * Perform playback of whole song. + */ + bool PlayInto() + { + /* Tempo seems to be handled as TEMPO_RATE = 148 ticks per second. + * Use this as the tickdiv, and define the tempo to be one second (1M microseconds) per tickdiv. + * MIDI software loading exported files will show a bogus tempo, but playback will be correct. */ + this->target.tickdiv = TEMPO_RATE; + this->target.tempos.push_back(MidiFile::TempoChange(0, 1000000)); + + /* Initialize playback simulation */ + this->RestartSong(); + this->shouldplayflag = true; + this->current_tempo = (int32)this->initial_tempo * 24 / 60; + this->tempo_ticks = this->current_tempo; + + /* Always reset percussion channel to program 0 */ + this->target.blocks.push_back(MidiFile::DataBlock()); + AddMidiData(this->target.blocks.back(), MIDIST_PROGCHG+9, 0x00); + + /* Technically should be an endless loop, but having + * a maximum (about 10 minutes) avoids getting stuck, + * in case of corrupted data. */ + for (uint32 tick = 0; tick < 100000; tick+=1) { + this->target.blocks.push_back(MidiFile::DataBlock()); + auto &block = this->target.blocks.back(); + block.ticktime = tick; + if (!this->PlayFrame(block)) { + break; + } + } + return true; + } +}; +/** Frames/ticks per second for music playback */ +const int MpsMachine::TEMPO_RATE = 148; +/** Base note velocities for various GM programs */ +const byte MpsMachine::programvelocities[128] = { + 100, 100, 100, 100, 100, 90, 100, 100, 100, 100, 100, 90, 100, 100, 100, 100, + 100, 100, 85, 100, 100, 100, 100, 100, 100, 100, 100, 100, 90, 90, 110, 80, + 100, 100, 100, 90, 70, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 90, 100, 100, 100, 100, 100, 100, 120, 100, 100, 100, 120, 100, 127, + 100, 100, 90, 100, 100, 100, 100, 100, 100, 95, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 115, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, +}; + +/** + * Create MIDI data from song data for the original Microprose music drivers. + * @param data pointer to block of data + * @param length size of data in bytes + * @return true if the data could be loaded + */ +bool MidiFile::LoadMpsData(const byte *data, size_t length) +{ + _midifile_instance = this; + + MpsMachine machine(data, length, *this); + return machine.PlayInto() && FixupMidiData(*this); +} + +bool MidiFile::LoadSong(const MusicSongInfo &song) +{ + switch (song.filetype) { + case MTT_STANDARDMIDI: + return this->LoadFile(song.filename); + case MTT_MPSMIDI: + { + size_t songdatalen = 0; + byte *songdata = GetMusicCatEntryData(song.filename, song.cat_index, songdatalen); + if (songdata != NULL) { + bool result = this->LoadMpsData(songdata, songdatalen); + free(songdata); + return result; + } else { + return false; + } + } + default: + NOT_REACHED(); + } +} + +/** + * Move data from other to this, and clears other. + * @param other object containing loaded data to take over + */ +void MidiFile::MoveFrom(MidiFile &other) +{ + std::swap(this->blocks, other.blocks); + std::swap(this->tempos, other.tempos); + this->tickdiv = other.tickdiv; + + _midifile_instance = this; + + other.blocks.clear(); + other.tempos.clear(); + other.tickdiv = 0; +} + +static void WriteVariableLen(FILE *f, uint32 value) +{ + if (value < 0x7F) { + byte tb = value; + fwrite(&tb, 1, 1, f); + } else if (value < 0x3FFF) { + byte tb[2]; + tb[1] = value & 0x7F; value >>= 7; + tb[0] = (value & 0x7F) | 0x80; value >>= 7; + fwrite(tb, 1, sizeof(tb), f); + } else if (value < 0x1FFFFF) { + byte tb[3]; + tb[2] = value & 0x7F; value >>= 7; + tb[1] = (value & 0x7F) | 0x80; value >>= 7; + tb[0] = (value & 0x7F) | 0x80; value >>= 7; + fwrite(tb, 1, sizeof(tb), f); + } else if (value < 0x0FFFFFFF) { + byte tb[4]; + tb[3] = value & 0x7F; value >>= 7; + tb[2] = (value & 0x7F) | 0x80; value >>= 7; + tb[1] = (value & 0x7F) | 0x80; value >>= 7; + tb[0] = (value & 0x7F) | 0x80; value >>= 7; + fwrite(tb, 1, sizeof(tb), f); + } +} + +/** + * Write a Standard MIDI File containing the decoded music. + * @param filename Name of file to write to + * @return True if the file was written to completion + */ +bool MidiFile::WriteSMF(const char *filename) +{ + FILE *f = FioFOpenFile(filename, "wb", Subdirectory::NO_DIRECTORY); + if (!f) { + return false; + } + + /* SMF header */ + const byte fileheader[] = { + 'M', 'T', 'h', 'd', // block name + 0x00, 0x00, 0x00, 0x06, // BE32 block length, always 6 bytes + 0x00, 0x00, // writing format 0 (all in one track) + 0x00, 0x01, // containing 1 track (BE16) + (byte)(this->tickdiv >> 8), (byte)this->tickdiv, // tickdiv in BE16 + }; + fwrite(fileheader, sizeof(fileheader), 1, f); + + /* Track header */ + const byte trackheader[] = { + 'M', 'T', 'r', 'k', // block name + 0, 0, 0, 0, // BE32 block length, unknown at this time + }; + fwrite(trackheader, sizeof(trackheader), 1, f); + /* Determine position to write the actual track block length at */ + size_t tracksizepos = ftell(f) - 4; + + /* Write blocks in sequence */ + uint32 lasttime = 0; + size_t nexttempoindex = 0; + for (size_t bi = 0; bi < this->blocks.size(); bi++) { + DataBlock &block = this->blocks[bi]; + TempoChange &nexttempo = this->tempos[nexttempoindex]; + + uint32 timediff = block.ticktime - lasttime; + + /* Check if there is a tempo change before this block */ + if (nexttempo.ticktime < block.ticktime) { + timediff = nexttempo.ticktime - lasttime; + } + + /* Write delta time for block */ + lasttime += timediff; + bool needtime = false; + WriteVariableLen(f, timediff); + + /* Write tempo change if there is one */ + if (nexttempo.ticktime <= block.ticktime) { + byte tempobuf[6] = { MIDIST_SMF_META, 0x51, 0x03, 0, 0, 0 }; + tempobuf[3] = (nexttempo.tempo & 0x00FF0000) >> 16; + tempobuf[4] = (nexttempo.tempo & 0x0000FF00) >> 8; + tempobuf[5] = (nexttempo.tempo & 0x000000FF); + fwrite(tempobuf, sizeof(tempobuf), 1, f); + nexttempoindex++; + needtime = true; + } + /* If a tempo change occurred between two blocks, rather than + * at start of this one, start over with delta time for the block. */ + if (nexttempo.ticktime < block.ticktime) { + /* Start loop over at same index */ + bi--; + continue; + } + + /* Write each block data command */ + byte *dp = block.data.Begin(); + while (dp < block.data.End()) { + /* Always zero delta time inside blocks */ + if (needtime) { + fputc(0, f); + } + needtime = true; + + /* Check message type and write appropriate number of bytes */ + switch (*dp & 0xF0) { + case MIDIST_NOTEOFF: + case MIDIST_NOTEON: + case MIDIST_POLYPRESS: + case MIDIST_CONTROLLER: + case MIDIST_PITCHBEND: + fwrite(dp, 1, 3, f); + dp += 3; + continue; + case MIDIST_PROGCHG: + case MIDIST_CHANPRESS: + fwrite(dp, 1, 2, f); + dp += 2; + continue; + } + + /* Sysex needs to measure length and write that as well */ + if (*dp == MIDIST_SYSEX) { + fwrite(dp, 1, 1, f); + dp++; + byte *sysexend = dp; + while (*sysexend != MIDIST_ENDSYSEX) sysexend++; + ptrdiff_t sysexlen = sysexend - dp; + WriteVariableLen(f, sysexlen); + fwrite(dp, 1, sysexend - dp, f); + dp = sysexend; + continue; + } + + /* Fail for any other commands */ + fclose(f); + return false; + } + } + + /* End of track marker */ + static const byte track_end_marker[] = { 0x00, MIDIST_SMF_META, 0x2F, 0x00 }; + fwrite(&track_end_marker, sizeof(track_end_marker), 1, f); + + /* Fill out the RIFF block length */ + size_t trackendpos = ftell(f); + fseek(f, tracksizepos, SEEK_SET); + uint32 tracksize = (uint32)(trackendpos - tracksizepos - 4); // blindly assume we never produce files larger than 2 GB + tracksize = TO_BE32(tracksize); + fwrite(&tracksize, 4, 1, f); + + fclose(f); + return true; +} + +/** + * Get the name of a Standard MIDI File for a given song. + * For songs already in SMF format, just returns the original. + * Otherwise the song is converted, written to a temporary-ish file, and the written filename is returned. + * @param song Song definition to query + * @return Full filename string, empty string if failed + */ +std::string MidiFile::GetSMFFile(const MusicSongInfo &song) +{ + if (song.filetype == MTT_STANDARDMIDI) { + char filename[MAX_PATH]; + if (FioFindFullPath(filename, lastof(filename), Subdirectory::BASESET_DIR, song.filename)) { + return std::string(filename); + } else if (FioFindFullPath(filename, lastof(filename), Subdirectory::OLD_GM_DIR, song.filename)) { + return std::string(filename); + } else { + return std::string(); + } + } + + if (song.filetype != MTT_MPSMIDI) return std::string(); + + char basename[MAX_PATH]; + { + const char *fnstart = strrchr(song.filename, PATHSEPCHAR); + if (fnstart == NULL) { + fnstart = song.filename; + } else { + fnstart++; + } + + /* Remove all '.' characters from filename */ + char *wp = basename; + for (const char *rp = fnstart; *rp != '\0'; rp++) { + if (*rp != '.') *wp++ = *rp; + } + *wp++ = '\0'; + } + + char tempdirname[MAX_PATH]; + FioGetFullPath(tempdirname, lastof(tempdirname), Searchpath::SP_AUTODOWNLOAD_DIR, Subdirectory::BASESET_DIR, basename); + if (!AppendPathSeparator(tempdirname, lastof(tempdirname))) return std::string(); + FioCreateDirectory(tempdirname); + + char output_filename[MAX_PATH]; + seprintf(output_filename, lastof(output_filename), "%s%d.mid", tempdirname, song.cat_index); + + if (FileExists(output_filename)) { + /* If the file already exists, assume it's the correct decoded data */ + return std::string(output_filename); + } + + byte *data; + size_t datalen; + data = GetMusicCatEntryData(song.filename, song.cat_index, datalen); + if (data == NULL) return std::string(); + + MidiFile midifile; + if (!midifile.LoadMpsData(data, datalen)) { + free(data); + return std::string(); + } + free(data); + + if (midifile.WriteSMF(output_filename)) { + return std::string(output_filename); + } else { + return std::string(); + } +} + + +static bool CmdDumpSMF(byte argc, char *argv[]) +{ + if (argc == 0) { + IConsolePrint(CC_WARNING, "Write the current song to a Standard MIDI File. Usage: 'dumpsmf '"); + return true; + } + if (argc != 2) { + IConsolePrint(CC_WARNING, "You must specify a filename to write MIDI data to."); + return false; + } + + if (_midifile_instance == NULL) { + IConsolePrint(CC_ERROR, "There is no MIDI file loaded currently, make sure music is playing, and you're using a driver that works with raw MIDI."); + return false; + } + + char fnbuf[MAX_PATH] = { 0 }; + if (seprintf(fnbuf, lastof(fnbuf), "%s%s", FiosGetScreenshotDir(), argv[1]) >= (int)lengthof(fnbuf)) { + IConsolePrint(CC_ERROR, "Filename too long."); + return false; + } + IConsolePrintF(CC_INFO, "Dumping MIDI to: %s", fnbuf); + + if (_midifile_instance->WriteSMF(fnbuf)) { + IConsolePrint(CC_INFO, "File written successfully."); + return true; + } else { + IConsolePrint(CC_ERROR, "An error occurred writing MIDI file."); + return false; + } +} + +static void RegisterConsoleMidiCommands() +{ + static bool registered = false; + if (!registered) { + IConsoleCmdRegister("dumpsmf", CmdDumpSMF); + registered = true; + } +} + +MidiFile::MidiFile() +{ + RegisterConsoleMidiCommands(); +} + +MidiFile::~MidiFile() +{ + if (_midifile_instance == this) { + _midifile_instance = NULL; + } +} + diff --git a/src/music/midifile.hpp b/src/music/midifile.hpp new file mode 100644 index 0000000000..0016be86ca --- /dev/null +++ b/src/music/midifile.hpp @@ -0,0 +1,55 @@ +/* $Id$ */ + +/* +* This file is part of OpenTTD. +* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . +*/ + +/* @file midifile.hpp Parser for standard MIDI files */ + +#ifndef MUSIC_MIDIFILE_HPP +#define MUSIC_MIDIFILE_HPP + +#include "../stdafx.h" +#include "../core/smallvec_type.hpp" +#include "midi.h" +#include +#include + +struct MusicSongInfo; + +struct MidiFile { + struct DataBlock { + uint32 ticktime; ///< tick number since start of file this block should be triggered at + uint32 realtime; ///< real-time (microseconds) since start of file this block should be triggered at + SmallVector data; ///< raw midi data contained in block + DataBlock(uint32 _ticktime = 0) : ticktime(_ticktime) { } + }; + struct TempoChange { + uint32 ticktime; ///< tick number since start of file this tempo change occurs at + uint32 tempo; ///< new tempo in microseconds per tick + TempoChange(uint32 _ticktime, uint32 _tempo) : ticktime(_ticktime), tempo(_tempo) { } + }; + + std::vector blocks; ///< sequential time-annotated data of file, merged to a single track + std::vector tempos; ///< list of tempo changes in file + uint16 tickdiv; ///< ticks per quarter note + + MidiFile(); + ~MidiFile(); + + bool LoadFile(const char *filename); + bool LoadMpsData(const byte *data, size_t length); + bool LoadSong(const MusicSongInfo &song); + void MoveFrom(MidiFile &other); + + bool WriteSMF(const char *filename); + + static std::string GetSMFFile(const MusicSongInfo &song); + static bool ReadSMFHeader(const char *filename, SMFHeader &header); + static bool ReadSMFHeader(FILE *file, SMFHeader &header); +}; + +#endif /* MUSIC_MIDIFILE_HPP */ diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp index 77b3ba168f..f4d3d7dd36 100644 --- a/src/music/music_driver.hpp +++ b/src/music/music_driver.hpp @@ -1,4 +1,4 @@ -/* $Id: music_driver.hpp 26538 2014-04-28 21:06:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,14 +14,16 @@ #include "../driver.h" +struct MusicSongInfo; + /** Driver for all music playback. */ class MusicDriver : public Driver { public: /** * Play a particular song. - * @param filename The name of file with the song to play. + * @param song The information for the song to play. */ - virtual void PlaySong(const char *filename) = 0; + virtual void PlaySong(const MusicSongInfo &song) = 0; /** * Stop playing the current song. diff --git a/src/music/null_m.cpp b/src/music/null_m.cpp index 87feeac228..90d08d04a1 100644 --- a/src/music/null_m.cpp +++ b/src/music/null_m.cpp @@ -1,4 +1,4 @@ -/* $Id: null_m.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/music/null_m.h b/src/music/null_m.h index c0af124346..51e1a06656 100644 --- a/src/music/null_m.h +++ b/src/music/null_m.h @@ -1,4 +1,4 @@ -/* $Id: null_m.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ public: /* virtual */ void Stop() { } - /* virtual */ void PlaySong(const char *filename) { } + /* virtual */ void PlaySong(const MusicSongInfo &song) { } /* virtual */ void StopSong() { } diff --git a/src/music/os2_m.cpp b/src/music/os2_m.cpp index 120648ee54..1689f00a64 100644 --- a/src/music/os2_m.cpp +++ b/src/music/os2_m.cpp @@ -1,4 +1,4 @@ -/* $Id: os2_m.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,6 +12,8 @@ #include "../stdafx.h" #include "../openttd.h" #include "os2_m.h" +#include "midifile.hpp" +#include "../base_media_base.h" #define INCL_DOS #define INCL_OS2MM @@ -49,11 +51,14 @@ static long CDECL MidiSendCommand(const char *cmd, ...) /** OS/2's music player's factory. */ static FMusicDriver_OS2 iFMusicDriver_OS2; -void MusicDriver_OS2::PlaySong(const char *filename) +void MusicDriver_OS2::PlaySong(const MusicSongInfo &song) { - MidiSendCommand("close all"); + std::string filename = MidiFile::GetSMFFile(song); - if (MidiSendCommand("open %s type sequencer alias song", filename) != 0) { + MidiSendCommand("close all"); + if (filename.empty()) return; + + if (MidiSendCommand("open %s type sequencer alias song", filename.c_str()) != 0) { return; } diff --git a/src/music/os2_m.h b/src/music/os2_m.h index d647261c40..ac7cd03197 100644 --- a/src/music/os2_m.h +++ b/src/music/os2_m.h @@ -1,4 +1,4 @@ -/* $Id: os2_m.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/qtmidi.cpp b/src/music/qtmidi.cpp index aac48e5191..f8ab150e79 100644 --- a/src/music/qtmidi.cpp +++ b/src/music/qtmidi.cpp @@ -1,4 +1,4 @@ -/* $Id: qtmidi.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -30,7 +30,9 @@ #include "../stdafx.h" #include "qtmidi.h" +#include "midifile.hpp" #include "../debug.h" +#include "../base_media_base.h" #define Rect OTTDRect #define Point OTTDPoint @@ -258,11 +260,14 @@ void MusicDriver_QtMidi::Stop() * * @param filename Path to a MIDI file. */ -void MusicDriver_QtMidi::PlaySong(const char *filename) +void MusicDriver_QtMidi::PlaySong(const MusicSongInfo &song) { if (!_quicktime_started) return; - DEBUG(driver, 2, "qtmidi: trying to play '%s'", filename); + std::string filename = MidiFile::GetSMFFile(song); + if (filename.empty()) return; + + DEBUG(driver, 2, "qtmidi: trying to play '%s'", filename.c_str()); switch (_quicktime_state) { case QT_STATE_PLAY: StopSong(); @@ -276,12 +281,12 @@ void MusicDriver_QtMidi::PlaySong(const char *filename) FALLTHROUGH; case QT_STATE_IDLE: - LoadMovieForMIDIFile(filename, &_quicktime_movie); + LoadMovieForMIDIFile(filename.c_str(), &_quicktime_movie); SetMovieVolume(_quicktime_movie, VOLUME); StartMovie(_quicktime_movie); _quicktime_state = QT_STATE_PLAY; } - DEBUG(driver, 3, "qtmidi: playing '%s'", filename); + DEBUG(driver, 3, "qtmidi: playing '%s'", filename.c_str()); } diff --git a/src/music/qtmidi.h b/src/music/qtmidi.h index fd030e9b03..32163db939 100644 --- a/src/music/qtmidi.h +++ b/src/music/qtmidi.h @@ -1,4 +1,4 @@ -/* $Id: qtmidi.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -20,7 +20,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index bf8255a98a..a32318db12 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -1,4 +1,4 @@ -/* $Id: win32_m.cpp 27673 2016-10-30 18:22:55Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,170 +15,407 @@ #include #include #include "../os/windows/win32.h" +#include "../debug.h" +#include "midifile.hpp" +#include "midi.h" +#include "../base_media_base.h" #include "../safeguards.h" +struct PlaybackSegment { + uint32 start, end; + size_t start_block; + bool loop; +}; + static struct { - bool stop_song; - bool terminate; - bool playing; - int new_vol; - HANDLE wait_obj; - HANDLE thread; - UINT_PTR devid; - char start_song[MAX_PATH]; + UINT time_period; ///< obtained timer precision value + HMIDIOUT midi_out; ///< handle to open midiOut + UINT timer_id; ///< ID of active multimedia timer + CRITICAL_SECTION lock; ///< synchronization for playback status fields + + bool playing; ///< flag indicating that playback is active + bool do_start; ///< flag for starting playback of next_file at next opportunity + bool do_stop; ///< flag for stopping playback at next opportunity + byte current_volume; ///< current effective volume setting + byte new_volume; ///< volume setting to change to + + MidiFile current_file; ///< file currently being played from + PlaybackSegment current_segment; ///< segment info for current playback + DWORD playback_start_time; ///< timestamp current file began playback + size_t current_block; ///< next block index to send + MidiFile next_file; ///< upcoming file to play + PlaybackSegment next_segment; ///< segment info for upcoming file + + byte channel_volumes[16]; ///< last seen volume controller values in raw data } _midi; static FMusicDriver_Win32 iFMusicDriver_Win32; -void MusicDriver_Win32::PlaySong(const char *filename) + +static byte ScaleVolume(byte original, byte scale) { - assert(filename != NULL); - strecpy(_midi.start_song, filename, lastof(_midi.start_song)); - _midi.playing = true; - _midi.stop_song = false; - SetEvent(_midi.wait_obj); + return original * scale / 127; +} + + +void CALLBACK MidiOutProc(HMIDIOUT hmo, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) +{ + if (wMsg == MOM_DONE) { + MIDIHDR *hdr = (LPMIDIHDR)dwParam1; + midiOutUnprepareHeader(hmo, hdr, sizeof(*hdr)); + free(hdr); + } +} + +static void TransmitChannelMsg(byte status, byte p1, byte p2 = 0) +{ + midiOutShortMsg(_midi.midi_out, status | (p1 << 8) | (p2 << 16)); +} + +static void TransmitSysex(byte *&msg_start, size_t &remaining) +{ + /* find end of message */ + byte *msg_end = msg_start; + while (*msg_end != MIDIST_ENDSYSEX) msg_end++; + msg_end++; /* also include sysex end byte */ + + /* prepare header */ + MIDIHDR *hdr = CallocT(1); + hdr->lpData = (LPSTR)msg_start; + hdr->dwBufferLength = msg_end - msg_start; + if (midiOutPrepareHeader(_midi.midi_out, hdr, sizeof(*hdr)) == MMSYSERR_NOERROR) { + /* transmit - just point directly into the data buffer */ + hdr->dwBytesRecorded = hdr->dwBufferLength; + midiOutLongMsg(_midi.midi_out, hdr, sizeof(*hdr)); + } else { + free(hdr); + } + + /* update position in buffer */ + remaining -= msg_end - msg_start; + msg_start = msg_end; +} + +static void TransmitSysexConst(byte *msg_start, size_t length) +{ + TransmitSysex(msg_start, length); +} + +/** + * Realtime MIDI playback service routine. + * This is called by the multimedia timer. + */ +void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DWORD_PTR) +{ + /* Try to check playback status changes. + * If _midi is already locked, skip checking for this cycle and try again + * next cycle, instead of waiting for locks in the realtime callback. */ + if (TryEnterCriticalSection(&_midi.lock)) { + /* check for stop */ + if (_midi.do_stop) { + DEBUG(driver, 2, "Win32-MIDI: timer: do_stop is set"); + midiOutReset(_midi.midi_out); + _midi.playing = false; + _midi.do_stop = false; + LeaveCriticalSection(&_midi.lock); + return; + } + + /* check for start/restart/change song */ + if (_midi.do_start) { + DEBUG(driver, 2, "Win32-MIDI: timer: do_start is set"); + if (_midi.playing) { + midiOutReset(_midi.midi_out); + /* Some songs change the "Pitch bend range" registered + * parameter. If this doesn't get reset, everything else + * will start sounding wrong. */ + for (int ch = 0; ch < 16; ch++) { + /* Running status, only need status for first message */ + /* Select RPN 00.00, set value to 02.00, and unselect again */ + TransmitChannelMsg(MIDIST_CONTROLLER | ch, MIDICT_RPN_SELECT_LO, 0x00); + TransmitChannelMsg(MIDICT_RPN_SELECT_HI, 0x00); + TransmitChannelMsg(MIDICT_DATAENTRY, 0x02); + TransmitChannelMsg(MIDICT_DATAENTRY_LO, 0x00); + TransmitChannelMsg(MIDICT_RPN_SELECT_LO, 0x7F); + TransmitChannelMsg(MIDICT_RPN_SELECT_HI, 0x7F); + } + } + _midi.current_file.MoveFrom(_midi.next_file); + std::swap(_midi.next_segment, _midi.current_segment); + _midi.current_segment.start_block = 0; + _midi.playback_start_time = timeGetTime(); + _midi.playing = true; + _midi.do_start = false; + _midi.current_block = 0; + + MemSetT(_midi.channel_volumes, 127, lengthof(_midi.channel_volumes)); + } else if (!_midi.playing) { + /* not playing, stop the timer */ + DEBUG(driver, 2, "Win32-MIDI: timer: not playing, stopping timer"); + timeKillEvent(uTimerID); + _midi.timer_id = 0; + LeaveCriticalSection(&_midi.lock); + return; + } + + /* check for volume change */ + static int volume_throttle = 0; + if (_midi.current_volume != _midi.new_volume) { + if (volume_throttle == 0) { + DEBUG(driver, 2, "Win32-MIDI: timer: volume change"); + _midi.current_volume = _midi.new_volume; + volume_throttle = 20 / _midi.time_period; + for (int ch = 0; ch < 16; ch++) { + int vol = ScaleVolume(_midi.channel_volumes[ch], _midi.current_volume); + TransmitChannelMsg(MIDIST_CONTROLLER | ch, MIDICT_CHANVOLUME, vol); + } + } + else { + volume_throttle--; + } + } + + LeaveCriticalSection(&_midi.lock); + } + + /* skip beginning of file? */ + if (_midi.current_segment.start > 0 && _midi.current_block == 0 && _midi.current_segment.start_block == 0) { + /* find first block after start time and pretend playback started earlier + * this is to allow all blocks prior to the actual start to still affect playback, + * as they may contain important controller and program changes */ + uint preload_bytes = 0; + for (size_t bl = 0; bl < _midi.current_file.blocks.size(); bl++) { + MidiFile::DataBlock &block = _midi.current_file.blocks[bl]; + preload_bytes += block.data.Length(); + if (block.ticktime >= _midi.current_segment.start) { + if (_midi.current_segment.loop) { + DEBUG(driver, 2, "Win32-MIDI: timer: loop from block %d (ticktime %d, realtime %.3f, bytes %d)", (int)bl, (int)block.ticktime, ((int)block.realtime)/1000.0, (int)preload_bytes); + _midi.current_segment.start_block = bl; + break; + } else { + /* Calculate offset start time for playback. + * The preload_bytes are used to compensate for delay in transmission over traditional serial MIDI interfaces, + * which have a bitrate of 31,250 bits/sec, and transmit 1+8+1 start/data/stop bits per byte. + * The delay compensation is needed to avoid time-compression of following messages. + */ + DEBUG(driver, 2, "Win32-MIDI: timer: start from block %d (ticktime %d, realtime %.3f, bytes %d)", (int)bl, (int)block.ticktime, ((int)block.realtime) / 1000.0, (int)preload_bytes); + _midi.playback_start_time -= block.realtime / 1000 - preload_bytes * 1000 / 3125; + break; + } + } + } + } + + + /* play pending blocks */ + DWORD current_time = timeGetTime(); + DWORD playback_time = current_time - _midi.playback_start_time; + while (_midi.current_block < _midi.current_file.blocks.size()) { + MidiFile::DataBlock &block = _midi.current_file.blocks[_midi.current_block]; + + /* check that block isn't at end-of-song override */ + if (_midi.current_segment.end > 0 && block.ticktime >= _midi.current_segment.end) { + if (_midi.current_segment.loop) { + _midi.current_block = _midi.current_segment.start_block; + _midi.playback_start_time = timeGetTime() - _midi.current_file.blocks[_midi.current_block].realtime / 1000; + } else { + _midi.do_stop = true; + } + break; + } + /* check that block is not in the future */ + if (block.realtime / 1000 > playback_time) { + break; + } + + byte *data = block.data.Begin(); + size_t remaining = block.data.Length(); + byte last_status = 0; + while (remaining > 0) { + /* MidiFile ought to have converted everything out of running status, + * but handle it anyway just to be safe */ + byte status = data[0]; + if (status & 0x80) { + last_status = status; + data++; + remaining--; + } else { + status = last_status; + } + switch (status & 0xF0) { + case MIDIST_PROGCHG: + case MIDIST_CHANPRESS: + /* 2 byte channel messages */ + TransmitChannelMsg(status, data[0]); + data++; + remaining--; + break; + case MIDIST_NOTEOFF: + case MIDIST_NOTEON: + case MIDIST_POLYPRESS: + case MIDIST_PITCHBEND: + /* 3 byte channel messages */ + TransmitChannelMsg(status, data[0], data[1]); + data += 2; + remaining -= 2; + break; + case MIDIST_CONTROLLER: + /* controller change */ + if (data[0] == MIDICT_CHANVOLUME) { + /* volume controller, adjust for user volume */ + _midi.channel_volumes[status & 0x0F] = data[1]; + int vol = ScaleVolume(data[1], _midi.current_volume); + TransmitChannelMsg(status, data[0], vol); + } else { + /* handle other controllers normally */ + TransmitChannelMsg(status, data[0], data[1]); + } + data += 2; + remaining -= 2; + break; + case 0xF0: + /* system messages */ + switch (status) { + case MIDIST_SYSEX: /* system exclusive */ + TransmitSysex(data, remaining); + break; + case MIDIST_TC_QFRAME: /* time code quarter frame */ + case MIDIST_SONGSEL: /* song select */ + data++; + remaining--; + break; + case MIDIST_SONGPOSPTR: /* song position pointer */ + data += 2; + remaining -= 2; + break; + default: /* remaining have no data bytes */ + break; + } + break; + } + } + + _midi.current_block++; + } + + /* end? */ + if (_midi.current_block == _midi.current_file.blocks.size()) { + if (_midi.current_segment.loop) { + _midi.current_block = _midi.current_segment.start_block; + _midi.playback_start_time = timeGetTime() - _midi.current_file.blocks[_midi.current_block].realtime / 1000; + } else { + _midi.do_stop = true; + } + } +} + +void MusicDriver_Win32::PlaySong(const MusicSongInfo &song) +{ + DEBUG(driver, 2, "Win32-MIDI: PlaySong: entry"); + EnterCriticalSection(&_midi.lock); + + if (!_midi.next_file.LoadSong(song)) { + LeaveCriticalSection(&_midi.lock); + return; + } + + _midi.next_segment.start = song.override_start; + _midi.next_segment.end = song.override_end; + _midi.next_segment.loop = song.loop; + + DEBUG(driver, 2, "Win32-MIDI: PlaySong: setting flag"); + _midi.do_stop = _midi.playing; + _midi.do_start = true; + + if (_midi.timer_id == 0) { + DEBUG(driver, 2, "Win32-MIDI: PlaySong: starting timer"); + _midi.timer_id = timeSetEvent(_midi.time_period, _midi.time_period, TimerCallback, (DWORD_PTR)this, TIME_PERIODIC | TIME_CALLBACK_FUNCTION); + } + + LeaveCriticalSection(&_midi.lock); } void MusicDriver_Win32::StopSong() { - if (_midi.playing) { - _midi.stop_song = true; - _midi.start_song[0] = '\0'; - SetEvent(_midi.wait_obj); - } + DEBUG(driver, 2, "Win32-MIDI: StopSong: entry"); + EnterCriticalSection(&_midi.lock); + DEBUG(driver, 2, "Win32-MIDI: StopSong: setting flag"); + _midi.do_stop = true; + LeaveCriticalSection(&_midi.lock); } bool MusicDriver_Win32::IsSongPlaying() { - return _midi.playing; + return _midi.playing || _midi.do_start; } void MusicDriver_Win32::SetVolume(byte vol) { - _midi.new_vol = vol; - SetEvent(_midi.wait_obj); -} - -static MCIERROR CDECL MidiSendCommand(const TCHAR *cmd, ...) -{ - va_list va; - TCHAR buf[512]; - - va_start(va, cmd); - _vsntprintf(buf, lengthof(buf), cmd, va); - va_end(va); - return mciSendString(buf, NULL, 0, 0); -} - -static bool MidiIntPlaySong(const char *filename) -{ - MidiSendCommand(_T("close all")); - - if (MidiSendCommand(_T("open \"%s\" type sequencer alias song"), OTTD2FS(filename)) != 0) { - /* Let's try the "short name" */ - TCHAR buf[MAX_PATH]; - if (GetShortPathName(OTTD2FS(filename), buf, MAX_PATH) == 0) return false; - if (MidiSendCommand(_T("open \"%s\" type sequencer alias song"), buf) != 0) return false; - } - - MidiSendCommand(_T("seek song to start wait")); - return MidiSendCommand(_T("play song")) == 0; -} - -static void MidiIntStopSong() -{ - MidiSendCommand(_T("close all")); -} - -static void MidiIntSetVolume(int vol) -{ - DWORD v = (vol * 65535 / 127); - midiOutSetVolume((HMIDIOUT)_midi.devid, v + (v << 16)); -} - -static bool MidiIntIsSongPlaying() -{ - char buf[16]; - mciSendStringA("status song mode", buf, sizeof(buf), 0); - return strcmp(buf, "playing") == 0 || strcmp(buf, "seeking") == 0; -} - -static DWORD WINAPI MidiThread(LPVOID arg) -{ - SetWin32ThreadName(-1, "ottd:win-midi"); - - do { - char *s; - int vol; - - vol = _midi.new_vol; - if (vol != -1) { - _midi.new_vol = -1; - MidiIntSetVolume(vol); - } - - s = _midi.start_song; - if (s[0] != '\0') { - _midi.playing = MidiIntPlaySong(s); - s[0] = '\0'; - - /* Delay somewhat in case we don't manage to play. */ - if (!_midi.playing) WaitForMultipleObjects(1, &_midi.wait_obj, FALSE, 5000); - } - - if (_midi.stop_song && _midi.playing) { - _midi.stop_song = false; - _midi.playing = false; - MidiIntStopSong(); - } - - if (_midi.playing && !MidiIntIsSongPlaying()) _midi.playing = false; - - WaitForMultipleObjects(1, &_midi.wait_obj, FALSE, 1000); - } while (!_midi.terminate); - - MidiIntStopSong(); - return 0; + EnterCriticalSection(&_midi.lock); + _midi.new_volume = vol; + LeaveCriticalSection(&_midi.lock); } const char *MusicDriver_Win32::Start(const char * const *parm) { - MIDIOUTCAPS midicaps; - UINT nbdev; - UINT_PTR dev; - char buf[16]; + DEBUG(driver, 2, "Win32-MIDI: Start: initializing"); - mciSendStringA("capability sequencer has audio", buf, lengthof(buf), 0); - if (strcmp(buf, "true") != 0) return "MCI sequencer can't play audio"; + InitializeCriticalSection(&_midi.lock); - memset(&_midi, 0, sizeof(_midi)); - _midi.new_vol = -1; + int resolution = GetDriverParamInt(parm, "resolution", 5); + int port = GetDriverParamInt(parm, "port", -1); - /* Get midi device */ - _midi.devid = MIDI_MAPPER; - for (dev = 0, nbdev = midiOutGetNumDevs(); dev < nbdev; dev++) { - if (midiOutGetDevCaps(dev, &midicaps, sizeof(midicaps)) == 0 && (midicaps.dwSupport & MIDICAPS_VOLUME)) { - _midi.devid = dev; - break; - } + UINT devid; + if (port < 0) { + devid = MIDI_MAPPER; + } else { + devid = (UINT)port; } - if (NULL == (_midi.wait_obj = CreateEvent(NULL, FALSE, FALSE, NULL))) return "Failed to create event"; + resolution = Clamp(resolution, 1, 20); - /* The lpThreadId parameter of CreateThread (the last parameter) - * may NOT be NULL on Windows 95, 98 and ME. */ - DWORD threadId; - if (NULL == (_midi.thread = CreateThread(NULL, 8192, MidiThread, 0, 0, &threadId))) return "Failed to create thread"; + if (midiOutOpen(&_midi.midi_out, devid, (DWORD_PTR)&MidiOutProc, (DWORD_PTR)this, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) { + return "could not open midi device"; + } - return NULL; + midiOutReset(_midi.midi_out); + + /* Standard "Enable General MIDI" message */ + static byte gm_enable_sysex[] = { 0xF0, 0x7E, 0x00, 0x09, 0x01, 0xF7 }; + TransmitSysexConst(&gm_enable_sysex[0], sizeof(gm_enable_sysex)); + + /* Roland-specific reverb room control, used by the original game */ + static byte roland_reverb_sysex[] = { 0xF0, 0x41, 0x10, 0x42, 0x12, 0x40, 0x01, 0x30, 0x02, 0x04, 0x00, 0x40, 0x40, 0x00, 0x00, 0x09, 0xF7 }; + TransmitSysexConst(&roland_reverb_sysex[0], sizeof(roland_reverb_sysex)); + + /* prepare multimedia timer */ + TIMECAPS timecaps; + if (timeGetDevCaps(&timecaps, sizeof(timecaps)) == MMSYSERR_NOERROR) { + _midi.time_period = min(max((UINT)resolution, timecaps.wPeriodMin), timecaps.wPeriodMax); + if (timeBeginPeriod(_midi.time_period) == MMSYSERR_NOERROR) { + /* success */ + DEBUG(driver, 2, "Win32-MIDI: Start: timer resolution is %d", (int)_midi.time_period); + return NULL; + } + } + midiOutClose(_midi.midi_out); + return "could not set timer resolution"; } void MusicDriver_Win32::Stop() { - _midi.terminate = true; - SetEvent(_midi.wait_obj); - WaitForMultipleObjects(1, &_midi.thread, true, INFINITE); - CloseHandle(_midi.wait_obj); - CloseHandle(_midi.thread); + EnterCriticalSection(&_midi.lock); + + if (_midi.timer_id) { + timeKillEvent(_midi.timer_id); + _midi.timer_id = 0; + } + + timeEndPeriod(_midi.time_period); + midiOutReset(_midi.midi_out); + midiOutClose(_midi.midi_out); + + LeaveCriticalSection(&_midi.lock); + DeleteCriticalSection(&_midi.lock); } diff --git a/src/music/win32_m.h b/src/music/win32_m.h index 42eb98231b..1ac8ae69e4 100644 --- a/src/music/win32_m.h +++ b/src/music/win32_m.h @@ -1,4 +1,4 @@ -/* $Id: win32_m.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ public: /* virtual */ void Stop(); - /* virtual */ void PlaySong(const char *filename); + /* virtual */ void PlaySong(const MusicSongInfo &song); /* virtual */ void StopSong(); diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 1da2b5a884..87a073b0a7 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: music_gui.cpp 27003 2014-10-12 18:41:53Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -10,6 +10,7 @@ /** @file music_gui.cpp GUI for the music playback. */ #include "stdafx.h" +#include #include "openttd.h" #include "base_media_base.h" #include "music/music_driver.hpp" @@ -18,11 +19,15 @@ #include "window_func.h" #include "sound_func.h" #include "gfx_func.h" +#include "zoom_func.h" #include "core/random_func.hpp" #include "error.h" #include "core/geometry_func.hpp" #include "string_func.h" #include "settings_type.h" +#include "settings_gui.h" +#include "widgets/dropdown_func.h" +#include "widgets/dropdown_type.h" #include "widgets/music_widget.h" @@ -31,271 +36,419 @@ #include "safeguards.h" -/** - * Get the name of the song. - * @param index of the song. - * @return the name of the song. - */ -static const char *GetSongName(int index) -{ - return BaseMusic::GetUsedSet()->song_name[index]; -} -/** - * Get the track number of the song. - * @param index of the song. - * @return the track number of the song. - */ -static int GetTrackNumber(int index) -{ - return BaseMusic::GetUsedSet()->track_nr[index]; -} +struct MusicSystem { + struct PlaylistEntry : MusicSongInfo { + const MusicSet *set; ///< music set the song comes from + uint set_index; ///< index of song in set -/** The currently played song */ -static byte _music_wnd_cursong = 1; -/** Whether a song is currently played */ -static bool _song_is_active = false; + PlaylistEntry(const MusicSet *set, uint set_index) : MusicSongInfo(set->songinfo[set_index]), set(set), set_index(set_index) { } + bool IsValid() const { return !StrEmpty(this->songname); } + }; + typedef std::vector Playlist; -/** Indices of the songs in the current playlist */ -static byte _cur_playlist[NUM_SONGS_PLAYLIST + 1]; + enum PlaylistChoices { + PLCH_ALLMUSIC, + PLCH_OLDSTYLE, + PLCH_NEWSTYLE, + PLCH_EZYSTREET, + PLCH_CUSTOM1, + PLCH_CUSTOM2, + PLCH_THEMEONLY, + PLCH_MAX, + }; -/** Indices of all songs */ -static byte _playlist_all[NUM_SONGS_AVAILABLE + 1]; -/** Indices of all old style songs */ -static byte _playlist_old_style[NUM_SONGS_CLASS + 1]; -/** Indices of all new style songs */ -static byte _playlist_new_style[NUM_SONGS_CLASS + 1]; -/** Indices of all ezy street songs */ -static byte _playlist_ezy_street[NUM_SONGS_CLASS + 1]; + Playlist active_playlist; ///< current play order of songs, including any shuffle + Playlist displayed_playlist; ///< current playlist as displayed in GUI, never in shuffled order + Playlist music_set; ///< all songs in current music set, in set order -assert_compile(lengthof(_settings_client.music.custom_1) == NUM_SONGS_PLAYLIST + 1); -assert_compile(lengthof(_settings_client.music.custom_2) == NUM_SONGS_PLAYLIST + 1); + PlaylistChoices selected_playlist; -/** The different playlists that can be played. */ -static byte * const _playlists[] = { - _playlist_all, - _playlist_old_style, - _playlist_new_style, - _playlist_ezy_street, - _settings_client.music.custom_1, - _settings_client.music.custom_2, + void BuildPlaylists(); + + void ChangePlaylist(PlaylistChoices pl); + void ChangeMusicSet(const char *set_name); + void Shuffle(); + void Unshuffle(); + + void Play(); + void Stop(); + void Next(); + void Prev(); + void CheckStatus(); + + bool IsPlaying() const; + bool IsShuffle() const; + PlaylistEntry GetCurrentSong() const; + + bool IsCustomPlaylist() const; + void PlaylistAdd(size_t song_index); + void PlaylistRemove(size_t song_index); + void PlaylistClear(); + +private: + void ChangePlaylistPosition(int ofs); + int playlist_position; + + void SaveCustomPlaylist(PlaylistChoices pl); + + Playlist standard_playlists[PLCH_MAX]; }; -/** - * Validate a playlist. - * @param playlist The playlist to validate. - * @param last The last location in the list. - */ -void ValidatePlaylist(byte *playlist, byte *last) -{ - while (*playlist != 0 && playlist <= last) { - /* Song indices are saved off-by-one so 0 is "nothing". */ - if (*playlist <= NUM_SONGS_AVAILABLE && !StrEmpty(GetSongName(*playlist - 1))) { - playlist++; - continue; - } - for (byte *p = playlist; *p != 0 && p <= last; p++) { - p[0] = p[1]; - } - } +MusicSystem _music; - /* Make sure the list is null terminated. */ - *last = 0; -} -/** Initialize the playlists */ -void InitializeMusic() +/** Rebuild all playlists for the current music set */ +void MusicSystem::BuildPlaylists() { - uint j = 0; + const MusicSet *set = BaseMusic::GetUsedSet(); + + /* Clear current playlists */ + for (size_t i = 0; i < lengthof(this->standard_playlists); ++i) this->standard_playlists[i].clear(); + this->music_set.clear(); + + /* Build standard playlists, and a list of available music */ for (uint i = 0; i < NUM_SONGS_AVAILABLE; i++) { - if (StrEmpty(GetSongName(i))) continue; - _playlist_all[j++] = i + 1; - } - /* Terminate the list */ - _playlist_all[j] = 0; + PlaylistEntry entry(set, i); + if (!entry.IsValid()) continue; - /* Now make the 'styled' playlists */ - for (uint k = 0; k < NUM_SONG_CLASSES; k++) { - j = 0; - for (uint i = 0; i < NUM_SONGS_CLASS; i++) { - int id = k * NUM_SONGS_CLASS + i + 1; - if (StrEmpty(GetSongName(id))) continue; - _playlists[k + 1][j++] = id + 1; - } - /* Terminate the list */ - _playlists[k + 1][j] = 0; - } + this->music_set.push_back(entry); - ValidatePlaylist(_settings_client.music.custom_1, lastof(_settings_client.music.custom_1)); - ValidatePlaylist(_settings_client.music.custom_2, lastof(_settings_client.music.custom_2)); + /* Add theme song to theme-only playlist */ + if (i == 0) this->standard_playlists[PLCH_THEMEONLY].push_back(entry); - if (BaseMusic::GetUsedSet()->num_available < _music_wnd_cursong) { - /* If there are less songs than the currently played song, - * just pause and reset to no song. */ - _music_wnd_cursong = 0; - _song_is_active = false; - } -} - -static void SkipToPrevSong() -{ - byte *b = _cur_playlist; - byte *p = b; - byte t; - - if (b[0] == 0) return; // empty playlist - - do p++; while (p[0] != 0); // find the end - - t = *--p; // and copy the bytes - while (p != b) { - p--; - p[1] = p[0]; - } - *b = t; - - _song_is_active = false; -} - -static void SkipToNextSong() -{ - byte *b = _cur_playlist; - byte t; - - t = b[0]; - if (t != 0) { - while (b[1] != 0) { - b[0] = b[1]; - b++; - } - b[0] = t; - } - - _song_is_active = false; -} - -static void MusicVolumeChanged(byte new_vol) -{ - MusicDriver::GetInstance()->SetVolume(new_vol); -} - -static void DoPlaySong() -{ - char filename[MAX_PATH]; - if (FioFindFullPath(filename, lastof(filename), BASESET_DIR, BaseMusic::GetUsedSet()->files[_music_wnd_cursong - 1].filename) == NULL) { - FioFindFullPath(filename, lastof(filename), OLD_GM_DIR, BaseMusic::GetUsedSet()->files[_music_wnd_cursong - 1].filename); - } - MusicDriver::GetInstance()->PlaySong(filename); - SetWindowDirty(WC_MUSIC_WINDOW, 0); -} - -static void DoStopMusic() -{ - MusicDriver::GetInstance()->StopSong(); - SetWindowDirty(WC_MUSIC_WINDOW, 0); -} - -static void SelectSongToPlay() -{ - uint i = 0; - uint j = 0; - - memset(_cur_playlist, 0, sizeof(_cur_playlist)); - do { - /* File is the index into the file table of the music set. The play list uses 0 as 'no entry', - * so we need to subtract 1. In case of 'no entry' (file = -1), just skip adding it outright. */ - int file = _playlists[_settings_client.music.playlist][i] - 1; - if (file >= 0) { - const char *filename = BaseMusic::GetUsedSet()->files[file].filename; - /* We are now checking for the existence of that file prior - * to add it to the list of available songs */ - if (!StrEmpty(filename) && FioCheckFileExists(filename, BASESET_DIR)) { - _cur_playlist[j] = _playlists[_settings_client.music.playlist][i]; - j++; - } - } - } while (_playlists[_settings_client.music.playlist][++i] != 0 && j < lengthof(_cur_playlist) - 1); - - /* Do not shuffle when on the intro-start window, as the song to play has to be the original TTD Theme*/ - if (_settings_client.music.shuffle && _game_mode != GM_MENU) { - i = 500; - do { - uint32 r = InteractiveRandom(); - byte *a = &_cur_playlist[GB(r, 0, 5)]; - byte *b = &_cur_playlist[GB(r, 8, 5)]; - - if (*a != 0 && *b != 0) { - byte t = *a; - *a = *b; - *b = t; - } - } while (--i); - } -} - -static void StopMusic() -{ - _music_wnd_cursong = 0; - DoStopMusic(); - _song_is_active = false; - SetWindowWidgetDirty(WC_MUSIC_WINDOW, 0, 9); -} - -static void PlayPlaylistSong() -{ - if (_cur_playlist[0] == 0) { - SelectSongToPlay(); - /* if there is not songs in the playlist, it may indicate - * no file on the gm folder, or even no gm folder. - * Stop the playback, then */ - if (_cur_playlist[0] == 0) { - _song_is_active = false; - _music_wnd_cursong = 0; - _settings_client.music.playing = false; - return; + /* Don't add the theme song to standard playlists */ + if (i > 0) { + this->standard_playlists[PLCH_ALLMUSIC].push_back(entry); + uint theme = (i - 1) / NUM_SONGS_CLASS; + this->standard_playlists[PLCH_OLDSTYLE + theme].push_back(entry); } } - _music_wnd_cursong = _cur_playlist[0]; - DoPlaySong(); - _song_is_active = true; - SetWindowWidgetDirty(WC_MUSIC_WINDOW, 0, 9); -} - -void ResetMusic() -{ - _music_wnd_cursong = 1; - DoPlaySong(); -} - -void MusicLoop() -{ - if (!_settings_client.music.playing && _song_is_active) { - StopMusic(); - } else if (_settings_client.music.playing && !_song_is_active) { - PlayPlaylistSong(); - } - - if (!_song_is_active) return; - - if (!MusicDriver::GetInstance()->IsSongPlaying()) { - if (_game_mode != GM_MENU) { - StopMusic(); - SkipToNextSong(); - PlayPlaylistSong(); - } else { - ResetMusic(); + /* Load custom playlists + * Song index offsets are 1-based, zero indicates invalid/end-of-list value */ + for (uint i = 0; i < NUM_SONGS_PLAYLIST; i++) { + if (_settings_client.music.custom_1[i] > 0) { + PlaylistEntry entry(set, _settings_client.music.custom_1[i] - 1); + if (entry.IsValid()) this->standard_playlists[PLCH_CUSTOM1].push_back(entry); + } + if (_settings_client.music.custom_2[i] > 0) { + PlaylistEntry entry(set, _settings_client.music.custom_2[i] - 1); + if (entry.IsValid()) this->standard_playlists[PLCH_CUSTOM2].push_back(entry); } } } -static void SelectPlaylist(byte list) +/** + * Switch to another playlist, or reload the current one. + * @param pl Playlist to select + */ +void MusicSystem::ChangePlaylist(PlaylistChoices pl) { - _settings_client.music.playlist = list; + assert(pl < PLCH_MAX && pl >= PLCH_ALLMUSIC); + + this->displayed_playlist = this->standard_playlists[pl]; + this->active_playlist = this->displayed_playlist; + this->selected_playlist = pl; + this->playlist_position = 0; + + if (this->selected_playlist != PLCH_THEMEONLY) _settings_client.music.playlist = this->selected_playlist; + + if (_settings_client.music.shuffle) { + this->Shuffle(); + /* Shuffle() will also Play() if necessary, only start once */ + } else if (_settings_client.music.playing) { + this->Play(); + } + InvalidateWindowData(WC_MUSIC_TRACK_SELECTION, 0); InvalidateWindowData(WC_MUSIC_WINDOW, 0); } +/** + * Change to named music set, and reset playback. + * @param set_name Name of music set to select + */ +void MusicSystem::ChangeMusicSet(const char *set_name) +{ + BaseMusic::SetSet(set_name); + + free(BaseMusic::ini_set); + BaseMusic::ini_set = stredup(set_name); + + this->BuildPlaylists(); + this->ChangePlaylist(this->selected_playlist); + + InvalidateWindowData(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_OPTIONS, 0, true); +} + +/** Enable shuffle mode and restart playback */ +void MusicSystem::Shuffle() +{ + _settings_client.music.shuffle = true; + + this->active_playlist = this->displayed_playlist; + for (size_t i = 0; i < this->active_playlist.size(); i++) { + size_t shuffle_index = InteractiveRandom() % (this->active_playlist.size() - i); + std::swap(this->active_playlist[i], this->active_playlist[i + shuffle_index]); + } + + if (_settings_client.music.playing) this->Play(); + + InvalidateWindowData(WC_MUSIC_WINDOW, 0); +} + +/** Disable shuffle and restart playback */ +void MusicSystem::Unshuffle() +{ + _settings_client.music.shuffle = false; + this->active_playlist = this->displayed_playlist; + + if (_settings_client.music.playing) this->Play(); + + InvalidateWindowData(WC_MUSIC_WINDOW, 0); +} + +/** Start/restart playback at current song */ +void MusicSystem::Play() +{ + /* Always set the playing flag, even if there is no music */ + _settings_client.music.playing = true; + MusicDriver::GetInstance()->StopSong(); + /* Make sure playlist_position is a valid index, if playlist has changed etc. */ + this->ChangePlaylistPosition(0); + + /* If there is no music, don't try to play it */ + if (this->active_playlist.empty()) return; + + MusicSongInfo song = this->active_playlist[this->playlist_position]; + if (_game_mode == GM_MENU && this->selected_playlist == PLCH_THEMEONLY) song.loop = true; + MusicDriver::GetInstance()->PlaySong(song); + + InvalidateWindowData(WC_MUSIC_WINDOW, 0); +} + +/** Stop playback and set flag that we don't intend to play music */ +void MusicSystem::Stop() +{ + MusicDriver::GetInstance()->StopSong(); + _settings_client.music.playing = false; + + InvalidateWindowData(WC_MUSIC_WINDOW, 0); +} + +/** Skip to next track */ +void MusicSystem::Next() +{ + this->ChangePlaylistPosition(+1); + if (_settings_client.music.playing) this->Play(); + + InvalidateWindowData(WC_MUSIC_WINDOW, 0); +} + +/** Skip to previous track */ +void MusicSystem::Prev() +{ + this->ChangePlaylistPosition(-1); + if (_settings_client.music.playing) this->Play(); + + InvalidateWindowData(WC_MUSIC_WINDOW, 0); +} + +/** Check that music is playing if it should, and that appropriate playlist is active for game/main menu */ +void MusicSystem::CheckStatus() +{ + if ((_game_mode == GM_MENU) != (this->selected_playlist == PLCH_THEMEONLY)) { + /* Make sure the theme-only playlist is active when on the title screen, and not during gameplay */ + this->ChangePlaylist((_game_mode == GM_MENU) ? PLCH_THEMEONLY : (PlaylistChoices)_settings_client.music.playlist); + } + if (this->active_playlist.empty()) return; + /* If we were supposed to be playing, but music has stopped, move to next song */ + if (this->IsPlaying() && !MusicDriver::GetInstance()->IsSongPlaying()) this->Next(); +} + +/** Is the player getting music right now? */ +bool MusicSystem::IsPlaying() const +{ + return _settings_client.music.playing && !this->active_playlist.empty(); +} + +/** Is shuffle mode enabled? */ +bool MusicSystem::IsShuffle() const +{ + return _settings_client.music.shuffle; +} + +/** Return the current song, or a dummy if none */ +MusicSystem::PlaylistEntry MusicSystem::GetCurrentSong() const +{ + if (!this->IsPlaying()) return PlaylistEntry(BaseMusic::GetUsedSet(), 0); + return this->active_playlist[this->playlist_position]; +} + +/** Is one of the custom playlists selected? */ +bool MusicSystem::IsCustomPlaylist() const +{ + return (this->selected_playlist == PLCH_CUSTOM1) || (this->selected_playlist == PLCH_CUSTOM2); +} + +/** + * Append a song to a custom playlist. + * Always adds to the currently active playlist. + * @param song_index Index of song in the current music set to add + */ +void MusicSystem::PlaylistAdd(size_t song_index) +{ + if (!this->IsCustomPlaylist()) return; + + /* Pick out song from the music set */ + if (song_index >= this->music_set.size()) return; + PlaylistEntry entry = this->music_set[song_index]; + + /* Check for maximum length */ + if (this->standard_playlists[this->selected_playlist].size() >= NUM_SONGS_PLAYLIST) return; + + /* Add it to the appropriate playlist, and the display */ + this->standard_playlists[this->selected_playlist].push_back(entry); + this->displayed_playlist.push_back(entry); + + /* Add it to the active playlist, if playback is shuffled select a random position to add at */ + if (this->active_playlist.empty()) { + this->active_playlist.push_back(entry); + if (this->IsPlaying()) this->Play(); + } else if (this->IsShuffle()) { + /* Generate a random position between 0 and n (inclusive, new length) to insert at */ + size_t maxpos = this->displayed_playlist.size(); + size_t newpos = InteractiveRandom() % maxpos; + this->active_playlist.insert(this->active_playlist.begin() + newpos, entry); + /* Make sure to shift up the current playback position if the song was inserted before it */ + if ((int)newpos <= this->playlist_position) this->playlist_position++; + } else { + this->active_playlist.push_back(entry); + } + + this->SaveCustomPlaylist(this->selected_playlist); + + InvalidateWindowData(WC_MUSIC_TRACK_SELECTION, 0); +} + +/** + * Remove a song from a custom playlist. + * @param song_index Index in the custom playlist to remove. + */ +void MusicSystem::PlaylistRemove(size_t song_index) +{ + if (!this->IsCustomPlaylist()) return; + + Playlist &pl = this->standard_playlists[this->selected_playlist]; + if (song_index >= pl.size()) return; + + /* Remove from "simple" playlists */ + PlaylistEntry song = pl[song_index]; + pl.erase(pl.begin() + song_index); + this->displayed_playlist.erase(this->displayed_playlist.begin() + song_index); + + /* Find in actual active playlist (may be shuffled) and remove, + * if it's the current song restart playback */ + for (size_t i = 0; i < this->active_playlist.size(); i++) { + Playlist::iterator s2 = this->active_playlist.begin() + i; + if (s2->filename == song.filename && s2->cat_index == song.cat_index) { + this->active_playlist.erase(s2); + if ((int)i == this->playlist_position && this->IsPlaying()) this->Play(); + break; + } + } + + this->SaveCustomPlaylist(this->selected_playlist); + + InvalidateWindowData(WC_MUSIC_TRACK_SELECTION, 0); +} + +/** + * Remove all songs from the current custom playlist. + * Effectively stops playback too. + */ +void MusicSystem::PlaylistClear() +{ + if (!this->IsCustomPlaylist()) return; + + this->standard_playlists[this->selected_playlist].clear(); + this->ChangePlaylist(this->selected_playlist); + + this->SaveCustomPlaylist(this->selected_playlist); +} + +/** + * Change playlist position pointer by the given offset, making sure to keep it within valid range. + * If the playlist is empty, position is always set to 0. + * @param ofs Amount to move playlist position by. + */ +void MusicSystem::ChangePlaylistPosition(int ofs) +{ + if (this->active_playlist.empty()) { + this->playlist_position = 0; + } else { + this->playlist_position += ofs; + while (this->playlist_position >= (int)this->active_playlist.size()) this->playlist_position -= (int)this->active_playlist.size(); + while (this->playlist_position < 0) this->playlist_position += (int)this->active_playlist.size(); + } +} + +/** + * Save a custom playlist to settings after modification. + * @param pl Playlist to store back + */ +void MusicSystem::SaveCustomPlaylist(PlaylistChoices pl) +{ + byte *settings_pl; + if (pl == PLCH_CUSTOM1) { + settings_pl = _settings_client.music.custom_1; + } else if (pl == PLCH_CUSTOM2) { + settings_pl = _settings_client.music.custom_2; + } else { + return; + } + + size_t num = 0; + MemSetT(settings_pl, 0, NUM_SONGS_PLAYLIST); + + for (Playlist::const_iterator song = this->standard_playlists[pl].begin(); song != this->standard_playlists[pl].end(); ++song) { + /* Music set indices in the settings playlist are 1-based, 0 means unused slot */ + settings_pl[num++] = (byte)song->set_index + 1; + } +} + + +/** + * Check music playback status and start/stop/song-finished. + * Called from main loop. + */ +void MusicLoop() +{ + _music.CheckStatus(); +} + +/** + * Change the configured music set and reset playback + * @param index Index of music set to switch to + */ +void ChangeMusicSet(int index) +{ + if (BaseMusic::GetIndexOfUsedSet() == index) return; + const char *name = BaseMusic::GetSet(index)->name; + _music.ChangeMusicSet(name); +} + +/** + * Prepare the music system for use. + * Called from \c InitializeGame + */ +void InitializeMusic() +{ + _music.BuildPlaylists(); +} + + struct MusicTrackSelectionWindow : public Window { MusicTrackSelectionWindow(WindowDesc *desc, WindowNumber number) : Window(desc) { @@ -312,6 +465,9 @@ struct MusicTrackSelectionWindow : public Window { case WID_MTS_PLAYLIST: SetDParam(0, STR_MUSIC_PLAYLIST_ALL + _settings_client.music.playlist); break; + case WID_MTS_CAPTION: + SetDParamStr(0, BaseMusic::GetUsedSet()->name); + break; } } @@ -349,13 +505,10 @@ struct MusicTrackSelectionWindow : public Window { case WID_MTS_LIST_LEFT: case WID_MTS_LIST_RIGHT: { Dimension d = {0, 0}; - for (uint i = 0; i < NUM_SONGS_AVAILABLE; i++) { - const char *song_name = GetSongName(i); - if (StrEmpty(song_name)) continue; - - SetDParam(0, GetTrackNumber(i)); + for (MusicSystem::Playlist::const_iterator song = _music.music_set.begin(); song != _music.music_set.end(); ++song) { + SetDParam(0, song->tracknr); SetDParam(1, 2); - SetDParamStr(2, GetSongName(i)); + SetDParamStr(2, song->songname); Dimension d2 = GetStringBoundingBox(STR_PLAYLIST_TRACK_NAME); d.width = max(d.width, d2.width); d.height += d2.height; @@ -375,13 +528,10 @@ struct MusicTrackSelectionWindow : public Window { GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_BLACK); int y = r.top + WD_FRAMERECT_TOP; - for (uint i = 0; i < NUM_SONGS_AVAILABLE; i++) { - const char *song_name = GetSongName(i); - if (StrEmpty(song_name)) continue; - - SetDParam(0, GetTrackNumber(i)); + for (MusicSystem::Playlist::const_iterator song = _music.music_set.begin(); song != _music.music_set.end(); ++song) { + SetDParam(0, song->tracknr); SetDParam(1, 2); - SetDParamStr(2, song_name); + SetDParamStr(2, song->songname); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_PLAYLIST_TRACK_NAME); y += FONT_HEIGHT_SMALL; } @@ -392,11 +542,10 @@ struct MusicTrackSelectionWindow : public Window { GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_BLACK); int y = r.top + WD_FRAMERECT_TOP; - for (const byte *p = _playlists[_settings_client.music.playlist]; *p != 0; p++) { - uint i = *p - 1; - SetDParam(0, GetTrackNumber(i)); + for (MusicSystem::Playlist::const_iterator song = _music.active_playlist.begin(); song != _music.active_playlist.end(); ++song) { + SetDParam(0, song->tracknr); SetDParam(1, 2); - SetDParamStr(2, GetSongName(i)); + SetDParamStr(2, song->songname); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_PLAYLIST_TRACK_NAME); y += FONT_HEIGHT_SMALL; } @@ -410,66 +559,51 @@ struct MusicTrackSelectionWindow : public Window { switch (widget) { case WID_MTS_LIST_LEFT: { // add to playlist int y = this->GetRowFromWidget(pt.y, widget, 0, FONT_HEIGHT_SMALL); - - if (_settings_client.music.playlist < 4) return; - if (!IsInsideMM(y, 0, BaseMusic::GetUsedSet()->num_available)) return; - - byte *p = _playlists[_settings_client.music.playlist]; - for (uint i = 0; i != NUM_SONGS_PLAYLIST - 1; i++) { - if (p[i] == 0) { - /* Find the actual song number */ - for (uint j = 0; j < NUM_SONGS_AVAILABLE; j++) { - if (GetTrackNumber(j) == y + 1) { - p[i] = j + 1; - break; - } - } - p[i + 1] = 0; - this->SetDirty(); - SelectSongToPlay(); - break; - } - } + _music.PlaylistAdd(y); break; } case WID_MTS_LIST_RIGHT: { // remove from playlist int y = this->GetRowFromWidget(pt.y, widget, 0, FONT_HEIGHT_SMALL); + _music.PlaylistRemove(y); + break; + } - if (_settings_client.music.playlist < 4) return; - if (!IsInsideMM(y, 0, NUM_SONGS_PLAYLIST)) return; - - byte *p = _playlists[_settings_client.music.playlist]; - for (uint i = y; i != NUM_SONGS_PLAYLIST - 1; i++) { - p[i] = p[i + 1]; - } - - this->SetDirty(); - SelectSongToPlay(); + case WID_MTS_MUSICSET: { + int selected = 0; + DropDownList *dropdown = BuildMusicSetDropDownList(&selected); + ShowDropDownList(this, dropdown, selected, widget, 0, true, false); break; } case WID_MTS_CLEAR: // clear - for (uint i = 0; _playlists[_settings_client.music.playlist][i] != 0; i++) _playlists[_settings_client.music.playlist][i] = 0; - this->SetDirty(); - StopMusic(); - SelectSongToPlay(); + _music.PlaylistClear(); break; case WID_MTS_ALL: case WID_MTS_OLD: case WID_MTS_NEW: case WID_MTS_EZY: case WID_MTS_CUSTOM1: case WID_MTS_CUSTOM2: // set playlist - SelectPlaylist(widget - WID_MTS_ALL); - StopMusic(); - SelectSongToPlay(); + _music.ChangePlaylist((MusicSystem::PlaylistChoices)(widget - WID_MTS_ALL)); break; } } + + virtual void OnDropdownSelect(int widget, int index) + { + switch (widget) { + case WID_MTS_MUSICSET: + ChangeMusicSet(index); + break; + default: + NOT_REACHED(); + } + } }; static const NWidgetPart _nested_music_track_selection_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_GREY), - NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_PLAYLIST_MUSIC_PROGRAM_SELECTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CAPTION, COLOUR_GREY, WID_MTS_CAPTION), SetDataTip(STR_PLAYLIST_MUSIC_SELECTION_SETNAME, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_MTS_MUSICSET), SetDataTip(STR_PLAYLIST_CHANGE_SET, STR_PLAYLIST_TOOLTIP_CHANGE_SET), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), SetPIP(2, 4, 2), @@ -522,6 +656,20 @@ struct MusicWindow : public Window { this->InitNested(number); this->LowerWidget(_settings_client.music.playlist + WID_M_ALL); this->SetWidgetLoweredState(WID_M_SHUFFLE, _settings_client.music.shuffle); + + UpdateDisabledButtons(); + } + + void UpdateDisabledButtons() + { + /* Disable music control widgets if there is no music + * -- except Programme button! So you can still select a music set. */ + this->SetWidgetsDisabledState( + BaseMusic::GetUsedSet()->num_available == 0, + WID_M_PREV, WID_M_NEXT, WID_M_STOP, WID_M_PLAY, WID_M_SHUFFLE, + WID_M_ALL, WID_M_OLD, WID_M_NEW, WID_M_EZY, WID_M_CUSTOM1, WID_M_CUSTOM2, + WIDGET_LIST_END + ); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) @@ -548,8 +696,8 @@ struct MusicWindow : public Window { case WID_M_TRACK_NAME: { Dimension d = GetStringBoundingBox(STR_MUSIC_TITLE_NONE); - for (uint i = 0; i < NUM_SONGS_AVAILABLE; i++) { - SetDParamStr(0, GetSongName(i)); + for (MusicSystem::Playlist::const_iterator song = _music.music_set.begin(); song != _music.music_set.end(); ++song) { + SetDParamStr(0, song->songname); d = maxdim(d, GetStringBoundingBox(STR_MUSIC_TITLE_NAME)); } d.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT; @@ -571,9 +719,12 @@ struct MusicWindow : public Window { switch (widget) { case WID_M_TRACK_NR: { GfxFillRect(r.left + 1, r.top + 1, r.right, r.bottom, PC_BLACK); + if (BaseMusic::GetUsedSet()->num_available == 0) { + break; + } StringID str = STR_MUSIC_TRACK_NONE; - if (_song_is_active != 0 && _music_wnd_cursong != 0) { - SetDParam(0, GetTrackNumber(_music_wnd_cursong - 1)); + if (_music.IsPlaying()) { + SetDParam(0, _music.GetCurrentSong().tracknr); SetDParam(1, 2); str = STR_MUSIC_TRACK_DIGIT; } @@ -584,24 +735,24 @@ struct MusicWindow : public Window { case WID_M_TRACK_NAME: { GfxFillRect(r.left, r.top + 1, r.right - 1, r.bottom, PC_BLACK); StringID str = STR_MUSIC_TITLE_NONE; - if (_song_is_active != 0 && _music_wnd_cursong != 0) { + if (BaseMusic::GetUsedSet()->num_available == 0) { + str = STR_MUSIC_TITLE_NOMUSIC; + } else if (_music.IsPlaying()) { str = STR_MUSIC_TITLE_NAME; - SetDParamStr(0, GetSongName(_music_wnd_cursong - 1)); + SetDParamStr(0, _music.GetCurrentSong().songname); } DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_FROMSTRING, SA_HOR_CENTER); break; } case WID_M_MUSIC_VOL: case WID_M_EFFECT_VOL: { - DrawFrameRect(r.left, r.top + 2, r.right, r.bottom - 2, COLOUR_GREY, FR_LOWERED); + int sw = ScaleGUITrad(slider_width); + int hsw = sw / 2; + DrawFrameRect(r.left + hsw, r.top + 2, r.right - hsw, r.bottom - 2, COLOUR_GREY, FR_LOWERED); byte volume = (widget == WID_M_MUSIC_VOL) ? _settings_client.music.music_vol : _settings_client.music.effect_vol; - int x = (volume * (r.right - r.left) / 127); - if (_current_text_dir == TD_RTL) { - x = r.right - x; - } else { - x += r.left; - } - DrawFrameRect(x, r.top, x + slider_width, r.bottom, COLOUR_GREY, FR_NONE); + if (_current_text_dir == TD_RTL) volume = 127 - volume; + int x = r.left + (volume * (r.right - r.left - sw) / 127); + DrawFrameRect(x, r.top, x + sw, r.bottom, COLOUR_GREY, FR_NONE); break; } } @@ -618,6 +769,9 @@ struct MusicWindow : public Window { for (int i = 0; i < 6; i++) { this->SetWidgetLoweredState(WID_M_ALL + i, i == _settings_client.music.playlist); } + + UpdateDisabledButtons(); + this->SetDirty(); } @@ -625,23 +779,19 @@ struct MusicWindow : public Window { { switch (widget) { case WID_M_PREV: // skip to prev - if (!_song_is_active) return; - SkipToPrevSong(); - this->SetDirty(); + _music.Prev(); break; case WID_M_NEXT: // skip to next - if (!_song_is_active) return; - SkipToNextSong(); - this->SetDirty(); + _music.Next(); break; case WID_M_STOP: // stop playing - _settings_client.music.playing = false; + _music.Stop(); break; case WID_M_PLAY: // start playing - _settings_client.music.playing = true; + _music.Play(); break; case WID_M_MUSIC_VOL: case WID_M_EFFECT_VOL: { // volume sliders @@ -651,9 +801,12 @@ struct MusicWindow : public Window { byte new_vol = x * 127 / this->GetWidget(widget)->current_x; if (_current_text_dir == TD_RTL) new_vol = 127 - new_vol; + /* Clamp to make sure min and max are properly settable */ + if (new_vol > 124) new_vol = 127; + if (new_vol < 3) new_vol = 0; if (new_vol != *vol) { *vol = new_vol; - if (widget == WID_M_MUSIC_VOL) MusicVolumeChanged(new_vol); + if (widget == WID_M_MUSIC_VOL) MusicDriver::GetInstance()->SetVolume(new_vol); this->SetDirty(); } @@ -662,12 +815,13 @@ struct MusicWindow : public Window { } case WID_M_SHUFFLE: // toggle shuffle - _settings_client.music.shuffle ^= 1; - this->SetWidgetLoweredState(WID_M_SHUFFLE, _settings_client.music.shuffle); + if (_music.IsShuffle()) { + _music.Unshuffle(); + } else { + _music.Shuffle(); + } + this->SetWidgetLoweredState(WID_M_SHUFFLE, _music.IsShuffle()); this->SetWidgetDirty(WID_M_SHUFFLE); - StopMusic(); - SelectSongToPlay(); - this->SetDirty(); break; case WID_M_PROGRAMME: // show track selection @@ -676,10 +830,7 @@ struct MusicWindow : public Window { case WID_M_ALL: case WID_M_OLD: case WID_M_NEW: case WID_M_EZY: case WID_M_CUSTOM1: case WID_M_CUSTOM2: // playlist - SelectPlaylist(widget - WID_M_ALL); - StopMusic(); - SelectSongToPlay(); - this->SetDirty(); + _music.ChangePlaylist((MusicSystem::PlaylistChoices)(widget - WID_M_ALL)); break; } } @@ -776,6 +927,5 @@ static WindowDesc _music_window_desc( void ShowMusicWindow() { - if (BaseMusic::GetUsedSet()->num_available == 0) ShowErrorMessage(STR_ERROR_NO_SONGS, INVALID_STRING_ID, WL_WARNING); AllocateWindowDescFront(&_music_window_desc, 0); } diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 7c98e94c8c..62af3a40bf 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -1,4 +1,4 @@ -/* $Id: address.cpp 27092 2014-12-24 17:17:18Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/address.h b/src/network/core/address.h index c2b04c928d..9fd40eaeef 100644 --- a/src/network/core/address.h +++ b/src/network/core/address.h @@ -1,4 +1,4 @@ -/* $Id: address.h 22695 2011-07-30 10:28:52Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/config.h b/src/network/core/config.h index a7880e504b..f6823b1a93 100644 --- a/src/network/core/config.h +++ b/src/network/core/config.h @@ -1,4 +1,4 @@ -/* $Id: config.h 27729 2017-01-14 13:12:49Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -43,7 +43,7 @@ static const uint NETWORK_NAME_LENGTH = 80; ///< The maxim static const uint NETWORK_COMPANY_NAME_LENGTH = 128; ///< The maximum length of the company name, in bytes including '\0' static const uint NETWORK_HOSTNAME_LENGTH = 80; ///< The maximum length of the host name, in bytes including '\0' static const uint NETWORK_SERVER_ID_LENGTH = 33; ///< The maximum length of the network id of the servers, in bytes including '\0' -static const uint NETWORK_REVISION_LENGTH = 15; ///< The maximum length of the revision, in bytes including '\0' +static const uint NETWORK_REVISION_LENGTH = 33; ///< The maximum length of the revision, in bytes including '\0' static const uint NETWORK_PASSWORD_LENGTH = 33; ///< The maximum length of the password, in bytes including '\0' (must be >= NETWORK_SERVER_ID_LENGTH) static const uint NETWORK_CLIENTS_LENGTH = 200; ///< The maximum length for the list of clients that controls a company, in bytes including '\0' static const uint NETWORK_CLIENT_NAME_LENGTH = 25; ///< The maximum length of a client's name, in bytes including '\0' diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp index 2a3609ed57..c8db860dd5 100644 --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -1,4 +1,4 @@ -/* $Id: core.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -64,7 +64,7 @@ bool NetworkCoreInitialize() #endif /* __MORPHOS__ / __AMIGA__ */ /* Let's load the network in windows */ -#ifdef WIN32 +#ifdef _WIN32 { WSADATA wsa; DEBUG(net, 3, "[core] loading windows socket library"); @@ -73,7 +73,7 @@ bool NetworkCoreInitialize() return false; } } -#endif /* WIN32 */ +#endif /* _WIN32 */ return true; } @@ -94,7 +94,7 @@ void NetworkCoreShutdown() if (SocketBase != NULL) CloseLibrary(SocketBase); #endif -#if defined(WIN32) +#if defined(_WIN32) WSACleanup(); #endif } diff --git a/src/network/core/core.h b/src/network/core/core.h index 7952e438e9..a250dbb081 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -1,4 +1,4 @@ -/* $Id: core.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/game.h b/src/network/core/game.h index 10ac8d1b30..a9da29118e 100644 --- a/src/network/core/game.h +++ b/src/network/core/game.h @@ -1,4 +1,4 @@ -/* $Id: game.h 17699 2009-10-04 20:00:56Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,6 +56,8 @@ struct NetworkGameInfo : NetworkServerGameInfo { byte map_set; ///< Graphical set }; +const char * GetNetworkRevisionString(); + #endif /* ENABLE_NETWORK */ #endif /* NETWORK_CORE_GAME_H */ diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp index 72f5ffcf00..216839032b 100644 --- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -1,4 +1,4 @@ -/* $Id: host.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -24,12 +24,7 @@ */ static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast); -#if defined(PSP) -static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // PSP implementation -{ -} - -#elif defined(BEOS_NET_SERVER) || defined(__HAIKU__) /* doesn't have neither getifaddrs or net/if.h */ +#if defined(BEOS_NET_SERVER) || defined(__HAIKU__) /* doesn't have neither getifaddrs or net/if.h */ /* Based on Andrew Bachmann's netstat+.c. Big thanks to him! */ extern "C" int _netstat(int fd, char **output, int verbose); @@ -112,7 +107,7 @@ static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // GE freeifaddrs(ifap); } -#elif defined(WIN32) +#elif defined(_WIN32) static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // Win32 implementation { SOCKET sock = socket(AF_INET, SOCK_DGRAM, 0); diff --git a/src/network/core/host.h b/src/network/core/host.h index 317fd1ab92..46bfa4e1fa 100644 --- a/src/network/core/host.h +++ b/src/network/core/host.h @@ -1,4 +1,4 @@ -/* $Id: host.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h index 624f51410e..32c6cffff2 100644 --- a/src/network/core/os_abstraction.h +++ b/src/network/core/os_abstraction.h @@ -1,4 +1,4 @@ -/* $Id: os_abstraction.h 27092 2014-12-24 17:17:18Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ #ifdef ENABLE_NETWORK /* Windows stuff */ -#if defined(WIN32) || defined(WIN64) +#if defined(_WIN32) #include #include #include @@ -38,94 +38,8 @@ typedef unsigned long in_addr_t; typedef SSIZE_T ssize_t; typedef int socklen_t; # define IPPROTO_IPV6 41 -#else -#include "../../os/windows/win32.h" -#include "../../core/alloc_func.hpp" - -#define AI_ADDRCONFIG 0x00000400 /* Resolution only if global address configured */ -#define IPV6_V6ONLY 27 - -static inline int OTTDgetnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, DWORD hostlen, char *serv, DWORD servlen, int flags) -{ - static int (WINAPI *getnameinfo)(const struct sockaddr *, socklen_t, char *, DWORD, char *, DWORD, int) = NULL; - static bool first_time = true; - - if (first_time) { - LoadLibraryList((Function*)&getnameinfo, "ws2_32.dll\0getnameinfo\0\0"); - first_time = false; - } - - if (getnameinfo != NULL) return getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); - - strncpy(host, inet_ntoa(((const struct sockaddr_in *)sa)->sin_addr), hostlen); - return 0; -} -#define getnameinfo OTTDgetnameinfo - -static inline int OTTDgetaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res) -{ - static int (WINAPI *getaddrinfo)(const char *, const char *, const struct addrinfo *, struct addrinfo **) = NULL; - static bool first_time = true; - - if (first_time) { - LoadLibraryList((Function*)&getaddrinfo, "ws2_32.dll\0getaddrinfo\0\0"); - first_time = false; - } - - if (getaddrinfo != NULL) return getaddrinfo(nodename, servname, hints, res); - - *res = NULL; - - in_addr_t ip = inet_addr(nodename); - if (ip == INADDR_NONE) { - struct hostent *he = gethostbyname(nodename); - if (he == NULL) return EAI_NONAME; - ip = (*(struct in_addr *)he->h_addr).s_addr; - } - - struct sockaddr_in *sin = CallocT(1); - sin->sin_family = AF_INET; - sin->sin_port = htons(strtoul(servname, NULL, 10)); - sin->sin_addr.s_addr = ip; - - struct addrinfo *ai = CallocT(1); - ai->ai_family = PF_INET; - ai->ai_addr = (struct sockaddr*)sin; - ai->ai_addrlen = sizeof(*sin); - ai->ai_socktype = hints->ai_socktype; - - *res = ai; - return 0; -} -#define getaddrinfo OTTDgetaddrinfo - -static inline void OTTDfreeaddrinfo(struct addrinfo *ai) -{ - static int (WINAPI *freeaddrinfo)(struct addrinfo *) = NULL; - static bool first_time = true; - - if (ai == NULL) return; - - if (first_time) { - LoadLibraryList((Function*)&freeaddrinfo, "ws2_32.dll\0freeaddrinfo\0\0"); - first_time = false; - } - - if (freeaddrinfo != NULL) { - freeaddrinfo(ai); - return; - } - - do { - struct addrinfo *next = ai->ai_next; - free(ai->ai_addr); - free(ai); - ai = next; - } while (ai != NULL); -} -#define freeaddrinfo OTTDfreeaddrinfo -#endif /* __MINGW32__ && __CYGWIN__ */ -#endif /* WIN32 */ +#endif /* !(__MINGW32__ && __CYGWIN__) */ +#endif /* _WIN32 */ /* UNIX stuff */ #if defined(UNIX) && !defined(__OS2__) @@ -194,29 +108,6 @@ static inline void OTTDfreeaddrinfo(struct addrinfo *ai) #define IPV6_V6ONLY 27 #endif -#if defined(PSP) -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# define TCP_NODELAY 1 -# define SO_NONBLOCK 0x1009 -# define SOCKET int -# define INVALID_SOCKET -1 -# define INADDR_NONE 0xffffffff -# define closesocket close -# define GET_LAST_ERROR() sceNetInetGetErrno() -#endif /* PSP */ - /* OS/2 stuff */ #if defined(__OS2__) # define SOCKET int @@ -313,12 +204,12 @@ typedef unsigned long in_addr_t; */ static inline bool SetNonBlocking(SOCKET d) { -#ifdef WIN32 +#ifdef _WIN32 u_long nonblocking = 1; #else int nonblocking = 1; #endif -#if (defined(__BEOS__) && defined(BEOS_NET_SERVER)) || defined(PSP) +#if (defined(__BEOS__) && defined(BEOS_NET_SERVER)) return setsockopt(d, SOL_SOCKET, SO_NONBLOCK, &nonblocking, sizeof(nonblocking)) == 0; #else return ioctlsocket(d, FIONBIO, &nonblocking) == 0; diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 225a4c7902..7548132e0b 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -1,4 +1,4 @@ -/* $Id: packet.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/packet.h b/src/network/core/packet.h index 114e781e61..7f344d0179 100644 --- a/src/network/core/packet.h +++ b/src/network/core/packet.h @@ -1,4 +1,4 @@ -/* $Id: packet.h 23590 2011-12-18 18:37:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index 84b931702e..790941fc01 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -1,4 +1,4 @@ -/* $Id: tcp.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 7c7499af02..b736189b4e 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -1,4 +1,4 @@ -/* $Id: tcp.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp index dfda1c6837..284ceda9b1 100644 --- a/src/network/core/tcp_admin.cpp +++ b/src/network/core/tcp_admin.cpp @@ -1,4 +1,4 @@ -/* $Id: tcp_admin.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h index 2f12bc4498..72c2e1160e 100644 --- a/src/network/core/tcp_admin.h +++ b/src/network/core/tcp_admin.h @@ -1,4 +1,4 @@ -/* $Id: tcp_admin.h 25588 2013-07-11 20:31:39Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp index afd0244e3b..2dc7898824 100644 --- a/src/network/core/tcp_connect.cpp +++ b/src/network/core/tcp_connect.cpp @@ -1,4 +1,4 @@ -/* $Id: tcp_connect.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp index 473bede27b..fc22c4491f 100644 --- a/src/network/core/tcp_content.cpp +++ b/src/network/core/tcp_content.cpp @@ -1,4 +1,4 @@ -/* $Id: tcp_content.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h index 1d098a8546..a506439da9 100644 --- a/src/network/core/tcp_content.h +++ b/src/network/core/tcp_content.h @@ -1,4 +1,4 @@ -/* $Id: tcp_content.h 25597 2013-07-13 09:26:11Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 08299a4691..caa378fc4c 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -1,4 +1,4 @@ -/* $Id: tcp_game.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -45,6 +45,8 @@ NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error) { /* Clients drop back to the main menu */ if (!_network_server && _networking) { + extern void ClientNetworkEmergencySave(); // from network_client.cpp + ClientNetworkEmergencySave(); _switch_mode = SM_MENU; _networking = false; ShowErrorMessage(STR_NETWORK_ERROR_LOSTCONNECTION, INVALID_STRING_ID, WL_CRITICAL); diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index 828e7ad446..5c6cb5c34d 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -1,4 +1,4 @@ -/* $Id: tcp_game.h 26056 2013-11-22 21:50:43Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index 40af578c5f..aec198bf55 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -1,4 +1,4 @@ -/* $Id: tcp_http.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -45,14 +45,14 @@ NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(SOCKET s, redirect_depth(depth), sock(s) { - size_t bufferSize = strlen(url) + strlen(host) + strlen(_openttd_revision) + (data == NULL ? 0 : strlen(data)) + 128; + size_t bufferSize = strlen(url) + strlen(host) + strlen(GetNetworkRevisionString()) + (data == NULL ? 0 : strlen(data)) + 128; char *buffer = AllocaM(char, bufferSize); DEBUG(net, 7, "[tcp/http] requesting %s%s", host, url); if (data != NULL) { - seprintf(buffer, buffer + bufferSize - 1, "POST %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\nContent-Type: text/plain\r\nContent-Length: %d\r\n\r\n%s\r\n", url, host, _openttd_revision, (int)strlen(data), data); + seprintf(buffer, buffer + bufferSize - 1, "POST %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\nContent-Type: text/plain\r\nContent-Length: %d\r\n\r\n%s\r\n", url, host, GetNetworkRevisionString(), (int)strlen(data), data); } else { - seprintf(buffer, buffer + bufferSize - 1, "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\n\r\n", url, host, _openttd_revision); + seprintf(buffer, buffer + bufferSize - 1, "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\n\r\n", url, host, GetNetworkRevisionString()); } ssize_t size = strlen(buffer); diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h index 24e72487d7..36520f1364 100644 --- a/src/network/core/tcp_http.h +++ b/src/network/core/tcp_http.h @@ -1,4 +1,4 @@ -/* $Id: tcp_http.h 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h index c8e1bae047..e6b5893324 100644 --- a/src/network/core/tcp_listen.h +++ b/src/network/core/tcp_listen.h @@ -1,4 +1,4 @@ -/* $Id: tcp_listen.h 26046 2013-11-22 21:41:19Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index c06c2f1a51..d2dc15d427 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -1,4 +1,4 @@ -/* $Id: udp.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -252,8 +252,8 @@ void NetworkUDPSocketHandler::ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo *dst = c; dst = &c->next; } + FALLTHROUGH; } - FALLTHROUGH; case 3: info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE); diff --git a/src/network/core/udp.h b/src/network/core/udp.h index dbc74ab484..9aa0c9dc49 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -1,4 +1,4 @@ -/* $Id: udp.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network.cpp b/src/network/network.cpp index 5a3d7468c5..77fdc485b2 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1,4 +1,4 @@ -/* $Id: network.cpp 27400 2015-09-19 16:49:46Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -1101,13 +1101,68 @@ void NetworkShutDown() NetworkCoreShutdown(); } +/** + * How many hex digits of the git hash to include in network revision string. + * Determined as 10 hex digits + 2 characters for -g/-u/-m prefix. + */ +static const uint GITHASH_SUFFIX_LEN = 12; + +/** + * Get the network version string used by this build. + * The returned string is guaranteed to be at most NETWORK_REVISON_LENGTH bytes. + */ +const char * GetNetworkRevisionString() +{ + /* This will be allocated on heap and never free'd, but only once so not a "real" leak. */ + static char *network_revision = nullptr; + + if (!network_revision) { + /* Start by taking a chance on the full revision string. */ + network_revision = stredup(_openttd_revision); + /* Ensure it's not longer than the packet buffer length. */ + if (strlen(network_revision) >= NETWORK_REVISION_LENGTH) network_revision[NETWORK_REVISION_LENGTH - 1] = '\0'; + + /* Release version names are not mangled further. */ + if (IsReleasedVersion()) return network_revision; + + /* Prepare a prefix of the git hash. + * Size is length + 1 for terminator, +2 for -g prefix. */ + assert(_openttd_revision_modified < 3); + char githash_suffix[GITHASH_SUFFIX_LEN + 1] = "-"; + githash_suffix[1] = "gum"[_openttd_revision_modified]; + for (uint i = 2; i < GITHASH_SUFFIX_LEN; i++) { + githash_suffix[i] = _openttd_revision_hash[i-2]; + } + + /* Where did the hash start in the original string? + * Overwrite from that position, unless that would go past end of packet buffer length. */ + ptrdiff_t hashofs = strrchr(_openttd_revision, '-') - _openttd_revision; + if (hashofs + strlen(githash_suffix) + 1 > NETWORK_REVISION_LENGTH) hashofs = strlen(network_revision) - strlen(githash_suffix); + /* Replace the git hash in revision string. */ + strecpy(network_revision + hashofs, githash_suffix, network_revision + NETWORK_REVISION_LENGTH); + assert(strlen(network_revision) < NETWORK_REVISION_LENGTH); // strlen does not include terminator, constant does, hence strictly less than + } + + return network_revision; +} + +static const char *ExtractNetworkRevisionHash(const char *revstr) +{ + return strrchr(revstr, '-'); +} + /** * Checks whether the given version string is compatible with our version. + * First tries to match the full string, if that fails, attempts to compare just git hashes. * @param other the version string to compare to */ bool IsNetworkCompatibleVersion(const char *other) { - return strncmp(_openttd_revision, other, NETWORK_REVISION_LENGTH - 1) == 0; + if (strncmp(GetNetworkRevisionString(), other, NETWORK_REVISION_LENGTH - 1) == 0) return true; + + const char *hash1 = ExtractNetworkRevisionHash(GetNetworkRevisionString()); + const char *hash2 = ExtractNetworkRevisionHash(other); + return hash1 && hash2 && (strncmp(hash1, hash2, GITHASH_SUFFIX_LEN) == 0); } #endif /* ENABLE_NETWORK */ diff --git a/src/network/network.h b/src/network/network.h index 688818ce10..26f94482ec 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -1,4 +1,4 @@ -/* $Id: network.h 26449 2014-04-08 20:19:41Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index 5986a57686..f70f3d1a51 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -1,4 +1,4 @@ -/* $Id: network_admin.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -172,7 +172,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome() Packet *p = new Packet(ADMIN_PACKET_SERVER_WELCOME); p->Send_string(_settings_client.network.server_name); - p->Send_string(_openttd_revision); + p->Send_string(GetNetworkRevisionString()); p->Send_bool (_network_dedicated); p->Send_string(_network_game_info.map_name); diff --git a/src/network/network_admin.h b/src/network/network_admin.h index 3178b140e2..cb478fc7e7 100644 --- a/src/network/network_admin.h +++ b/src/network/network_admin.h @@ -1,4 +1,4 @@ -/* $Id: network_admin.h 25588 2013-07-11 20:31:39Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_base.h b/src/network/network_base.h index 6bade417b1..1644b3558a 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -1,4 +1,4 @@ -/* $Id: network_base.h 22423 2011-05-04 20:24:23Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index eba6d2c0c7..68e1489874 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: network_chat_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 8d61b4a2bb..4902052533 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -1,4 +1,4 @@ -/* $Id: network_client.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -126,6 +126,19 @@ struct PacketReader : LoadFilter { }; +/** + * Create an emergency savegame when the network connection is lost. + */ +void ClientNetworkEmergencySave() +{ + if (!_settings_client.gui.autosave_on_network_disconnect) return; + + const char *filename = "netsave.sav"; + DEBUG(net, 0, "Client: Performing emergency save (%s)", filename); + SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, AUTOSAVE_DIR, false); +} + + /** * Create a new socket for the client side of the game connection. * @param s The socket to connect with. @@ -272,10 +285,6 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) if (_network_first_time) { _network_first_time = false; SendAck(); - extern bool novahost(); - if(novahost()) { - NetworkClientSendChatToServer("!check 1512"); //check version - } } _sync_frame = 0; @@ -364,7 +373,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendJoin() p->Send_uint32(_openttd_newgrf_version); } } else { - p->Send_string(_openttd_revision); + p->Send_string(GetNetworkRevisionString()); p->Send_uint32(_openttd_newgrf_version); } p->Send_string(_settings_client.network.client_name); // Client name @@ -713,6 +722,9 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_ERROR(Packet *p ShowErrorMessage(err, INVALID_STRING_ID, WL_CRITICAL); + /* Perform an emergency save if we had already entered the game */ + if (this->status == STATUS_ACTIVE) ClientNetworkEmergencySave(); + DeleteWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_JOIN); return NETWORK_RECV_STATUS_SERVER_ERROR; @@ -905,7 +917,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(Packet * the server will give us a client-id and let us in */ _network_join_status = NETWORK_JOIN_STATUS_REGISTERING; ShowJoinStatusWindow(); - NetworkSendCommand(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); + NetworkSendCommand(0, CCA_NEW, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); } } else { /* take control over an existing company */ @@ -1097,6 +1109,8 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet ShowErrorMessage(STR_NETWORK_MESSAGE_SERVER_SHUTDOWN, INVALID_STRING_ID, WL_CRITICAL); } + if (this->status == STATUS_ACTIVE) ClientNetworkEmergencySave(); + return NETWORK_RECV_STATUS_SERVER_ERROR; } @@ -1112,6 +1126,8 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet ShowErrorMessage(STR_NETWORK_MESSAGE_SERVER_REBOOT, INVALID_STRING_ID, WL_CRITICAL); } + if (this->status == STATUS_ACTIVE) ClientNetworkEmergencySave(); + return NETWORK_RECV_STATUS_SERVER_ERROR; } @@ -1201,6 +1217,7 @@ void ClientNetworkGameSocketHandler::CheckConnection() if (lag > 20) { this->NetworkGameSocketHandler::CloseConnection(); ShowErrorMessage(STR_NETWORK_ERROR_LOSTCONNECTION, INVALID_STRING_ID, WL_CRITICAL); + ClientNetworkEmergencySave(); return; } diff --git a/src/network/network_client.h b/src/network/network_client.h index 06db7ea454..eb4790305a 100644 --- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -1,4 +1,4 @@ -/* $Id: network_client.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index f628139e8c..bc08bc5f14 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -1,4 +1,4 @@ -/* $Id: network_command.cpp 27571 2016-05-22 10:07:48Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index ad08b5d731..551abb4420 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -1,4 +1,4 @@ -/* $Id: network_content.cpp 27576 2016-05-22 10:45:46Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -404,10 +404,14 @@ static bool GunzipFile(const ContentInfo *ci) { #if defined(WITH_ZLIB) bool ret = true; + + /* Need to open the file with fopen() to support non-ASCII on Windows. */ FILE *ftmp = fopen(GetFullFilename(ci, true), "rb"); if (ftmp == NULL) return false; + /* Duplicate the handle, and close the FILE*, to avoid double-closing the handle later. */ + gzFile fin = gzdopen(dup(fileno(ftmp)), "rb"); + fclose(ftmp); - gzFile fin = gzdopen(fileno(ftmp), "rb"); FILE *fout = fopen(GetFullFilename(ci, false), "wb"); if (fin == NULL || fout == NULL) { @@ -444,14 +448,7 @@ static bool GunzipFile(const ContentInfo *ci) } } - if (fin != NULL) { - /* Closes ftmp too! */ - gzclose(fin); - } else if (ftmp != NULL) { - /* In case the gz stream was opened correctly this will - * be closed by gzclose. */ - fclose(ftmp); - } + if (fin != NULL) gzclose(fin); if (fout != NULL) fclose(fout); return ret; diff --git a/src/network/network_content.h b/src/network/network_content.h index bdfa712b03..25788065fd 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -1,4 +1,4 @@ -/* $Id: network_content.h 27468 2015-12-10 18:28:01Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 3a098c537c..877dea9786 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: network_content_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -76,7 +76,7 @@ struct ContentTextfileWindow : public TextfileWindow { void ShowContentTextfileWindow(TextfileType file_type, const ContentInfo *ci) { - DeleteWindowByClass(WC_TEXTFILE); + DeleteWindowById(WC_TEXTFILE, file_type); new ContentTextfileWindow(file_type, ci); } @@ -519,7 +519,7 @@ public: * Create the content list window. * @param desc the window description to pass to Window's constructor. * @param select_all Whether the select all button is allowed or not. - * @param type the main type of content to display or #CONTENT_TYPE_END. + * @param types the main type of content to display or #CONTENT_TYPE_END. * When a type other than #CONTENT_TYPE_END is given, dependencies of * other types are only shown when content that depend on them are * selected. diff --git a/src/network/network_content_gui.h b/src/network/network_content_gui.h index c741f31bac..1397010019 100644 --- a/src/network/network_content_gui.h +++ b/src/network/network_content_gui.h @@ -1,4 +1,4 @@ -/* $Id: network_content_gui.h 27288 2015-05-17 19:49:35Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_func.h b/src/network/network_func.h index 07bb6876ff..d3145ea0c7 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -1,4 +1,4 @@ -/* $Id: network_func.h 27400 2015-09-19 16:49:46Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp index e62461dd35..e5d80630e1 100644 --- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -1,4 +1,4 @@ -/* $Id: network_gamelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_gamelist.h b/src/network/network_gamelist.h index fa878e5d1b..c77c6719e0 100644 --- a/src/network/network_gamelist.h +++ b/src/network/network_gamelist.h @@ -1,4 +1,4 @@ -/* $Id: network_gamelist.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index d78dcea930..a8d26f52e7 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: network_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,7 +14,6 @@ #include "../strings_func.h" #include "../date_func.h" #include "../fios.h" -#include "../error.h" #include "network_client.h" #include "network_gui.h" #include "network_gamelist.h" @@ -32,7 +31,7 @@ #include "../core/geometry_func.hpp" #include "../genworld.h" #include "../map_type.h" -#include "../zoom_func.h" +#include "../guitimer_func.h" #include "../widgets/network_widget.h" @@ -40,6 +39,9 @@ #include "../table/sprites.h" #include "../stringfilter_type.h" + +#include "../error.h" +#include "../zoom_func.h" #include "../watch_gui.h" #include "../safeguards.h" @@ -237,6 +239,7 @@ protected: Scrollbar *vscroll; ///< vertical scrollbar of the list of servers QueryString name_editbox; ///< Client name editbox. QueryString filter_editbox; ///< Editbox for filter on servers + GUITimer requery_timer; ///< Timer for network requery bool UDP_CC_queried; int lock_offset; ///< Left offset for lock icon. @@ -486,6 +489,8 @@ public: this->server = this->last_joined; if (this->last_joined != NULL) NetworkUDPQueryServer(this->last_joined->address); + this->requery_timer.SetInterval(MILLISECONDS_PER_TICK); + this->servers.SetListing(this->last_sorting); this->servers.SetSortFuncs(this->sorter_funcs); this->servers.SetFilterFuncs(this->filter_funcs); @@ -937,8 +942,11 @@ public: this->vscroll->SetCapacityFromWidget(this, WID_NG_MATRIX); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!this->requery_timer.Elapsed(delta_ms)) return; + this->requery_timer.SetInterval(MILLISECONDS_PER_TICK); + NetworkGameListRequery(); } }; diff --git a/src/network/network_gui.h b/src/network/network_gui.h index d50b22dc59..a196c75e9f 100644 --- a/src/network/network_gui.h +++ b/src/network/network_gui.h @@ -1,4 +1,4 @@ -/* $Id: network_gui.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_internal.h b/src/network/network_internal.h index ad1c46ca5e..ed9a8de6f6 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -1,4 +1,4 @@ -/* $Id: network_internal.h 26488 2014-04-23 21:19:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index e9acda2ba8..05fb27fc87 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1,4 +1,4 @@ -/* $Id: network_server.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -1115,7 +1115,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(Packet } if ((GetCommandFlags(cp.cmd) & CMD_SPECTATOR) == 0 && !Company::IsValidID(cp.company) && ci->client_id != CLIENT_ID_SERVER) { - IConsolePrintF(CC_ERROR, "WARNING: spectator issueing command from client %d (IP: %s), kicking...", ci->client_id, this->GetClientIP()); + IConsolePrintF(CC_ERROR, "WARNING: spectator issuing command from client %d (IP: %s), kicking...", ci->client_id, this->GetClientIP()); return this->SendError(NETWORK_ERROR_KICKED); } @@ -1675,7 +1675,7 @@ static void NetworkAutoCleanCompanies() /* Is the company empty for autoclean_unprotected-months, and is there no protection? */ if (_settings_client.network.autoclean_unprotected != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_unprotected && StrEmpty(_network_company_states[c->index].password)) { /* Shut the company down */ - DoCommandP(0, 2 | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_DELETE | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL); IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no password", c->index + 1); } /* Is the company empty for autoclean_protected-months, and there is a protection? */ @@ -1689,7 +1689,7 @@ static void NetworkAutoCleanCompanies() /* Is the company empty for autoclean_novehicles-months, and has no vehicles? */ if (_settings_client.network.autoclean_novehicles != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_novehicles && vehicles_in_company[c->index] == 0) { /* Shut the company down */ - DoCommandP(0, 2 | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_DELETE | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL); IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no vehicles", c->index + 1); } } else { @@ -2137,7 +2137,7 @@ bool NetworkCompanyHasClients(CompanyID company) /** - * Get the name of the client, if the user did not send it yet, Client # is used. + * Get the name of the client, if the user did not send it yet, Client ID is used. * @param client_name The variable to write the name to. * @param last The pointer to the last element of the destination buffer */ diff --git a/src/network/network_server.h b/src/network/network_server.h index 6e94e354b8..a52b2c9366 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -1,4 +1,4 @@ -/* $Id: network_server.h 26576 2014-05-11 12:52:21Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_type.h b/src/network/network_type.h index fc3c4d28b8..3c390c29be 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -1,4 +1,4 @@ -/* $Id: network_type.h 23780 2012-01-09 21:22:48Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 9373b48f40..3fd0dd4853 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -1,4 +1,4 @@ -/* $Id: network_udp.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -191,7 +191,7 @@ void ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *p, Networ strecpy(ngi.map_name, _network_game_info.map_name, lastof(ngi.map_name)); strecpy(ngi.server_name, _settings_client.network.server_name, lastof(ngi.server_name)); - strecpy(ngi.server_revision, _openttd_revision, lastof(ngi.server_revision)); + strecpy(ngi.server_revision, GetNetworkRevisionString(), lastof(ngi.server_revision)); Packet packet(PACKET_UDP_SERVER_RESPONSE); this->SendNetworkGameInfo(&packet, &ngi); diff --git a/src/network/network_udp.h b/src/network/network_udp.h index 352a17a886..3dfd076720 100644 --- a/src/network/network_udp.h +++ b/src/network/network_udp.h @@ -1,4 +1,4 @@ -/* $Id: network_udp.h 23751 2012-01-04 22:08:43Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 03a60b09bd..74d29e3e50 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf.cpp 27989 2018-03-11 15:08:51Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -194,7 +194,7 @@ static GrfProcessingState _cur; /** * Helper to check whether an image index is valid for a particular NewGRF vehicle. - * @param The type of vehicle. + * @tparam T The type of vehicle. * @param image_index The image index to check. * @return True iff the image index is valid, or 0xFD (use new graphics). */ @@ -313,8 +313,8 @@ struct GRFTempEngineData { Refittability refittability; ///< Did the newgrf set any refittability property? If not, default refittability will be applied. bool prop27_set; ///< Did the NewGRF set property 27 (misc flags)? uint8 rv_max_speed; ///< Temporary storage of RV prop 15, maximum speed in mph/0.8 - uint32 ctt_include_mask; ///< Cargo types always included in the refit mask. - uint32 ctt_exclude_mask; ///< Cargo types always excluded from the refit mask. + CargoTypes ctt_include_mask; ///< Cargo types always included in the refit mask. + CargoTypes ctt_exclude_mask; ///< Cargo types always excluded from the refit mask. /** * Update the summary refittability on setting a refittability property. @@ -734,9 +734,9 @@ static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite) * @param invert_action1_flag Set to true, if palette bit 15 means 'not from action 1'. * @param use_cur_spritesets Whether to use currently referenceable action 1 sets. * @param feature GrfSpecFeature to use spritesets from. - * @param [out] grf_sprite Read sprite and palette. - * @param [out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset) - * @param [out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset) + * @param[out] grf_sprite Read sprite and palette. + * @param[out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset) + * @param[out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset) * @return Read TileLayoutFlags. */ static TileLayoutFlags ReadSpriteLayoutSprite(ByteReader *buf, bool read_flags, bool invert_action1_flag, bool use_cur_spritesets, int feature, PalSpriteID *grf_sprite, uint16 *max_sprite_offset = NULL, uint16 *max_palette_offset = NULL) @@ -943,11 +943,11 @@ static bool ReadSpriteLayout(ByteReader *buf, uint num_building_sprites, bool us } /** - * Translate the refit mask. + * Translate the refit mask. refit_mask is uint32 as it has not been mapped to CargoTypes. */ -static uint32 TranslateRefitMask(uint32 refit_mask) +static CargoTypes TranslateRefitMask(uint32 refit_mask) { - uint32 result = 0; + CargoTypes result = 0; uint8 bit; FOR_EACH_SET_BIT(bit, refit_mask) { CargoID cargo = GetCargoTranslation(bit, _cur.grffile, true); @@ -1310,7 +1310,7 @@ static ChangeInfoResult RailVehicleChangeInfo(uint engine, int numinfo, int prop uint8 count = buf->ReadByte(); _gted[e->index].UpdateRefittability(prop == 0x2C && count != 0); if (prop == 0x2C) _gted[e->index].defaultcargo_grf = _cur.grffile; - uint32 &ctt = prop == 0x2C ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; + CargoTypes &ctt = prop == 0x2C ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; ctt = 0; while (count--) { CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile); @@ -1498,7 +1498,7 @@ static ChangeInfoResult RoadVehicleChangeInfo(uint engine, int numinfo, int prop uint8 count = buf->ReadByte(); _gted[e->index].UpdateRefittability(prop == 0x24 && count != 0); if (prop == 0x24) _gted[e->index].defaultcargo_grf = _cur.grffile; - uint32 &ctt = prop == 0x24 ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; + CargoTypes &ctt = prop == 0x24 ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; ctt = 0; while (count--) { CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile); @@ -1670,7 +1670,7 @@ static ChangeInfoResult ShipVehicleChangeInfo(uint engine, int numinfo, int prop uint8 count = buf->ReadByte(); _gted[e->index].UpdateRefittability(prop == 0x1E && count != 0); if (prop == 0x1E) _gted[e->index].defaultcargo_grf = _cur.grffile; - uint32 &ctt = prop == 0x1E ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; + CargoTypes &ctt = prop == 0x1E ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; ctt = 0; while (count--) { CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile); @@ -1820,7 +1820,7 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int uint8 count = buf->ReadByte(); _gted[e->index].UpdateRefittability(prop == 0x1D && count != 0); if (prop == 0x1D) _gted[e->index].defaultcargo_grf = _cur.grffile; - uint32 &ctt = prop == 0x1D ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; + CargoTypes &ctt = prop == 0x1D ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask; ctt = 0; while (count--) { CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile); @@ -1845,7 +1845,7 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int /** * Define properties for stations - * @param stdid StationID of the first station tile. + * @param stid StationID of the first station tile. * @param numinfo Number of subsequent station tiles to change the property for. * @param prop The property to change. * @param buf The property value. @@ -1971,12 +1971,12 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, Byte if (length == 0 || number == 0) break; if (length > statspec->lengths) { + byte diff_length = length - statspec->lengths; statspec->platforms = ReallocT(statspec->platforms, length); - memset(statspec->platforms + statspec->lengths, 0, length - statspec->lengths); + memset(statspec->platforms + statspec->lengths, 0, diff_length); statspec->layouts = ReallocT(statspec->layouts, length); - memset(statspec->layouts + statspec->lengths, 0, - (length - statspec->lengths) * sizeof(*statspec->layouts)); + memset(statspec->layouts + statspec->lengths, 0, diff_length * sizeof(*statspec->layouts)); statspec->lengths = length; } @@ -2036,9 +2036,10 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, Byte break; case 0x12: // Cargo types for random triggers - statspec->cargo_triggers = buf->ReadDWord(); if (_cur.grffile->grf_version >= 7) { - statspec->cargo_triggers = TranslateRefitMask(statspec->cargo_triggers); + statspec->cargo_triggers = TranslateRefitMask(buf->ReadDWord()); + } else { + statspec->cargo_triggers = (CargoTypes)buf->ReadDWord(); } break; @@ -2293,6 +2294,10 @@ static ChangeInfoResult IgnoreTownHouseProperty(int prop, ByteReader *buf) break; } + case 0x23: + buf->Skip(buf->ReadByte() * 2); + break; + default: ret = CIR_UNKNOWN; break; @@ -2525,6 +2530,28 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, Byt housespec->max_year = buf->ReadWord(); break; + case 0x23: { // variable length cargo types accepted + uint count = buf->ReadByte(); + if (count > lengthof(housespec->accepts_cargo)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG); + error->param_value[1] = prop; + return CIR_DISABLED; + } + /* Always write the full accepts_cargo array, and check each index for being inside the + * provided data. This ensures all values are properly initialized, and also avoids + * any risks of array overrun. */ + for (uint i = 0; i < lengthof(housespec->accepts_cargo); i++) { + if (i < count) { + housespec->accepts_cargo[i] = GetCargoTranslation(buf->ReadByte(), _cur.grffile); + housespec->cargo_acceptance[i] = buf->ReadByte(); + } else { + housespec->accepts_cargo[i] = CT_INVALID; + housespec->cargo_acceptance[i] = 0; + } + } + break; + } + default: ret = CIR_UNKNOWN; break; @@ -2552,7 +2579,7 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, Byt * @param gvid ID of the global variable. This is basically only checked for zerones. * @param numinfo Number of subsequent IDs to change the property for. * @param buf The property value. - * @param [in,out] translation_table Storage location for the translation table. + * @param[in,out] translation_table Storage location for the translation table. * @param name Name of the table for debug output. * @return ChangeInfoResult. */ @@ -3082,6 +3109,10 @@ static ChangeInfoResult IgnoreIndustryTileProperty(int prop, ByteReader *buf) buf->ReadWord(); break; + case 0x13: + buf->Skip(buf->ReadByte() * 2); + break; + default: ret = CIR_UNKNOWN; break; @@ -3171,7 +3202,7 @@ static ChangeInfoResult IndustrytilesChangeInfo(uint indtid, int numinfo, int pr case 0x0C: { uint16 acctp = buf->ReadWord(); tsp->accepts_cargo[prop - 0x0A] = GetCargoTranslation(GB(acctp, 0, 8), _cur.grffile); - tsp->acceptance[prop - 0x0A] = GB(acctp, 8, 8); + tsp->acceptance[prop - 0x0A] = Clamp(GB(acctp, 8, 8), 0, 16); break; } @@ -3200,6 +3231,26 @@ static ChangeInfoResult IndustrytilesChangeInfo(uint indtid, int numinfo, int pr tsp->special_flags = (IndustryTileSpecialFlags)buf->ReadByte(); break; + case 0x13: { // variable length cargo acceptance + byte num_cargoes = buf->ReadByte(); + if (num_cargoes > lengthof(tsp->acceptance)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG); + error->param_value[1] = prop; + return CIR_DISABLED; + } + for (uint i = 0; i < lengthof(tsp->acceptance); i++) { + if (i < num_cargoes) { + tsp->accepts_cargo[i] = GetCargoTranslation(buf->ReadByte(), _cur.grffile); + /* Tile acceptance can be negative to counteract the INDTILE_SPECIAL_ACCEPTS_ALL_CARGO flag */ + tsp->acceptance[i] = (int8)buf->ReadByte(); + } else { + tsp->accepts_cargo[i] = CT_INVALID; + tsp->acceptance[i] = 0; + } + } + break; + } + default: ret = CIR_UNKNOWN; break; @@ -3279,11 +3330,17 @@ static ChangeInfoResult IgnoreIndustryProperty(int prop, ByteReader *buf) for (byte j = 0; j < 3; j++) buf->ReadByte(); break; - case 0x15: { - byte number_of_sounds = buf->ReadByte(); - for (uint8 j = 0; j < number_of_sounds; j++) { - buf->ReadByte(); - } + case 0x15: + case 0x25: + case 0x26: + case 0x27: + buf->Skip(buf->ReadByte()); + break; + + case 0x28: { + int num_inputs = buf->ReadByte(); + int num_outputs = buf->ReadByte(); + buf->Skip(num_inputs * num_outputs * 2); break; } @@ -3471,8 +3528,6 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, } else { /* Declared as been valid, can be used */ itt[k].gfx = tempid; - size = k + 1; - copy_from = itt; } } else if (itt[k].gfx == 0xFF) { itt[k].ti.x = (int8)GB(itt[k].ti.x, 0, 8); @@ -3643,6 +3698,77 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, break; } + case 0x25: { // variable length produced cargoes + byte num_cargoes = buf->ReadByte(); + if (num_cargoes > lengthof(indsp->produced_cargo)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG); + error->param_value[1] = prop; + return CIR_DISABLED; + } + for (uint i = 0; i < lengthof(indsp->produced_cargo); i++) { + if (i < num_cargoes) { + CargoID cargo = GetCargoTranslation(buf->ReadByte(), _cur.grffile); + indsp->produced_cargo[i] = cargo; + } else { + indsp->produced_cargo[i] = CT_INVALID; + } + } + break; + } + + case 0x26: { // variable length accepted cargoes + byte num_cargoes = buf->ReadByte(); + if (num_cargoes > lengthof(indsp->accepts_cargo)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG); + error->param_value[1] = prop; + return CIR_DISABLED; + } + for (uint i = 0; i < lengthof(indsp->accepts_cargo); i++) { + if (i < num_cargoes) { + CargoID cargo = GetCargoTranslation(buf->ReadByte(), _cur.grffile); + indsp->accepts_cargo[i] = cargo; + } else { + indsp->accepts_cargo[i] = CT_INVALID; + } + } + break; + } + + case 0x27: { // variable length production rates + byte num_cargoes = buf->ReadByte(); + if (num_cargoes > lengthof(indsp->production_rate)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG); + error->param_value[1] = prop; + return CIR_DISABLED; + } + for (uint i = 0; i < lengthof(indsp->production_rate); i++) { + if (i < num_cargoes) { + indsp->production_rate[i] = buf->ReadByte(); + } else { + indsp->production_rate[i] = 0; + } + } + break; + } + + case 0x28: { // variable size input/output production multiplier table + byte num_inputs = buf->ReadByte(); + byte num_outputs = buf->ReadByte(); + if (num_inputs > lengthof(indsp->accepts_cargo) || num_outputs > lengthof(indsp->produced_cargo)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG); + error->param_value[1] = prop; + return CIR_DISABLED; + } + for (uint i = 0; i < lengthof(indsp->accepts_cargo); i++) { + for (uint j = 0; j < lengthof(indsp->produced_cargo); j++) { + uint16 mult = 0; + if (i < num_inputs && j < num_outputs) mult = buf->ReadWord(); + indsp->input_cargo_multiplier[i][j] = mult; + } + } + break; + } + default: ret = CIR_UNKNOWN; break; @@ -3786,8 +3912,6 @@ static ChangeInfoResult AirportChangeInfo(uint airport, int numinfo, int prop, B } else { /* Declared as been valid, can be used */ att[k].gfx = tempid; - size = k + 1; - copy_from = att; } } else if (att[k].gfx == 0xFF) { att[k].ti.x = (int8)GB(att[k].ti.x, 0, 8); @@ -4740,7 +4864,7 @@ static void NewSpriteGroup(ByteReader *buf) } } - group->num_ranges = optimised.size(); + group->num_ranges = (uint)optimised.size(); // cast is safe, there should never be 2**31 elements here if (group->num_ranges > 0) { group->ranges = MallocT(group->num_ranges); MemCpyT(group->ranges, &optimised.front(), group->num_ranges); @@ -4842,7 +4966,7 @@ static void NewSpriteGroup(ByteReader *buf) } case GSF_INDUSTRIES: { - if (type > 1) { + if (type > 2) { grfmsg(1, "NewSpriteGroup: Unsupported industry production version %d, skipping", type); break; } @@ -4852,21 +4976,63 @@ static void NewSpriteGroup(ByteReader *buf) act_group = group; group->version = type; if (type == 0) { + group->num_input = 3; for (uint i = 0; i < 3; i++) { group->subtract_input[i] = (int16)buf->ReadWord(); // signed } + group->num_output = 2; for (uint i = 0; i < 2; i++) { group->add_output[i] = buf->ReadWord(); // unsigned } group->again = buf->ReadByte(); - } else { + } else if (type == 1) { + group->num_input = 3; for (uint i = 0; i < 3; i++) { group->subtract_input[i] = buf->ReadByte(); } + group->num_output = 2; for (uint i = 0; i < 2; i++) { group->add_output[i] = buf->ReadByte(); } group->again = buf->ReadByte(); + } else if (type == 2) { + group->num_input = buf->ReadByte(); + if (group->num_input > lengthof(group->subtract_input)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_INDPROD_CALLBACK); + error->data = stredup("too many inputs (max 16)"); + return; + } + for (uint i = 0; i < group->num_input; i++) { + byte rawcargo = buf->ReadByte(); + CargoID cargo = GetCargoTranslation(rawcargo, _cur.grffile); + if (std::find(group->cargo_input, group->cargo_input + i, cargo) != group->cargo_input + i) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_INDPROD_CALLBACK); + error->data = stredup("duplicate input cargo"); + return; + } + group->cargo_input[i] = cargo; + group->subtract_input[i] = buf->ReadByte(); + } + group->num_output = buf->ReadByte(); + if (group->num_output > lengthof(group->add_output)) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_INDPROD_CALLBACK); + error->data = stredup("too many outputs (max 16)"); + return; + } + for (uint i = 0; i < group->num_output; i++) { + byte rawcargo = buf->ReadByte(); + CargoID cargo = GetCargoTranslation(rawcargo, _cur.grffile); + if (std::find(group->cargo_output, group->cargo_output + i, cargo) != group->cargo_output + i) { + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_INDPROD_CALLBACK); + error->data = stredup("duplicate output cargo"); + return; + } + group->cargo_output[i] = cargo; + group->add_output[i] = buf->ReadByte(); + } + group->again = buf->ReadByte(); + } else { + NOT_REACHED(); } break; } @@ -5906,7 +6072,8 @@ static uint32 GetParamVal(byte param, uint32 *cond_val) /* Supported in Action 0x07 and 0x09, not 0x0D */ return 0; } else { - uint32 param_val = _ttdpatch_flags[*cond_val / 0x20]; + uint32 index = *cond_val / 0x20; + uint32 param_val = index < lengthof(_ttdpatch_flags) ? _ttdpatch_flags[index] : 0; *cond_val %= 0x20; return param_val; } @@ -7896,6 +8063,8 @@ static void InitializeGRFSpecial() | ((_settings_game.vehicle.dynamic_engines ? 1 : 0) << 0x18) // dynamic engines | (1 << 0x1E) // variablerunningcosts | (1 << 0x1F); // any switch is on + + _ttdpatch_flags[4] = (1 << 0x00); // larger persistent storage } /** Reset and clear all NewGRF stations */ @@ -8305,9 +8474,9 @@ static void CalculateRefitMasks() /* Did the newgrf specify any refitting? If not, use defaults. */ if (_gted[engine].refittability != GRFTempEngineData::UNSET) { - uint32 mask = 0; - uint32 not_mask = 0; - uint32 xor_mask = ei->refit_mask; + CargoTypes mask = 0; + CargoTypes not_mask = 0; + CargoTypes xor_mask = ei->refit_mask; /* If the original masks set by the grf are zero, the vehicle shall only carry the default cargo. * Note: After applying the translations, the vehicle may end up carrying no defined cargo. It becomes unavailable in that case. */ @@ -8328,7 +8497,7 @@ static void CalculateRefitMasks() ei->refit_mask |= _gted[engine].ctt_include_mask; ei->refit_mask &= ~_gted[engine].ctt_exclude_mask; } else { - uint32 xor_mask = 0; + CargoTypes xor_mask = 0; /* Don't apply default refit mask to wagons nor engines with no capacity */ if (e->type != VEH_TRAIN || (e->u.rail.capacity != 0 && e->u.rail.railveh_type != RAILVEH_WAGON)) { @@ -8422,6 +8591,8 @@ static void FinaliseEngineArray() } } + if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue; + /* When the train does not set property 27 (misc flags), but it * is overridden by a NewGRF graphically we want to disable the * flipping possibility. */ diff --git a/src/newgrf.h b/src/newgrf.h index bfafb3b9e9..1ab55dd044 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -1,4 +1,4 @@ -/* $Id: newgrf.h 27730 2017-01-14 15:48:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index fd8c5a0c2a..6213097bd0 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_airport.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -216,7 +216,6 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as) /** * Store a value into the object's persistent storage. - * @param object Object that we want to query. * @param pos Position in the persistent storage to use. * @param value Value to store. */ diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h index e4d3755ef4..867362e9ad 100644 --- a/src/newgrf_airport.h +++ b/src/newgrf_airport.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_airport.h 27908 2017-08-31 06:55:38Z adf88 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index d248921354..2d3a5129c9 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_airporttiles.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_airporttiles.h b/src/newgrf_airporttiles.h index dbfbc70501..dc04642037 100644 --- a/src/newgrf_airporttiles.h +++ b/src/newgrf_airporttiles.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_airporttiles.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_animation_base.h b/src/newgrf_animation_base.h index b21cf91acd..791f3d691a 100644 --- a/src/newgrf_animation_base.h +++ b/src/newgrf_animation_base.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_animation_base.h 24846 2012-12-23 21:09:09Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -31,7 +31,6 @@ template palette & GRFP_BLT_32BPP) { - SetDParamStr(0, (c->palette & GRFP_USE_WINDOWS) ? "Legacy (W) / 32 bpp" : "Default (D) / 32 bpp"); + SetDParam(0, (c->palette & GRFP_USE_WINDOWS) ? STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP : STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP); } else { - SetDParamStr(0, (c->palette & GRFP_USE_WINDOWS) ? "Legacy (W)" : "Default (D)"); + SetDParam(0, (c->palette & GRFP_USE_WINDOWS) ? STR_NEWGRF_SETTINGS_PALETTE_LEGACY : STR_NEWGRF_SETTINGS_PALETTE_DEFAULT); } y = DrawStringMultiLine(x, right, y, bottom, STR_NEWGRF_SETTINGS_PALETTE); } @@ -150,7 +151,7 @@ struct NewGRFParametersWindow : public Window { bool clicked_increase; ///< True if the increase button was clicked, false for the decrease button. bool clicked_dropdown; ///< Whether the dropdown is open. bool closing_dropdown; ///< True, if the dropdown list is currently closing. - int timeout; ///< How long before we unpress the last-pressed button? + GUITimer timeout; ///< How long before we unpress the last-pressed button? uint clicked_row; ///< The selected parameter int line_height; ///< Height of a row in the matrix widget. Scrollbar *vscroll; @@ -162,7 +163,6 @@ struct NewGRFParametersWindow : public Window { clicked_button(UINT_MAX), clicked_dropdown(false), closing_dropdown(false), - timeout(0), clicked_row(UINT_MAX), editable(editable) { @@ -403,7 +403,7 @@ struct NewGRFParametersWindow : public Window { par_info->SetValue(this->grf_config, val); this->clicked_button = num; - this->timeout = 5; + this->timeout.SetInterval(150); } } else if (par_info->type == PTYPE_UINT_ENUM && !par_info->complete_labels && click_count >= 2) { /* Display a query box so users can enter a custom value. */ @@ -483,9 +483,9 @@ struct NewGRFParametersWindow : public Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->timeout == 0) { + if (timeout.Elapsed(delta_ms)) { this->clicked_button = UINT_MAX; this->SetDirty(); } @@ -561,7 +561,7 @@ struct NewGRFTextfileWindow : public TextfileWindow { void ShowNewGRFTextfileWindow(TextfileType file_type, const GRFConfig *c) { - DeleteWindowByClass(WC_TEXTFILE); + DeleteWindowById(WC_TEXTFILE, file_type); new NewGRFTextfileWindow(file_type, c); } @@ -725,7 +725,11 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { GRFConfig *d = new GRFConfig(*a); d->next = (*c)->next; d->CopyParams(**c); - if (this->active_sel == *c) this->active_sel = NULL; + if (this->active_sel == *c) { + DeleteWindowByClass(WC_GRF_PARAMETERS); + DeleteWindowByClass(WC_TEXTFILE); + this->active_sel = NULL; + } delete *c; *c = d; iter->second = d; @@ -1022,7 +1026,10 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { GRFConfig *c; for (c = this->actives; c != NULL && i > 0; c = c->next, i--) {} - if (this->active_sel != c) DeleteWindowByClass(WC_GRF_PARAMETERS); + if (this->active_sel != c) { + DeleteWindowByClass(WC_GRF_PARAMETERS); + DeleteWindowByClass(WC_TEXTFILE); + } this->active_sel = c; this->avail_sel = NULL; this->avail_pos = -1; @@ -1033,12 +1040,13 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { break; } /* With double click, continue */ + FALLTHROUGH; } - FALLTHROUGH; case WID_NS_REMOVE: { // Remove GRF if (this->active_sel == NULL || !this->editable) break; DeleteWindowByClass(WC_GRF_PARAMETERS); + DeleteWindowByClass(WC_TEXTFILE); /* Choose the next GRF file to be the selected file. */ GRFConfig *newsel = this->active_sel->next; @@ -1080,6 +1088,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { this->active_sel = NULL; DeleteWindowByClass(WC_GRF_PARAMETERS); if (i < this->avails.Length()) { + if (this->avail_sel != this->avails[i]) DeleteWindowByClass(WC_TEXTFILE); this->avail_sel = this->avails[i]; this->avail_pos = i; } @@ -1089,8 +1098,8 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { break; } /* With double click, continue */ + FALLTHROUGH; } - FALLTHROUGH; case WID_NS_ADD: if (this->avail_sel == NULL || !this->editable || HasBit(this->avail_sel->flags, GCF_INVALID)) break; @@ -1152,11 +1161,11 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { virtual void OnNewGRFsScanned() { + if (this->active_sel == NULL) DeleteWindowByClass(WC_TEXTFILE); this->avail_sel = NULL; this->avail_pos = -1; this->avails.ForceRebuild(); this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window - this->DeleteChildWindows(WC_TEXTFILE); // Remove the view textfile window } virtual void OnDropdownSelect(int widget, int index) @@ -1173,6 +1182,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { ResetObjectToPlace(); DeleteWindowByClass(WC_GRF_PARAMETERS); + DeleteWindowByClass(WC_TEXTFILE); this->active_sel = NULL; this->InvalidateData(GOID_NEWGRF_PRESET_LOADED); } @@ -1221,7 +1231,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { *l = new GRFConfig(*f); (*l)->next = c->next; - if (active_sel == c) active_sel = *l; + if (this->active_sel == c) this->active_sel = *l; delete c; } @@ -1347,6 +1357,9 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { if (this->avails.Length() == 0) this->avail_pos = -1; if (this->avail_pos >= 0) { + this->active_sel = NULL; + DeleteWindowByClass(WC_GRF_PARAMETERS); + if (this->avail_sel != this->avails[this->avail_pos]) DeleteWindowByClass(WC_TEXTFILE); this->avail_sel = this->avails[this->avail_pos]; this->vscroll2->ScrollTowards(this->avail_pos); this->InvalidateData(0); @@ -1509,6 +1522,8 @@ private: { if (this->avail_sel == NULL || !this->editable || HasBit(this->avail_sel->flags, GCF_INVALID)) return false; + DeleteWindowByClass(WC_TEXTFILE); + uint count = 0; GRFConfig **entry = NULL; GRFConfig **list; @@ -1584,8 +1599,8 @@ NewGRFWindow::GUIGRFConfigList::FilterFunction * const NewGRFWindow::filter_func /** * Custom nested widget container for the NewGRF gui. * Depending on the space in the gui, it uses either - * - two column mode, put the #acs and the #avs underneath each other and the #info next to it, or - * - three column mode, put the #avs, #acs, and #info each in its own column. + * - two column mode, put the #acs and the #avs underneath each other and the #inf next to it, or + * - three column mode, put the #avs, #acs, and #inf each in its own column. */ class NWidgetNewGRFDisplay : public NWidgetContainer { public: @@ -1968,6 +1983,7 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed) { if (confirmed) { DeleteWindowByClass(WC_GRF_PARAMETERS); + DeleteWindowByClass(WC_TEXTFILE); NewGRFWindow *nw = dynamic_cast(w); GamelogStartAction(GLAT_GRF); diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index f57068e950..314f02b3dc 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_house.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,7 +56,7 @@ static const GRFFile *GetHouseSpecGrf(HouseID house_id) */ HouseResolverObject::HouseResolverObject(HouseID house_id, TileIndex tile, Town *town, CallbackID callback, uint32 param1, uint32 param2, - bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers) + bool not_yet_constructed, uint8 initial_random_bits, CargoTypes watched_cargo_triggers) : ResolverObject(GetHouseSpecGrf(house_id), callback, param1, param2), house_scope(*this, house_id, tile, town, not_yet_constructed, initial_random_bits, watched_cargo_triggers), town_scope(*this, town, not_yet_constructed) // Don't access StorePSA if house is not yet constructed. @@ -409,7 +409,7 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI } uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile, - bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers) + bool not_yet_constructed, uint8 initial_random_bits, CargoTypes watched_cargo_triggers) { assert(IsValidTile(tile) && (not_yet_constructed || IsTileType(tile, MP_HOUSE))); @@ -472,13 +472,13 @@ void DrawNewHouseTile(TileInfo *ti, HouseID house_id) } /* Simple wrapper for GetHouseCallback to keep the animation unified. */ -uint16 GetSimpleHouseCallback(CallbackID callback, uint32 param1, uint32 param2, const HouseSpec *spec, Town *town, TileIndex tile, uint32 extra_data) +uint16 GetSimpleHouseCallback(CallbackID callback, uint32 param1, uint32 param2, const HouseSpec *spec, Town *town, TileIndex tile, CargoTypes extra_data) { return GetHouseCallback(callback, param1, param2, spec - HouseSpec::Get(0), town, tile, false, 0, extra_data); } /** Helper class for animation control. */ -struct HouseAnimationBase : public AnimationBase { +struct HouseAnimationBase : public AnimationBase { static const CallbackID cb_animation_speed = CBID_HOUSE_ANIMATION_SPEED; static const CallbackID cb_animation_next_frame = CBID_HOUSE_ANIMATION_NEXT_FRAME; @@ -633,7 +633,7 @@ void TriggerHouse(TileIndex t, HouseTrigger trigger) * @param trigger_cargoes Cargo types that triggered the callback. * @param random Random bits. */ -void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, uint32 trigger_cargoes, uint16 random) +void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, CargoTypes trigger_cargoes, uint16 random) { TileIndexDiffC diff = TileIndexToTileIndexDiffC(origin, tile); uint32 cb_info = random << 16 | (uint8)diff.y << 8 | (uint8)diff.x; @@ -646,7 +646,7 @@ void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, uint32 trigger_car * @param trigger_cargoes Triggering cargo types. * @pre IsTileType(t, MP_HOUSE) */ -void WatchedCargoCallback(TileIndex tile, uint32 trigger_cargoes) +void WatchedCargoCallback(TileIndex tile, CargoTypes trigger_cargoes) { assert(IsTileType(tile, MP_HOUSE)); HouseID id = GetHouseType(tile); diff --git a/src/newgrf_house.h b/src/newgrf_house.h index 2ec8b91327..bb364f6fc6 100644 --- a/src/newgrf_house.h +++ b/src/newgrf_house.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_house.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -25,7 +25,7 @@ struct HouseScopeResolver : public ScopeResolver { Town *town; ///< Town of this house. bool not_yet_constructed; ///< True for construction check. uint16 initial_random_bits; ///< Random bits during construction checks. - uint32 watched_cargo_triggers; ///< Cargo types that triggered the watched cargo callback. + CargoTypes watched_cargo_triggers; ///< Cargo types that triggered the watched cargo callback. /** * Constructor of a house scope resolver. @@ -38,7 +38,7 @@ struct HouseScopeResolver : public ScopeResolver { * @param watched_cargo_triggers Cargo types that triggered the watched cargo callback. */ HouseScopeResolver(ResolverObject &ro, HouseID house_id, TileIndex tile, Town *town, - bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers) + bool not_yet_constructed, uint8 initial_random_bits, CargoTypes watched_cargo_triggers) : ScopeResolver(ro), house_id(house_id), tile(tile), town(town), not_yet_constructed(not_yet_constructed), initial_random_bits(initial_random_bits), watched_cargo_triggers(watched_cargo_triggers) { @@ -56,7 +56,7 @@ struct HouseResolverObject : public ResolverObject { HouseResolverObject(HouseID house_id, TileIndex tile, Town *town, CallbackID callback = CBID_NO_CALLBACK, uint32 param1 = 0, uint32 param2 = 0, - bool not_yet_constructed = false, uint8 initial_random_bits = 0, uint32 watched_cargo_triggers = 0); + bool not_yet_constructed = false, uint8 initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0); /* virtual */ ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) { @@ -97,8 +97,8 @@ void AnimateNewHouseTile(TileIndex tile); void AnimateNewHouseConstruction(TileIndex tile); uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile, - bool not_yet_constructed = false, uint8 initial_random_bits = 0, uint32 watched_cargo_triggers = 0); -void WatchedCargoCallback(TileIndex tile, uint32 trigger_cargoes); + bool not_yet_constructed = false, uint8 initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0); +void WatchedCargoCallback(TileIndex tile, CargoTypes trigger_cargoes); bool CanDeleteHouse(TileIndex tile); diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 9bb021bb52..de388c0234 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_industries.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -304,6 +304,33 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout return GetCountAndDistanceOfClosestInstance(parameter, layout_filter, town_filter, this->industry); } + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: { + CargoID cargo = GetCargoTranslation(parameter, this->ro.grffile); + int index = this->industry->GetCargoProducedIndex(cargo); + if (index < 0) return 0; // invalid cargo + if (variable == 0x69) return this->industry->produced_cargo_waiting[index]; + if (variable == 0x6A) return this->industry->this_month_production[index]; + if (variable == 0x6B) return this->industry->this_month_transported[index]; + if (variable == 0x6C) return this->industry->last_month_production[index]; + if (variable == 0x6D) return this->industry->last_month_transported[index]; + NOT_REACHED(); + } + + + case 0x6E: + case 0x6F: { + CargoID cargo = GetCargoTranslation(parameter, this->ro.grffile); + int index = this->industry->GetCargoAcceptedIndex(cargo); + if (index < 0) return 0; // invalid cargo + if (variable == 0x6E) return this->industry->last_cargo_accepted_at[index]; + if (variable == 0x6F) return this->industry->incoming_cargo_waiting[index]; + NOT_REACHED(); + } + /* Get a variable from the persistent storage */ case 0x7C: return (this->industry->psa != NULL) ? this->industry->psa->GetValue(parameter) : 0; @@ -364,7 +391,10 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout case 0xB0: return Clamp(this->industry->construction_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Date when built since 1920 (in days) case 0xB3: return this->industry->construction_type; // Construction type - case 0xB4: return Clamp(this->industry->last_cargo_accepted_at - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Date last cargo accepted since 1920 (in days) + case 0xB4: { + Date *latest = std::max_element(this->industry->last_cargo_accepted_at, endof(this->industry->last_cargo_accepted_at)); + return Clamp((*latest) - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Date last cargo accepted since 1920 (in days) + } } DEBUG(grf, 1, "Unhandled industry variable 0x%X", variable); @@ -415,7 +445,7 @@ static const GRFFile *GetGrffile(IndustryType type) /** * Constructor of the industries resolver. * @param tile %Tile owned by the industry. - * @param industry %Industry being resolved. + * @param indus %Industry being resolved. * @param type Type of the industry. * @param random_bits Random bits of the new industry. * @param callback Callback ID. @@ -575,13 +605,28 @@ void IndustryProductionCallback(Industry *ind, int reason) if (tgroup == NULL || tgroup->type != SGT_INDUSTRY_PRODUCTION) break; const IndustryProductionSpriteGroup *group = (const IndustryProductionSpriteGroup *)tgroup; - bool deref = (group->version == 1); + bool deref = (group->version >= 1); - for (uint i = 0; i < 3; i++) { - ind->incoming_cargo_waiting[i] = Clamp(ind->incoming_cargo_waiting[i] - DerefIndProd(group->subtract_input[i], deref) * multiplier, 0, 0xFFFF); - } - for (uint i = 0; i < 2; i++) { - ind->produced_cargo_waiting[i] = Clamp(ind->produced_cargo_waiting[i] + max(DerefIndProd(group->add_output[i], deref), 0) * multiplier, 0, 0xFFFF); + if (group->version < 2) { + /* Callback parameters map directly to industry cargo slot indices */ + for (uint i = 0; i < group->num_input; i++) { + ind->incoming_cargo_waiting[i] = Clamp(ind->incoming_cargo_waiting[i] - DerefIndProd(group->subtract_input[i], deref) * multiplier, 0, 0xFFFF); + } + for (uint i = 0; i < group->num_output; i++) { + ind->produced_cargo_waiting[i] = Clamp(ind->produced_cargo_waiting[i] + max(DerefIndProd(group->add_output[i], deref), 0) * multiplier, 0, 0xFFFF); + } + } else { + /* Callback receives list of cargos to apply for, which need to have their cargo slots in industry looked up */ + for (uint i = 0; i < group->num_input; i++) { + int cargo_index = ind->GetCargoAcceptedIndex(group->cargo_input[i]); + if (cargo_index < 0) continue; + ind->incoming_cargo_waiting[cargo_index] = Clamp(ind->incoming_cargo_waiting[cargo_index] - DerefIndProd(group->subtract_input[i], deref) * multiplier, 0, 0xFFFF); + } + for (uint i = 0; i < group->num_output; i++) { + int cargo_index = ind->GetCargoProducedIndex(group->cargo_output[i]); + if (cargo_index < 0) continue; + ind->produced_cargo_waiting[cargo_index] = Clamp(ind->produced_cargo_waiting[cargo_index] + max(DerefIndProd(group->add_output[i], deref), 0) * multiplier, 0, 0xFFFF); + } } int32 again = DerefIndProd(group->again, deref); @@ -602,7 +647,7 @@ void IndustryProductionCallback(Industry *ind, int reason) */ bool IndustryTemporarilyRefusesCargo(Industry *ind, CargoID cargo_type) { - assert(cargo_type == ind->accepts_cargo[0] || cargo_type == ind->accepts_cargo[1] || cargo_type == ind->accepts_cargo[2]); + assert(std::find(ind->accepts_cargo, endof(ind->accepts_cargo), cargo_type) != endof(ind->accepts_cargo)); const IndustrySpec *indspec = GetIndustrySpec(ind->type); if (HasBit(indspec->callback_mask, CBM_IND_REFUSE_CARGO)) { diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h index 24e2297f29..fa809fcd73 100644 --- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_industries.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index e46848424e..0b2a55000e 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_industrytiles.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -296,7 +296,7 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge * @param tile Industry tile to trigger. * @param trigger Trigger to trigger. * @param ind Industry of the tile. - * @param [in,out] reseed_industry Collects bits to reseed for the industry. + * @param[in,out] reseed_industry Collects bits to reseed for the industry. */ static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, Industry *ind, uint32 &reseed_industry) { diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h index e9de0ab76e..6051c1062b 100644 --- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_industrytiles.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index fbe26f157c..1501cb9b8a 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_object.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -96,7 +96,9 @@ uint ObjectSpec::Index() const void ResetObjects() { /* Clean the pool. */ - MemSetT(_object_specs, 0, lengthof(_object_specs)); + for (uint16 i = 0; i < NUM_OBJECTS; i++) { + _object_specs[i] = {}; + } /* And add our originals. */ MemCpyT(_object_specs, _original_objects, lengthof(_original_objects)); @@ -348,8 +350,8 @@ unhandled: * @param tile %Tile of the object. * @param view View of the object. * @param callback Callback ID. - * @param callback_param1 First parameter (var 10) of the callback. - * @param callback_param2 Second parameter (var 18) of the callback. + * @param param1 First parameter (var 10) of the callback. + * @param param2 Second parameter (var 18) of the callback. */ ObjectResolverObject::ObjectResolverObject(const ObjectSpec *spec, Object *obj, TileIndex tile, uint8 view, CallbackID callback, uint32 param1, uint32 param2) diff --git a/src/newgrf_object.h b/src/newgrf_object.h index 5c6963ddcc..43c8de031c 100644 --- a/src/newgrf_object.h +++ b/src/newgrf_object.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_object.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -138,8 +138,8 @@ struct ObjectResolverObject : public ResolverObject { case VSG_SCOPE_PARENT: { TownScopeResolver *tsr = this->GetTown(); if (tsr != NULL) return tsr; + FALLTHROUGH; } - FALLTHROUGH; default: return ResolverObject::GetScope(scope, relative); diff --git a/src/newgrf_properties.h b/src/newgrf_properties.h index 46aa3f23cd..e1240f29ee 100644 --- a/src/newgrf_properties.h +++ b/src/newgrf_properties.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_properties.h 23504 2011-12-13 00:43:35Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index d0df6e8e8a..8421844717 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_railtype.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -87,8 +87,8 @@ RailTypeResolverObject::RailTypeResolverObject(const RailtypeInfo *rti, TileInde * @param rti The rail type data (spec). * @param tile The tile to get the sprite for. * @param rtsg The type of sprite to draw. - * @param content Where are we drawing the tile? - * @param [out] num_results If not NULL, return the number of sprites in the spriteset. + * @param context Where are we drawing the tile? + * @param[out] num_results If not NULL, return the number of sprites in the spriteset. * @return The sprite to draw. */ SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context, uint *num_results) diff --git a/src/newgrf_railtype.h b/src/newgrf_railtype.h index 947d68f710..5fadcd2ab5 100644 --- a/src/newgrf_railtype.h +++ b/src/newgrf_railtype.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_railtype.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp index 4dc4b3689c..0cc113d9df 100644 --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_sound.cpp 27507 2016-02-08 21:05:57Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_sound.h b/src/newgrf_sound.h index 0bbb03e930..efded063c8 100644 --- a/src/newgrf_sound.h +++ b/src/newgrf_sound.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_sound.h 27507 2016-02-08 21:05:57Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 1778d0b4bc..d8a10914cc 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_spritegroup.cpp 27989 2018-03-11 15:08:51Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -118,7 +118,7 @@ static inline uint32 GetVariable(const ResolverObject &object, ScopeResolver *sc /** * Store a value into the persistent storage area (PSA). Default implementation does nothing (for newgrf classes without storage). - * @param pos Position to store into. + * @param reg Position to store into. * @param value Value to store. */ /* virtual */ void ScopeResolver::StorePSA(uint reg, int32 value) {} @@ -144,21 +144,6 @@ static inline uint32 GetVariable(const ResolverObject &object, ScopeResolver *sc return &this->default_scope; } -/** - * Rotate val rot times to the right - * @param val the value to rotate - * @param rot the amount of times to rotate - * @return the rotated value - */ -static uint32 RotateRight(uint32 val, uint32 rot) -{ - /* Do not rotate more than necessary */ - rot %= 32; - - return (val >> rot) | (val << (32 - rot)); -} - - /* Evaluate an adjustment for a variable of the given size. * U is the unsigned type and S is the signed type to use. */ template @@ -192,7 +177,7 @@ static U EvalAdjustT(const DeterministicSpriteGroupAdjust *adjust, ScopeResolver case DSGA_OP_STO: _temp_store.StoreValue((U)value, (S)last_value); return last_value; case DSGA_OP_RST: return value; case DSGA_OP_STOP: scope->StorePSA((U)value, (S)last_value); return last_value; - case DSGA_OP_ROR: return RotateRight(last_value, value); + case DSGA_OP_ROR: return ROR((U)last_value, (U)value & 0x1F); // mask 'value' to 5 bits, which should behave the same on all architectures. case DSGA_OP_SCMP: return ((S)last_value == (S)value) ? 1 : ((S)last_value < (S)value ? 0 : 2); case DSGA_OP_UCMP: return ((U)last_value == (U)value) ? 1 : ((U)last_value < (U)value ? 0 : 2); case DSGA_OP_SHL: return (uint32)(U)last_value << ((U)value & 0x1F); // Same behaviour as in ParamSet, mask 'value' to 5 bits, which should behave the same on all architectures. @@ -309,7 +294,7 @@ const SpriteGroup *RealSpriteGroup::Resolve(ResolverObject &object) const * Process registers and the construction stage into the sprite layout. * The passed construction stage might get reset to zero, if it gets incorporated into the layout * during the preprocessing. - * @param [in, out] stage Construction stage (0-3), or NULL if not applicable. + * @param[in,out] stage Construction stage (0-3), or NULL if not applicable. * @return sprite layout to draw. */ const DrawTileSprites *TileLayoutSpriteGroup::ProcessRegisters(uint8 *stage) const diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index d965d2846a..6f038fd138 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_spritegroup.h 27989 2018-03-11 15:08:51Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,7 @@ #include "town_type.h" #include "engine_type.h" #include "house_type.h" +#include "industry_type.h" #include "newgrf_callbacks.h" #include "newgrf_generic.h" @@ -277,9 +278,14 @@ struct IndustryProductionSpriteGroup : SpriteGroup { IndustryProductionSpriteGroup() : SpriteGroup(SGT_INDUSTRY_PRODUCTION) {} uint8 version; - int16 subtract_input[3]; // signed - uint16 add_output[2]; // unsigned + uint8 num_input; ///< How many subtract_input values are valid + int16 subtract_input[INDUSTRY_NUM_INPUTS]; ///< Take this much of the input cargo (can be negative, is indirect in cb version 1+) + CargoID cargo_input[INDUSTRY_NUM_INPUTS]; ///< Which input cargoes to take from (only cb version 2) + uint8 num_output; ///< How many add_output values are valid + uint16 add_output[INDUSTRY_NUM_OUTPUTS]; ///< Add this much output cargo when successful (unsigned, is indirect in cb version 1+) + CargoID cargo_output[INDUSTRY_NUM_OUTPUTS]; ///< Which output cargoes to add to (only cb version 2) uint8 again; + }; /** diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index c417dde44c..d9b79c55a1 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_station.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -881,7 +881,7 @@ bool CanStationTileHaveWires(TileIndex tile) return statspec == NULL || !HasBit(statspec->wires, GetStationGfx(tile)); } -/** Wrapper for animation control, see #GetStationCallback. */ +/** Wrapper for animation control, see GetStationCallback. */ uint16 GetAnimStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int extra_data) { return GetStationCallback(callback, param1, param2, statspec, st, tile); @@ -963,7 +963,7 @@ void TriggerStationRandomisation(Station *st, TileIndex tile, StationRandomTrigg uint32 whole_reseed = 0; ETileArea area = ETileArea(st, tile, tas[trigger]); - uint32 empty_mask = 0; + CargoTypes empty_mask = 0; if (trigger == SRT_CARGO_TAKEN) { /* Create a bitmask of completely empty cargo types to be matched */ for (CargoID i = 0; i < NUM_CARGO; i++) { diff --git a/src/newgrf_station.h b/src/newgrf_station.h index aad2edda47..123330d0ad 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_station.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -68,8 +68,8 @@ struct StationResolverObject : public ResolverObject { case VSG_SCOPE_PARENT: { TownScopeResolver *tsr = this->GetTown(); if (tsr != NULL) return tsr; + FALLTHROUGH; } - FALLTHROUGH; default: return ResolverObject::GetScope(scope, relative); @@ -153,7 +153,7 @@ struct StationSpec { */ uint16 cargo_threshold; - uint32 cargo_triggers; ///< Bitmask of cargo types which cause trigger re-randomizing + CargoTypes cargo_triggers; ///< Bitmask of cargo types which cause trigger re-randomizing byte callback_mask; ///< Bitmask of station callbacks that have to be called diff --git a/src/newgrf_storage.cpp b/src/newgrf_storage.cpp index 8d299fb237..e91e1f90c8 100644 --- a/src/newgrf_storage.cpp +++ b/src/newgrf_storage.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_storage.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_storage.h b/src/newgrf_storage.h index 93faf74a46..a0c1558f8e 100644 --- a/src/newgrf_storage.h +++ b/src/newgrf_storage.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_storage.h 26371 2014-02-23 22:03:08Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -220,7 +220,7 @@ extern PersistentStoragePool _persistent_storage_pool; /** * Class for pooled persistent storage of data. */ -struct PersistentStorage : PersistentStorageArray, PersistentStoragePool::PoolItem<&_persistent_storage_pool> { +struct PersistentStorage : PersistentStorageArray, PersistentStoragePool::PoolItem<&_persistent_storage_pool> { /** We don't want GCC to zero our struct! It already is zeroed and has an index! */ PersistentStorage(const uint32 new_grfid, byte feature, TileIndex tile) { @@ -230,7 +230,7 @@ struct PersistentStorage : PersistentStorageArray, PersistentStorageP } }; -assert_compile(cpp_lengthof(OldPersistentStorage, storage) == cpp_lengthof(PersistentStorage, storage)); +assert_compile(cpp_lengthof(OldPersistentStorage, storage) <= cpp_lengthof(PersistentStorage, storage)); #define FOR_ALL_STORAGES_FROM(var, start) FOR_ALL_ITEMS_FROM(PersistentStorage, storage_index, var, start) #define FOR_ALL_STORAGES(var) FOR_ALL_STORAGES_FROM(var, 0) diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index 8157bcbbba..b92b84355a 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_text.cpp 27851 2017-04-09 21:58:07Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -329,7 +329,7 @@ struct UnmappedChoiceList : ZeroedMemoryAllocator { * @param language_id The (NewGRF) language ID associated with this string. * @param allow_newlines Whether newlines are allowed in the string or not. * @param str The string to translate. - * @param [out] olen The length of the final string. + * @param[out] olen The length of the final string. * @param byte80 The control code to use as replacement for the 0x80-value. * @return The translated string. */ diff --git a/src/newgrf_text.h b/src/newgrf_text.h index 6502adac29..033967d307 100644 --- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_text.h 27851 2017-04-09 21:58:07Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index 1fab2a48ee..00fcf76b63 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_town.cpp 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -50,7 +50,7 @@ case 0x81: return GB(this->t->xy, 8, 8); case 0x82: return ClampToU16(this->t->cache.population); case 0x83: return GB(ClampToU16(this->t->cache.population), 8, 8); - case 0x8A: return this->t->grow_counter; + case 0x8A: return this->t->grow_counter / TOWN_GROWTH_TICKS; case 0x92: return this->t->flags; // In original game, 0x92 and 0x93 are really one word. Since flags is a byte, this is to adjust case 0x93: return 0; case 0x94: return ClampToU16(this->t->cache.squared_town_zone_radius[0]); @@ -82,7 +82,7 @@ case 0xAE: return this->t->have_ratings; case 0xB2: return this->t->statues; case 0xB6: return ClampToU16(this->t->cache.num_houses); - case 0xB9: return this->t->growth_rate & (~TOWN_GROW_RATE_CUSTOM); + case 0xB9: return this->t->growth_rate / TOWN_GROWTH_TICKS; case 0xBA: return ClampToU16(this->t->supplied[CT_PASSENGERS].new_max); case 0xBB: return GB(ClampToU16(this->t->supplied[CT_PASSENGERS].new_max), 8, 8); case 0xBC: return ClampToU16(this->t->supplied[CT_MAIL].new_max); diff --git a/src/newgrf_town.h b/src/newgrf_town.h index a1575f4131..7c4fb5395c 100644 --- a/src/newgrf_town.h +++ b/src/newgrf_town.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_town.h 27984 2018-03-11 13:19:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_townname.cpp b/src/newgrf_townname.cpp index 4a849ebbb4..42aae3f147 100644 --- a/src/newgrf_townname.cpp +++ b/src/newgrf_townname.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_townname.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/newgrf_townname.h b/src/newgrf_townname.h index 4c32147417..0b1b389cbe 100644 --- a/src/newgrf_townname.h +++ b/src/newgrf_townname.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_townname.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/news_func.h b/src/news_func.h index 1819b3de9d..cd0862f348 100644 --- a/src/news_func.h +++ b/src/news_func.h @@ -1,4 +1,4 @@ -/* $Id: news_func.h 24845 2012-12-23 21:08:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 62ea864846..b79418c899 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: news_gui.cpp 27838 2017-03-31 23:09:50Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -33,6 +33,7 @@ #include "command_func.h" #include "company_base.h" #include "settings_internal.h" +#include "guitimer_func.h" #include "widgets/news_widget.h" @@ -42,10 +43,10 @@ const NewsItem *_statusbar_news_item = NULL; -static uint MIN_NEWS_AMOUNT = 30; ///< preferred minimum amount of news messages -static uint _total_news = 0; ///< current number of news items -static NewsItem *_oldest_news = NULL; ///< head of news items queue -static NewsItem *_latest_news = NULL; ///< tail of news items queue +static uint MIN_NEWS_AMOUNT = 30; ///< preferred minimum amount of news messages +static uint _total_news = 0; ///< current number of news items +NewsItem *_oldest_news = NULL; ///< head of news items queue +static NewsItem *_latest_news = NULL; ///< tail of news items queue /** * Forced news item. @@ -260,17 +261,21 @@ struct NewsWindow : Window { uint16 chat_height; ///< Height of the chat window. uint16 status_height; ///< Height of the status bar window const NewsItem *ni; ///< News item to display. - static uint duration; ///< Remaining time for showing current news message (may only be accessed while a news item is displayed). + static int duration; ///< Remaining time for showing the current news message (may only be access while a news item is displayed). + + GUITimer timer; NewsWindow(WindowDesc *desc, const NewsItem *ni) : Window(desc), ni(ni) { - NewsWindow::duration = 555; + NewsWindow::duration = 16650; const Window *w = FindWindowByClass(WC_SEND_NETWORK_MSG); this->chat_height = (w != NULL) ? w->height : 0; this->status_height = FindWindowById(WC_STATUS_BAR, 0)->height; this->flags |= WF_DISABLE_VP_SCROLL; + this->timer.SetInterval(15); + this->CreateNestedTree(); /* For company news with a face we have a separate headline in param[0] */ @@ -485,16 +490,23 @@ struct NewsWindow : Window { this->SetWindowTop(newtop); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - /* Scroll up newsmessages from the bottom in steps of 4 pixels */ - int newtop = max(this->top - 4, _screen.height - this->height - this->status_height - this->chat_height); - this->SetWindowTop(newtop); + int count = this->timer.CountElapsed(delta_ms); + if (count > 0) { + /* Scroll up newsmessages from the bottom */ + int newtop = max(this->top - 2 * count, _screen.height - this->height - this->status_height - this->chat_height); + this->SetWindowTop(newtop); + } + + /* Decrement the news timer. We don't need to action an elapsed event here, + * so no need to use TimerElapsed(). */ + if (NewsWindow::duration > 0) NewsWindow::duration -= delta_ms; } private: /** - * Moves the window so #newtop is new 'top' coordinate. Makes screen dirty where needed. + * Moves the window to a new #top coordinate. Makes screen dirty where needed. * @param newtop new top coordinate */ void SetWindowTop(int newtop) @@ -536,7 +548,7 @@ private: } }; -/* static */ uint NewsWindow::duration = 0; // Instance creation. +/* static */ int NewsWindow::duration = 0; // Instance creation. /** Open up an own newspaper window for the news item */ @@ -588,11 +600,8 @@ static bool ReadyForNextItem() * Check if the status bar message is still being displayed? */ if (IsNewsTickerShown()) return false; - /* Newspaper message, decrement duration counter */ - if (NewsWindow::duration != 0) NewsWindow::duration--; - /* neither newsticker nor newspaper are running */ - return (NewsWindow::duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); + return (NewsWindow::duration <= 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); } /** Move to the next news item */ @@ -962,7 +971,6 @@ void ShowLastNewsMessage() * @param y position of the string * @param colour the colour the string will be shown in * @param *ni NewsItem being printed - * @param maxw maximum width of string in pixels */ static void DrawNewsString(uint left, uint right, int y, TextColour colour, const NewsItem *ni) { diff --git a/src/news_gui.h b/src/news_gui.h index 966d0d5ff1..0f42c68c6c 100644 --- a/src/news_gui.h +++ b/src/news_gui.h @@ -1,4 +1,4 @@ -/* $Id: news_gui.h 24842 2012-12-23 21:06:37Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,7 +12,11 @@ #ifndef NEWS_GUI_H #define NEWS_GUI_H +#include "news_type.h" + void ShowLastNewsMessage(); void ShowMessageHistory(); +extern NewsItem *_oldest_news; + #endif /* NEWS_GUI_H */ diff --git a/src/news_type.h b/src/news_type.h index 5e2002512d..cad15ecbef 100644 --- a/src/news_type.h +++ b/src/news_type.h @@ -1,4 +1,4 @@ -/* $Id: news_type.h 24843 2012-12-23 21:07:12Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,19 +17,6 @@ #include "strings_type.h" #include "sound_type.h" -/** Constants in the message options window. */ -enum MessageOptionsSpace { - MOS_WIDG_PER_SETTING = 4, ///< Number of widgets needed for each news category, starting at widget #WID_MO_START_OPTION. - - MOS_LEFT_EDGE = 6, ///< Number of pixels between left edge of the window and the options buttons column. - MOS_COLUMN_SPACING = 4, ///< Number of pixels between the buttons and the description columns. - MOS_RIGHT_EDGE = 6, ///< Number of pixels between right edge of the window and the options descriptions column. - MOS_BUTTON_SPACE = 10, ///< Additional space in the button with the option value (for better looks). - - MOS_ABOVE_GLOBAL_SETTINGS = 6, ///< Number of vertical pixels between the categories and the global options. - MOS_BOTTOM_EDGE = 6, ///< Number of pixels between bottom edge of the window and bottom of the global options. -}; - /** * Type of news. */ diff --git a/src/object.h b/src/object.h index 2296842389..0ab92d3769 100644 --- a/src/object.h +++ b/src/object.h @@ -1,4 +1,4 @@ -/* $Id: object.h 27346 2015-07-28 18:20:54Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/object_base.h b/src/object_base.h index f90a97ca54..47e5a7f94c 100644 --- a/src/object_base.h +++ b/src/object_base.h @@ -1,4 +1,4 @@ -/* $Id: object_base.h 25844 2013-10-12 16:35:50Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 3622949c83..9f03813dfb 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: object_cmd.cpp 27656 2016-09-18 14:07:52Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -540,7 +540,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags) return cost; } -static void AddAcceptedCargo_Object(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted) +static void AddAcceptedCargo_Object(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted) { if (!IsObjectType(tile, OBJECT_HQ)) return; diff --git a/src/object_gui.cpp b/src/object_gui.cpp index 1076e981a8..8aabcfdc46 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: object_gui.cpp 27438 2015-11-07 15:07:18Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -520,10 +520,7 @@ static WindowDesc _build_object_desc( _nested_build_object_widgets, lengthof(_nested_build_object_widgets) ); -/** - * Show our object picker. - * @param w The toolbar window we're associated with. - */ +/** Show our object picker. */ void ShowBuildObjectPicker() { /* Don't show the place object button when there are no objects to place. */ diff --git a/src/object_map.h b/src/object_map.h index c728502e18..1aaf984345 100644 --- a/src/object_map.h +++ b/src/object_map.h @@ -1,4 +1,4 @@ -/* $Id: object_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/object_type.h b/src/object_type.h index 4ccc4ab773..4ead576f38 100644 --- a/src/object_type.h +++ b/src/object_type.h @@ -1,4 +1,4 @@ -/* $Id: object_type.h 25844 2013-10-12 16:35:50Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/openttd.cpp b/src/openttd.cpp index cf438dd139..e876ffda77 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1,4 +1,4 @@ -/* $Id: openttd.cpp 27732 2017-01-14 18:30:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -63,6 +63,7 @@ #include "subsidy_func.h" #include "gfx_layout.h" #include "viewport_sprite_sorter.h" +#include "framerate_type.h" #include "linkgraph/linkgraphschedule.h" @@ -75,7 +76,7 @@ void IncreaseDate(); void DoPaletteAnimations(); void MusicLoop(); void ResetMusic(); -void CallWindowTickEvent(); +void CallWindowGameTickEvent(); bool HandleBootstrap(); extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY); @@ -116,7 +117,9 @@ void CDECL error(const char *s, ...) vseprintf(buf, lastof(buf), s, va); va_end(va); - ShowOSErrorBox(buf, true); + if (VideoDriver::GetInstance() == NULL || VideoDriver::GetInstance()->HasGUI()) { + ShowOSErrorBox(buf, true); + } /* Set the error message for the crash log and then invoke it. */ CrashLog::SetErrorMessage(buf); @@ -167,7 +170,7 @@ static void ShowHelp() " -P password = Password to join company\n" " -D [ip][:port] = Start dedicated server\n" " -l ip[:port] = Redirect DEBUG()\n" -#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(WIN32) +#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(_WIN32) " -f = Fork into the background (dedicated only)\n" #endif #endif /* ENABLE_NETWORK */ @@ -211,7 +214,7 @@ static void ShowHelp() /* ShowInfo put output to stderr, but version information should go * to stdout; this is the only exception */ -#if !defined(WIN32) && !defined(WIN64) +#if !defined(_WIN32) printf("%s\n", buf); #else ShowInfo(buf); @@ -220,7 +223,7 @@ static void ShowHelp() static void WriteSavegameInfo(const char *name) { - extern uint16 _sl_version; + extern SaveLoadVersion _sl_version; uint32 last_ottd_rev = 0; byte ever_modified = 0; bool removed_newgrfs = false; @@ -249,7 +252,7 @@ static void WriteSavegameInfo(const char *name) /* ShowInfo put output to stderr, but version information should go * to stdout; this is the only exception */ -#if !defined(WIN32) && !defined(WIN64) +#if !defined(_WIN32) printf("%s\n", buf); #else ShowInfo(buf); @@ -277,7 +280,7 @@ static void ParseResolution(Dimension *res, const char *s) /** - * Unitializes drivers, frees allocated memory, cleans pools, ... + * Uninitializes drivers, frees allocated memory, cleans pools, ... * Generally, prepares the game for shutting down */ static void ShutdownGame() @@ -341,8 +344,7 @@ static void LoadIntroGame(bool load_newgrfs = true) CheckForMissingGlyphs(); - /* Play main theme */ - if (MusicDriver::GetInstance()->IsSongPlaying()) ResetMusic(); + MusicLoop(); // ensure music is correct } void MakeNewgameSettingsLive() @@ -365,6 +367,9 @@ void MakeNewgameSettingsLive() _settings_game.ai_config[c] = NULL; if (_settings_newgame.ai_config[c] != NULL) { _settings_game.ai_config[c] = new AIConfig(_settings_newgame.ai_config[c]); + if (!AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->HasScript()) { + AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->Change(NULL); + } } } _settings_game.game_config = NULL; @@ -385,7 +390,7 @@ void OpenBrowser(const char *url) /** Callback structure of statements to be executed after the NewGRF scan. */ struct AfterNewGRFScan : NewGRFScanCallback { Year startyear; ///< The start year. - uint generation_seed; ///< Seed for the new game. + uint32 generation_seed; ///< Seed for the new game. char *dedicated_host; ///< Hostname for the dedicated server. uint16 dedicated_port; ///< Port for the dedicated server. char *network_conn; ///< Information about the server to connect to, or NULL. @@ -405,6 +410,9 @@ struct AfterNewGRFScan : NewGRFScanCallback { join_server_password(NULL), join_company_password(NULL), save_config_ptr(save_config_ptr), save_config(true) { + /* Visual C++ 2015 fails compiling this line (AfterNewGRFScan::generation_seed undefined symbol) + * if it's placed outside a member function, directly in the struct body. */ + assert_compile(sizeof(generation_seed) == sizeof(_settings_game.game_creation.generation_seed)); } virtual void OnNewGRFsScanned() @@ -508,7 +516,7 @@ static const OptionData _options[] = { GETOPT_SHORT_VALUE('l'), GETOPT_SHORT_VALUE('p'), GETOPT_SHORT_VALUE('P'), -#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(WIN32) +#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(_WIN32) GETOPT_SHORT_NOVAL('f'), #endif #endif /* ENABLE_NETWORK */ @@ -608,7 +616,7 @@ int openttd_main(int argc, char *argv[]) case 'r': ParseResolution(&resolution, mgo.opt); break; case 't': scanner->startyear = atoi(mgo.opt); break; case 'd': { -#if defined(WIN32) +#if defined(_WIN32) CreateConsole(); #endif if (mgo.opt != NULL) SetDebugString(mgo.opt); @@ -666,7 +674,7 @@ int openttd_main(int argc, char *argv[]) goto exit_noshutdown; } - case 'G': scanner->generation_seed = atoi(mgo.opt); break; + case 'G': scanner->generation_seed = strtoul(mgo.opt, NULL, 10); break; case 'c': free(_config_file); _config_file = stredup(mgo.opt); break; case 'x': scanner->save_config = false; break; case 'h': @@ -692,11 +700,6 @@ int openttd_main(int argc, char *argv[]) goto exit_noshutdown; } -#if defined(WINCE) && defined(_DEBUG) - /* Switch on debug lvl 4 for WinCE if Debug release, as you can't give params, and you most likely do want this information */ - SetDebugString("4"); -#endif - DeterminePaths(argv[0]); TarScanner::DoScan(TarScanner::BASESET); @@ -815,7 +818,7 @@ int openttd_main(int argc, char *argv[]) if (sounds_set == NULL && BaseSounds::ini_set != NULL) sounds_set = stredup(BaseSounds::ini_set); if (!BaseSounds::SetSet(sounds_set)) { if (StrEmpty(sounds_set) || !BaseSounds::SetSet(NULL)) { - usererror("Failed to find a sounds set. Please acquire a sounds set for OpenTTD. See section 4.1 of readme.txt."); + usererror("Failed to find a sounds set. Please acquire a sounds set for OpenTTD. See section 4.1 of README.md."); } else { ErrorMessageData msg(STR_CONFIG_ERROR, STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND); msg.SetDParamStr(0, sounds_set); @@ -828,7 +831,7 @@ int openttd_main(int argc, char *argv[]) if (music_set == NULL && BaseMusic::ini_set != NULL) music_set = stredup(BaseMusic::ini_set); if (!BaseMusic::SetSet(music_set)) { if (StrEmpty(music_set) || !BaseMusic::SetSet(NULL)) { - usererror("Failed to find a music set. Please acquire a music set for OpenTTD. See section 4.1 of readme.txt."); + usererror("Failed to find a music set. Please acquire a music set for OpenTTD. See section 4.1 of README.md."); } else { ErrorMessageData msg(STR_CONFIG_ERROR, STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND); msg.SetDParamStr(0, music_set); @@ -941,6 +944,14 @@ static void MakeNewGameDone() Company *c = Company::Get(COMPANY_FIRST); c->settings = _settings_client.company; + /* Overwrite color from settings if needed + * COLOUR_END corresponds to Random colour */ + if (_settings_client.gui.starting_colour != COLOUR_END) { + c->colour = _settings_client.gui.starting_colour; + ResetCompanyLivery(c); + _company_colours[c->index] = (Colours)c->colour; + } + IConsoleCmdExec("exec scripts/game_start.scr 0"); SetLocalCompany(COMPANY_FIRST); @@ -991,9 +1002,9 @@ static void MakeNewEditorWorld() * Load the specified savegame but on error do different things. * If loading fails due to corrupt savegame, bad version, etc. go back to * a previous correct state. In the menu for example load the intro game again. - * @param mode mode of loading, either SL_LOAD or SL_OLD_LOAD - * @param newgm switch to this mode of loading fails due to some unknown error * @param filename file to be loaded + * @param fop mode of loading, always SLO_LOAD + * @param newgm switch to this mode of loading fails due to some unknown error * @param subdir default directory to look for filename, set to 0 if not needed * @param lf Load filter to use, if NULL: use filename + subdir. */ @@ -1342,13 +1353,23 @@ void StateGameLoop() { /* don't execute the state loop during pause */ if (_pause_mode != PM_UNPAUSED) { + PerformanceMeasurer::Paused(PFE_GAMELOOP); + PerformanceMeasurer::Paused(PFE_GL_ECONOMY); + PerformanceMeasurer::Paused(PFE_GL_TRAINS); + PerformanceMeasurer::Paused(PFE_GL_ROADVEHS); + PerformanceMeasurer::Paused(PFE_GL_SHIPS); + PerformanceMeasurer::Paused(PFE_GL_AIRCRAFT); + PerformanceMeasurer::Paused(PFE_GL_LANDSCAPE); + UpdateLandscapingLimits(); #ifndef DEBUG_DUMP_COMMANDS Game::GameLoop(); #endif - CallWindowTickEvent(); return; } + + PerformanceMeasurer framerate(PFE_GAMELOOP); + PerformanceAccumulator::Reset(PFE_GL_LANDSCAPE); if (HasModalProgress()) return; Layouter::ReduceLineCache(); @@ -1361,7 +1382,7 @@ void StateGameLoop() BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP); UpdateLandscapingLimits(); - CallWindowTickEvent(); + CallWindowGameTickEvent(); NewsLoop(); } else { if (_debug_desync_level > 2 && _date_fract == 0 && (_date & 0x1F) == 0) { @@ -1391,7 +1412,7 @@ void StateGameLoop() #endif UpdateLandscapingLimits(); - CallWindowTickEvent(); + CallWindowGameTickEvent(); NewsLoop(); cur_company.Restore(); } @@ -1407,11 +1428,6 @@ static void DoAutosave() { char buf[MAX_PATH]; -#if defined(PSP) - /* Autosaving in networking is too time expensive for the PSP */ - if (_networking) return; -#endif /* PSP */ - if (_settings_client.gui.keep_all_autosave) { GenerateDefaultSaveName(buf, lastof(buf)); strecat(buf, ".sav", lastof(buf)); @@ -1459,10 +1475,6 @@ void GameLoop() IncreaseSpriteLRU(); InteractiveRandom(); - extern int _caret_timer; - _caret_timer += 3; - CursorTick(); - #ifdef ENABLE_NETWORK /* Check for UDP stuff */ if (_network_available) NetworkBackgroundLoop(); @@ -1479,21 +1491,12 @@ void GameLoop() /* Singleplayer */ StateGameLoop(); } - - /* Check chat messages roughly once a second. */ - static uint check_message = 0; - if (++check_message > 1000 / MILLISECONDS_PER_TICK) { - check_message = 0; - NetworkChatMessageLoop(); - } #else StateGameLoop(); #endif /* ENABLE_NETWORK */ if (!_pause_mode && HasBit(_display_opt, DO_FULL_ANIMATION)) DoPaletteAnimations(); - if (!_pause_mode || _game_mode == GM_EDITOR || _settings_game.construction.command_pause_level > CMDPL_NO_CONSTRUCTION) MoveAllTextEffects(); - InputLoop(); SoundDriver::GetInstance()->MainLoop(); diff --git a/src/openttd.h b/src/openttd.h index 5d21277df0..5e360d6fcd 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -1,4 +1,4 @@ -/* $Id: openttd.h 25506 2013-06-28 21:11:35Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/order_backup.cpp b/src/order_backup.cpp index f94aa83fcf..597ad13bba 100644 --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -1,4 +1,4 @@ -/* $Id: order_backup.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/order_backup.h b/src/order_backup.h index 4ad8156447..59404d5beb 100644 --- a/src/order_backup.h +++ b/src/order_backup.h @@ -1,4 +1,4 @@ -/* $Id: order_backup.h 24444 2012-07-29 16:45:34Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/order_base.h b/src/order_base.h index f5aa9aab0b..a67cf69bb4 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -1,4 +1,4 @@ -/* $Id: order_base.h 26547 2014-05-01 14:49:16Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 56082dc502..9a62a182ab 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: order_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,6 +23,7 @@ #include "core/random_func.hpp" #include "aircraft.h" #include "roadveh.h" +#include "ship.h" #include "station_base.h" #include "waypoint_base.h" #include "company_base.h" @@ -929,7 +930,7 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 dist = GetOrderDistance(prev, &new_order, v); } - if (dist >= 130) { + if (dist >= SHIP_MAX_ORDER_DISTANCE) { return_cmd_error(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION); } } @@ -1949,7 +1950,6 @@ void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist, bool reset_order_indic * Clamp the service interval to the correct min/max. The actual min/max values * depend on whether it's in percent or days. * @param interval proposed service interval - * @param company_id the owner of the vehicle * @return Clamped service interval */ uint16 GetServiceIntervalClamped(uint interval, bool ispercent) @@ -2019,6 +2019,7 @@ VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v) switch (order->GetConditionVariable()) { case OCV_LOAD_PERCENTAGE: skip_order = OrderConditionCompare(occ, CalcPercentVehicleFilled(v, NULL), value); break; case OCV_RELIABILITY: skip_order = OrderConditionCompare(occ, ToPercent16(v->reliability), value); break; + case OCV_MAX_RELIABILITY: skip_order = OrderConditionCompare(occ, ToPercent16(v->GetEngine()->reliability), value); break; case OCV_MAX_SPEED: skip_order = OrderConditionCompare(occ, v->GetDisplayMaxSpeed() * 10 / 16, value); break; case OCV_AGE: skip_order = OrderConditionCompare(occ, v->age / DAYS_IN_LEAP_YEAR, value); break; case OCV_REQUIRES_SERVICE: skip_order = OrderConditionCompare(occ, v->NeedsServicing(), value); break; @@ -2041,13 +2042,13 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool { if (conditional_depth > v->GetNumOrders()) { v->current_order.Free(); - v->dest_tile = 0; + v->SetDestTile(0); return false; } switch (order->GetType()) { case OT_GOTO_STATION: - v->dest_tile = v->GetOrderStationLocation(order->GetDestination()); + v->SetDestTile(v->GetOrderStationLocation(order->GetDestination())); return true; case OT_GOTO_DEPOT: @@ -2068,7 +2069,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool /* PBS reservations cannot reverse */ if (pbs_look_ahead && reverse) return false; - v->dest_tile = location; + v->SetDestTile(location); v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType(), v->current_order.GetNonStopType(), (OrderDepotActionFlags)(v->current_order.GetDepotActionType() & ~ODATFB_NEAREST_DEPOT), v->current_order.GetRefitCargo()); /* If there is no depot in front, reverse automatically (trains only) */ @@ -2092,14 +2093,21 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool v->IncrementRealOrderIndex(); } else { if (v->type != VEH_AIRCRAFT) { - v->dest_tile = Depot::Get(order->GetDestination())->xy; + v->SetDestTile(Depot::Get(order->GetDestination())->xy); + } else { + Aircraft *a = Aircraft::From(v); + DestinationID destination = a->current_order.GetDestination(); + if (a->targetairport != destination) { + /* The aircraft is now heading for a different hangar than the next in the orders */ + a->SetDestTile(a->GetOrderStationLocation(destination)); + } } return true; } break; case OT_GOTO_WAYPOINT: - v->dest_tile = Waypoint::Get(order->GetDestination())->xy; + v->SetDestTile(Waypoint::Get(order->GetDestination())->xy); return true; case OT_CONDITIONAL: { @@ -2127,7 +2135,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool } default: - v->dest_tile = 0; + v->SetDestTile(0); return false; } @@ -2143,7 +2151,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool if (order == NULL) { v->current_order.Free(); - v->dest_tile = 0; + v->SetDestTile(0); return false; } @@ -2219,7 +2227,7 @@ bool ProcessOrders(Vehicle *v) } v->current_order.Free(); - v->dest_tile = 0; + v->SetDestTile(0); return false; } diff --git a/src/order_func.h b/src/order_func.h index 511f6add52..54977181ab 100644 --- a/src/order_func.h +++ b/src/order_func.h @@ -1,4 +1,4 @@ -/* $Id: order_func.h 24995 2013-02-14 17:06:49Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/order_gui.cpp b/src/order_gui.cpp index f6e4db735b..ae936b20d9 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: order_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -152,6 +152,7 @@ static const StringID _order_goto_dropdown_aircraft[] = { static const OrderConditionVariable _order_conditional_variable[] = { OCV_LOAD_PERCENTAGE, OCV_RELIABILITY, + OCV_MAX_RELIABILITY, OCV_MAX_SPEED, OCV_AGE, OCV_REMAINING_LIFETIME, diff --git a/src/order_type.h b/src/order_type.h index 6eced11e53..ac66bfa38f 100644 --- a/src/order_type.h +++ b/src/order_type.h @@ -1,4 +1,4 @@ -/* $Id: order_type.h 25735 2013-08-20 20:05:31Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -123,6 +123,7 @@ enum OrderConditionVariable { OCV_REQUIRES_SERVICE, ///< Skip when the vehicle requires service OCV_UNCONDITIONALLY, ///< Always skip OCV_REMAINING_LIFETIME, ///< Skip based on the remaining lifetime + OCV_MAX_RELIABILITY, ///< Skip based on the maximum reliability OCV_END }; diff --git a/src/os/macosx/G5_detector.cpp b/src/os/macosx/G5_detector.cpp index 93688af8ee..53d21c4d4f 100644 --- a/src/os/macosx/G5_detector.cpp +++ b/src/os/macosx/G5_detector.cpp @@ -1,4 +1,4 @@ -/* $Id: G5_detector.cpp 24524 2012-09-13 18:42:33Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/macosx/crashlog_osx.cpp b/src/os/macosx/crashlog_osx.cpp index 234b1bf73f..ad258bbc91 100644 --- a/src/os/macosx/crashlog_osx.cpp +++ b/src/os/macosx/crashlog_osx.cpp @@ -1,4 +1,4 @@ -/* $Id: crashlog_osx.cpp 26709 2014-07-30 20:19:29Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/macosx/macos.h b/src/os/macosx/macos.h index 7791bc953d..4204d93bb6 100644 --- a/src/os/macosx/macos.h +++ b/src/os/macosx/macos.h @@ -1,4 +1,4 @@ -/* $Id: macos.h 25663 2013-08-05 20:36:06Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -38,4 +38,6 @@ static inline bool MacOSVersionIsAtLeast(long major, long minor, long bugfix) bool IsMonospaceFont(CFStringRef name); +void MacOSSetThreadName(const char *name); + #endif /* MACOS_H */ diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm index a2a9a8da7a..7fb71fe9ee 100644 --- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -1,4 +1,4 @@ -/* $Id: macos.mm 26485 2014-04-23 20:44:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,7 @@ #include "../../rev.h" #include "macos.h" #include "../../string_func.h" +#include #define Rect OTTDRect #define Point OTTDPoint @@ -21,12 +22,26 @@ #undef Rect #undef Point +#ifndef __clang__ +#define __bridge +#endif + /* * This file contains objective C * Apple uses objective C instead of plain C to interact with OS specific/native functions */ +#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10) +typedef struct { + NSInteger majorVersion; + NSInteger minorVersion; + NSInteger patchVersion; +} OTTDOperatingSystemVersion; + +#define NSOperatingSystemVersion OTTDOperatingSystemVersion +#endif + /** * Get the version of the MacOS we are running under. Code adopted * from http://www.cocoadev.com/index.pl?DeterminingOSVersion @@ -40,6 +55,19 @@ void GetMacOSVersion(int *return_major, int *return_minor, int *return_bugfix) *return_major = -1; *return_minor = -1; *return_bugfix = -1; + + if ([[ NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion) ]) { + IMP sel = [ [ NSProcessInfo processInfo] methodForSelector:@selector(operatingSystemVersion) ]; + NSOperatingSystemVersion ver = ((NSOperatingSystemVersion (*)(id, SEL))sel)([ NSProcessInfo processInfo], @selector(operatingSystemVersion)); + + *return_major = (int)ver.majorVersion; + *return_minor = (int)ver.minorVersion; + *return_bugfix = (int)ver.patchVersion; + + return; + } + +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10) SInt32 systemVersion, version_major, version_minor, version_bugfix; if (Gestalt(gestaltSystemVersion, &systemVersion) == noErr) { if (systemVersion >= 0x1040) { @@ -52,6 +80,7 @@ void GetMacOSVersion(int *return_major, int *return_minor, int *return_bugfix) *return_bugfix = (int)GB(systemVersion, 0, 4); } } +#endif } #ifdef WITH_SDL @@ -182,7 +211,7 @@ uint GetCPUCoreCount() uint count = 1; #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if (MacOSVersionIsAtLeast(10, 5, 0)) { - count = [ [ NSProcessInfo processInfo ] activeProcessorCount ]; + count = (uint)[ [ NSProcessInfo processInfo ] activeProcessorCount ]; } else #endif { @@ -201,7 +230,25 @@ uint GetCPUCoreCount() */ bool IsMonospaceFont(CFStringRef name) { - NSFont *font = [ NSFont fontWithName:(NSString *)name size:0.0f ]; + NSFont *font = [ NSFont fontWithName:(__bridge NSString *)name size:0.0f ]; return font != NULL ? [ font isFixedPitch ] : false; } + +/** + * Set the name of the current thread for the debugger. + * @param name The new name of the current thread. + */ +void MacOSSetThreadName(const char *name) +{ +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if (MacOSVersionIsAtLeast(10, 6, 0)) { + pthread_setname_np(name); + } +#endif + + NSThread *cur = [ NSThread currentThread ]; + if (cur != NULL && [ cur respondsToSelector:@selector(setName:) ]) { + [ cur performSelector:@selector(setName:) withObject:[ NSString stringWithUTF8String:name ] ]; + } +} diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h index 6f9ba2ebe3..70dc8030cc 100644 --- a/src/os/macosx/osx_stdafx.h +++ b/src/os/macosx/osx_stdafx.h @@ -1,4 +1,4 @@ -/* $Id: osx_stdafx.h 27675 2016-10-31 19:29:01Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -53,6 +53,13 @@ #define MAC_OS_X_VERSION_10_9 1090 #endif +#ifndef MAC_OS_X_VERSION_10_10 +#define MAC_OS_X_VERSION_10_10 101000 +#endif + +#ifndef MAC_OS_X_VERSION_10_11 +#define MAC_OS_X_VERSION_10_11 101100 +#endif #define __STDC_LIMIT_MACROS #include diff --git a/src/os/macosx/splash.cpp b/src/os/macosx/splash.cpp index 7f3d71e99b..eadb785101 100644 --- a/src/os/macosx/splash.cpp +++ b/src/os/macosx/splash.cpp @@ -1,4 +1,4 @@ -/* $Id: splash.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/macosx/splash.h b/src/os/macosx/splash.h index 00073c76c3..90e6638140 100644 --- a/src/os/macosx/splash.h +++ b/src/os/macosx/splash.h @@ -1,4 +1,4 @@ -/* $Id: splash.h 22913 2011-09-09 20:28:48Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp new file mode 100644 index 0000000000..1c5d558855 --- /dev/null +++ b/src/os/macosx/string_osx.cpp @@ -0,0 +1,450 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file string_osx.cpp Functions related to localized text support on OSX. */ + +#include "../../stdafx.h" +#include "string_osx.h" +#include "../../string_func.h" +#include "../../strings_func.h" +#include "../../table/control_codes.h" +#include "../../fontcache.h" +#include "macos.h" + +#include + + +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +/** Cached current locale. */ +static CFLocaleRef _osx_locale = NULL; +/** CoreText cache for font information, cleared when OTTD changes fonts. */ +static CTFontRef _font_cache[FS_END]; + + +/** + * Wrapper for doing layouts with CoreText. + */ +class CoreTextParagraphLayout : public ParagraphLayouter { +private: + const CoreTextParagraphLayoutFactory::CharType *text_buffer; + ptrdiff_t length; + const FontMap& font_map; + + CTTypesetterRef typesetter; + + CFIndex cur_offset = 0; ///< Offset from the start of the current run from where to output. + +public: + /** Visual run contains data about the bit of text with the same font. */ + class CoreTextVisualRun : public ParagraphLayouter::VisualRun { + private: + std::vector glyphs; + std::vector positions; + std::vector glyph_to_char; + + int total_advance = 0; + Font *font; + + public: + CoreTextVisualRun(CTRunRef run, Font *font, const CoreTextParagraphLayoutFactory::CharType *buff); + + virtual const GlyphID *GetGlyphs() const { return &this->glyphs[0]; } + virtual const float *GetPositions() const { return &this->positions[0]; } + virtual const int *GetGlyphToCharMap() const { return &this->glyph_to_char[0]; } + + virtual const Font *GetFont() const { return this->font; } + virtual int GetLeading() const { return this->font->fc->GetHeight(); } + virtual int GetGlyphCount() const { return (int)this->glyphs.size(); } + int GetAdvance() const { return this->total_advance; } + }; + + /** A single line worth of VisualRuns. */ + class CoreTextLine : public AutoDeleteSmallVector, public ParagraphLayouter::Line { + public: + CoreTextLine(CTLineRef line, const FontMap &fontMapping, const CoreTextParagraphLayoutFactory::CharType *buff) + { + CFArrayRef runs = CTLineGetGlyphRuns(line); + for (CFIndex i = 0; i < CFArrayGetCount(runs); i++) { + CTRunRef run = (CTRunRef)CFArrayGetValueAtIndex(runs, i); + + /* Extract font information for this run. */ + CFRange chars = CTRunGetStringRange(run); + FontMap::const_iterator map = fontMapping.Begin(); + while (map < fontMapping.End() - 1 && map->first <= chars.location) map++; + + *this->Append() = new CoreTextVisualRun(run, map->second, buff); + } + CFRelease(line); + } + + virtual int GetLeading() const; + virtual int GetWidth() const; + virtual int CountRuns() const { return this->Length(); } + virtual const VisualRun *GetVisualRun(int run) const { return *this->Get(run); } + + int GetInternalCharLength(WChar c) const + { + /* CoreText uses UTF-16 internally which means we need to account for surrogate pairs. */ + return c >= 0x010000U ? 2 : 1; + } + }; + + CoreTextParagraphLayout(CTTypesetterRef typesetter, const CoreTextParagraphLayoutFactory::CharType *buffer, ptrdiff_t len, const FontMap &fontMapping) : text_buffer(buffer), length(len), font_map(fontMapping), typesetter(typesetter) + { + this->Reflow(); + } + + virtual ~CoreTextParagraphLayout() + { + CFRelease(this->typesetter); + } + + virtual void Reflow() + { + this->cur_offset = 0; + } + + virtual const Line *NextLine(int max_width); +}; + + +/** Get the width of an encoded sprite font character. */ +static CGFloat SpriteFontGetWidth(void *ref_con) +{ + FontSize fs = (FontSize)((size_t)ref_con >> 24); + WChar c = (WChar)((size_t)ref_con & 0xFFFFFF); + + return GetGlyphWidth(fs, c); +} + +static CTRunDelegateCallbacks _sprite_font_callback = { + kCTRunDelegateCurrentVersion, NULL, NULL, NULL, + &SpriteFontGetWidth +}; + +/* static */ ParagraphLayouter *CoreTextParagraphLayoutFactory::GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping) +{ + if (!MacOSVersionIsAtLeast(10, 5, 0)) return NULL; + + /* Can't layout an empty string. */ + ptrdiff_t length = buff_end - buff; + if (length == 0) return NULL; + + /* Can't layout our in-built sprite fonts. */ + for (FontMap::const_iterator i = fontMapping.Begin(); i != fontMapping.End(); i++) { + if (i->second->fc->IsBuiltInFont()) return NULL; + } + + /* Make attributed string with embedded font information. */ + CFMutableAttributedStringRef str = CFAttributedStringCreateMutable(kCFAllocatorDefault, 0); + CFAttributedStringBeginEditing(str); + + CFStringRef base = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buff, length, kCFAllocatorNull); + CFAttributedStringReplaceString(str, CFRangeMake(0, 0), base); + CFRelease(base); + + /* Apply font and colour ranges to our string. This is important to make sure + * that we get proper glyph boundaries on style changes. */ + int last = 0; + for (FontMap::const_iterator i = fontMapping.Begin(); i != fontMapping.End(); i++) { + if (i->first - last == 0) continue; + + if (_font_cache[i->second->fc->GetSize()] == NULL) { + /* Cache font information. */ + CFStringRef font_name = CFStringCreateWithCString(kCFAllocatorDefault, i->second->fc->GetFontName(), kCFStringEncodingUTF8); + _font_cache[i->second->fc->GetSize()] = CTFontCreateWithName(font_name, i->second->fc->GetFontSize(), NULL); + CFRelease(font_name); + } + CFAttributedStringSetAttribute(str, CFRangeMake(last, i->first - last), kCTFontAttributeName, _font_cache[i->second->fc->GetSize()]); + + CGColorRef color = CGColorCreateGenericGray((uint8)i->second->colour / 255.0f, 1.0f); // We don't care about the real colours, just that they are different. + CFAttributedStringSetAttribute(str, CFRangeMake(last, i->first - last), kCTForegroundColorAttributeName, color); + CGColorRelease(color); + + /* Install a size callback for our special sprite glyphs. */ + for (ssize_t c = last; c < i->first; c++) { + if (buff[c] >= SCC_SPRITE_START && buff[c] <= SCC_SPRITE_END) { + CTRunDelegateRef del = CTRunDelegateCreate(&_sprite_font_callback, (void *)(size_t)(buff[c] | (i->second->fc->GetSize() << 24))); + CFAttributedStringSetAttribute(str, CFRangeMake(c, 1), kCTRunDelegateAttributeName, del); + CFRelease(del); + } + } + + last = i->first; + } + CFAttributedStringEndEditing(str); + + /* Create and return typesetter for the string. */ + CTTypesetterRef typesetter = CTTypesetterCreateWithAttributedString(str); + CFRelease(str); + + return typesetter != NULL ? new CoreTextParagraphLayout(typesetter, buff, length, fontMapping) : NULL; +} + +/* virtual */ const CoreTextParagraphLayout::Line *CoreTextParagraphLayout::NextLine(int max_width) +{ + if (this->cur_offset >= this->length) return NULL; + + /* Get line break position, trying word breaking first and breaking somewhere if that doesn't work. */ + CFIndex len = CTTypesetterSuggestLineBreak(this->typesetter, this->cur_offset, max_width); + if (len <= 0) len = CTTypesetterSuggestClusterBreak(this->typesetter, this->cur_offset, max_width); + + /* Create line. */ + CTLineRef line = CTTypesetterCreateLine(this->typesetter, CFRangeMake(this->cur_offset, len)); + this->cur_offset += len; + + return line != NULL ? new CoreTextLine(line, this->font_map, this->text_buffer) : NULL; +} + +CoreTextParagraphLayout::CoreTextVisualRun::CoreTextVisualRun(CTRunRef run, Font *font, const CoreTextParagraphLayoutFactory::CharType *buff) : font(font) +{ + this->glyphs.resize(CTRunGetGlyphCount(run)); + + /* Query map of glyphs to source string index. */ + CFIndex map[this->glyphs.size()]; + CTRunGetStringIndices(run, CFRangeMake(0, 0), map); + + this->glyph_to_char.resize(this->glyphs.size()); + for (size_t i = 0; i < this->glyph_to_char.size(); i++) this->glyph_to_char[i] = (int)map[i]; + + CGPoint pts[this->glyphs.size()]; + CTRunGetPositions(run, CFRangeMake(0, 0), pts); + this->positions.resize(this->glyphs.size() * 2 + 2); + + /* Convert glyph array to our data type. At the same time, substitute + * the proper glyphs for our private sprite glyphs. */ + CGGlyph gl[this->glyphs.size()]; + CTRunGetGlyphs(run, CFRangeMake(0, 0), gl); + for (size_t i = 0; i < this->glyphs.size(); i++) { + if (buff[this->glyph_to_char[i]] >= SCC_SPRITE_START && buff[this->glyph_to_char[i]] <= SCC_SPRITE_END) { + this->glyphs[i] = font->fc->MapCharToGlyph(buff[this->glyph_to_char[i]]); + this->positions[i * 2 + 0] = pts[i].x; + this->positions[i * 2 + 1] = font->fc->GetAscender() - font->fc->GetGlyph(this->glyphs[i])->height - 1; // Align sprite glyphs to font baseline. + } else { + this->glyphs[i] = gl[i]; + this->positions[i * 2 + 0] = pts[i].x; + this->positions[i * 2 + 1] = pts[i].y; + } + } + this->total_advance = (int)CTRunGetTypographicBounds(run, CFRangeMake(0, 0), NULL, NULL, NULL); + this->positions[this->glyphs.size() * 2] = this->positions[0] + this->total_advance; +} + +/** + * Get the height of the line. + * @return The maximum height of the line. + */ +int CoreTextParagraphLayout::CoreTextLine::GetLeading() const +{ + int leading = 0; + for (const CoreTextVisualRun * const *run = this->Begin(); run != this->End(); run++) { + leading = max(leading, (*run)->GetLeading()); + } + + return leading; +} + +/** + * Get the width of this line. + * @return The width of the line. + */ +int CoreTextParagraphLayout::CoreTextLine::GetWidth() const +{ + if (this->Length() == 0) return 0; + + int total_width = 0; + for (const CoreTextVisualRun * const *run = this->Begin(); run != this->End(); run++) { + total_width += (*run)->GetAdvance(); + } + + return total_width; +} + + +/** Delete CoreText font reference for a specific font size. */ +void MacOSResetScriptCache(FontSize size) +{ + if (_font_cache[size] != NULL) { + CFRelease(_font_cache[size]); + _font_cache[size] = NULL; + } +} + +/** Store current language locale as a CoreFounation locale. */ +void MacOSSetCurrentLocaleName(const char *iso_code) +{ + if (!MacOSVersionIsAtLeast(10, 5, 0)) return; + + if (_osx_locale != NULL) CFRelease(_osx_locale); + + CFStringRef iso = CFStringCreateWithCString(kCFAllocatorNull, iso_code, kCFStringEncodingUTF8); + _osx_locale = CFLocaleCreate(kCFAllocatorDefault, iso); + CFRelease(iso); +} + +/** + * Compares two strings using case insensitive natural sort. + * + * @param s1 First string to compare. + * @param s2 Second string to compare. + * @return 1 if s1 < s2, 2 if s1 == s2, 3 if s1 > s2, or 0 if not supported by the OS. + */ +int MacOSStringCompare(const char *s1, const char *s2) +{ + static bool supported = MacOSVersionIsAtLeast(10, 5, 0); + if (!supported) return 0; + + CFStringCompareFlags flags = kCFCompareCaseInsensitive | kCFCompareNumerically | kCFCompareLocalized | kCFCompareWidthInsensitive | kCFCompareForcedOrdering; + + CFStringRef cf1 = CFStringCreateWithCString(kCFAllocatorDefault, s1, kCFStringEncodingUTF8); + CFStringRef cf2 = CFStringCreateWithCString(kCFAllocatorDefault, s2, kCFStringEncodingUTF8); + + CFComparisonResult res = CFStringCompareWithOptionsAndLocale(cf1, cf2, CFRangeMake(0, CFStringGetLength(cf1)), flags, _osx_locale); + + CFRelease(cf1); + CFRelease(cf2); + + return (int)res + 2; +} + + +/* virtual */ void OSXStringIterator::SetString(const char *s) +{ + const char *string_base = s; + + this->utf16_to_utf8.clear(); + this->str_info.clear(); + this->cur_pos = 0; + + /* CoreText operates on UTF-16, thus we have to convert the input string. + * To be able to return proper offsets, we have to create a mapping at the same time. */ + std::vector utf16_str; ///< UTF-16 copy of the string. + while (*s != '\0') { + size_t idx = s - string_base; + + WChar c = Utf8Consume(&s); + if (c < 0x10000) { + utf16_str.push_back((UniChar)c); + } else { + /* Make a surrogate pair. */ + utf16_str.push_back((UniChar)(0xD800 + ((c - 0x10000) >> 10))); + utf16_str.push_back((UniChar)(0xDC00 + ((c - 0x10000) & 0x3FF))); + this->utf16_to_utf8.push_back(idx); + } + this->utf16_to_utf8.push_back(idx); + } + this->utf16_to_utf8.push_back(s - string_base); + + /* Query CoreText for word and cluster break information. */ + this->str_info.resize(utf16_to_utf8.size()); + + if (utf16_str.size() > 0) { + CFStringRef str = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, &utf16_str[0], utf16_str.size(), kCFAllocatorNull); + + /* Get cluster breaks. */ + for (CFIndex i = 0; i < CFStringGetLength(str); ) { + CFRange r = CFStringGetRangeOfComposedCharactersAtIndex(str, i); + this->str_info[r.location].char_stop = true; + + i += r.length; + } + + /* Get word breaks. */ + CFStringTokenizerRef tokenizer = CFStringTokenizerCreate(kCFAllocatorDefault, str, CFRangeMake(0, CFStringGetLength(str)), kCFStringTokenizerUnitWordBoundary, _osx_locale); + + CFStringTokenizerTokenType tokenType = kCFStringTokenizerTokenNone; + while ((tokenType = CFStringTokenizerAdvanceToNextToken(tokenizer)) != kCFStringTokenizerTokenNone) { + /* Skip tokens that are white-space or punctuation tokens. */ + if ((tokenType & kCFStringTokenizerTokenHasNonLettersMask) != kCFStringTokenizerTokenHasNonLettersMask) { + CFRange r = CFStringTokenizerGetCurrentTokenRange(tokenizer); + this->str_info[r.location].word_stop = true; + } + } + + CFRelease(tokenizer); + CFRelease(str); + } + + /* End-of-string is always a valid stopping point. */ + this->str_info.back().char_stop = true; + this->str_info.back().word_stop = true; +} + +/* virtual */ size_t OSXStringIterator::SetCurPosition(size_t pos) +{ + /* Convert incoming position to an UTF-16 string index. */ + size_t utf16_pos = 0; + for (size_t i = 0; i < this->utf16_to_utf8.size(); i++) { + if (this->utf16_to_utf8[i] == pos) { + utf16_pos = i; + break; + } + } + + /* Sanitize in case we get a position inside a grapheme cluster. */ + while (utf16_pos > 0 && !this->str_info[utf16_pos].char_stop) utf16_pos--; + this->cur_pos = utf16_pos; + + return this->utf16_to_utf8[this->cur_pos]; +} + +/* virtual */ size_t OSXStringIterator::Next(IterType what) +{ + assert(this->cur_pos <= this->utf16_to_utf8.size()); + assert(what == StringIterator::ITER_CHARACTER || what == StringIterator::ITER_WORD); + + if (this->cur_pos == this->utf16_to_utf8.size()) return END; + + do { + this->cur_pos++; + } while (this->cur_pos < this->utf16_to_utf8.size() && (what == ITER_WORD ? !this->str_info[this->cur_pos].word_stop : !this->str_info[this->cur_pos].char_stop)); + + return this->cur_pos == this->utf16_to_utf8.size() ? END : this->utf16_to_utf8[this->cur_pos]; +} + +/* virtual */ size_t OSXStringIterator::Prev(IterType what) +{ + assert(this->cur_pos <= this->utf16_to_utf8.size()); + assert(what == StringIterator::ITER_CHARACTER || what == StringIterator::ITER_WORD); + + if (this->cur_pos == 0) return END; + + do { + this->cur_pos--; + } while (this->cur_pos > 0 && (what == ITER_WORD ? !this->str_info[this->cur_pos].word_stop : !this->str_info[this->cur_pos].char_stop)); + + return this->utf16_to_utf8[this->cur_pos]; +} + +/* static */ StringIterator *OSXStringIterator::Create() +{ + if (!MacOSVersionIsAtLeast(10, 5, 0)) return NULL; + + return new OSXStringIterator(); +} + +#else +void MacOSResetScriptCache(FontSize size) {} +void MacOSSetCurrentLocaleName(const char *iso_code) {} + +int MacOSStringCompare(const char *s1, const char *s2) +{ + return 0; +} + +/* static */ StringIterator *OSXStringIterator::Create() +{ + return NULL; +} + +/* static */ ParagraphLayouter *CoreTextParagraphLayoutFactory::GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping) +{ + return NULL; +} +#endif /* (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) */ diff --git a/src/os/macosx/string_osx.h b/src/os/macosx/string_osx.h new file mode 100644 index 0000000000..d632b0a440 --- /dev/null +++ b/src/os/macosx/string_osx.h @@ -0,0 +1,90 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file string_osx.h Functions related to localized text support on OSX. */ + +#ifndef STRING_OSX_H +#define STRING_OSX_H + +#include "../../gfx_layout.h" +#include "../../string_base.h" +#include + +/** String iterator using CoreText as a backend. */ +class OSXStringIterator : public StringIterator { + /** Break info for a character. */ + struct CharInfo { + bool word_stop : 1; ///< Code point is suitable as a word break. + bool char_stop : 1; ///< Code point is the start of a grapheme cluster, i.e. a "character". + }; + + std::vector str_info; ///< Break information for each code point. + std::vector utf16_to_utf8; ///< Mapping from UTF-16 code point position to index in the UTF-8 source string. + + size_t cur_pos; ///< Current iteration position. + +public: + virtual void SetString(const char *s); + virtual size_t SetCurPosition(size_t pos); + virtual size_t Next(IterType what); + virtual size_t Prev(IterType what); + + static StringIterator *Create(); +}; + +/** + * Helper class to construct a new #CoreTextParagraphLayout. + */ +class CoreTextParagraphLayoutFactory { +public: + /** Helper for GetLayouter, to get the right type. */ + typedef UniChar CharType; + /** Helper for GetLayouter, to get whether the layouter supports RTL. */ + static const bool SUPPORTS_RTL = true; + + /** + * Get the actual ParagraphLayout for the given buffer. + * @param buff The begin of the buffer. + * @param buff_end The location after the last element in the buffer. + * @param fontMapping THe mapping of the fonts. + * @return The ParagraphLayout instance. + */ + static ParagraphLayouter *GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping); + + /** + * Append a wide character to the internal buffer. + * @param buff The buffer to append to. + * @param buffer_last The end of the buffer. + * @param c The character to add. + * @return The number of buffer spaces that were used. + */ + static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, WChar c) + { + if (c >= 0x010000U) { + /* Character is encoded using surrogates in UTF-16. */ + if (buff + 1 <= buffer_last) { + buff[0] = (CharType)(((c - 0x010000U) >> 10) + 0xD800); + buff[1] = (CharType)(((c - 0x010000U) & 0x3FF) + 0xDC00); + } else { + /* Not enough space in buffer. */ + *buff = 0; + } + return 2; + } else { + *buff = (CharType)(c & 0xFFFF); + return 1; + } + } +}; + +void MacOSResetScriptCache(FontSize size); +void MacOSSetCurrentLocaleName(const char *iso_code); +int MacOSStringCompare(const char *s1, const char *s2); + +#endif /* STRING_OSX_H */ diff --git a/src/os/os2/os2.cpp b/src/os/os2/os2.cpp index fa93c5816c..7b34f528a6 100644 --- a/src/os/os2/os2.cpp +++ b/src/os/os2/os2.cpp @@ -1,4 +1,4 @@ -/* $Id: os2.cpp 27643 2016-09-04 12:54:30Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/unix/crashlog_unix.cpp b/src/os/unix/crashlog_unix.cpp index 239228bbf4..47de057f7e 100644 --- a/src/os/unix/crashlog_unix.cpp +++ b/src/os/unix/crashlog_unix.cpp @@ -1,4 +1,4 @@ -/* $Id: crashlog_unix.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index 6bad2012fc..bea69ec931 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -1,4 +1,4 @@ -/* $Id: unix.cpp 27643 2016-09-04 12:54:30Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -308,9 +308,7 @@ bool GetClipboardContents(char *buffer, const char *last) void CSleep(int milliseconds) { - #if defined(PSP) - sceKernelDelayThread(milliseconds * 1000); - #elif defined(__BEOS__) + #if defined(__BEOS__) snooze(milliseconds * 1000); #elif defined(__AMIGA__) { diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp index 5432a09bd2..1abb0e725c 100644 --- a/src/os/windows/crashlog_win.cpp +++ b/src/os/windows/crashlog_win.cpp @@ -1,4 +1,4 @@ -/* $Id: crashlog_win.cpp 27380 2015-08-10 20:21:29Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/os/windows/ottdres.rc.in b/src/os/windows/ottdres.rc.in index 0b4b17de47..ebf0cc4afb 100644 --- a/src/os/windows/ottdres.rc.in +++ b/src/os/windows/ottdres.rc.in @@ -1,5 +1,5 @@ //Microsoft Developer Studio generated resource script. -// $Id: ottdres.rc.in 27980 2018-03-11 12:24:32Z frosch $ +// $Id$ // // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -14,7 +14,7 @@ #define APSTUDIO_HIDDEN_SYMBOLS #include "windows.h" #undef APSTUDIO_HIDDEN_SYMBOLS -#ifdef MSVC +#ifndef __MINGW32__ #include "winres.h" #else #define IDC_STATIC (-1) // all static controls @@ -79,8 +79,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,8,0,!!REVISION!! - PRODUCTVERSION 1,8,0,!!REVISION!! + FILEVERSION 1,9,0,!!ISODATE!! + PRODUCTVERSION 1,9,0,!!ISODATE!! FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -100,7 +100,7 @@ BEGIN VALUE "FileDescription", "OpenTTD\0" VALUE "FileVersion", "!!VERSION!!\0" VALUE "InternalName", "openttd\0" - VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2018. All Rights Reserved.\0" + VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2019. All Rights Reserved.\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "openttd.exe\0" VALUE "PrivateBuild", "\0" @@ -117,5 +117,9 @@ END #endif // !_MAC +#ifdef __MINGW32__ +1 24 "..\\..\\..\\projects\\dpi_aware.manifest" +#endif + #endif // Neutral (Default) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp new file mode 100644 index 0000000000..ce61537b2b --- /dev/null +++ b/src/os/windows/string_uniscribe.cpp @@ -0,0 +1,611 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file string_uniscribe.cpp Functions related to laying out text on Win32. */ + +#if defined(WITH_UNISCRIBE) + +#include "../../stdafx.h" +#include "../../debug.h" +#include "string_uniscribe.h" +#include "../../language.h" +#include "../../strings_func.h" +#include "../../string_func.h" +#include "../../table/control_codes.h" +#include "win32.h" +#include + +#include +#include + +#include "../../safeguards.h" + +#ifdef _MSC_VER +# pragma comment(lib, "usp10") +#endif + + +/** Uniscribe cache for internal font information, cleared when OTTD changes fonts. */ +static SCRIPT_CACHE _script_cache[FS_END]; + +/** + * Contains all information about a run of characters. A run are consecutive + * characters that share a single font and language. + */ +struct UniscribeRun { + int pos; + int len; + Font *font; + + std::vector ft_glyphs; + + SCRIPT_ANALYSIS sa; + std::vector char_to_glyph; + + std::vector vis_attribs; + std::vector glyphs; + std::vector advances; + std::vector offsets; + int total_advance; + + UniscribeRun(int pos, int len, Font *font, SCRIPT_ANALYSIS &sa) : pos(pos), len(len), font(font), sa(sa) {} +}; + +/** Break a string into language formatting ranges. */ +static std::vector UniscribeItemizeString(UniscribeParagraphLayoutFactory::CharType *buff, int32 length); +/** Generate and place glyphs for a run of characters. */ +static bool UniscribeShapeRun(const UniscribeParagraphLayoutFactory::CharType *buff, UniscribeRun &range); + +/** + * Wrapper for doing layouts with Uniscribe. + */ +class UniscribeParagraphLayout : public ParagraphLayouter { +private: + const UniscribeParagraphLayoutFactory::CharType *text_buffer; + + std::vector ranges; ///< All runs of the text. + std::vector::iterator cur_range; ///< The next run to be output. + int cur_range_offset = 0; ///< Offset from the start of the current run from where to output. + +public: + /** Visual run contains data about the bit of text with the same font. */ + class UniscribeVisualRun : public ParagraphLayouter::VisualRun { + private: + std::vector glyphs; + std::vector positions; + std::vector char_to_glyph; + + int start_pos; + int total_advance; + int num_glyphs; + Font *font; + + mutable int *glyph_to_char = NULL; + + public: + UniscribeVisualRun(const UniscribeRun &range, int x); + virtual ~UniscribeVisualRun() + { + free(this->glyph_to_char); + } + + virtual const GlyphID *GetGlyphs() const { return &this->glyphs[0]; } + virtual const float *GetPositions() const { return &this->positions[0]; } + virtual const int *GetGlyphToCharMap() const; + + virtual const Font *GetFont() const { return this->font; } + virtual int GetLeading() const { return this->font->fc->GetHeight(); } + virtual int GetGlyphCount() const { return this->num_glyphs; } + int GetAdvance() const { return this->total_advance; } + }; + + /** A single line worth of VisualRuns. */ + class UniscribeLine : public AutoDeleteSmallVector, public ParagraphLayouter::Line { + public: + virtual int GetLeading() const; + virtual int GetWidth() const; + virtual int CountRuns() const { return this->Length(); } + virtual const VisualRun *GetVisualRun(int run) const { return *this->Get(run); } + + int GetInternalCharLength(WChar c) const + { + /* Uniscribe uses UTF-16 internally which means we need to account for surrogate pairs. */ + return c >= 0x010000U ? 2 : 1; + } + }; + + UniscribeParagraphLayout(std::vector &ranges, const UniscribeParagraphLayoutFactory::CharType *buffer) : text_buffer(buffer), ranges(ranges) + { + this->Reflow(); + } + + virtual ~UniscribeParagraphLayout() {} + + virtual void Reflow() + { + this->cur_range = this->ranges.begin(); + this->cur_range_offset = 0; + } + + virtual const Line *NextLine(int max_width); +}; + +void UniscribeResetScriptCache(FontSize size) +{ + if (_script_cache[size] != NULL) { + ScriptFreeCache(&_script_cache[size]); + _script_cache[size] = NULL; + } +} + +/** Load the matching native Windows font. */ +static HFONT HFontFromFont(Font *font) +{ + LOGFONT logfont; + ZeroMemory(&logfont, sizeof(LOGFONT)); + logfont.lfHeight = font->fc->GetHeight(); + logfont.lfWeight = FW_NORMAL; + logfont.lfCharSet = DEFAULT_CHARSET; + convert_to_fs(font->fc->GetFontName(), logfont.lfFaceName, lengthof(logfont.lfFaceName)); + + return CreateFontIndirect(&logfont); +} + +/** Determine the glyph positions for a run. */ +static bool UniscribeShapeRun(const UniscribeParagraphLayoutFactory::CharType *buff, UniscribeRun &range) +{ + /* Initial size guess for the number of glyphs recommended by Uniscribe. */ + range.glyphs.resize(range.len * 3 / 2 + 16); + range.vis_attribs.resize(range.glyphs.size()); + + /* The char-to-glyph array is the same size as the input. */ + range.char_to_glyph.resize(range.len); + + HDC temp_dc = NULL; + HFONT old_font = NULL; + HFONT cur_font = NULL; + + while (true) { + /* Shape the text run by determining the glyphs needed for display. */ + int glyphs_used = 0; + HRESULT hr = ScriptShape(temp_dc, &_script_cache[range.font->fc->GetSize()], buff + range.pos, range.len, (int)range.glyphs.size(), &range.sa, &range.glyphs[0], &range.char_to_glyph[0], &range.vis_attribs[0], &glyphs_used); + + if (SUCCEEDED(hr)) { + range.glyphs.resize(glyphs_used); + range.vis_attribs.resize(glyphs_used); + + /* Calculate the glyph positions. */ + ABC abc; + range.advances.resize(range.glyphs.size()); + range.offsets.resize(range.glyphs.size()); + hr = ScriptPlace(temp_dc, &_script_cache[range.font->fc->GetSize()], &range.glyphs[0], (int)range.glyphs.size(), &range.vis_attribs[0], &range.sa, &range.advances[0], &range.offsets[0], &abc); + if (SUCCEEDED(hr)) { + /* We map our special sprite chars to values that don't fit into a WORD. Copy the glyphs + * into a new vector and query the real glyph to use for these special chars. */ + range.ft_glyphs.resize(range.glyphs.size()); + for (size_t g_id = 0; g_id < range.glyphs.size(); g_id++) { + range.ft_glyphs[g_id] = range.glyphs[g_id]; + } + for (int i = 0; i < range.len; i++) { + if (buff[range.pos + i] >= SCC_SPRITE_START && buff[range.pos + i] <= SCC_SPRITE_END) { + range.ft_glyphs[range.char_to_glyph[i]] = range.font->fc->MapCharToGlyph(buff[range.pos + i]); + range.offsets[range.char_to_glyph[i]].dv = range.font->fc->GetAscender() - range.font->fc->GetGlyph(range.ft_glyphs[range.char_to_glyph[i]])->height - 1; // Align sprite glyphs to font baseline. + } + } + + /* FreeType and GDI/Uniscribe seems to occasionally disagree over the width of a glyph. */ + range.total_advance = 0; + for (size_t i = 0; i < range.advances.size(); i++) { + if (range.advances[i] > 0 && range.ft_glyphs[i] != 0xFFFF) range.advances[i] = range.font->fc->GetGlyphWidth(range.ft_glyphs[i]); + range.total_advance += range.advances[i]; + } + break; + } + } + + if (hr == E_OUTOFMEMORY) { + /* The glyph buffer needs to be larger. Just double it every time. */ + range.glyphs.resize(range.glyphs.size() * 2); + range.vis_attribs.resize(range.vis_attribs.size() * 2); + } else if (hr == E_PENDING) { + /* Glyph data is not in cache, load native font. */ + cur_font = HFontFromFont(range.font); + if (cur_font == NULL) return false; // Sorry, no dice. + + temp_dc = CreateCompatibleDC(NULL); + SetMapMode(temp_dc, MM_TEXT); + old_font = (HFONT)SelectObject(temp_dc, cur_font); + } else if (hr == USP_E_SCRIPT_NOT_IN_FONT && range.sa.eScript != SCRIPT_UNDEFINED) { + /* Try again with the generic shaping engine. */ + range.sa.eScript = SCRIPT_UNDEFINED; + } else { + /* Some unknown other error. */ + if (temp_dc != NULL) { + SelectObject(temp_dc, old_font); + DeleteObject(cur_font); + ReleaseDC(NULL, temp_dc); + } + return false; + } + } + + if (temp_dc != NULL) { + SelectObject(temp_dc, old_font); + DeleteObject(cur_font); + ReleaseDC(NULL, temp_dc); + } + + return true; +} + +static std::vector UniscribeItemizeString(UniscribeParagraphLayoutFactory::CharType *buff, int32 length) +{ + /* Itemize text. */ + SCRIPT_CONTROL control; + ZeroMemory(&control, sizeof(SCRIPT_CONTROL)); + control.uDefaultLanguage = _current_language->winlangid; + + SCRIPT_STATE state; + ZeroMemory(&state, sizeof(SCRIPT_STATE)); + state.uBidiLevel = _current_text_dir == TD_RTL ? 1 : 0; + + std::vector items(16); + while (true) { + /* We subtract one from max_items to work around a buffer overflow on some older versions of Windows. */ + int generated = 0; + HRESULT hr = ScriptItemize(buff, length, (int)items.size() - 1, &control, &state, &items[0], &generated); + + if (SUCCEEDED(hr)) { + /* Resize the item buffer. Note that Uniscribe will always add an additional end sentinel item. */ + items.resize(generated + 1); + break; + } + /* Some kind of error except item buffer too small. */ + if (hr != E_OUTOFMEMORY) return std::vector(); + + items.resize(items.size() * 2); + } + + return items; +} + +/* static */ ParagraphLayouter *UniscribeParagraphLayoutFactory::GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping) +{ + int32 length = buff_end - buff; + /* Can't layout an empty string. */ + if (length == 0) return NULL; + + /* Can't layout our in-built sprite fonts. */ + for (FontMap::const_iterator i = fontMapping.Begin(); i != fontMapping.End(); i++) { + if (i->second->fc->IsBuiltInFont()) return NULL; + } + + /* Itemize text. */ + std::vector items = UniscribeItemizeString(buff, length); + if (items.size() == 0) return NULL; + + /* Build ranges from the items and the font map. A range is a run of text + * that is part of a single item and formatted using a single font style. */ + std::vector ranges; + + int cur_pos = 0; + std::vector::iterator cur_item = items.begin(); + for (FontMap::const_iterator i = fontMapping.Begin(); i != fontMapping.End(); i++) { + while (cur_pos < i->first && cur_item != items.end() - 1) { + /* Add a range that spans the intersection of the remaining item and font run. */ + int stop_pos = min(i->first, (cur_item + 1)->iCharPos); + assert(stop_pos - cur_pos > 0); + ranges.push_back(UniscribeRun(cur_pos, stop_pos - cur_pos, i->second, cur_item->a)); + + /* Shape the range. */ + if (!UniscribeShapeRun(buff, ranges.back())) { + return NULL; + } + + /* If we are at the end of the current item, advance to the next item. */ + if (stop_pos == (cur_item + 1)->iCharPos) cur_item++; + cur_pos = stop_pos; + } + } + + return new UniscribeParagraphLayout(ranges, buff); +} + +/* virtual */ const ParagraphLayouter::Line *UniscribeParagraphLayout::NextLine(int max_width) +{ + std::vector::iterator start_run = this->cur_range; + std::vector::iterator last_run = this->cur_range; + + if (start_run == this->ranges.end()) return NULL; + + /* Add remaining width of the first run if it is a broken run. */ + int cur_width = 0; + if (this->cur_range_offset != 0) { + std::vector dx(start_run->len); + ScriptGetLogicalWidths(&start_run->sa, start_run->len, (int)start_run->glyphs.size(), &start_run->advances[0], &start_run->char_to_glyph[0], &start_run->vis_attribs[0], &dx[0]); + + for (std::vector::const_iterator c = dx.begin() + this->cur_range_offset; c != dx.end(); c++) { + cur_width += *c; + } + ++last_run; + } + + /* Gather runs until the line is full. */ + while (last_run != this->ranges.end() && cur_width < max_width) { + cur_width += last_run->total_advance; + ++last_run; + } + + /* If the text does not fit into the available width, find a suitable breaking point. */ + int remaing_offset = (last_run - 1)->len; + if (cur_width > max_width) { + std::vector log_attribs; + + /* Get word break information. */ + int width_avail = max_width; + int num_chars = this->cur_range_offset; + int start_offs = this->cur_range_offset; + int last_cluster = this->cur_range_offset + 1; + for (std::vector::iterator r = start_run; r != last_run; r++) { + log_attribs.resize(r->pos - start_run->pos + r->len); + if (FAILED(ScriptBreak(this->text_buffer + r->pos + start_offs, r->len - start_offs, &r->sa, &log_attribs[r->pos - start_run->pos + start_offs]))) return NULL; + + std::vector dx(r->len); + ScriptGetLogicalWidths(&r->sa, r->len, (int)r->glyphs.size(), &r->advances[0], &r->char_to_glyph[0], &r->vis_attribs[0], &dx[0]); + + /* Count absolute max character count on the line. */ + for (int c = start_offs; c < r->len && width_avail > 0; c++, num_chars++) { + if (c > start_offs && log_attribs[num_chars].fCharStop) last_cluster = num_chars; + width_avail -= dx[c]; + } + + start_offs = 0; + } + + /* Walk backwards to find the last suitable breaking point. */ + while (--num_chars > this->cur_range_offset && !log_attribs[num_chars].fSoftBreak && !log_attribs[num_chars].fWhiteSpace) {} + + if (num_chars == this->cur_range_offset) { + /* Didn't find any suitable word break point, just break on the last cluster boundary. */ + num_chars = last_cluster; + } + + /* Include whitespace characters after the breaking point. */ + while (num_chars < (int)log_attribs.size() && log_attribs[num_chars].fWhiteSpace) { + num_chars++; + } + + /* Get last run that corresponds to the number of characters to show. */ + for (std::vector::iterator run = start_run; run != last_run; run++) { + num_chars -= run->len; + + if (num_chars <= 0) { + remaing_offset = num_chars + run->len + 1; + last_run = run + 1; + assert(remaing_offset - 1 > 0); + break; + } + } + } + + /* Build display order from the runs. */ + std::vector bidi_level; + for (std::vector::iterator r = start_run; r != last_run; r++) { + bidi_level.push_back(r->sa.s.uBidiLevel); + } + std::vector vis_to_log(bidi_level.size()); + if (FAILED(ScriptLayout((int)bidi_level.size(), &bidi_level[0], &vis_to_log[0], NULL))) return NULL; + + /* Create line. */ + UniscribeLine *line = new UniscribeLine(); + + int cur_pos = 0; + for (std::vector::iterator l = vis_to_log.begin(); l != vis_to_log.end(); l++) { + std::vector::iterator i_run = start_run + *l; + UniscribeRun run = *i_run; + + /* Partial run after line break (either start or end)? Reshape run to get the first/last glyphs right. */ + if (i_run == last_run - 1 && remaing_offset < (last_run - 1)->len) { + run.len = remaing_offset - 1; + + if (!UniscribeShapeRun(this->text_buffer, run)) return NULL; + } + if (i_run == start_run && this->cur_range_offset > 0) { + assert(run.len - this->cur_range_offset > 0); + run.pos += this->cur_range_offset; + run.len -= this->cur_range_offset; + + if (!UniscribeShapeRun(this->text_buffer, run)) return NULL; + } + + *line->Append() = new UniscribeVisualRun(run, cur_pos); + cur_pos += run.total_advance; + } + + if (remaing_offset < (last_run - 1)->len) { + /* We didn't use up all of the last run, store remainder for the next line. */ + this->cur_range_offset = remaing_offset - 1; + this->cur_range = last_run - 1; + assert(this->cur_range->len > this->cur_range_offset); + } else { + this->cur_range_offset = 0; + this->cur_range = last_run; + } + + return line; +} + +/** + * Get the height of the line. + * @return The maximum height of the line. + */ +int UniscribeParagraphLayout::UniscribeLine::GetLeading() const +{ + int leading = 0; + for (const UniscribeVisualRun * const *run = this->Begin(); run != this->End(); run++) { + leading = max(leading, (*run)->GetLeading()); + } + + return leading; +} + +/** + * Get the width of this line. + * @return The width of the line. + */ +int UniscribeParagraphLayout::UniscribeLine::GetWidth() const +{ + int length = 0; + for (const UniscribeVisualRun * const *run = this->Begin(); run != this->End(); run++) { + length += (*run)->GetAdvance(); + } + + return length; +} + +UniscribeParagraphLayout::UniscribeVisualRun::UniscribeVisualRun(const UniscribeRun &range, int x) : glyphs(range.ft_glyphs), char_to_glyph(range.char_to_glyph), start_pos(range.pos), total_advance(range.total_advance), font(range.font) +{ + this->num_glyphs = (int)glyphs.size(); + this->positions.resize(this->num_glyphs * 2 + 2); + + int advance = 0; + for (int i = 0; i < this->num_glyphs; i++) { + this->positions[i * 2 + 0] = range.offsets[i].du + advance + x; + this->positions[i * 2 + 1] = range.offsets[i].dv; + + advance += range.advances[i]; + } + this->positions[this->num_glyphs * 2] = advance + x; +} + +const int *UniscribeParagraphLayout::UniscribeVisualRun::GetGlyphToCharMap() const +{ + if (this->glyph_to_char == NULL) { + this->glyph_to_char = CallocT(this->GetGlyphCount()); + + /* The char to glyph array contains the first glyph index of the cluster that is associated + * with each character. It is possible for a cluster to be formed of several chars. */ + for (int c = 0; c < (int)this->char_to_glyph.size(); c++) { + /* If multiple chars map to one glyph, only refer back to the first character. */ + if (this->glyph_to_char[this->char_to_glyph[c]] == 0) this->glyph_to_char[this->char_to_glyph[c]] = c + this->start_pos; + } + + /* We only marked the first glyph of each cluster in the loop above. Fill the gaps. */ + int last_char = this->glyph_to_char[0]; + for (int g = 0; g < this->GetGlyphCount(); g++) { + if (this->glyph_to_char[g] != 0) last_char = this->glyph_to_char[g]; + this->glyph_to_char[g] = last_char; + } + } + + return this->glyph_to_char; +} + + +/* virtual */ void UniscribeStringIterator::SetString(const char *s) +{ + const char *string_base = s; + + this->utf16_to_utf8.clear(); + this->str_info.clear(); + this->cur_pos = 0; + + /* Uniscribe operates on UTF-16, thus we have to convert the input string. + * To be able to return proper offsets, we have to create a mapping at the same time. */ + std::vector utf16_str; ///< UTF-16 copy of the string. + while (*s != '\0') { + size_t idx = s - string_base; + + WChar c = Utf8Consume(&s); + if (c < 0x10000) { + utf16_str.push_back((wchar_t)c); + } else { + /* Make a surrogate pair. */ + utf16_str.push_back((wchar_t)(0xD800 + ((c - 0x10000) >> 10))); + utf16_str.push_back((wchar_t)(0xDC00 + ((c - 0x10000) & 0x3FF))); + this->utf16_to_utf8.push_back(idx); + } + this->utf16_to_utf8.push_back(idx); + } + this->utf16_to_utf8.push_back(s - string_base); + + /* Query Uniscribe for word and cluster break information. */ + this->str_info.resize(utf16_to_utf8.size()); + + if (utf16_str.size() > 0) { + /* Itemize string into language runs. */ + std::vector runs = UniscribeItemizeString(&utf16_str[0], (int32)utf16_str.size()); + + for (std::vector::const_iterator run = runs.begin(); runs.size() > 0 && run != runs.end() - 1; run++) { + /* Get information on valid word and character break.s */ + int len = (run + 1)->iCharPos - run->iCharPos; + std::vector attr(len); + ScriptBreak(&utf16_str[run->iCharPos], len, &run->a, &attr[0]); + + /* Extract the information we're interested in. */ + for (size_t c = 0; c < attr.size(); c++) { + /* First character of a run is always a valid word break. */ + this->str_info[c + run->iCharPos].word_stop = attr[c].fWordStop || c == 0; + this->str_info[c + run->iCharPos].char_stop = attr[c].fCharStop; + } + } + } + + /* End-of-string is always a valid stopping point. */ + this->str_info.back().char_stop = true; + this->str_info.back().word_stop = true; +} + +/* virtual */ size_t UniscribeStringIterator::SetCurPosition(size_t pos) +{ + /* Convert incoming position to an UTF-16 string index. */ + size_t utf16_pos = 0; + for (size_t i = 0; i < this->utf16_to_utf8.size(); i++) { + if (this->utf16_to_utf8[i] == pos) { + utf16_pos = i; + break; + } + } + + /* Sanitize in case we get a position inside a grapheme cluster. */ + while (utf16_pos > 0 && !this->str_info[utf16_pos].char_stop) utf16_pos--; + this->cur_pos = utf16_pos; + + return this->utf16_to_utf8[this->cur_pos]; +} + +/* virtual */ size_t UniscribeStringIterator::Next(IterType what) +{ + assert(this->cur_pos <= this->utf16_to_utf8.size()); + assert(what == StringIterator::ITER_CHARACTER || what == StringIterator::ITER_WORD); + + if (this->cur_pos == this->utf16_to_utf8.size()) return END; + + do { + this->cur_pos++; + } while (this->cur_pos < this->utf16_to_utf8.size() && (what == ITER_WORD ? !this->str_info[this->cur_pos].word_stop : !this->str_info[this->cur_pos].char_stop)); + + return this->cur_pos == this->utf16_to_utf8.size() ? END : this->utf16_to_utf8[this->cur_pos]; +} + +/*virtual */ size_t UniscribeStringIterator::Prev(IterType what) +{ + assert(this->cur_pos <= this->utf16_to_utf8.size()); + assert(what == StringIterator::ITER_CHARACTER || what == StringIterator::ITER_WORD); + + if (this->cur_pos == 0) return END; + + do { + this->cur_pos--; + } while (this->cur_pos > 0 && (what == ITER_WORD ? !this->str_info[this->cur_pos].word_stop : !this->str_info[this->cur_pos].char_stop)); + + return this->utf16_to_utf8[this->cur_pos]; +} + +#endif /* defined(WITH_UNISCRIBE) */ diff --git a/src/os/windows/string_uniscribe.h b/src/os/windows/string_uniscribe.h new file mode 100644 index 0000000000..6af858a88f --- /dev/null +++ b/src/os/windows/string_uniscribe.h @@ -0,0 +1,92 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file string_uniscribe.h Functions related to laying out text on Win32. */ + +#ifndef STRING_UNISCRIBE_H +#define STRING_UNISCRIBE_H + +#if defined(WITH_UNISCRIBE) + +#include "../../gfx_layout.h" +#include "../../string_base.h" +#include + + +void UniscribeResetScriptCache(FontSize size); + + +/** + * Helper class to construct a new #UniscribeParagraphLayout. + */ +class UniscribeParagraphLayoutFactory { +public: + /** Helper for GetLayouter, to get the right type. */ + typedef wchar_t CharType; + /** Helper for GetLayouter, to get whether the layouter supports RTL. */ + static const bool SUPPORTS_RTL = true; + + /** + * Get the actual ParagraphLayout for the given buffer. + * @param buff The begin of the buffer. + * @param buff_end The location after the last element in the buffer. + * @param fontMapping THe mapping of the fonts. + * @return The ParagraphLayout instance. + */ + static ParagraphLayouter *GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping); + + /** + * Append a wide character to the internal buffer. + * @param buff The buffer to append to. + * @param buffer_last The end of the buffer. + * @param c The character to add. + * @return The number of buffer spaces that were used. + */ + static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, WChar c) + { + if (c >= 0x010000U) { + /* Character is encoded using surrogates in UTF-16. */ + if (buff + 1 <= buffer_last) { + buff[0] = (CharType)(((c - 0x010000U) >> 10) + 0xD800); + buff[1] = (CharType)(((c - 0x010000U) & 0x3FF) + 0xDC00); + } else { + /* Not enough space in buffer. */ + *buff = 0; + } + return 2; + } else { + *buff = (CharType)(c & 0xFFFF); + return 1; + } + } +}; + +/** String iterator using Uniscribe as a backend. */ +class UniscribeStringIterator : public StringIterator { + /** */ + struct CharInfo { + bool word_stop : 1; ///< Code point is suitable as a word break. + bool char_stop : 1; ///< Code point is the start of a grapheme cluster, i.e. a "character". + }; + + std::vector str_info; ///< Break information for each code point. + std::vector utf16_to_utf8; ///< Mapping from UTF-16 code point position to index in the UTF-8 source string. + + size_t cur_pos; ///< Current iteration position. + +public: + virtual void SetString(const char *s); + virtual size_t SetCurPosition(size_t pos); + virtual size_t Next(IterType what); + virtual size_t Prev(IterType what); +}; + +#endif /* defined(WITH_UNISCRIBE) */ + +#endif /* STRING_UNISCRIBE_H */ diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 0e6cdddb29..4a49555492 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -1,4 +1,4 @@ -/* $Id: win32.cpp 27673 2016-10-30 18:22:55Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,6 +17,7 @@ #include #include #include +#define NO_SHOBJIDL_SORTDIRECTION // Avoid multiple definition of SORT_ASCENDING #include /* SHGetFolderPath */ #include #include "win32.h" @@ -28,11 +29,9 @@ #include "../../crashlog.h" #include #include +#include "../../language.h" -/* Due to TCHAR, strncat and strncpy have to remain (for a while). */ #include "../../safeguards.h" -#undef strncat -#undef strncpy static bool _has_console; static bool _cursor_disable = true; @@ -67,11 +66,7 @@ bool LoadLibraryList(Function proc[], const char *dll) while (*dll++ != '\0') { /* Nothing */ } if (*dll == '\0') break; -#if defined(WINCE) - p = GetProcAddress(lib, MB_TO_WIDE(dll)); -#else p = GetProcAddress(lib, dll); -#endif if (p == NULL) return false; *proc++ = (Function)p; } @@ -210,14 +205,6 @@ bool FiosIsRoot(const char *file) void FiosGetDrives(FileList &file_list) { -#if defined(WINCE) - /* WinCE only knows one drive: / */ - FiosItem *fios = file_list.Append(); - fios->type = FIOS_TYPE_DRIVE; - fios->mtime = 0; - seprintf(fios->name, lastof(fios->name), PATHSEP ""); - strecpy(fios->title, fios->name, lastof(fios->title)); -#else TCHAR drives[256]; const TCHAR *s; @@ -230,7 +217,6 @@ void FiosGetDrives(FileList &file_list) strecpy(fios->title, fios->name, lastof(fios->title)); while (*s++ != '\0') { /* Nothing */ } } -#endif } bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb) @@ -306,16 +292,13 @@ static int ParseCommandLine(char *line, char **argv, int max_argc) void CreateConsole() { -#if defined(WINCE) - /* WinCE doesn't support console stuff */ -#else HANDLE hand; CONSOLE_SCREEN_BUFFER_INFO coninfo; if (_has_console) return; _has_console = true; - AllocConsole(); + if (!AllocConsole()) return; hand = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleScreenBufferInfo(hand, &coninfo); @@ -358,7 +341,6 @@ void CreateConsole() setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); -#endif } /** Temporary pointer to get the help message to the window */ @@ -426,18 +408,14 @@ void ShowInfo(const char *str) } } -#if defined(WINCE) -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) -#else int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) -#endif { int argc; char *argv[64]; // max 64 command line arguments CrashLog::InitialiseCrashLog(); -#if defined(UNICODE) && !defined(WINCE) +#if defined(UNICODE) /* Check if a win9x user started the win32 version */ if (HasBit(GetVersion(), 31)) usererror("This version of OpenTTD doesn't run on windows 95/98/ME.\nPlease download the win9x binary and try again."); #endif @@ -451,9 +429,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi CreateConsole(); #endif -#if !defined(WINCE) _set_error_mode(_OUT_TO_MSGBOX); // force assertion output to messagebox -#endif /* setup random seed to something quite random */ SetRandomSeed(GetTickCount()); @@ -468,35 +444,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi return 0; } -#if defined(WINCE) -void GetCurrentDirectoryW(int length, wchar_t *path) -{ - /* Get the name of this module */ - GetModuleFileName(NULL, path, length); - - /* Remove the executable name, this we call CurrentDir */ - wchar_t *pDest = wcsrchr(path, '\\'); - if (pDest != NULL) { - int result = pDest - path + 1; - path[result] = '\0'; - } -} -#endif - char *getcwd(char *buf, size_t size) { -#if defined(WINCE) - TCHAR path[MAX_PATH]; - GetModuleFileName(NULL, path, MAX_PATH); - convert_from_fs(path, buf, size); - /* GetModuleFileName returns dir with file, so remove everything behind latest '\\' */ - char *p = strrchr(buf, '\\'); - if (p != NULL) *p = '\0'; -#else TCHAR path[MAX_PATH]; GetCurrentDirectory(MAX_PATH - 1, path); convert_from_fs(path, buf, size); -#endif return buf; } @@ -671,11 +623,11 @@ char *convert_from_fs(const TCHAR *name, char *utf8_buf, size_t buflen) * Convert from OpenTTD's encoding to that of the environment in * UNICODE. OpenTTD encoding is UTF8, local is wide * @param name pointer to a valid string that will be converted - * @param utf16_buf pointer to a valid wide-char buffer that will receive the + * @param system_buf pointer to a valid wide-char buffer that will receive the * converted string * @param buflen length in wide characters of the receiving buffer * @param console_cp convert to the console encoding instead of the normal system encoding. - * @return pointer to utf16_buf. If conversion fails the string is of zero-length + * @return pointer to system_buf. If conversion fails the string is of zero-length */ TCHAR *convert_to_fs(const char *name, TCHAR *system_buf, size_t buflen, bool console_cp) { @@ -786,17 +738,80 @@ uint GetCPUCoreCount() return info.dwNumberOfProcessors; } + +static WCHAR _cur_iso_locale[16] = L""; + +void Win32SetCurrentLocaleName(const char *iso_code) +{ + /* Convert the iso code into the format that windows expects. */ + char iso[16]; + if (strcmp(iso_code, "zh_TW") == 0) { + strecpy(iso, "zh-Hant", lastof(iso)); + } else if (strcmp(iso_code, "zh_CN") == 0) { + strecpy(iso, "zh-Hans", lastof(iso)); + } else { + /* Windows expects a '-' between language and country code, but we use a '_'. */ + strecpy(iso, iso_code, lastof(iso)); + for (char *c = iso; *c != '\0'; c++) { + if (*c == '_') *c = '-'; + } + } + + MultiByteToWideChar(CP_UTF8, 0, iso, -1, _cur_iso_locale, lengthof(_cur_iso_locale)); +} + +int OTTDStringCompare(const char *s1, const char *s2) +{ + typedef int (WINAPI *PFNCOMPARESTRINGEX)(LPCWSTR, DWORD, LPCWCH, int, LPCWCH, int, LPVOID, LPVOID, LPARAM); + static PFNCOMPARESTRINGEX _CompareStringEx = NULL; + static bool first_time = true; + +#ifndef SORT_DIGITSASNUMBERS +# define SORT_DIGITSASNUMBERS 0x00000008 // use digits as numbers sort method +#endif +#ifndef LINGUISTIC_IGNORECASE +# define LINGUISTIC_IGNORECASE 0x00000010 // linguistically appropriate 'ignore case' +#endif + + if (first_time) { + _CompareStringEx = (PFNCOMPARESTRINGEX)GetProcAddress(GetModuleHandle(_T("Kernel32")), "CompareStringEx"); + first_time = false; + } + + if (_CompareStringEx != NULL) { + /* CompareStringEx takes UTF-16 strings, even in ANSI-builds. */ + int len_s1 = MultiByteToWideChar(CP_UTF8, 0, s1, -1, NULL, 0); + int len_s2 = MultiByteToWideChar(CP_UTF8, 0, s2, -1, NULL, 0); + + if (len_s1 != 0 && len_s2 != 0) { + LPWSTR str_s1 = AllocaM(WCHAR, len_s1); + LPWSTR str_s2 = AllocaM(WCHAR, len_s2); + + MultiByteToWideChar(CP_UTF8, 0, s1, -1, str_s1, len_s1); + MultiByteToWideChar(CP_UTF8, 0, s2, -1, str_s2, len_s2); + + int result = _CompareStringEx(_cur_iso_locale, LINGUISTIC_IGNORECASE | SORT_DIGITSASNUMBERS, str_s1, -1, str_s2, -1, NULL, NULL, 0); + if (result != 0) return result; + } + } + + TCHAR s1_buf[512], s2_buf[512]; + convert_to_fs(s1, s1_buf, lengthof(s1_buf)); + convert_to_fs(s2, s2_buf, lengthof(s2_buf)); + + return CompareString(MAKELCID(_current_language->winlangid, SORT_DEFAULT), NORM_IGNORECASE, s1_buf, -1, s2_buf, -1); +} + #ifdef _MSC_VER -/* Code from MSDN: https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx */ +/* Based on code from MSDN: https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx */ const DWORD MS_VC_EXCEPTION = 0x406D1388; -#pragma pack(push,8) -typedef struct { + +PACK_N(struct THREADNAME_INFO { DWORD dwType; ///< Must be 0x1000. LPCSTR szName; ///< Pointer to name (in user addr space). DWORD dwThreadID; ///< Thread ID (-1=caller thread). DWORD dwFlags; ///< Reserved for future use, must be zero. -} THREADNAME_INFO; -#pragma pack(pop) +}, 8); /** * Signal thread name to any attached debuggers. diff --git a/src/os/windows/win32.h b/src/os/windows/win32.h index 1f33de24dd..4f813c4a6f 100644 --- a/src/os/windows/win32.h +++ b/src/os/windows/win32.h @@ -1,4 +1,4 @@ -/* $Id: win32.h 27674 2016-10-30 19:27:07Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -45,4 +45,7 @@ void SetWin32ThreadName(DWORD dwThreadID, const char* threadName); static inline void SetWin32ThreadName(DWORD dwThreadID, const char* threadName) {} #endif +void Win32SetCurrentLocaleName(const char *iso_code); +int OTTDStringCompare(const char *s1, const char *s2); + #endif /* WIN32_H */ diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index bb051b948e..dc069d1686 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: osk_gui.cpp 26538 2014-04-28 21:06:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -437,9 +437,9 @@ void UpdateOSKOriginalText(const Window *parent, int button) /** * Check whether the OSK is opened for a specific editbox. - * @parent w Window to check for + * @param w Window to check for * @param button Editbox of \a w to check for - * @return true if the OSK is oppened for \a button. + * @return true if the OSK is opened for \a button. */ bool IsOSKOpenedFor(const Window *w, int button) { diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 13cf853f1e..9b4377248e 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -1,4 +1,4 @@ -/* $Id: follow_track.hpp 27418 2015-10-30 16:18:03Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -73,7 +73,8 @@ struct CFollowTrackT inline void Init(Owner o, RailTypes railtype_override, CPerformanceTimer *pPerf) { - assert((!IsRoadTT() || m_veh != NULL) && (!IsRailTT() || railtype_override != INVALID_RAILTYPES)); + assert(!IsRoadTT() || m_veh != NULL); + assert(!IsRailTT() || railtype_override != INVALID_RAILTYPES); m_veh_owner = o; m_pPerf = pPerf; /* don't worry, all is inlined so compiler should remove unnecessary initializations */ @@ -123,8 +124,12 @@ struct CFollowTrackT m_old_tile = old_tile; m_old_td = old_td; m_err = EC_NONE; - assert(((TrackStatusToTrackdirBits(GetTileTrackStatus(m_old_tile, TT(), IsRoadTT() ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)) & TrackdirToTrackdirBits(m_old_td)) != 0) || - (IsTram() && GetSingleTramBit(m_old_tile) != INVALID_DIAGDIR)); // Disable the assertion for single tram bits + assert( + ((TrackStatusToTrackdirBits( + GetTileTrackStatus(m_old_tile, TT(), (IsRoadTT() && m_veh != NULL) ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0) + ) & TrackdirToTrackdirBits(m_old_td)) != 0) || + (IsTram() && GetSingleTramBit(m_old_tile) != INVALID_DIAGDIR) // Disable the assertion for single tram bits + ); m_exitdir = TrackdirToExitdir(m_old_td); if (ForcedReverse()) return true; if (!CanExitOldTile()) return false; @@ -219,16 +224,13 @@ protected: } /* normal or station tile, do one step */ - TileIndexDiff diff = TileOffsByDiagDir(m_exitdir); - m_new_tile = TILE_ADD(m_old_tile, diff); + m_new_tile = TileAddByDiagDir(m_old_tile, m_exitdir); /* special handling for stations */ if (IsRailTT() && HasStationTileRail(m_new_tile)) { m_is_station = true; } else if (IsRoadTT() && IsRoadStopTile(m_new_tile)) { m_is_station = true; - } else { - m_is_station = false; } } @@ -241,7 +243,7 @@ protected: } else { m_new_td_bits = TrackStatusToTrackdirBits(GetTileTrackStatus(m_new_tile, TT(), IsRoadTT() ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)); - if (IsTram() && m_new_td_bits == 0) { + if (IsTram() && m_new_td_bits == TRACKDIR_BIT_NONE) { /* GetTileTrackStatus() returns 0 for single tram bits. * As we cannot change it there (easily) without breaking something, change it here */ switch (GetSingleTramBit(m_new_tile)) { @@ -408,8 +410,9 @@ protected: } } - /* single tram bits cause reversing */ - if (IsTram() && GetSingleTramBit(m_old_tile) == ReverseDiagDir(m_exitdir)) { + /* Single tram bits and standard road stops cause reversing. */ + if (IsRoadTT() && ((IsTram() && GetSingleTramBit(m_old_tile) == ReverseDiagDir(m_exitdir)) || + (IsStandardRoadStopTile(m_old_tile) && GetRoadStopDir(m_old_tile) == ReverseDiagDir(m_exitdir)))) { /* reverse */ m_new_tile = m_old_tile; m_new_td_bits = TrackdirToTrackdirBits(ReverseTrackdir(m_old_td)); diff --git a/src/pathfinder/npf/aystar.cpp b/src/pathfinder/npf/aystar.cpp index 47c24422c2..beac06291f 100644 --- a/src/pathfinder/npf/aystar.cpp +++ b/src/pathfinder/npf/aystar.cpp @@ -1,4 +1,4 @@ -/* $Id: aystar.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -156,7 +156,7 @@ void AyStar::CheckTile(AyStarNode *current, OpenListNode *parent) * his neighbour items. If they are valid, they are added to be checked too. * @return Possible values: * - #AYSTAR_EMPTY_OPENLIST : indicates all items are tested, and no path has been found. - * - #AYSTAR_LIMIT_REACHED : Indicates that the max_nodes limit has been reached. + * - #AYSTAR_LIMIT_REACHED : Indicates that the max_search_nodes limit has been reached. * - #AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found. * - #AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try. */ @@ -170,7 +170,7 @@ int AyStar::Loop() if (current == NULL) return AYSTAR_EMPTY_OPENLIST; /* Check for end node and if found, return that code */ - if (this->EndNodeCheck(this, current) == AYSTAR_FOUND_END_NODE) { + if (this->EndNodeCheck(this, current) == AYSTAR_FOUND_END_NODE && !CheckIgnoreFirstTile(¤t->path)) { if (this->FoundEndNode != NULL) { this->FoundEndNode(this, current); } diff --git a/src/pathfinder/npf/aystar.h b/src/pathfinder/npf/aystar.h index 4a03d8d1d6..890b023e83 100644 --- a/src/pathfinder/npf/aystar.h +++ b/src/pathfinder/npf/aystar.h @@ -1,4 +1,4 @@ -/* $Id: aystar.h 27733 2017-01-15 13:59:46Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -30,7 +30,7 @@ enum AystarStatus { AYSTAR_EMPTY_OPENLIST, ///< All items are tested, and no path has been found. AYSTAR_STILL_BUSY, ///< Some checking was done, but no path found yet, and there are still items left to try. AYSTAR_NO_PATH, ///< No path to the goal was found. - AYSTAR_LIMIT_REACHED, ///< The #max_nodes limit has been reached, aborting search. + AYSTAR_LIMIT_REACHED, ///< The #AyStar::max_search_nodes limit has been reached, aborting search. AYSTAR_DONE, ///< Not an end-tile, or wrong direction. }; @@ -59,6 +59,8 @@ struct OpenListNode { PathNode path; }; +bool CheckIgnoreFirstTile(const PathNode *node); + struct AyStar; /** @@ -75,7 +77,7 @@ struct AyStar; * - #AYSTAR_FOUND_END_NODE : indicates this is the end tile * - #AYSTAR_DONE : indicates this is not the end tile (or direction was wrong) */ -typedef int32 AyStar_EndNodeCheck(AyStar *aystar, OpenListNode *current); +typedef int32 AyStar_EndNodeCheck(const AyStar *aystar, const OpenListNode *current); /** * Calculate the G-value for the %AyStar algorithm. @@ -93,9 +95,9 @@ typedef int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNod typedef int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent); /** - * This function requests the tiles around the current tile and put them in #tiles_around. - * #tiles_around is never reset, so if you are not using directions, just leave it alone. - * \warning Never add more tiles_around than memory allocated for it. + * This function requests the tiles around the current tile and put them in #neighbours. + * #neighbours is never reset, so if you are not using directions, just leave it alone. + * @warning Never add more #neighbours than memory allocated for it. */ typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current); diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index fc36de5fc3..7d19d4ef1d 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -1,4 +1,4 @@ -/* $Id: npf.cpp 27912 2017-09-03 13:06:29Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -101,6 +101,11 @@ static inline void NPFSetFlag(AyStarNode *node, NPFNodeFlag flag, bool value) SB(node->user_data[NPF_NODE_FLAGS], flag, 1, value); } +bool CheckIgnoreFirstTile(const PathNode *node) +{ + return (node->parent == NULL && HasBit(node->node.user_data[NPF_NODE_FLAGS], NPF_FLAG_IGNORE_START_TILE)); +} + /** * Calculates the minimum distance travelled to get from t0 to t1 when only * using tracks (ie, only making 45 degree turns). Returns the distance in the @@ -275,7 +280,6 @@ static uint NPFReservedTrackCost(AyStarNode *current) */ static void NPFMarkTile(TileIndex tile) { -#ifndef NO_DEBUG_MESSAGES if (_debug_npf_level < 1 || _networking) return; switch (GetTileType(tile)) { case MP_RAILWAY: @@ -296,7 +300,6 @@ static void NPFMarkTile(TileIndex tile) default: break; } -#endif } static int32 NPFWaterPathCost(AyStar *as, AyStarNode *current, OpenListNode *parent) @@ -531,7 +534,7 @@ static int32 NPFRailPathCost(AyStar *as, AyStarNode *current, OpenListNode *pare } /* Will find any depot */ -static int32 NPFFindDepot(AyStar *as, OpenListNode *current) +static int32 NPFFindDepot(const AyStar *as, const OpenListNode *current) { AyStarUserData *user = (AyStarUserData *)as->user_data; /* It's not worth caching the result with NPF_FLAG_IS_TARGET here as below, @@ -541,7 +544,7 @@ static int32 NPFFindDepot(AyStar *as, OpenListNode *current) } /** Find any safe and free tile. */ -static int32 NPFFindSafeTile(AyStar *as, OpenListNode *current) +static int32 NPFFindSafeTile(const AyStar *as, const OpenListNode *current) { const Train *v = Train::From(((NPFFindStationOrTileData *)as->user_target)->v); @@ -551,10 +554,10 @@ static int32 NPFFindSafeTile(AyStar *as, OpenListNode *current) } /* Will find a station identified using the NPFFindStationOrTileData */ -static int32 NPFFindStationOrTile(AyStar *as, OpenListNode *current) +static int32 NPFFindStationOrTile(const AyStar *as, const OpenListNode *current) { NPFFindStationOrTileData *fstd = (NPFFindStationOrTileData*)as->user_target; - AyStarNode *node = ¤t->path.node; + const AyStarNode *node = ¤t->path.node; TileIndex tile = node->tile; if (fstd->station_index == INVALID_STATION && tile == fstd->dest_coords) return AYSTAR_FOUND_END_NODE; @@ -809,7 +812,7 @@ static TrackdirBits GetDriveableTrackdirBits(TileIndex dst_tile, Trackdir src_tr { TrackdirBits trackdirbits = TrackStatusToTrackdirBits(GetTileTrackStatus(dst_tile, type, subtype)); - if (trackdirbits == 0 && type == TRANSPORT_ROAD && HasBit(subtype, ROADTYPE_TRAM)) { + if (trackdirbits == TRACKDIR_BIT_NONE && type == TRANSPORT_ROAD && HasBit(subtype, ROADTYPE_TRAM)) { /* GetTileTrackStatus() returns 0 for single tram bits. * As we cannot change it there (easily) without breaking something, change it here */ switch (GetSingleTramBit(dst_tile)) { @@ -855,11 +858,6 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) TileIndex src_tile = current->path.node.tile; DiagDirection src_exitdir = TrackdirToExitdir(src_trackdir); - /* Is src_tile valid, and can be used? - * When choosing track on a junction src_tile is the tile neighboured to the junction wrt. exitdir. - * But we must not check the validity of this move, as src_tile is totally unrelated to the move, if a roadvehicle reversed on a junction. */ - bool ignore_src_tile = (current->path.parent == NULL && NPFGetFlag(¤t->path.node, NPF_FLAG_IGNORE_START_TILE)); - /* Information about the vehicle: TransportType (road/rail/water) and SubType (compatible rail/road types) */ TransportType type = user->type; uint subtype = user->roadtypes; @@ -873,7 +871,10 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) TrackdirBits trackdirbits; /* Find dest tile */ - if (ignore_src_tile) { + /* Is src_tile valid, and can be used? + * When choosing track on a junction src_tile is the tile neighboured to the junction wrt. exitdir. + * But we must not check the validity of this move, as src_tile is totally unrelated to the move, if a roadvehicle reversed on a junction. */ + if (CheckIgnoreFirstTile(¤t->path)) { /* Do not perform any checks that involve src_tile */ dst_tile = src_tile + TileOffsByDiagDir(src_exitdir); trackdirbits = GetDriveableTrackdirBits(dst_tile, src_trackdir, type, subtype); @@ -902,7 +903,7 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) trackdirbits = GetDriveableTrackdirBits(dst_tile, src_trackdir, type, subtype); - if (trackdirbits == 0) { + if (trackdirbits == TRACKDIR_BIT_NONE) { /* We cannot enter the next tile. Road vehicles can reverse, others reach dead end */ if (type != TRANSPORT_ROAD || HasBit(subtype, ROADTYPE_TRAM)) return; @@ -926,7 +927,7 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) /* Enumerate possible track */ uint i = 0; - while (trackdirbits != 0) { + while (trackdirbits != TRACKDIR_BIT_NONE) { Trackdir dst_trackdir = RemoveFirstTrackdir(&trackdirbits); DEBUG(npf, 5, "Expanded into trackdir: %d, remaining trackdirs: 0x%X", dst_trackdir, trackdirbits); @@ -961,12 +962,13 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) * multiple targets that are spread around, we should perform a breadth first * search by specifiying CalcZero as our heuristic. */ -static NPFFoundTargetData NPFRouteInternal(AyStarNode *start1, bool ignore_start_tile1, AyStarNode *start2, bool ignore_start_tile2, NPFFindStationOrTileData *target, AyStar_EndNodeCheck target_proc, AyStar_CalculateH heuristic_proc, AyStarUserData *user, uint reverse_penalty, bool ignore_reserved = false) +static NPFFoundTargetData NPFRouteInternal(AyStarNode *start1, bool ignore_start_tile1, AyStarNode *start2, bool ignore_start_tile2, NPFFindStationOrTileData *target, AyStar_EndNodeCheck target_proc, AyStar_CalculateH heuristic_proc, AyStarUserData *user, uint reverse_penalty, bool ignore_reserved = false, int max_penalty = 0) { int r; NPFFoundTargetData result; /* Initialize procs */ + _npf_aystar.max_path_cost = max_penalty; _npf_aystar.CalculateH = heuristic_proc; _npf_aystar.EndNodeCheck = target_proc; _npf_aystar.FoundEndNode = NPFSaveTargetData; @@ -1054,7 +1056,7 @@ static NPFFoundTargetData NPFRouteToStationOrTile(TileIndex tile, Trackdir track * reverse_penalty applied (NPF_TILE_LENGTH is the equivalent of one full * tile). */ -static NPFFoundTargetData NPFRouteToDepotBreadthFirstTwoWay(TileIndex tile1, Trackdir trackdir1, bool ignore_start_tile1, TileIndex tile2, Trackdir trackdir2, bool ignore_start_tile2, NPFFindStationOrTileData *target, AyStarUserData *user, uint reverse_penalty) +static NPFFoundTargetData NPFRouteToDepotBreadthFirstTwoWay(TileIndex tile1, Trackdir trackdir1, bool ignore_start_tile1, TileIndex tile2, Trackdir trackdir2, bool ignore_start_tile2, NPFFindStationOrTileData *target, AyStarUserData *user, uint reverse_penalty, int max_penalty) { AyStarNode start1; AyStarNode start2; @@ -1066,7 +1068,7 @@ static NPFFoundTargetData NPFRouteToDepotBreadthFirstTwoWay(TileIndex tile1, Tra /* perform a breadth first search. Target is NULL, * since we are just looking for any depot...*/ - return NPFRouteInternal(&start1, ignore_start_tile1, (IsValidTile(tile2) ? &start2 : NULL), ignore_start_tile2, target, NPFFindDepot, NPFCalcZero, user, reverse_penalty); + return NPFRouteInternal(&start1, ignore_start_tile1, (IsValidTile(tile2) ? &start2 : NULL), ignore_start_tile2, target, NPFFindDepot, NPFCalcZero, user, reverse_penalty, false, max_penalty); } void InitializeNPF() @@ -1116,7 +1118,7 @@ FindDepotData NPFRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_penal Trackdir trackdir = v->GetVehicleTrackdir(); AyStarUserData user = { v->owner, TRANSPORT_ROAD, INVALID_RAILTYPES, v->compatible_roadtypes }; - NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, v->tile, ReverseTrackdir(trackdir), false, NULL, &user, 0); + NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, INVALID_TILE, INVALID_TRACKDIR, false, NULL, &user, 0, max_penalty); if (ftd.best_bird_dist != 0) return FindDepotData(); @@ -1128,7 +1130,7 @@ FindDepotData NPFRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_penal return FindDepotData(ftd.node.tile, ftd.best_path_dist); } -Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs, bool &path_found) +Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir, bool &path_found) { NPFFindStationOrTileData fstd; @@ -1137,13 +1139,8 @@ Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDir AyStarUserData user = { v->owner, TRANSPORT_ROAD, INVALID_RAILTYPES, v->compatible_roadtypes }; NPFFoundTargetData ftd = NPFRouteToStationOrTile(tile - TileOffsByDiagDir(enterdir), trackdir, true, &fstd, &user); - if (ftd.best_trackdir == INVALID_TRACKDIR) { - /* We are already at our target. Just do something - * @todo: maybe display error? - * @todo: go straight ahead if possible? */ - path_found = true; - return (Trackdir)FindFirstBit2x64(trackdirs); - } + + assert(ftd.best_trackdir != INVALID_TRACKDIR); /* If ftd.best_bird_dist is 0, we found our target and ftd.best_trackdir contains * the direction we need to take to get there, if ftd.best_bird_dist is not 0, @@ -1155,7 +1152,7 @@ Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDir /*** Ships ***/ -Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found) +Track NPFShipChooseTrack(const Ship *v, bool &path_found) { NPFFindStationOrTileData fstd; Trackdir trackdir = v->GetVehicleTrackdir(); @@ -1164,14 +1161,15 @@ Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, NPFFillWithOrderData(&fstd, v); AyStarUserData user = { v->owner, TRANSPORT_WATER, INVALID_RAILTYPES, ROADTYPES_NONE }; - NPFFoundTargetData ftd = NPFRouteToStationOrTile(tile - TileOffsByDiagDir(enterdir), trackdir, true, &fstd, &user); + NPFFoundTargetData ftd = NPFRouteToStationOrTile(v->tile, trackdir, true, &fstd, &user); + + assert(ftd.best_trackdir != INVALID_TRACKDIR); /* If ftd.best_bird_dist is 0, we found our target and ftd.best_trackdir contains * the direction we need to take to get there, if ftd.best_bird_dist is not 0, * we did not find our target, but ftd.best_trackdir contains the direction leading * to the tile closest to our target. */ path_found = (ftd.best_bird_dist == 0); - if (ftd.best_trackdir == 0xff) return INVALID_TRACK; return TrackdirToTrack(ftd.best_trackdir); } @@ -1206,7 +1204,7 @@ FindDepotData NPFTrainFindNearestDepot(const Train *v, int max_penalty) assert(trackdir != INVALID_TRACKDIR); AyStarUserData user = { v->owner, TRANSPORT_RAIL, v->compatible_railtypes, ROADTYPES_NONE }; - NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, last->tile, trackdir_rev, false, &fstd, &user, NPF_INFINITE_PENALTY); + NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, last->tile, trackdir_rev, false, &fstd, &user, NPF_INFINITE_PENALTY, max_penalty); if (ftd.best_bird_dist != 0) return FindDepotData(); /* Found target */ @@ -1257,7 +1255,7 @@ bool NPFTrainCheckReverse(const Train *v) return ftd.best_bird_dist == 0 && NPFGetFlag(&ftd.node, NPF_FLAG_REVERSE); } -Track NPFTrainChooseTrack(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool reserve_track, struct PBSTileInfo *target) +Track NPFTrainChooseTrack(const Train *v, bool &path_found, bool reserve_track, struct PBSTileInfo *target) { NPFFindStationOrTileData fstd; NPFFillWithOrderData(&fstd, v, reserve_track); @@ -1274,13 +1272,7 @@ Track NPFTrainChooseTrack(const Train *v, TileIndex tile, DiagDirection enterdir target->okay = ftd.res_okay; } - if (ftd.best_trackdir == INVALID_TRACKDIR) { - /* We are already at our target. Just do something - * @todo maybe display error? - * @todo: go straight ahead if possible? */ - path_found = true; - return FindFirstTrack(tracks); - } + assert(ftd.best_trackdir != INVALID_TRACKDIR); /* If ftd.best_bird_dist is 0, we found our target and ftd.best_trackdir contains * the direction we need to take to get there, if ftd.best_bird_dist is not 0, diff --git a/src/pathfinder/npf/npf_func.h b/src/pathfinder/npf/npf_func.h index d5721dad90..2429989ab9 100644 --- a/src/pathfinder/npf/npf_func.h +++ b/src/pathfinder/npf/npf_func.h @@ -1,4 +1,4 @@ -/* $Id: npf_func.h 24481 2012-08-18 11:37:47Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,22 +32,18 @@ FindDepotData NPFRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_penal * @param v the RV that needs to find a path * @param tile the tile to find the path from (should be next tile the RV is about to enter) * @param enterdir diagonal direction which the RV will enter this new tile from - * @param trackdirs available trackdirs on the new tile (to choose from) * @param path_found [out] Whether a path has been found (true) or has been guessed (false) * @return the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found */ -Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs, bool &path_found); +Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir, bool &path_found); /** * Finds the best path for given ship using NPF. * @param v the ship that needs to find a path - * @param tile the tile to find the path from (should be next tile the ship is about to enter) - * @param enterdir diagonal direction which the ship will enter this new tile from - * @param tracks available tracks on the new tile (to choose from) * @param path_found [out] Whether a path has been found (true) or has been guessed (false) * @return the best trackdir for next turn or INVALID_TRACK if the path could not be found */ -Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found); +Track NPFShipChooseTrack(const Ship *v, bool &path_found); /** * Returns true if it is better to reverse the ship before leaving depot using NPF. @@ -87,14 +83,11 @@ bool NPFTrainCheckReverse(const Train *v); /** * Finds the best path for given train using NPF. * @param v the train that needs to find a path - * @param tile the tile to find the path from (should be next tile the train is about to enter) - * @param enterdir diagonal direction which the RV will enter this new tile from - * @param tracks available trackdirs on the new tile (to choose from) * @param path_found [out] Whether a path has been found (true) or has been guessed (false) * @param reserve_track indicates whether YAPF should try to reserve the found path * @param target [out] the target tile of the reservation, free is set to true if path was reserved * @return the best track for next turn */ -Track NPFTrainChooseTrack(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool reserve_track, struct PBSTileInfo *target); +Track NPFTrainChooseTrack(const Train *v, bool &path_found, bool reserve_track, struct PBSTileInfo *target); #endif /* NPF_FUNC_H */ diff --git a/src/pathfinder/npf/queue.cpp b/src/pathfinder/npf/queue.cpp index 942eeaf500..2afb413918 100644 --- a/src/pathfinder/npf/queue.cpp +++ b/src/pathfinder/npf/queue.cpp @@ -1,4 +1,4 @@ -/* $Id: queue.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/npf/queue.h b/src/pathfinder/npf/queue.h index 83c9776b05..3a5bd1ce92 100644 --- a/src/pathfinder/npf/queue.h +++ b/src/pathfinder/npf/queue.h @@ -1,4 +1,4 @@ -/* $Id: queue.h 23640 2011-12-20 17:57:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp index 99ba4fef6e..c993f82033 100644 --- a/src/pathfinder/opf/opf_ship.cpp +++ b/src/pathfinder/opf/opf_ship.cpp @@ -1,4 +1,4 @@ -/* $Id: opf_ship.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -145,6 +145,7 @@ static uint FindShipTrack(const Ship *v, TileIndex tile, DiagDirection dir, Trac Track best_track = INVALID_TRACK; + assert(bits != TRACK_BIT_NONE); do { Track i = RemoveFirstTrack(&bits); @@ -176,16 +177,21 @@ good:; best_length = pfs.best_length; bad:; - } while (bits != 0); + } while (bits != TRACK_BIT_NONE); *track = best_track; return best_bird_dist; } /** - * returns the track to choose on the next tile, or -1 when it's better to - * reverse. The tile given is the tile we are about to enter, enterdir is the - * direction in which we are entering the tile + * Finds the best track to choose on the next tile and + * returns INVALID_TRACK when it is better to reverse. + * @param v The ship. + * @param tile The tile we are about to enter. + * @param enterdir The direction entering the tile. + * @param tracks The tracks available on new tile. + * @param[out] path_found Whether a path has been found. + * @return Best track on next tile or INVALID_TRACK when better to reverse. */ Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found) { @@ -195,13 +201,15 @@ Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, Track track; /* Let's find out how far it would be if we would reverse first */ - Trackdir trackdir = v->GetVehicleTrackdir(); - TrackBits b = TrackStatusToTrackBits(GetTileTrackStatus(tile2, TRANSPORT_WATER, 0)) & DiagdirReachesTracks(ReverseDiagDir(enterdir)) & TrackdirBitsToTrackBits(TrackdirToTrackdirBits(trackdir)); + uint rev_dist = UINT_MAX; // distance if we reverse + Track cur_track = TrackdirToTrack(v->GetVehicleTrackdir()); // track on the current tile + DiagDirection rev_enterdir = ReverseDiagDir(enterdir); + TrackBits rev_tracks = TrackStatusToTrackBits(GetTileTrackStatus(tile2, TRANSPORT_WATER, 0)) & + DiagdirReachesTracks(rev_enterdir); - uint distr = UINT_MAX; // distance if we reversed - if (b != 0) { - distr = FindShipTrack(v, tile2, ReverseDiagDir(enterdir), b, tile, &track); - if (distr != UINT_MAX) distr++; // penalty for reversing + if (HasTrack(rev_tracks, cur_track)) { + rev_dist = FindShipTrack(v, tile2, rev_enterdir, TrackToTrackBits(cur_track), tile, &track); + if (rev_dist != UINT_MAX) rev_dist++; // penalty for reversing } /* And if we would not reverse? */ @@ -209,6 +217,6 @@ Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, /* Due to the way this pathfinder works we cannot determine whether we're lost or not. */ path_found = true; - if (dist <= distr) return track; + if (dist <= rev_dist) return track; return INVALID_TRACK; // We could better reverse } diff --git a/src/pathfinder/opf/opf_ship.h b/src/pathfinder/opf/opf_ship.h index ba5862fdeb..62668b206a 100644 --- a/src/pathfinder/opf/opf_ship.h +++ b/src/pathfinder/opf/opf_ship.h @@ -1,4 +1,4 @@ -/* $Id: opf_ship.h 21511 2010-12-13 21:56:40Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/pathfinder_func.h b/src/pathfinder/pathfinder_func.h index 658b053ee3..4c0671941c 100644 --- a/src/pathfinder/pathfinder_func.h +++ b/src/pathfinder/pathfinder_func.h @@ -1,4 +1,4 @@ -/* $Id: pathfinder_func.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h index e4167865be..0ecf00bbd2 100644 --- a/src/pathfinder/pathfinder_type.h +++ b/src/pathfinder/pathfinder_type.h @@ -1,4 +1,4 @@ -/* $Id: pathfinder_type.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -20,8 +20,8 @@ static const int NPF_TILE_LENGTH = 100; /** * This penalty is the equivalent of "infinite", which means that paths that * get this penalty will be chosen, but only if there is no other route - * without it. Be careful with not applying this penalty to often, or the - * total path cost might overflow.. + * without it. Be careful with not applying this penalty too often, or the + * total path cost might overflow. */ static const int NPF_INFINITE_PENALTY = 1000 * NPF_TILE_LENGTH; @@ -35,11 +35,14 @@ static const int YAPF_TILE_CORNER_LENGTH = 71; /** * This penalty is the equivalent of "infinite", which means that paths that * get this penalty will be chosen, but only if there is no other route - * without it. Be careful with not applying this penalty to often, or the - * total path cost might overflow.. + * without it. Be careful with not applying this penalty too often, or the + * total path cost might overflow. */ static const int YAPF_INFINITE_PENALTY = 1000 * YAPF_TILE_LENGTH; +/** Maximum length of ship path cache */ +static const int YAPF_SHIP_PATH_CACHE_LENGTH = 32; + /** * Helper container to find a depot */ diff --git a/src/pathfinder/pf_performance_timer.hpp b/src/pathfinder/pf_performance_timer.hpp index 7743cb112a..808542d25a 100644 --- a/src/pathfinder/pf_performance_timer.hpp +++ b/src/pathfinder/pf_performance_timer.hpp @@ -1,4 +1,4 @@ -/* $Id: pf_performance_timer.hpp 23640 2011-12-20 17:57:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/nodelist.hpp b/src/pathfinder/yapf/nodelist.hpp index 8ba37f4e75..87e65fd26e 100644 --- a/src/pathfinder/yapf/nodelist.hpp +++ b/src/pathfinder/yapf/nodelist.hpp @@ -1,4 +1,4 @@ -/* $Id: nodelist.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -25,7 +25,7 @@ template class CNodeList_HashTableT { public: typedef Titem_ Titem; ///< Make #Titem_ visible from outside of class. - typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of #HashTable. + typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of this class. typedef SmallArray CItemArray; ///< Type that we will use as item container. typedef CHashTableT COpenList; ///< How pointers to open nodes will be stored. typedef CHashTableT CClosedList; ///< How pointers to closed nodes will be stored. diff --git a/src/pathfinder/yapf/yapf.h b/src/pathfinder/yapf/yapf.h index 96543d2a54..84bd35c8b0 100644 --- a/src/pathfinder/yapf/yapf.h +++ b/src/pathfinder/yapf/yapf.h @@ -1,4 +1,4 @@ -/* $Id: yapf.h 24481 2012-08-18 11:37:47Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,7 @@ #include "../../direction_type.h" #include "../../track_type.h" #include "../../vehicle_type.h" +#include "../../ship.h" #include "../pathfinder_type.h" /** @@ -26,7 +27,7 @@ * @param path_found [out] Whether a path has been found (true) or has been guessed (false) * @return the best trackdir for next turn or INVALID_TRACK if the path could not be found */ -Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found); +Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache); /** * Returns true if it is better to reverse the ship before leaving depot using YAPF. diff --git a/src/pathfinder/yapf/yapf.hpp b/src/pathfinder/yapf/yapf.hpp index 5c5638f808..fda79287d8 100644 --- a/src/pathfinder/yapf/yapf.hpp +++ b/src/pathfinder/yapf/yapf.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf.hpp 25608 2013-07-14 09:20:34Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp index 1c94a6706c..6360567bb2 100644 --- a/src/pathfinder/yapf/yapf_base.hpp +++ b/src/pathfinder/yapf/yapf_base.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_base.hpp 27362 2015-08-08 10:06:24Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -122,10 +122,8 @@ public: { m_veh = v; -#ifndef NO_DEBUG_MESSAGES CPerformanceTimer perf; perf.Start(); -#endif /* !NO_DEBUG_MESSAGES */ Yapf().PfSetStartupNodes(); bool bDestFound = true; @@ -154,7 +152,6 @@ public: bDestFound &= (m_pBestDestNode != NULL); -#ifndef NO_DEBUG_MESSAGES perf.Stop(); if (_debug_yapf_level >= 2) { int t = perf.Get(1000000); @@ -174,7 +171,6 @@ public: ); } } -#endif /* !NO_DEBUG_MESSAGES */ return bDestFound; } diff --git a/src/pathfinder/yapf/yapf_cache.h b/src/pathfinder/yapf/yapf_cache.h index 080e4fbc3d..1660a21c02 100644 --- a/src/pathfinder/yapf/yapf_cache.h +++ b/src/pathfinder/yapf/yapf_cache.h @@ -1,4 +1,4 @@ -/* $Id: yapf_cache.h 21594 2010-12-22 11:24:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_common.hpp b/src/pathfinder/yapf/yapf_common.hpp index 6e769e125b..8ff69b3f6b 100644 --- a/src/pathfinder/yapf/yapf_common.hpp +++ b/src/pathfinder/yapf/yapf_common.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_common.hpp 27362 2015-08-08 10:06:24Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -142,8 +142,7 @@ public: /** Called by YAPF to detect if node ends in the desired destination */ inline bool PfDetectDestination(Node &n) { - bool bDest = (n.m_key.m_tile == m_destTile) && ((m_destTrackdirs & TrackdirToTrackdirBits(n.GetTrackdir())) != TRACKDIR_BIT_NONE); - return bDest; + return (n.m_key.m_tile == m_destTile) && HasTrackdir(m_destTrackdirs, n.GetTrackdir()); } /** diff --git a/src/pathfinder/yapf/yapf_costbase.hpp b/src/pathfinder/yapf/yapf_costbase.hpp index f5a3286250..6b55585a83 100644 --- a/src/pathfinder/yapf/yapf_costbase.hpp +++ b/src/pathfinder/yapf/yapf_costbase.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_costbase.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_costcache.hpp b/src/pathfinder/yapf/yapf_costcache.hpp index aa5e340c63..f16d4054c6 100644 --- a/src/pathfinder/yapf/yapf_costcache.hpp +++ b/src/pathfinder/yapf/yapf_costcache.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_costcache.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 25b2deab32..022b9a1678 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_costrail.hpp 27885 2017-06-22 16:57:06Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -104,7 +104,7 @@ public: assert(IsValidTrackdir(td2)); int cost = 0; if (TrackFollower::Allow90degTurns() - && ((TrackdirToTrackdirBits(td2) & (TrackdirBits)TrackdirCrossesTrackdirs(td1)) != 0)) { + && HasTrackdir(TrackdirCrossesTrackdirs(td1), td2)) { /* 90-deg curve penalty */ cost += Yapf().PfGetSettings().rail_curve90_penalty; } else if (td2 != NextTrackdir(td1)) { @@ -280,7 +280,7 @@ public: { assert(!n.flags_u.flags_s.m_targed_seen); assert(tf->m_new_tile == n.m_key.m_tile); - assert((TrackdirToTrackdirBits(n.m_key.m_td) & tf->m_new_td_bits) != TRACKDIR_BIT_NONE); + assert((HasTrackdir(tf->m_new_td_bits, n.m_key.m_td))); CPerfStart perf_cost(Yapf().m_perf_cost); diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp index 0c6042b437..1d1833fbfd 100644 --- a/src/pathfinder/yapf/yapf_destrail.hpp +++ b/src/pathfinder/yapf/yapf_destrail.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_destrail.hpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -166,16 +166,13 @@ public: /** Called by YAPF to detect if node ends in the desired destination */ inline bool PfDetectDestination(TileIndex tile, Trackdir td) { - bool bDest; if (m_dest_station_id != INVALID_STATION) { - bDest = HasStationTileRail(tile) + return HasStationTileRail(tile) && (GetStationIndex(tile) == m_dest_station_id) && (GetRailStationTrack(tile) == TrackdirToTrack(td)); - } else { - bDest = (tile == m_destTile) - && ((m_destTrackdirs & TrackdirToTrackdirBits(td)) != TRACKDIR_BIT_NONE); } - return bDest; + + return (tile == m_destTile) && HasTrackdir(m_destTrackdirs, td); } /** diff --git a/src/pathfinder/yapf/yapf_node.hpp b/src/pathfinder/yapf/yapf_node.hpp index 87923fd050..b3021096b3 100644 --- a/src/pathfinder/yapf/yapf_node.hpp +++ b/src/pathfinder/yapf/yapf_node.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_node.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_node_rail.hpp b/src/pathfinder/yapf/yapf_node_rail.hpp index f13edefa1d..180c894392 100644 --- a/src/pathfinder/yapf/yapf_node_rail.hpp +++ b/src/pathfinder/yapf/yapf_node_rail.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_node_rail.hpp 27362 2015-08-08 10:06:24Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_node_road.hpp b/src/pathfinder/yapf/yapf_node_road.hpp index 02fcb56fc1..9a392f088f 100644 --- a/src/pathfinder/yapf/yapf_node_road.hpp +++ b/src/pathfinder/yapf/yapf_node_road.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_node_road.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_node_ship.hpp b/src/pathfinder/yapf/yapf_node_ship.hpp index 95bb8d4d55..df4254fd98 100644 --- a/src/pathfinder/yapf/yapf_node_ship.hpp +++ b/src/pathfinder/yapf/yapf_node_ship.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_node_ship.hpp 27363 2015-08-08 13:19:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pathfinder/yapf/yapf_rail.cpp b/src/pathfinder/yapf/yapf_rail.cpp index 7d1b2da440..d3f8e8aeee 100644 --- a/src/pathfinder/yapf/yapf_rail.cpp +++ b/src/pathfinder/yapf/yapf_rail.cpp @@ -1,4 +1,4 @@ -/* $Id: yapf_rail.cpp 27845 2017-04-03 22:02:28Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,6 +28,8 @@ template void DumpState(Tpf &pf1, Tpf &pf2) pf2.DumpBase(dmp2); FILE *f1 = fopen("yapf1.txt", "wt"); FILE *f2 = fopen("yapf2.txt", "wt"); + assert(f1 != NULL); + assert(f2 != NULL); fwrite(dmp1.m_out.Data(), 1, dmp1.m_out.Size(), f1); fwrite(dmp2.m_out.Data(), 1, dmp2.m_out.Size(), f2); fclose(f1); diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index 07c7c9380c..0240eb9366 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -1,4 +1,4 @@ -/* $Id: yapf_road.cpp 27586 2016-05-29 14:14:52Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -27,6 +27,10 @@ public: typedef typename Node::Key Key; ///< key to hash tables protected: + int m_max_cost; + + CYapfCostRoadT() : m_max_cost(0) {}; + /** to access inherited path finder */ Tpf& Yapf() { @@ -97,6 +101,11 @@ protected: } public: + inline void SetMaxCost(int max_cost) + { + m_max_cost = max_cost; + } + /** * Called by YAPF to calculate the cost from the origin to the given node. * Calculates only the cost of given node, adds it to the parent node cost @@ -109,6 +118,8 @@ public: /* start at n.m_key.m_tile / n.m_key.m_td and walk to the end of segment */ TileIndex tile = n.m_key.m_tile; Trackdir trackdir = n.m_key.m_td; + int parent_cost = (n.m_parent != NULL) ? n.m_parent->m_cost : 0; + for (;;) { /* base tile cost depending on distance between edges */ segment_cost += Yapf().OneTileCost(tile, trackdir); @@ -117,6 +128,12 @@ public: /* we have reached the vehicle's destination - segment should end here to avoid target skipping */ if (Yapf().PfDetectDestinationTile(tile, trackdir)) break; + /* Finish if we already exceeded the maximum path cost (i.e. when + * searching for the nearest depot). */ + if (m_max_cost > 0 && (parent_cost + segment_cost) > m_max_cost) { + return false; + } + /* stop if we have just entered the depot */ if (IsRoadDepotTile(tile) && trackdir == DiagDirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) { /* next time we will reverse and leave the depot */ @@ -160,7 +177,6 @@ public: n.m_segment_last_td = trackdir; /* save also tile cost */ - int parent_cost = (n.m_parent != NULL) ? n.m_parent->m_cost : 0; n.m_cost = parent_cost + segment_cost; return true; } @@ -185,8 +201,7 @@ public: /** Called by YAPF to detect if node ends in the desired destination */ inline bool PfDetectDestination(Node &n) { - bool bDest = IsRoadDepotTile(n.m_segment_last_tile); - return bDest; + return IsRoadDepotTile(n.m_segment_last_tile); } inline bool PfDetectDestinationTile(TileIndex tile, Trackdir trackdir) @@ -261,7 +276,7 @@ public: (m_non_artic || IsDriveThroughStopTile(tile)); } - return tile == m_destTile && ((m_destTrackdirs & TrackdirToTrackdirBits(trackdir)) != TRACKDIR_BIT_NONE); + return tile == m_destTile && HasTrackdir(m_destTrackdirs, trackdir); } /** @@ -421,7 +436,7 @@ public: /* set origin (tile, trackdir) */ TileIndex src_tile = v->tile; Trackdir src_td = v->GetVehicleTrackdir(); - if ((TrackStatusToTrackdirBits(GetTileTrackStatus(src_tile, TRANSPORT_ROAD, v->compatible_roadtypes)) & TrackdirToTrackdirBits(src_td)) == 0) { + if (!HasTrackdir(TrackStatusToTrackdirBits(GetTileTrackStatus(src_tile, TRANSPORT_ROAD, v->compatible_roadtypes)), src_td)) { /* sometimes the roadveh is not on the road (it resides on non-existing track) * how should we handle that situation? */ return false; @@ -442,15 +457,12 @@ public: * @param tile Tile of the vehicle. * @param td Trackdir of the vehicle. * @param max_distance max length (penalty) for paths. - * @todo max_distance not used by YAPF for road vehicles. - * It can be removed or copy the SetMaxCost() strategy - * applied in YAPF for rail. The best depot can be at - * a distance greater than max_distance. */ inline FindDepotData FindNearestDepot(const RoadVehicle *v, TileIndex tile, Trackdir td, int max_distance) { /* Set origin. */ Yapf().SetOrigin(tile, TrackdirToTrackdirBits(td)); + Yapf().SetMaxCost(max_distance); /* Find the best path and return if no depot is found. */ if (!Yapf().FindPath(v)) return FindDepotData(); @@ -504,7 +516,7 @@ FindDepotData YapfRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_dist { TileIndex tile = v->tile; Trackdir trackdir = v->GetVehicleTrackdir(); - if ((TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_ROAD, v->compatible_roadtypes)) & TrackdirToTrackdirBits(trackdir)) == 0) { + if (!HasTrackdir(TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_ROAD, v->compatible_roadtypes)), trackdir)) { return FindDepotData(); } diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index ba77c5730b..c6e484feaa 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -1,4 +1,4 @@ -/* $Id: yapf_ship.cpp 27362 2015-08-08 10:06:24Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -54,22 +54,22 @@ public: return 'w'; } - static Trackdir ChooseShipTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found) + static Trackdir ChooseShipTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache) { /* handle special case - when next tile is destination tile */ if (tile == v->dest_tile) { /* convert tracks to trackdirs */ - TrackdirBits trackdirs = (TrackdirBits)(tracks | ((int)tracks << 8)); + TrackdirBits trackdirs = TrackBitsToTrackdirBits(tracks); /* limit to trackdirs reachable from enterdir */ trackdirs &= DiagdirReachesTrackdirs(enterdir); /* use vehicle's current direction if that's possible, otherwise use first usable one. */ Trackdir veh_dir = v->GetVehicleTrackdir(); - return ((trackdirs & TrackdirToTrackdirBits(veh_dir)) != 0) ? veh_dir : (Trackdir)FindFirstBit2x64(trackdirs); + return (HasTrackdir(trackdirs, veh_dir)) ? veh_dir : (Trackdir)FindFirstBit2x64(trackdirs); } /* move back to the old tile/trackdir (where ship is coming from) */ - TileIndex src_tile = TILE_ADD(tile, TileOffsByDiagDir(ReverseDiagDir(enterdir))); + TileIndex src_tile = TileAddByDiagDir(tile, ReverseDiagDir(enterdir)); Trackdir trackdir = v->GetVehicleTrackdir(); assert(IsValidTrackdir(trackdir)); @@ -90,9 +90,17 @@ public: Node *pNode = pf.GetBestNode(); if (pNode != NULL) { + uint steps = 0; + for (Node *n = pNode; n->m_parent != NULL; n = n->m_parent) steps++; + /* walk through the path back to the origin */ Node *pPrevNode = NULL; while (pNode->m_parent != NULL) { + if (steps > 1 && --steps < YAPF_SHIP_PATH_CACHE_LENGTH) { + TrackdirByte td; + td = pNode->GetTrackdir(); + path_cache.push_front(td); + } pPrevNode = pNode; pNode = pNode->m_parent; } @@ -100,6 +108,8 @@ public: Node &best_next_node = *pPrevNode; assert(best_next_node.GetTile() == tile); next_trackdir = best_next_node.GetTrackdir(); + /* remove last element for the special case when tile == dest_tile */ + if (path_found && !path_cache.empty()) path_cache.pop_back(); } return next_trackdir; } @@ -222,10 +232,10 @@ struct CYapfShip2 : CYapfT > {}; /** Ship controller helper - path finder invoker */ -Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found) +Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache) { /* default is YAPF type 2 */ - typedef Trackdir (*PfnChooseShipTrack)(const Ship*, TileIndex, DiagDirection, TrackBits, bool &path_found); + typedef Trackdir (*PfnChooseShipTrack)(const Ship*, TileIndex, DiagDirection, TrackBits, bool &path_found, ShipPathCache &path_cache); PfnChooseShipTrack pfnChooseShipTrack = CYapfShip2::ChooseShipTrack; // default: ExitDir, allow 90-deg /* check if non-default YAPF type needed */ @@ -235,7 +245,7 @@ Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, pfnChooseShipTrack = &CYapfShip1::ChooseShipTrack; // Trackdir, allow 90-deg } - Trackdir td_ret = pfnChooseShipTrack(v, tile, enterdir, tracks, path_found); + Trackdir td_ret = pfnChooseShipTrack(v, tile, enterdir, tracks, path_found, path_cache); return (td_ret != INVALID_TRACKDIR) ? TrackdirToTrack(td_ret) : INVALID_TRACK; } diff --git a/src/pathfinder/yapf/yapf_type.hpp b/src/pathfinder/yapf/yapf_type.hpp index 19dd33e88d..8d24eee5e2 100644 --- a/src/pathfinder/yapf/yapf_type.hpp +++ b/src/pathfinder/yapf/yapf_type.hpp @@ -1,4 +1,4 @@ -/* $Id: yapf_type.hpp 27885 2017-06-22 16:57:06Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/pbs.cpp b/src/pbs.cpp index ff67487731..6bb35a6964 100644 --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -1,4 +1,4 @@ -/* $Id: pbs.cpp 27209 2015-03-28 14:04:06Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -81,7 +81,7 @@ void SetRailStationPlatformReservation(TileIndex start, DiagDirection dir, bool */ bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations) { - assert((GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0); + assert(HasTrack(TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)), t)); if (_settings_client.gui.show_track_reservation) { /* show the reserved rail if needed */ @@ -142,7 +142,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations) */ void UnreserveRailTrack(TileIndex tile, Track t) { - assert((GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0); + assert(HasTrack(TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)), t)); if (_settings_client.gui.show_track_reservation) { if (IsBridgeTile(tile)) { diff --git a/src/pbs.h b/src/pbs.h index 335a782536..a02d4d06e1 100644 --- a/src/pbs.h +++ b/src/pbs.h @@ -1,4 +1,4 @@ -/* $Id: pbs.h 24905 2013-01-11 07:39:25Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/progress.cpp b/src/progress.cpp index c56d555db6..b498be109b 100644 --- a/src/progress.cpp +++ b/src/progress.cpp @@ -1,4 +1,4 @@ -/* $Id: progress.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/progress.h b/src/progress.h index 93efcaa7c2..eec369b23c 100644 --- a/src/progress.h +++ b/src/progress.h @@ -1,4 +1,4 @@ -/* $Id: progress.h 22820 2011-08-24 12:18:53Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/querystring_gui.h b/src/querystring_gui.h index a24c7f17ae..a1f3896dd1 100644 --- a/src/querystring_gui.h +++ b/src/querystring_gui.h @@ -1,4 +1,4 @@ -/* $Id: querystring_gui.h 25691 2013-08-05 20:37:53Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/rail.cpp b/src/rail.cpp index 50da9d3e0f..8bd7aa5181 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -1,4 +1,4 @@ -/* $Id: rail.cpp 27808 2017-03-19 22:30:47Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -180,14 +180,24 @@ RailType GetTileRailType(TileIndex tile) } /** - * Finds out if a company has a certain railtype available + * Finds out if a company has a certain buildable railtype available. * @param company the company in question * @param railtype requested RailType * @return true if company has requested RailType available */ bool HasRailtypeAvail(const CompanyID company, const RailType railtype) { - return HasBit(Company::Get(company)->avail_railtypes, railtype); + return !HasBit(_railtypes_hidden_mask, railtype) && HasBit(Company::Get(company)->avail_railtypes, railtype); +} + +/** + * Test if any buildable railtype is available for a company. + * @param company the company in question + * @return true if company has any RailTypes available + */ +bool HasAnyRailtypesAvail(const CompanyID company) +{ + return (Company::Get(company)->avail_railtypes & ~_railtypes_hidden_mask) != 0; } /** @@ -251,7 +261,7 @@ RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date) /** * Get the rail types the given company can build. - * @param c the company to get the rail types for. + * @param company the company to get the rail types for. * @return the rail types. */ RailTypes GetCompanyRailtypes(CompanyID company) diff --git a/src/rail.h b/src/rail.h index e7d30fd2b0..83d1d9b7af 100644 --- a/src/rail.h +++ b/src/rail.h @@ -1,4 +1,4 @@ -/* $Id: rail.h 27687 2016-12-10 13:26:29Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,10 +26,12 @@ enum RailTypeFlags { RTF_CATENARY = 0, ///< Bit number for drawing a catenary. RTF_NO_LEVEL_CROSSING = 1, ///< Bit number for disallowing level crossings. + RTF_HIDDEN = 2, ///< Bit number for hiding from selection. RTFB_NONE = 0, ///< All flags cleared. RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary. RTFB_NO_LEVEL_CROSSING = 1 << RTF_NO_LEVEL_CROSSING, ///< Value for disallowing level crossings. + RTFB_HIDDEN = 1 << RTF_HIDDEN, ///< Value for hiding from selection. }; DECLARE_ENUM_AS_BIT_SET(RailTypeFlags) @@ -239,7 +241,7 @@ public: * When #INVALID_DATE or a vehicle using this railtype gets introduced earlier, * the vehicle's introduction date will be used instead for this railtype. * The introduction at this date is furthermore limited by the - * #introduction_required_types. + * #introduction_required_railtypes. */ Date introduction_date; @@ -419,6 +421,7 @@ Foundation GetRailFoundation(Slope tileh, TrackBits bits); bool HasRailtypeAvail(const CompanyID company, const RailType railtype); +bool HasAnyRailtypesAvail(const CompanyID company); bool ValParamRailtype(const RailType rail); RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date); @@ -434,6 +437,7 @@ RailType AllocateRailType(RailTypeLabel label); extern RailType _sorted_railtypes[RAILTYPE_END]; extern uint8 _sorted_railtypes_size; +extern RailTypes _railtypes_hidden_mask; /** * Loop header for iterating over railtypes, sorted by sortorder. diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index d94a3e69e8..dc469c63b2 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: rail_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -47,6 +47,7 @@ RailtypeInfo _railtypes[RAILTYPE_END]; RailType _sorted_railtypes[RAILTYPE_END]; uint8 _sorted_railtypes_size; TileIndex _rail_track_endtile; ///< The end of a rail track; as hidden return from the rail build/remove command for GUI purposes. +RailTypes _railtypes_hidden_mask; /** Enum holding the signal offset in the sprite sheet according to the side it is representing. */ enum SignalOffsets { @@ -79,6 +80,8 @@ void ResetRailTypes() RailTypeLabelList(), 0, 0, RAILTYPES_NONE, RAILTYPES_NONE, 0, {}, {} }; for (; i < lengthof(_railtypes); i++) _railtypes[i] = empty_railtype; + + _railtypes_hidden_mask = RAILTYPES_NONE; } void ResolveRailTypeGUISprites(RailtypeInfo *rti) @@ -141,11 +144,12 @@ void InitRailTypes() for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) { RailtypeInfo *rti = &_railtypes[rt]; ResolveRailTypeGUISprites(rti); + if (HasBit(rti->flags, RTF_HIDDEN)) SetBit(_railtypes_hidden_mask, rt); } _sorted_railtypes_size = 0; for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) { - if (_railtypes[rt].label != 0) { + if (_railtypes[rt].label != 0 && !HasBit(_railtypes_hidden_mask, rt)) { _sorted_railtypes[_sorted_railtypes_size++] = rt; } } @@ -167,11 +171,11 @@ RailType AllocateRailType(RailTypeLabel label) rti->alternate_labels.Clear(); /* Make us compatible with ourself. */ - rti->powered_railtypes = (RailTypes)(1 << rt); - rti->compatible_railtypes = (RailTypes)(1 << rt); + rti->powered_railtypes = (RailTypes)(1LL << rt); + rti->compatible_railtypes = (RailTypes)(1LL << rt); /* We also introduce ourself. */ - rti->introduces_railtypes = (RailTypes)(1 << rt); + rti->introduces_railtypes = (RailTypes)(1LL << rt); /* Default sort order; order of allocation, but with some * offsets so it's easier for NewGRF to pick a spot without @@ -442,7 +446,7 @@ static inline bool ValParamTrackOrientation(Track track) */ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { - RailType railtype = Extract(p1); + RailType railtype = Extract(p1); Track track = Extract(p2); CommandCost cost(EXPENSES_CONSTRUCTION); @@ -561,8 +565,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u _rail_track_endtile = tile; return_cmd_error(STR_ERROR_ALREADY_BUILT); } + FALLTHROUGH; } - FALLTHROUGH; default: { /* Will there be flat water on the lower halftile? */ @@ -865,19 +869,19 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd * @param flags operation to perform * @param p1 end tile of drag * @param p2 various bitstuffed elements - * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev), only used for building - * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum) - * - p2 = (bit 7) - 0 = build, 1 = remove tracks - * - p2 = (bit 8) - 0 = build up to an obstacle, 1 = fail if an obstacle is found (used for AIs). + * - p2 = (bit 0-5) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev), only used for building + * - p2 = (bit 6-8) - track-orientation, valid values: 0-5 (Track enum) + * - p2 = (bit 9) - 0 = build, 1 = remove tracks + * - p2 = (bit 10) - 0 = build up to an obstacle, 1 = fail if an obstacle is found (used for AIs). * @param text unused * @return the cost of this operation or an error */ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { CommandCost total_cost(EXPENSES_CONSTRUCTION); - Track track = Extract(p2); - bool remove = HasBit(p2, 7); - RailType railtype = Extract(p2); + Track track = Extract(p2); + bool remove = HasBit(p2, 9); + RailType railtype = Extract(p2); _rail_track_endtile = INVALID_TILE; @@ -899,7 +903,7 @@ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint3 last_error = ret; if (_rail_track_endtile == INVALID_TILE) _rail_track_endtile = last_endtile; if (last_error.GetErrorMessage() != STR_ERROR_ALREADY_BUILT && !remove) { - if (HasBit(p2, 8)) return last_error; + if (HasBit(p2, 10)) return last_error; break; } @@ -929,16 +933,16 @@ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint3 * @param flags operation to perform * @param p1 end tile of drag * @param p2 various bitstuffed elements - * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev) - * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum) - * - p2 = (bit 7) - 0 = build, 1 = remove tracks + * - p2 = (bit 0-5) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev) + * - p2 = (bit 6-8) - track-orientation, valid values: 0-5 (Track enum) + * - p2 = (bit 9) - 0 = build, 1 = remove tracks * @param text unused * @return the cost of this operation or an error * @see CmdRailTrackHelper */ CommandCost CmdBuildRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { - return CmdRailTrackHelper(tile, flags, p1, ClrBit(p2, 7), text); + return CmdRailTrackHelper(tile, flags, p1, ClrBit(p2, 9), text); } /** @@ -948,16 +952,16 @@ CommandCost CmdBuildRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1 * @param flags operation to perform * @param p1 end tile of drag * @param p2 various bitstuffed elements - * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev), only used for building - * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum) - * - p2 = (bit 7) - 0 = build, 1 = remove tracks + * - p2 = (bit 0-5) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev), only used for building + * - p2 = (bit 6-8) - track-orientation, valid values: 0-5 (Track enum) + * - p2 = (bit 9) - 0 = build, 1 = remove tracks * @param text unused * @return the cost of this operation or an error * @see CmdRailTrackHelper */ CommandCost CmdRemoveRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { - return CmdRailTrackHelper(tile, flags, p1, SetBit(p2, 7), text); + return CmdRailTrackHelper(tile, flags, p1, SetBit(p2, 9), text); } /** @@ -975,13 +979,15 @@ CommandCost CmdRemoveRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { /* check railtype and valid direction for depot (0 through 3), 4 in total */ - RailType railtype = Extract(p1); + RailType railtype = Extract(p1); if (!ValParamRailtype(railtype)) return CMD_ERROR; Slope tileh = GetTileSlope(tile); DiagDirection dir = Extract(p2); + CommandCost cost(EXPENSES_CONSTRUCTION); + /* Prohibit construction if * The tile is non-flat AND * 1) build-on-slopes is disabled @@ -989,14 +995,14 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u * 3) the exit points in the wrong direction */ - if (tileh != SLOPE_FLAT && ( - !_settings_game.construction.build_on_slopes || - !CanBuildDepotByTileh(dir, tileh) - )) { - return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); + if (tileh != SLOPE_FLAT) { + if (!_settings_game.construction.build_on_slopes || !CanBuildDepotByTileh(dir, tileh)) { + return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); + } + cost.AddCost(_price[PR_BUILD_FOUNDATION]); } - CommandCost cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); + cost.AddCost(DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR)); if (cost.Failed()) return cost; if (IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); @@ -1555,17 +1561,17 @@ static Vehicle *UpdateTrainPowerProc(Vehicle *v, void *data) * @param flags operation to perform * @param p1 start tile of drag * @param p2 various bitstuffed elements: - * - p2 = (bit 0- 3) new railtype to convert to. - * - p2 = (bit 4) build diagonally or not. + * - p2 = (bit 0- 5) new railtype to convert to. + * - p2 = (bit 6) build diagonally or not. * @param text unused * @return the cost of this operation or an error */ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { - RailType totype = Extract(p2); + RailType totype = Extract(p2); TileIndex area_start = p1; TileIndex area_end = tile; - bool diagonal = HasBit(p2, 4); + bool diagonal = HasBit(p2, 6); if (!ValParamRailtype(totype)) return CMD_ERROR; if (area_start >= MapSize()) return CMD_ERROR; @@ -2910,11 +2916,9 @@ int TicksToLeaveDepot(const Train *v) case DIAGDIR_NE: return ((int)(v->x_pos & 0x0F) - ((_fractcoords_enter[dir] & 0x0F) - (length + 1))); case DIAGDIR_SE: return -((int)(v->y_pos & 0x0F) - ((_fractcoords_enter[dir] >> 4) + (length + 1))); case DIAGDIR_SW: return -((int)(v->x_pos & 0x0F) - ((_fractcoords_enter[dir] & 0x0F) + (length + 1))); - default: case DIAGDIR_NW: return ((int)(v->y_pos & 0x0F) - ((_fractcoords_enter[dir] >> 4) - (length + 1))); + default: NOT_REACHED(); } - - return 0; // make compilers happy } /** diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 353386d9ec..35380fdb19 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: rail_gui.cpp 27710 2016-12-25 14:59:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -206,7 +206,7 @@ static void PlaceRail_Station(TileIndex tile) VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED, DDSP_BUILD_STATION); VpSetPlaceSizingLimit(_settings_game.station.station_spread); } else { - uint32 p1 = _cur_railtype | _railstation.orientation << 4 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24; + uint32 p1 = _cur_railtype | _railstation.orientation << 6 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24; uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16; int w = _settings_client.gui.station_numtracks; @@ -370,7 +370,7 @@ static CommandContainer DoRailroadTrackCmd(TileIndex start_tile, TileIndex end_t CommandContainer ret = { start_tile, // tile end_tile, // p1 - (uint32)(_cur_railtype | (track << 4)), // p2 + (uint32)(_cur_railtype | (track << 6)), // p2 _remove_button_clicked ? CMD_REMOVE_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) : CMD_BUILD_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK), // cmd @@ -898,7 +898,7 @@ struct BuildRailToolbarWindow : Window { break; case DDSP_CONVERT_RAIL: - DoCommandP(end_tile, start_tile, _cur_railtype | (_ctrl_pressed ? 0x10 : 0), CMD_CONVERT_RAIL | CMD_MSG(STR_ERROR_CAN_T_CONVERT_RAIL), CcPlaySound_SPLAT_RAIL); + DoCommandP(end_tile, start_tile, _cur_railtype | (_ctrl_pressed ? 1 << 6 : 0), CMD_CONVERT_RAIL | CMD_MSG(STR_ERROR_CAN_T_CONVERT_RAIL), CcPlaySound_SPLAT_RAIL); break; case DDSP_REMOVE_STATION: @@ -916,7 +916,7 @@ struct BuildRailToolbarWindow : Window { DoCommandP(end_tile, start_tile, _ctrl_pressed ? 0 : 1, CMD_REMOVE_FROM_RAIL_WAYPOINT | CMD_MSG(STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT), CcPlaySound_SPLAT_RAIL); } else { TileArea ta(start_tile, end_tile); - uint32 p1 = _cur_railtype | (select_method == VPM_X_LIMITED ? AXIS_X : AXIS_Y) << 4 | ta.w << 8 | ta.h << 16 | _ctrl_pressed << 24; + uint32 p1 = _cur_railtype | (select_method == VPM_X_LIMITED ? AXIS_X : AXIS_Y) << 6 | ta.w << 8 | ta.h << 16 | _ctrl_pressed << 24; uint32 p2 = STAT_CLASS_WAYP | _cur_waypoint_type << 8 | INVALID_STATION << 16; CommandContainer cmdcont = { ta.tile, p1, p2, CMD_BUILD_RAIL_WAYPOINT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT), CcPlaySound_SPLAT_RAIL, "" }; @@ -1081,7 +1081,7 @@ static void HandleStationPlacement(TileIndex start, TileIndex end) if (_railstation.orientation == AXIS_X) Swap(numtracks, platlength); - uint32 p1 = _cur_railtype | _railstation.orientation << 4 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24; + uint32 p1 = _cur_railtype | _railstation.orientation << 6 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24; uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16; CommandContainer cmdcont = { ta.tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation, "" }; @@ -1563,7 +1563,7 @@ public: } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } @@ -2119,7 +2119,7 @@ static void SetDefaultRailGui() RailType rt = (RailType)(_settings_client.gui.default_rail_type + RAILTYPE_END); if (rt == DEF_RAILTYPE_MOST_USED) { /* Find the most used rail type */ - RailType count[RAILTYPE_END]; + uint count[RAILTYPE_END]; memset(count, 0, sizeof(count)); for (TileIndex t = 0; t < MapSize(); t++) { if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || HasStationTileRail(t) || diff --git a/src/rail_gui.h b/src/rail_gui.h index 7b86169dbc..e7a03b9120 100644 --- a/src/rail_gui.h +++ b/src/rail_gui.h @@ -1,4 +1,4 @@ -/* $Id: rail_gui.h 27683 2016-12-08 20:21:39Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/rail_map.h b/src/rail_map.h index eb5037b20f..74afe5ace5 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -1,4 +1,4 @@ -/* $Id: rail_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -115,7 +115,7 @@ static inline bool IsRailDepotTile(TileIndex t) */ static inline RailType GetRailType(TileIndex t) { - return (RailType)GB(_m[t].m3, 0, 4); + return (RailType)GB(_me[t].m8, 0, 6); } /** @@ -125,7 +125,7 @@ static inline RailType GetRailType(TileIndex t) */ static inline void SetRailType(TileIndex t, RailType r) { - SB(_m[t].m3, 0, 4, r); + SB(_me[t].m8, 0, 6, r); } @@ -522,11 +522,12 @@ static inline void MakeRailNormal(TileIndex t, Owner o, TrackBits b, RailType r) SetTileType(t, MP_RAILWAY); SetTileOwner(t, o); _m[t].m2 = 0; - _m[t].m3 = r; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = RAIL_TILE_NORMAL << 6 | b; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = r; } @@ -535,11 +536,12 @@ static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirectio SetTileType(t, MP_RAILWAY); SetTileOwner(t, o); _m[t].m2 = did; - _m[t].m3 = r; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = RAIL_TILE_DEPOT << 6 | d; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = r; } #endif /* RAIL_MAP_H */ diff --git a/src/rail_type.h b/src/rail_type.h index 17b356972d..2bd602a37e 100644 --- a/src/rail_type.h +++ b/src/rail_type.h @@ -1,4 +1,4 @@ -/* $Id: rail_type.h 23595 2011-12-19 17:48:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,7 +32,7 @@ enum RailType { RAILTYPE_ELECTRIC = 1, ///< Electric rails RAILTYPE_MONO = 2, ///< Monorail RAILTYPE_MAGLEV = 3, ///< Maglev - RAILTYPE_END = 16, ///< Used for iterations + RAILTYPE_END = 64, ///< Used for iterations INVALID_RAILTYPE = 0xFF, ///< Flag for invalid railtype DEF_RAILTYPE_FIRST = RAILTYPE_END, ///< Default railtype: first available @@ -43,19 +43,20 @@ enum RailType { /** Allow incrementing of Track variables */ DECLARE_POSTFIX_INCREMENT(RailType) /** Define basic enum properties */ -template <> struct EnumPropsT : MakeEnumPropsT {}; +template <> struct EnumPropsT : MakeEnumPropsT {}; typedef TinyEnumT RailTypeByte; /** - * The different roadtypes we support, but then a bitmask of them + * The different railtypes we support, but then a bitmask of them. + * @note Must be treated as a uint64 type, narrowing it causes bit membership tests to give wrong results, as in bug #6951. */ -enum RailTypes { +enum RailTypes : uint64 { RAILTYPES_NONE = 0, ///< No rail types RAILTYPES_RAIL = 1 << RAILTYPE_RAIL, ///< Non-electrified rails RAILTYPES_ELECTRIC = 1 << RAILTYPE_ELECTRIC, ///< Electrified rails RAILTYPES_MONO = 1 << RAILTYPE_MONO, ///< Monorail! RAILTYPES_MAGLEV = 1 << RAILTYPE_MAGLEV, ///< Ever fast maglev - INVALID_RAILTYPES = UINT_MAX, ///< Invalid railtypes + INVALID_RAILTYPES = UINT64_MAX, ///< Invalid railtypes }; DECLARE_ENUM_AS_BIT_SET(RailTypes) diff --git a/src/rev.cpp b/src/rev.cpp index e3f8a4bf98..ad1662cf37 100644 --- a/src/rev.cpp +++ b/src/rev.cpp @@ -1,4 +1,4 @@ -/* $Id: rev.cpp.in 27949 2017-12-24 12:09:20Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,20 +26,18 @@ bool IsReleasedVersion() /** * The text version of OpenTTD's revision. - * This will be either "..[-RC]", - * "r[M][-]" or "norev000". + * This will be either + * - "", like "..[-RC]", + * - "-g" in "master", + * - "--g" in other branches, or + * - "norev000", if the version is unknown. * * The major, minor and build are the numbers that describe releases of * OpenTTD (like 0.5.3). "-RC" is used to flag release candidates. * - * The revision number is fairly straight forward. The M is to show that - * the binary is made from modified source code. The branch shows the - * branch the revision is of and will not be there when it is trunk. - * - * norev000 is for non-releases that are made on systems without - * subversion or sources that are not a checkout of subversion. + * shows a "M", if the binary is made from modified source code. */ -const char _openttd_revision[] = "1.8.0"; +const char _openttd_revision[] = "1.9.0-beta2"; /** * The text version of OpenTTD's build date. @@ -49,6 +47,11 @@ const char _openttd_revision[] = "1.8.0"; */ const char _openttd_build_date[] = __DATE__ " " __TIME__; +/** + * The git revision hash of this version. + */ +const char _openttd_revision_hash[] = ""; + /** * Let us know if current build was modified. This detection * works even in the case when revision string is overridden by @@ -66,17 +69,17 @@ const byte _openttd_revision_modified = 0; * 24-27 minor version * 20-23 build * 19 1 if it is a release, 0 if it is not. - * 0-18 revision number; 0 for releases and when the revision is unknown. + * 0-18 used to be the SVN revision, now just last revision before switch to git * * The 19th bit is there so the development/betas/alpha, etc. leading to a * final release will always have a lower version number than the released * version, thus making comparisons on specific revisions easy. */ -const uint32 _openttd_newgrf_version = 1 << 28 | 8 << 24 | 0 << 20 | 1 << 19 | (28002 & ((1 << 19) - 1)); +const uint32 _openttd_newgrf_version = 1 << 28 | 9 << 24 | 0 << 20 | 0 << 19 | 28004; #ifdef __MORPHOS__ /** * Variable used by MorphOS to show the version. */ -extern const char morphos_versions_tag[] = "$VER: OpenTTD 1.8.0 (06.04.18) OpenTTD Team [MorphOS, PowerPC]"; +extern const char morphos_versions_tag[] = "$VER: OpenTTD --g (14.02.19) OpenTTD Team [MorphOS, PowerPC]"; #endif diff --git a/src/rev.cpp.in b/src/rev.cpp.in index 033a4862e4..2948645755 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -1,4 +1,4 @@ -/* $Id: rev.cpp.in 28002 2018-04-01 11:14:34Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,20 +26,18 @@ bool IsReleasedVersion() /** * The text version of OpenTTD's revision. - * This will be either "..[-RC]", - * "r[M][-]" or "norev000". + * This will be either + * - "", like "..[-RC]", + * - "-g" in "master", + * - "--g" in other branches, or + * - "norev000", if the version is unknown. * * The major, minor and build are the numbers that describe releases of * OpenTTD (like 0.5.3). "-RC" is used to flag release candidates. * - * The revision number is fairly straight forward. The M is to show that - * the binary is made from modified source code. The branch shows the - * branch the revision is of and will not be there when it is trunk. - * - * norev000 is for non-releases that are made on systems without - * subversion or sources that are not a checkout of subversion. + * shows a "M", if the binary is made from modified source code. */ -const char _openttd_revision[] = "1.5.0-beta2"; +const char _openttd_revision[] = "1.9.0-beta2"; /** * The text version of OpenTTD's build date. @@ -49,6 +47,11 @@ const char _openttd_revision[] = "1.5.0-beta2"; */ const char _openttd_build_date[] = __DATE__ " " __TIME__; +/** + * The git revision hash of this version. + */ +const char _openttd_revision_hash[] = "!!GITHASH!!"; + /** * Let us know if current build was modified. This detection * works even in the case when revision string is overridden by @@ -66,13 +69,13 @@ const byte _openttd_revision_modified = 0; * 24-27 minor version * 20-23 build * 19 1 if it is a release, 0 if it is not. - * 0-18 revision number; 0 for releases and when the revision is unknown. + * 0-18 used to be the SVN revision, now just last revision before switch to git * * The 19th bit is there so the development/betas/alpha, etc. leading to a * final release will always have a lower version number than the released * version, thus making comparisons on specific revisions easy. */ -const uint32 _openttd_newgrf_version = 1 << 28 | 8 << 24 | 0 << 20 | 1 << 19 | (!!REVISION!! & ((1 << 19) - 1)); +const uint32 _openttd_newgrf_version = 1 << 28 | 9 << 24 | 0 << 20 | 0 << 19 | 28004; #ifdef __MORPHOS__ /** diff --git a/src/rev.h b/src/rev.h index 54f433b340..55fc086992 100644 --- a/src/rev.h +++ b/src/rev.h @@ -1,4 +1,4 @@ -/* $Id: rev.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,7 @@ extern const char _openttd_revision[]; extern const char _openttd_build_date[]; +extern const char _openttd_revision_hash[]; extern const byte _openttd_revision_modified; extern const uint32 _openttd_newgrf_version; diff --git a/src/road.cpp b/src/road.cpp index 01cfc3ff90..f51597538d 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -1,4 +1,4 @@ -/* $Id: road.cpp 27424 2015-10-30 17:19:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 470bfef3b7..200e443982 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: road_cmd.cpp 27746 2017-02-12 12:03:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -333,7 +333,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec if (rt == ROADTYPE_ROAD && IsRoadOwner(tile, ROADTYPE_ROAD, OWNER_TOWN)) { /* Update nearest-town index */ const Town *town = CalcClosestTownFromTile(tile); - SetTownIndex(tile, town == NULL ? (TownID)INVALID_TOWN : town->index); + SetTownIndex(tile, town == NULL ? INVALID_TOWN : town->index); } SetRoadBits(tile, ROAD_NONE, rt); SetRoadTypes(tile, rts); @@ -494,7 +494,7 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if ((Company::IsValidID(company) && p2 != 0) || (company == OWNER_TOWN && !Town::IsValidID(p2)) || (company == OWNER_DEITY && p2 != 0)) return CMD_ERROR; if (company != OWNER_TOWN) { const Town *town = CalcClosestTownFromTile(tile); - p2 = (town != NULL) ? town->index : (TownID)INVALID_TOWN; + p2 = (town != NULL) ? town->index : INVALID_TOWN; if (company == OWNER_DEITY) { company = OWNER_TOWN; @@ -809,7 +809,9 @@ do_clear:; */ bool CanConnectToRoad(TileIndex tile, RoadType rt, DiagDirection dir) { - RoadBits bits = GetAnyRoadBits(tile + TileOffsByDiagDir(dir), rt, false); + tile += TileOffsByDiagDir(dir); + if (!IsValidTile(tile)) return false; + RoadBits bits = GetAnyRoadBits(tile, rt, false); return (bits & DiagDirToRoadBits(ReverseDiagDir(dir))) != 0; } @@ -1017,15 +1019,17 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui if (!IsValidRoadType(rt) || !ValParamRoadType(rt)) return CMD_ERROR; + CommandCost cost(EXPENSES_CONSTRUCTION); + Slope tileh = GetTileSlope(tile); - if (tileh != SLOPE_FLAT && ( - !_settings_game.construction.build_on_slopes || - !CanBuildDepotByTileh(dir, tileh) - )) { - return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); + if (tileh != SLOPE_FLAT) { + if (!_settings_game.construction.build_on_slopes || !CanBuildDepotByTileh(dir, tileh)) { + return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); + } + cost.AddCost(_price[PR_BUILD_FOUNDATION]); } - CommandCost cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); + cost.AddCost(DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR)); if (cost.Failed()) return cost; if (IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); @@ -1442,7 +1446,7 @@ void UpdateNearestTownForRoadTiles(bool invalidate) for (TileIndex t = 0; t < MapSize(); t++) { if (IsTileType(t, MP_ROAD) && !IsRoadDepot(t) && !HasTownOwnedRoad(t)) { - TownID tid = (TownID)INVALID_TOWN; + TownID tid = INVALID_TOWN; if (!invalidate) { const Town *town = CalcClosestTownFromTile(t); if (town != NULL) tid = town->index; diff --git a/src/road_cmd.h b/src/road_cmd.h index 079619d9ba..3cf588dcd6 100644 --- a/src/road_cmd.h +++ b/src/road_cmd.h @@ -1,4 +1,4 @@ -/* $Id: road_cmd.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/road_func.h b/src/road_func.h index be48e4b040..59e97c4d6b 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -1,4 +1,4 @@ -/* $Id: road_func.h 26105 2013-11-25 13:16:06Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -39,7 +39,7 @@ static inline bool IsValidRoadType(RoadType rt) /** * Whether the given roadtype is valid. - * @param rt the roadtype to check for validness + * @param r the roadtype to check for validness * @return true if and only if valid */ static inline bool IsValidRoadBits(RoadBits r) diff --git a/src/road_gui.cpp b/src/road_gui.cpp index b3da2706e0..0923afb261 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: road_gui.cpp 27734 2017-01-15 14:27:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -825,24 +825,28 @@ struct BuildRoadToolbarWindow : Window { break; case DDSP_BUILD_BUSSTOP: - PlaceRoadStop(start_tile, end_tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_BUS, CMD_BUILD_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_BUS])); + case DDSP_REMOVE_BUSSTOP: + if (this->IsWidgetLowered(WID_ROT_BUS_STATION)) { + if (_remove_button_clicked) { + TileArea ta(start_tile, end_tile); + DoCommandP(ta.tile, ta.w | ta.h << 8, (_ctrl_pressed << 1) | ROADSTOP_BUS, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_BUS]), CcPlaySound_SPLAT_OTHER); + } else { + PlaceRoadStop(start_tile, end_tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_BUS, CMD_BUILD_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_BUS])); + } + } break; case DDSP_BUILD_TRUCKSTOP: - PlaceRoadStop(start_tile, end_tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_TRUCK, CMD_BUILD_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_TRUCK])); + case DDSP_REMOVE_TRUCKSTOP: + if (this->IsWidgetLowered(WID_ROT_TRUCK_STATION)) { + if (_remove_button_clicked) { + TileArea ta(start_tile, end_tile); + DoCommandP(ta.tile, ta.w | ta.h << 8, (_ctrl_pressed << 1) | ROADSTOP_TRUCK, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_TRUCK]), CcPlaySound_SPLAT_OTHER); + } else { + PlaceRoadStop(start_tile, end_tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_TRUCK, CMD_BUILD_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_TRUCK])); + } + } break; - - case DDSP_REMOVE_BUSSTOP: { - TileArea ta(start_tile, end_tile); - DoCommandP(ta.tile, ta.w | ta.h << 8, (_ctrl_pressed << 1) | ROADSTOP_BUS, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_BUS]), CcPlaySound_SPLAT_OTHER); - break; - } - - case DDSP_REMOVE_TRUCKSTOP: { - TileArea ta(start_tile, end_tile); - DoCommandP(ta.tile, ta.w | ta.h << 8, (_ctrl_pressed << 1) | ROADSTOP_TRUCK, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_TRUCK]), CcPlaySound_SPLAT_OTHER); - break; - } } } } @@ -1284,7 +1288,7 @@ struct BuildRoadStationWindow : public PickerWindowBase { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } diff --git a/src/road_gui.h b/src/road_gui.h index 66acf81ea7..c56443c375 100644 --- a/src/road_gui.h +++ b/src/road_gui.h @@ -1,4 +1,4 @@ -/* $Id: road_gui.h 21887 2011-01-22 10:10:03Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/road_internal.h b/src/road_internal.h index 1966358cc0..8da909e94a 100644 --- a/src/road_internal.h +++ b/src/road_internal.h @@ -1,4 +1,4 @@ -/* $Id: road_internal.h 27676 2016-11-05 11:53:03Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/road_map.cpp b/src/road_map.cpp index dab79edebf..4984117bab 100644 --- a/src/road_map.cpp +++ b/src/road_map.cpp @@ -1,4 +1,4 @@ -/* $Id: road_map.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/road_map.h b/src/road_map.h index b0a57e38e2..49526d37f2 100644 --- a/src/road_map.h +++ b/src/road_map.h @@ -1,4 +1,4 @@ -/* $Id: road_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -449,6 +449,7 @@ enum Roadside { ROADSIDE_GRASS = 1, ///< Road on grass ROADSIDE_PAVED = 2, ///< Road with paved sidewalks ROADSIDE_STREET_LIGHTS = 3, ///< Road with street lights on paved sidewalks + // 4 is unused for historical reasons ROADSIDE_TREES = 5, ///< Road with trees on paved sidewalks ROADSIDE_GRASS_ROAD_WORKS = 6, ///< Road on grass with road works ROADSIDE_PAVED_ROAD_WORKS = 7, ///< Road with sidewalks and road works @@ -579,11 +580,12 @@ static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner r SetTileType(t, MP_ROAD); SetTileOwner(t, rail); _m[t].m2 = town; - _m[t].m3 = rat; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = ROAD_TILE_CROSSING << 6 | roaddir; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = rot << 6 | road; + _me[t].m8 = rat; SetRoadOwner(t, ROADTYPE_TRAM, tram); } diff --git a/src/road_type.h b/src/road_type.h index f8ddfb6a65..5251a53923 100644 --- a/src/road_type.h +++ b/src/road_type.h @@ -1,4 +1,4 @@ -/* $Id: road_type.h 23595 2011-12-19 17:48:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/roadstop.cpp b/src/roadstop.cpp index 4da0b3dab6..ca049979ca 100644 --- a/src/roadstop.cpp +++ b/src/roadstop.cpp @@ -1,4 +1,4 @@ -/* $Id: roadstop.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/roadstop_base.h b/src/roadstop_base.h index 40bb385de7..ee470db8d1 100644 --- a/src/roadstop_base.h +++ b/src/roadstop_base.h @@ -1,4 +1,4 @@ -/* $Id: roadstop_base.h 23704 2012-01-01 17:22:32Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/roadveh.h b/src/roadveh.h index 447922e6cc..ca069b7acf 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -1,4 +1,4 @@ -/* $Id: roadveh.h 27666 2016-10-16 14:57:56Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -105,7 +105,7 @@ struct RoadVehicle FINAL : public GroundVehicle { friend struct GroundVehicle; // GroundVehicle needs to use the acceleration functions defined at RoadVehicle. void MarkDirty(); - void UpdateDeltaXY(Direction direction); + void UpdateDeltaXY(); ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_ROADVEH_INC : EXPENSES_ROADVEH_RUN; } bool IsPrimaryVehicle() const { return this->IsFrontEngine(); } void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const; diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 9de4347d52..9704770016 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: roadveh_cmd.cpp 27814 2017-03-20 18:16:23Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -35,6 +35,7 @@ #include "core/backup_type.hpp" #include "newgrf.h" #include "zoom_func.h" +#include "framerate_type.h" #include "table/strings.h" @@ -254,7 +255,7 @@ void RoadVehUpdateCache(RoadVehicle *v, bool same_length) * @param flags type of operation. * @param e the engine to build. * @param data unused. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) @@ -403,7 +404,7 @@ void RoadVehicle::MarkDirty() this->CargoChanged(); } -void RoadVehicle::UpdateDeltaXY(Direction direction) +void RoadVehicle::UpdateDeltaXY() { static const int8 _delta_xy_table[8][10] = { /* y_extent, x_extent, y_offs, x_offs, y_bb_offs, x_bb_offs, y_extent_shorten, x_extent_shorten, y_bb_offs_shorten, x_bb_offs_shorten */ @@ -418,9 +419,9 @@ void RoadVehicle::UpdateDeltaXY(Direction direction) }; int shorten = VEHICLE_LENGTH - this->gcache.cached_veh_length; - if (!IsDiagonalDirection(direction)) shorten >>= 1; + if (!IsDiagonalDirection(this->direction)) shorten >>= 1; - const int8 *bb = _delta_xy_table[direction]; + const int8 *bb = _delta_xy_table[this->direction]; this->x_bb_offs = bb[5] + bb[9] * shorten; this->y_bb_offs = bb[4] + bb[8] * shorten;; this->x_offs = bb[3]; @@ -957,7 +958,7 @@ static Trackdir RoadFindPathToDest(RoadVehicle *v, TileIndex tile, DiagDirection } switch (_settings_game.pf.pathfinder_for_roadvehs) { - case VPF_NPF: best_track = NPFRoadVehicleChooseTrack(v, tile, enterdir, trackdirs, path_found); break; + case VPF_NPF: best_track = NPFRoadVehicleChooseTrack(v, tile, enterdir, path_found); break; case VPF_YAPF: best_track = YapfRoadVehicleChooseTrack(v, tile, enterdir, trackdirs, path_found); break; default: NOT_REACHED(); @@ -1449,7 +1450,7 @@ again: /* Vehicle has arrived at a bay in a road stop */ if (IsDriveThroughStopTile(v->tile)) { - TileIndex next_tile = TILE_ADD(v->tile, TileOffsByDir(v->direction)); + TileIndex next_tile = TileAddByDir(v->tile, v->direction); /* Check if next inline bay is free and has compatible road. */ if (RoadStop::IsDriveThroughRoadStopContinuation(v->tile, next_tile) && (GetRoadTypes(next_tile) & v->compatible_roadtypes) != 0) { @@ -1587,6 +1588,8 @@ Money RoadVehicle::GetRunningCost() const bool RoadVehicle::Tick() { + PerformanceAccumulator framerate(PFE_GL_ROADVEHS); + this->tick_counter++; if (this->IsFrontEngine()) { @@ -1636,7 +1639,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) SetBit(v->gv_flags, GVF_SUPPRESS_IMPLICIT_ORDERS); v->current_order.MakeGoToDepot(depot, ODTFB_SERVICE); - v->dest_tile = rfdd.tile; + v->SetDestTile(rfdd.tile); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index 571875759c..63e0549582 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: roadveh_gui.cpp 27689 2016-12-10 14:33:58Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/safeguards.h b/src/safeguards.h index 04228d25a4..f447627e68 100644 --- a/src/safeguards.h +++ b/src/safeguards.h @@ -1,4 +1,4 @@ -/* $Id: safeguards.h 26651 2014-06-17 19:01:45Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 4c7a7a6b53..634c025f07 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1,4 +1,4 @@ -/* $Id: afterload.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -55,6 +55,7 @@ #include "../order_backup.h" #include "../error.h" #include "../disaster_vehicle.h" +#include "../ship.h" #include "../story_base.h" #include "../game/game_text.hpp" @@ -206,10 +207,8 @@ static void UpdateCurrencies() */ static void UpdateVoidTiles() { - uint i; - - for (i = 0; i < MapMaxY(); ++i) MakeVoid(i * MapSizeX() + MapMaxX()); - for (i = 0; i < MapSizeX(); ++i) MakeVoid(MapSizeX() * MapMaxY() + i); + for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, MapMaxY())); + for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(MapMaxX(), y)); } static inline RailType UpdateRailType(RailType rt, RailType min) @@ -579,14 +578,14 @@ bool AfterLoadGame() /* The LFSR used in RunTileLoop iteration cannot have a zeroed state, make it non-zeroed. */ if (_cur_tileloop_tile == 0) _cur_tileloop_tile = 1; - if (IsSavegameVersionBefore(98)) GamelogOldver(); + if (IsSavegameVersionBefore(SLV_98)) GamelogOldver(); GamelogTestRevision(); GamelogTestMode(); - if (IsSavegameVersionBefore(98)) GamelogGRFAddList(_grfconfig); + if (IsSavegameVersionBefore(SLV_98)) GamelogGRFAddList(_grfconfig); - if (IsSavegameVersionBefore(119)) { + if (IsSavegameVersionBefore(SLV_119)) { _pause_mode = (_pause_mode == 2) ? PM_PAUSED_NORMAL : PM_UNPAUSED; } else if (_network_dedicated && (_pause_mode & PM_PAUSED_ERROR) != 0) { DEBUG(net, 0, "The loading savegame was paused due to an error state."); @@ -611,7 +610,7 @@ bool AfterLoadGame() * Because the data stored by TTDPatch are unusable for rail stations > 7x7, * recompute the width and height. Doing this unconditionally for all old * savegames simplifies the code. */ - if (IsSavegameVersionBefore(2)) { + if (IsSavegameVersionBefore(SLV_2)) { Station *st; FOR_ALL_STATIONS(st) { st->train_station.w = st->train_station.h = 0; @@ -629,7 +628,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(194)) { + if (IsSavegameVersionBefore(SLV_194)) { _settings_game.construction.max_heightlevel = 15; /* In old savegame versions, the heightlevel was coded in bits 0..3 of the type field */ @@ -647,19 +646,19 @@ bool AfterLoadGame() } /* in version 2.1 of the savegame, town owner was unified. */ - if (IsSavegameVersionBefore(2, 1)) ConvertTownOwner(); + if (IsSavegameVersionBefore(SLV_2, 1)) ConvertTownOwner(); /* from version 4.1 of the savegame, exclusive rights are stored at towns */ - if (IsSavegameVersionBefore(4, 1)) UpdateExclusiveRights(); + if (IsSavegameVersionBefore(SLV_4, 1)) UpdateExclusiveRights(); /* from version 4.2 of the savegame, currencies are in a different order */ - if (IsSavegameVersionBefore(4, 2)) UpdateCurrencies(); + if (IsSavegameVersionBefore(SLV_4, 2)) UpdateCurrencies(); /* In old version there seems to be a problem that water is owned by * OWNER_NONE, not OWNER_WATER.. I can't replicate it for the current * (4.3) version, so I just check when versions are older, and then * walk through the whole map.. */ - if (IsSavegameVersionBefore(4, 3)) { + if (IsSavegameVersionBefore(SLV_4, 3)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_WATER) && GetTileOwner(t) >= MAX_COMPANIES) { SetTileOwner(t, OWNER_WATER); @@ -667,7 +666,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(84)) { + if (IsSavegameVersionBefore(SLV_84)) { Company *c; FOR_ALL_COMPANIES(c) { c->name = CopyFromOldName(c->name_1); @@ -693,7 +692,7 @@ bool AfterLoadGame() /* From this point the old names array is cleared. */ ResetOldNames(); - if (IsSavegameVersionBefore(106)) { + if (IsSavegameVersionBefore(SLV_106)) { /* no station is determined by 'tile == INVALID_TILE' now (instead of '0') */ Station *st; FOR_ALL_STATIONS(st) { @@ -705,7 +704,7 @@ bool AfterLoadGame() /* the same applies to Company::location_of_HQ */ Company *c; FOR_ALL_COMPANIES(c) { - if (c->location_of_HQ == 0 || (IsSavegameVersionBefore(4) && c->location_of_HQ == 0xFFFF)) { + if (c->location_of_HQ == 0 || (IsSavegameVersionBefore(SLV_4) && c->location_of_HQ == 0xFFFF)) { c->location_of_HQ = INVALID_TILE; } } @@ -738,7 +737,7 @@ bool AfterLoadGame() } /* The value of _date_fract got divided, so make sure that old games are converted correctly. */ - if (IsSavegameVersionBefore(11, 1) || (IsSavegameVersionBefore(147) && _date_fract > DAY_TICKS)) _date_fract /= 885; + if (IsSavegameVersionBefore(SLV_11, 1) || (IsSavegameVersionBefore(SLV_147) && _date_fract > DAY_TICKS)) _date_fract /= 885; /* Update current year * must be done before loading sprites as some newgrfs check it */ @@ -757,29 +756,29 @@ bool AfterLoadGame() * right value has been chosen in the settings. Otherwise we will be converting * it incorrectly in half of the times without a means to correct that. */ - if (IsSavegameVersionBefore(4, 2)) _settings_game.station.modified_catchment = false; - if (IsSavegameVersionBefore(6, 1)) _settings_game.pf.forbid_90_deg = false; - if (IsSavegameVersionBefore(21)) _settings_game.vehicle.train_acceleration_model = 0; - if (IsSavegameVersionBefore(90)) _settings_game.vehicle.plane_speed = 4; - if (IsSavegameVersionBefore(95)) _settings_game.vehicle.dynamic_engines = 0; - if (IsSavegameVersionBefore(96)) _settings_game.economy.station_noise_level = false; - if (IsSavegameVersionBefore(133)) { + if (IsSavegameVersionBefore(SLV_4, 2)) _settings_game.station.modified_catchment = false; + if (IsSavegameVersionBefore(SLV_6, 1)) _settings_game.pf.forbid_90_deg = false; + if (IsSavegameVersionBefore(SLV_21)) _settings_game.vehicle.train_acceleration_model = 0; + if (IsSavegameVersionBefore(SLV_90)) _settings_game.vehicle.plane_speed = 4; + if (IsSavegameVersionBefore(SLV_95)) _settings_game.vehicle.dynamic_engines = 0; + if (IsSavegameVersionBefore(SLV_96)) _settings_game.economy.station_noise_level = false; + if (IsSavegameVersionBefore(SLV_133)) { _settings_game.vehicle.train_slope_steepness = 3; } - if (IsSavegameVersionBefore(134)) _settings_game.economy.feeder_payment_share = 75; - if (IsSavegameVersionBefore(138)) _settings_game.vehicle.plane_crashes = 2; - if (IsSavegameVersionBefore(139)) { + if (IsSavegameVersionBefore(SLV_134)) _settings_game.economy.feeder_payment_share = 75; + if (IsSavegameVersionBefore(SLV_138)) _settings_game.vehicle.plane_crashes = 2; + if (IsSavegameVersionBefore(SLV_139)) { _settings_game.vehicle.roadveh_acceleration_model = 0; _settings_game.vehicle.roadveh_slope_steepness = 7; } - if (IsSavegameVersionBefore(143)) _settings_game.economy.allow_town_level_crossings = true; - if (IsSavegameVersionBefore(159)) { + if (IsSavegameVersionBefore(SLV_143)) _settings_game.economy.allow_town_level_crossings = true; + if (IsSavegameVersionBefore(SLV_159)) { _settings_game.vehicle.max_train_length = 50; _settings_game.construction.max_bridge_length = 64; _settings_game.construction.max_tunnel_length = 64; } - if (IsSavegameVersionBefore(166)) _settings_game.economy.infrastructure_maintenance = false; - if (IsSavegameVersionBefore(183)) { + if (IsSavegameVersionBefore(SLV_166)) _settings_game.economy.infrastructure_maintenance = false; + if (IsSavegameVersionBefore(SLV_183)) { _settings_game.linkgraph.distribution_pax = DT_MANUAL; _settings_game.linkgraph.distribution_mail = DT_MANUAL; _settings_game.linkgraph.distribution_armoured = DT_MANUAL; @@ -795,7 +794,7 @@ bool AfterLoadGame() /* Connect front and rear engines of multiheaded trains and converts * subtype to the new format */ - if (IsSavegameVersionBefore(17, 1)) ConvertOldMultiheadToNew(); + if (IsSavegameVersionBefore(SLV_17, 1)) ConvertOldMultiheadToNew(); /* Connect front and rear engines of multiheaded trains */ ConnectMultiheadedTrains(); @@ -811,7 +810,7 @@ bool AfterLoadGame() /* Oilrig was moved from id 15 to 9. We have to do this conversion * here as AfterLoadVehicles can check it indirectly via the newgrf * code. */ - if (IsSavegameVersionBefore(139)) { + if (IsSavegameVersionBefore(SLV_139)) { Station *st; FOR_ALL_STATIONS(st) { if (st->airport.tile != INVALID_TILE && st->airport.type == 15) { @@ -843,7 +842,7 @@ bool AfterLoadGame() * This problem appears in savegame version 21 too, see r3455. But after loading the * savegame and saving again, the buggy map array could be converted to new savegame * version. It didn't show up before r12070. */ - if (IsSavegameVersionBefore(87)) UpdateVoidTiles(); + if (IsSavegameVersionBefore(SLV_87)) UpdateVoidTiles(); /* If Load Scenario / New (Scenario) Game is used, * a company does not exist yet. So create one here. @@ -862,7 +861,7 @@ bool AfterLoadGame() cp->current_station = cp->front->last_station_visited; } - if (IsSavegameVersionBefore(72)) { + if (IsSavegameVersionBefore(SLV_72)) { /* Locks in very old savegames had OWNER_WATER as owner */ for (TileIndex t = 0; t < MapSize(); t++) { switch (GetTileType(t)) { @@ -933,7 +932,7 @@ bool AfterLoadGame() switch (GetStationType(t)) { case STATION_TRUCK: case STATION_BUS: - if (IsSavegameVersionBefore(6)) { + if (IsSavegameVersionBefore(SLV_6)) { /* Before version 5 you could not have more than 250 stations. * Version 6 adds large maps, so you could only place 253*253 * road stops on a map (no freeform edges) = 64009. So, yes @@ -983,12 +982,12 @@ bool AfterLoadGame() /* In version 2.2 of the savegame, we have new airports, so status of all aircraft is reset. * This has to be called after the oilrig airport_type update above ^^^ ! */ - if (IsSavegameVersionBefore(2, 2)) UpdateOldAircraft(); + if (IsSavegameVersionBefore(SLV_2, 2)) UpdateOldAircraft(); /* In version 6.1 we put the town index in the map-array. To do this, we need * to use m2 (16bit big), so we need to clean m2, and that is where this is * all about ;) */ - if (IsSavegameVersionBefore(6, 1)) { + if (IsSavegameVersionBefore(SLV_6, 1)) { for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_HOUSE: @@ -1011,20 +1010,20 @@ bool AfterLoadGame() } /* Force the freeform edges to false for old savegames. */ - if (IsSavegameVersionBefore(111)) { + if (IsSavegameVersionBefore(SLV_111)) { _settings_game.construction.freeform_edges = false; } /* From version 9.0, we update the max passengers of a town (was sometimes negative * before that. */ - if (IsSavegameVersionBefore(9)) { + if (IsSavegameVersionBefore(SLV_9)) { Town *t; FOR_ALL_TOWNS(t) UpdateTownMaxPass(t); } /* From version 16.0, we included autorenew on engines, which are now saved, but * of course, we do need to initialize them for older savegames. */ - if (IsSavegameVersionBefore(16)) { + if (IsSavegameVersionBefore(SLV_16)) { Company *c; FOR_ALL_COMPANIES(c) { c->engine_renew_list = NULL; @@ -1045,7 +1044,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(48)) { + if (IsSavegameVersionBefore(SLV_48)) { for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_RAILWAY: @@ -1073,9 +1072,9 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(61)) { + if (IsSavegameVersionBefore(SLV_61)) { /* Added the RoadType */ - bool old_bridge = IsSavegameVersionBefore(42); + bool old_bridge = IsSavegameVersionBefore(SLV_42); for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_ROAD: @@ -1112,9 +1111,9 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(114)) { - bool fix_roadtypes = !IsSavegameVersionBefore(61); - bool old_bridge = IsSavegameVersionBefore(42); + if (IsSavegameVersionBefore(SLV_114)) { + bool fix_roadtypes = !IsSavegameVersionBefore(SLV_61); + bool old_bridge = IsSavegameVersionBefore(SLV_42); for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { @@ -1179,7 +1178,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(42)) { + if (IsSavegameVersionBefore(SLV_42)) { Vehicle *v; for (TileIndex t = 0; t < map_size; t++) { @@ -1260,8 +1259,40 @@ bool AfterLoadGame() } } + /* Railtype moved from m3 to m8 in version SLV_EXTEND_RAILTYPES. */ + if (IsSavegameVersionBefore(SLV_EXTEND_RAILTYPES)) { + for (TileIndex t = 0; t < map_size; t++) { + switch (GetTileType(t)) { + case MP_RAILWAY: + SetRailType(t, (RailType)GB(_m[t].m3, 0, 4)); + break; + + case MP_ROAD: + if (IsLevelCrossing(t)) { + SetRailType(t, (RailType)GB(_m[t].m3, 0, 4)); + } + break; + + case MP_STATION: + if (HasStationRail(t)) { + SetRailType(t, (RailType)GB(_m[t].m3, 0, 4)); + } + break; + + case MP_TUNNELBRIDGE: + if (GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL) { + SetRailType(t, (RailType)GB(_m[t].m3, 0, 4)); + } + break; + + default: + break; + } + } + } + /* Elrails got added in rev 24 */ - if (IsSavegameVersionBefore(24)) { + if (IsSavegameVersionBefore(SLV_24)) { RailType min_rail = RAILTYPE_ELECTRIC; Train *v; @@ -1311,12 +1342,12 @@ bool AfterLoadGame() /* In version 16.1 of the savegame a company can decide if trains, which get * replaced, shall keep their old length. In all prior versions, just default * to false */ - if (IsSavegameVersionBefore(16, 1)) { + if (IsSavegameVersionBefore(SLV_16, 1)) { Company *c; FOR_ALL_COMPANIES(c) c->settings.renew_keep_length = false; } - if (IsSavegameVersionBefore(123)) { + if (IsSavegameVersionBefore(SLV_123)) { /* Waypoints became subclasses of stations ... */ MoveWaypointsToBaseStations(); /* ... and buoys were moved to waypoints. */ @@ -1325,7 +1356,7 @@ bool AfterLoadGame() /* From version 15, we moved a semaphore bit from bit 2 to bit 3 in m4, making * room for PBS. Now in version 21 move it back :P. */ - if (IsSavegameVersionBefore(21) && !IsSavegameVersionBefore(15)) { + if (IsSavegameVersionBefore(SLV_21) && !IsSavegameVersionBefore(SLV_15)) { for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_RAILWAY: @@ -1359,14 +1390,14 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(25)) { + if (IsSavegameVersionBefore(SLV_25)) { RoadVehicle *rv; FOR_ALL_ROADVEHICLES(rv) { rv->vehstatus &= ~0x40; } } - if (IsSavegameVersionBefore(26)) { + if (IsSavegameVersionBefore(SLV_26)) { Station *st; FOR_ALL_STATIONS(st) { st->last_vehicle_type = VEH_INVALID; @@ -1375,7 +1406,7 @@ bool AfterLoadGame() YapfNotifyTrackLayoutChange(INVALID_TILE, INVALID_TRACK); - if (IsSavegameVersionBefore(34)) { + if (IsSavegameVersionBefore(SLV_34)) { Company *c; FOR_ALL_COMPANIES(c) ResetCompanyLivery(c); } @@ -1386,11 +1417,11 @@ bool AfterLoadGame() c->avail_roadtypes = GetCompanyRoadtypes(c->index); } - if (!IsSavegameVersionBefore(27)) AfterLoadStations(); + if (!IsSavegameVersionBefore(SLV_27)) AfterLoadStations(); /* Time starts at 0 instead of 1920. * Account for this in older games by adding an offset */ - if (IsSavegameVersionBefore(31)) { + if (IsSavegameVersionBefore(SLV_31)) { Station *st; Waypoint *wp; Engine *e; @@ -1415,7 +1446,7 @@ bool AfterLoadGame() /* From 32 on we save the industry who made the farmland. * To give this prettiness to old savegames, we remove all farmfields and * plant new ones. */ - if (IsSavegameVersionBefore(32)) { + if (IsSavegameVersionBefore(SLV_32)) { Industry *i; for (TileIndex t = 0; t < map_size; t++) { @@ -1435,7 +1466,7 @@ bool AfterLoadGame() } /* Setting no refit flags to all orders in savegames from before refit in orders were added */ - if (IsSavegameVersionBefore(36)) { + if (IsSavegameVersionBefore(SLV_36)) { Order *order; Vehicle *v; @@ -1450,14 +1481,14 @@ bool AfterLoadGame() /* from version 38 we have optional elrails, since we cannot know the * preference of a user, let elrails enabled; it can be disabled manually */ - if (IsSavegameVersionBefore(38)) _settings_game.vehicle.disable_elrails = false; + if (IsSavegameVersionBefore(SLV_38)) _settings_game.vehicle.disable_elrails = false; /* do the same as when elrails were enabled/disabled manually just now */ SettingsDisableElrail(_settings_game.vehicle.disable_elrails); InitializeRailGUI(); /* From version 53, the map array was changed for house tiles to allow * space for newhouses grf features. A new byte, m7, was also added. */ - if (IsSavegameVersionBefore(53)) { + if (IsSavegameVersionBefore(SLV_53)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_HOUSE)) { if (GB(_m[t].m3, 6, 2) != TOWN_HOUSE_COMPLETED) { @@ -1494,7 +1525,7 @@ bool AfterLoadGame() /* Check and update house and town values */ UpdateHousesAndTowns(); - if (IsSavegameVersionBefore(43)) { + if (IsSavegameVersionBefore(SLV_43)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_INDUSTRY)) { switch (GetIndustryGfx(t)) { @@ -1521,7 +1552,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(45)) { + if (IsSavegameVersionBefore(SLV_45)) { Vehicle *v; /* Originally just the fact that some cargo had been paid for was * stored to stop people cheating and cashing in several times. This @@ -1535,14 +1566,14 @@ bool AfterLoadGame() /* Buoys do now store the owner of the previous water tile, which can never * be OWNER_NONE. So replace OWNER_NONE with OWNER_WATER. */ - if (IsSavegameVersionBefore(46)) { + if (IsSavegameVersionBefore(SLV_46)) { Waypoint *wp; FOR_ALL_WAYPOINTS(wp) { if ((wp->facilities & FACIL_DOCK) != 0 && IsTileOwner(wp->xy, OWNER_NONE) && TileHeight(wp->xy) == 0) SetTileOwner(wp->xy, OWNER_WATER); } } - if (IsSavegameVersionBefore(50)) { + if (IsSavegameVersionBefore(SLV_50)) { Aircraft *v; /* Aircraft units changed from 8 mph to 1 km-ish/h */ FOR_ALL_AIRCRAFT(v) { @@ -1555,9 +1586,9 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(49)) FOR_ALL_COMPANIES(c) c->face = ConvertFromOldCompanyManagerFace(c->face); + if (IsSavegameVersionBefore(SLV_49)) FOR_ALL_COMPANIES(c) c->face = ConvertFromOldCompanyManagerFace(c->face); - if (IsSavegameVersionBefore(52)) { + if (IsSavegameVersionBefore(SLV_52)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_OBJECT) && _m[t].m5 == OBJECT_STATUE) { _m[t].m2 = CalcClosestTownFromTile(t)->index; @@ -1568,7 +1599,7 @@ bool AfterLoadGame() /* A setting containing the proportion of towns that grow twice as * fast was added in version 54. From version 56 this is now saved in the * town as cities can be built specifically in the scenario editor. */ - if (IsSavegameVersionBefore(56)) { + if (IsSavegameVersionBefore(SLV_56)) { Town *t; FOR_ALL_TOWNS(t) { @@ -1578,7 +1609,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(57)) { + if (IsSavegameVersionBefore(SLV_57)) { Vehicle *v; /* Added a FIFO queue of vehicles loading at stations */ FOR_ALL_VEHICLES(v) { @@ -1592,7 +1623,7 @@ bool AfterLoadGame() ClrBit(v->vehicle_flags, VF_LOADING_FINISHED); } } - } else if (IsSavegameVersionBefore(59)) { + } else if (IsSavegameVersionBefore(SLV_59)) { /* For some reason non-loading vehicles could be in the station's loading vehicle list */ Station *st; @@ -1606,7 +1637,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(58)) { + if (IsSavegameVersionBefore(SLV_58)) { /* Setting difficulty industry_density other than zero get bumped to +1 * since a new option (very low at position 1) has been added */ if (_settings_game.difficulty.industry_density > 0) { @@ -1617,7 +1648,7 @@ bool AfterLoadGame() _settings_game.difficulty.number_towns++; } - if (IsSavegameVersionBefore(64)) { + if (IsSavegameVersionBefore(SLV_64)) { /* Since now we allow different signal types and variants on a single tile. * Move signal states to m4 to make room and clone the signal type/variant. */ for (TileIndex t = 0; t < map_size; t++) { @@ -1631,7 +1662,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(69)) { + if (IsSavegameVersionBefore(SLV_69)) { /* In some old savegames a bit was cleared when it should not be cleared */ RoadVehicle *rv; FOR_ALL_ROADVEHICLES(rv) { @@ -1641,7 +1672,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(70)) { + if (IsSavegameVersionBefore(SLV_70)) { /* Added variables to support newindustries */ Industry *i; FOR_ALL_INDUSTRIES(i) i->founder = OWNER_NONE; @@ -1649,7 +1680,7 @@ bool AfterLoadGame() /* From version 82, old style canals (above sealevel (0), WATER owner) are no longer supported. Replace the owner for those by OWNER_NONE. */ - if (IsSavegameVersionBefore(82)) { + if (IsSavegameVersionBefore(SLV_82)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_WATER) && GetWaterTileType(t) == WATER_TILE_CLEAR && @@ -1666,7 +1697,7 @@ bool AfterLoadGame() * someone can remove canals owned by somebody else and it prevents * making floods using the removal of ship depots. */ - if (IsSavegameVersionBefore(83)) { + if (IsSavegameVersionBefore(SLV_83)) { for (TileIndex t = 0; t < map_size; t++) { if (IsShipDepotTile(t)) { _m[t].m4 = (TileHeight(t) == 0) ? OWNER_WATER : OWNER_NONE; @@ -1674,7 +1705,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(74)) { + if (IsSavegameVersionBefore(SLV_74)) { Station *st; FOR_ALL_STATIONS(st) { for (CargoID c = 0; c < NUM_CARGO; c++) { @@ -1684,7 +1715,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(78)) { + if (IsSavegameVersionBefore(SLV_78)) { Industry *i; uint j; FOR_ALL_INDUSTRIES(i) { @@ -1702,7 +1733,7 @@ bool AfterLoadGame() * grassy trees were always drawn fully grassy. Furthermore, trees on rough * land used to have zero density, now they have full density. Therefore, * make all grassy/rough land trees have a density of 3. */ - if (IsSavegameVersionBefore(81)) { + if (IsSavegameVersionBefore(SLV_81)) { for (TileIndex t = 0; t < map_size; t++) { if (GetTileType(t) == MP_TREES) { TreeGround groundType = (TreeGround)GB(_m[t].m2, 4, 2); @@ -1712,7 +1743,7 @@ bool AfterLoadGame() } - if (IsSavegameVersionBefore(93)) { + if (IsSavegameVersionBefore(SLV_93)) { /* Rework of orders. */ Order *order; FOR_ALL_ORDERS(order) order->ConvertFromOldSavegame(); @@ -1729,7 +1760,7 @@ bool AfterLoadGame() FOR_VEHICLE_ORDERS(v, order) order->SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS); } } - } else if (IsSavegameVersionBefore(94)) { + } else if (IsSavegameVersionBefore(SLV_94)) { /* Unload and transfer are now mutual exclusive. */ Order *order; FOR_ALL_ORDERS(order) { @@ -1748,7 +1779,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(84)) { + if (IsSavegameVersionBefore(SLV_84)) { /* Set all share owners to INVALID_COMPANY for * 1) all inactive companies * (when inactive companies were stored in the savegame - TTD, TTDP and some @@ -1765,7 +1796,7 @@ bool AfterLoadGame() } /* The water class was moved/unified. */ - if (IsSavegameVersionBefore(146)) { + if (IsSavegameVersionBefore(SLV_146)) { for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_STATION: @@ -1799,7 +1830,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(86)) { + if (IsSavegameVersionBefore(SLV_86)) { for (TileIndex t = 0; t < map_size; t++) { /* Move river flag and update canals to use water class */ if (IsTileType(t, MP_WATER)) { @@ -1830,7 +1861,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(87)) { + if (IsSavegameVersionBefore(SLV_87)) { for (TileIndex t = 0; t < map_size; t++) { /* skip oil rigs at borders! */ if ((IsTileType(t, MP_WATER) || IsBuoyTile(t)) && @@ -1868,13 +1899,13 @@ bool AfterLoadGame() } /* Convert old PF settings to new */ - if (_settings_game.pf.yapf.rail_use_yapf || IsSavegameVersionBefore(28)) { + if (_settings_game.pf.yapf.rail_use_yapf || IsSavegameVersionBefore(SLV_28)) { _settings_game.pf.pathfinder_for_trains = VPF_YAPF; } else { _settings_game.pf.pathfinder_for_trains = VPF_NPF; } - if (_settings_game.pf.yapf.road_use_yapf || IsSavegameVersionBefore(28)) { + if (_settings_game.pf.yapf.road_use_yapf || IsSavegameVersionBefore(SLV_28)) { _settings_game.pf.pathfinder_for_roadvehs = VPF_YAPF; } else { _settings_game.pf.pathfinder_for_roadvehs = VPF_NPF; @@ -1887,7 +1918,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(88)) { + if (IsSavegameVersionBefore(SLV_88)) { /* Profits are now with 8 bit fract */ Vehicle *v; FOR_ALL_VEHICLES(v) { @@ -1897,7 +1928,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(91)) { + if (IsSavegameVersionBefore(SLV_91)) { /* Increase HouseAnimationFrame from 5 to 7 bits */ for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_HOUSE) && GetHouseType(t) >= NEW_HOUSE_OFFSET) { @@ -1907,7 +1938,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(62)) { + if (IsSavegameVersionBefore(SLV_62)) { /* Remove all trams from savegames without tram support. * There would be trams without tram track under causing crashes sooner or later. */ RoadVehicle *v; @@ -1919,7 +1950,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(99)) { + if (IsSavegameVersionBefore(SLV_99)) { for (TileIndex t = 0; t < map_size; t++) { /* Set newly introduced WaterClass of industry tiles */ if (IsTileType(t, MP_STATION) && IsOilRig(t)) { @@ -1943,7 +1974,7 @@ bool AfterLoadGame() /* Move the signal variant back up one bit for PBS. We don't convert the old PBS * format here, as an old layout wouldn't work properly anyway. To be safe, we * clear any possible PBS reservations as well. */ - if (IsSavegameVersionBefore(100)) { + if (IsSavegameVersionBefore(SLV_100)) { for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_RAILWAY: @@ -1981,21 +2012,21 @@ bool AfterLoadGame() } /* Reserve all tracks trains are currently on. */ - if (IsSavegameVersionBefore(101)) { + if (IsSavegameVersionBefore(SLV_101)) { const Train *t; FOR_ALL_TRAINS(t) { if (t->First() == t) t->ReserveTrackUnderConsist(); } } - if (IsSavegameVersionBefore(102)) { + if (IsSavegameVersionBefore(SLV_102)) { for (TileIndex t = 0; t < map_size; t++) { /* Now all crossings should be in correct state */ if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false); } } - if (IsSavegameVersionBefore(103)) { + if (IsSavegameVersionBefore(SLV_103)) { /* Non-town-owned roads now store the closest town */ UpdateNearestTownForRoadTiles(false); @@ -2013,7 +2044,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(104)) { + if (IsSavegameVersionBefore(SLV_104)) { Aircraft *a; FOR_ALL_AIRCRAFT(a) { /* Set engine_type of shadow and rotor */ @@ -2040,7 +2071,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(112)) { + if (IsSavegameVersionBefore(SLV_112)) { for (TileIndex t = 0; t < map_size; t++) { /* Check for HQ bit being set, instead of using map accessor, * since we've already changed it code-wise */ @@ -2052,7 +2083,7 @@ bool AfterLoadGame() } } } - if (IsSavegameVersionBefore(144)) { + if (IsSavegameVersionBefore(SLV_144)) { for (TileIndex t = 0; t < map_size; t++) { if (!IsTileType(t, MP_OBJECT)) continue; @@ -2067,7 +2098,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(147) && Object::GetNumItems() == 0) { + if (IsSavegameVersionBefore(SLV_147) && Object::GetNumItems() == 0) { /* Make real objects for object tiles. */ for (TileIndex t = 0; t < map_size; t++) { if (!IsTileType(t, MP_OBJECT)) continue; @@ -2111,7 +2142,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(113)) { + if (IsSavegameVersionBefore(SLV_113)) { /* allow_town_roads is added, set it if town_layout wasn't TL_NO_ROADS */ if (_settings_game.economy.town_layout == 0) { // was TL_NO_ROADS _settings_game.economy.allow_town_roads = false; @@ -2141,7 +2172,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(114)) { + if (IsSavegameVersionBefore(SLV_114)) { /* There could be (deleted) stations with invalid owner, set owner to OWNER NONE. * The conversion affects oil rigs and buoys too, but it doesn't matter as * they have st->owner == OWNER_NONE already. */ @@ -2152,14 +2183,14 @@ bool AfterLoadGame() } /* Trains could now stop in a specific location. */ - if (IsSavegameVersionBefore(117)) { + if (IsSavegameVersionBefore(SLV_117)) { Order *o; FOR_ALL_ORDERS(o) { if (o->IsType(OT_GOTO_STATION)) o->SetStopLocation(OSL_PLATFORM_FAR_END); } } - if (IsSavegameVersionBefore(120)) { + if (IsSavegameVersionBefore(SLV_120)) { extern VehicleDefaultSettings _old_vds; Company *c; FOR_ALL_COMPANIES(c) { @@ -2167,7 +2198,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(121)) { + if (IsSavegameVersionBefore(SLV_121)) { /* Delete small ufos heading for non-existing vehicles */ Vehicle *v; FOR_ALL_DISASTERVEHICLES(v) { @@ -2199,31 +2230,30 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(122)) { + if (IsSavegameVersionBefore(SLV_122)) { /* Animated tiles would sometimes not be actually animated or * in case of old savegames duplicate. */ - extern TileIndex *_animated_tile_list; - extern uint _animated_tile_count; + extern SmallVector _animated_tiles; - for (uint i = 0; i < _animated_tile_count; /* Nothing */) { + for (TileIndex *tile = _animated_tiles.Begin(); tile < _animated_tiles.End(); /* Nothing */) { /* Remove if tile is not animated */ - bool remove = _tile_type_procs[GetTileType(_animated_tile_list[i])]->animate_tile_proc == NULL; + bool remove = _tile_type_procs[GetTileType(*tile)]->animate_tile_proc == NULL; /* and remove if duplicate */ - for (uint j = 0; !remove && j < i; j++) { - remove = _animated_tile_list[i] == _animated_tile_list[j]; + for (TileIndex *j = _animated_tiles.Begin(); !remove && j < tile; j++) { + remove = *tile == *j; } if (remove) { - DeleteAnimatedTile(_animated_tile_list[i]); + DeleteAnimatedTile(*tile); } else { - i++; + tile++; } } } - if (IsSavegameVersionBefore(124) && !IsSavegameVersionBefore(1)) { + if (IsSavegameVersionBefore(SLV_124) && !IsSavegameVersionBefore(SLV_1)) { /* The train station tile area was added, but for really old (TTDPatch) it's already valid. */ Waypoint *wp; FOR_ALL_WAYPOINTS(wp) { @@ -2239,7 +2269,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(125)) { + if (IsSavegameVersionBefore(SLV_125)) { /* Convert old subsidies */ Subsidy *s; FOR_ALL_SUBSIDIES(s) { @@ -2299,7 +2329,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(126)) { + if (IsSavegameVersionBefore(SLV_126)) { /* Recompute inflation based on old unround loan limit * Note: Max loan is 500000. With an inflation of 4% across 170 years * that results in a max loan of about 0.7 * 2^31. @@ -2317,7 +2347,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(128)) { + if (IsSavegameVersionBefore(SLV_128)) { const Depot *d; FOR_ALL_DEPOTS(d) { _m[d->xy].m2 = d->index; @@ -2327,7 +2357,7 @@ bool AfterLoadGame() /* The behaviour of force_proceed has been changed. Now * it counts signals instead of some random time out. */ - if (IsSavegameVersionBefore(131)) { + if (IsSavegameVersionBefore(SLV_131)) { Train *t; FOR_ALL_TRAINS(t) { if (t->force_proceed != TFP_NONE) { @@ -2338,7 +2368,7 @@ bool AfterLoadGame() /* The bits for the tree ground and tree density have * been swapped (m2 bits 7..6 and 5..4. */ - if (IsSavegameVersionBefore(135)) { + if (IsSavegameVersionBefore(SLV_135)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_CLEAR)) { if (GetRawClearGround(t) == CLEAR_SNOW) { @@ -2358,7 +2388,7 @@ bool AfterLoadGame() } /* Wait counter and load/unload ticks got split. */ - if (IsSavegameVersionBefore(136)) { + if (IsSavegameVersionBefore(SLV_136)) { Aircraft *a; FOR_ALL_AIRCRAFT(a) { a->turn_counter = a->current_order.IsType(OT_LOADING) ? 0 : a->load_unload_ticks; @@ -2371,7 +2401,7 @@ bool AfterLoadGame() } /* Airport tile animation uses animation frame instead of other graphics id */ - if (IsSavegameVersionBefore(137)) { + if (IsSavegameVersionBefore(SLV_137)) { struct AirportTileConversion { byte old_start; byte num_frames; @@ -2407,7 +2437,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(140)) { + if (IsSavegameVersionBefore(SLV_140)) { Station *st; FOR_ALL_STATIONS(st) { if (st->airport.tile != INVALID_TILE) { @@ -2417,7 +2447,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(141)) { + if (IsSavegameVersionBefore(SLV_141)) { for (TileIndex t = 0; t < map_size; t++) { /* Reset tropic zone for VOID tiles, they shall not have any. */ if (IsTileType(t, MP_VOID)) SetTropicZone(t, TROPICZONE_NORMAL); @@ -2432,7 +2462,7 @@ bool AfterLoadGame() FOR_ALL_DEPOTS(d) MakeDefaultName(d); } - if (IsSavegameVersionBefore(142)) { + if (IsSavegameVersionBefore(SLV_142)) { Depot *d; FOR_ALL_DEPOTS(d) d->build_date = _date; } @@ -2442,7 +2472,7 @@ bool AfterLoadGame() * another airport in the same station so we don't allow that anymore. * For old savegames with such aircraft we just throw them in the air and * treat the aircraft like they were flying already. */ - if (IsSavegameVersionBefore(146)) { + if (IsSavegameVersionBefore(SLV_146)) { Aircraft *v; FOR_ALL_AIRCRAFT(v) { if (!v->IsNormalAircraft()) continue; @@ -2461,7 +2491,7 @@ bool AfterLoadGame() } /* Move the animation frame to the same location (m7) for all objects. */ - if (IsSavegameVersionBefore(147)) { + if (IsSavegameVersionBefore(SLV_147)) { for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_HOUSE: @@ -2493,7 +2523,7 @@ bool AfterLoadGame() } /* Add (random) colour to all objects. */ - if (IsSavegameVersionBefore(148)) { + if (IsSavegameVersionBefore(SLV_148)) { Object *o; FOR_ALL_OBJECTS(o) { Owner owner = GetTileOwner(o->location.tile); @@ -2501,7 +2531,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(149)) { + if (IsSavegameVersionBefore(SLV_149)) { for (TileIndex t = 0; t < map_size; t++) { if (!IsTileType(t, MP_STATION)) continue; if (!IsBuoy(t) && !IsOilRig(t) && !(IsDock(t) && IsTileFlat(t))) { @@ -2523,7 +2553,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(152)) { + if (IsSavegameVersionBefore(SLV_152)) { _industry_builder.Reset(); // Initialize industry build data. /* The moment vehicles go from hidden to visible changed. This means @@ -2592,7 +2622,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(153)) { + if (IsSavegameVersionBefore(SLV_153)) { RoadVehicle *rv; FOR_ALL_ROADVEHICLES(rv) { if (rv->state == RVSB_IN_DEPOT || rv->state == RVSB_WORMHOLE) continue; @@ -2607,7 +2637,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(156)) { + if (IsSavegameVersionBefore(SLV_156)) { /* The train's pathfinder lost flag got moved. */ Train *t; FOR_ALL_TRAINS(t) { @@ -2625,7 +2655,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(158)) { + if (IsSavegameVersionBefore(SLV_158)) { Vehicle *v; FOR_ALL_VEHICLES(v) { switch (v->type) { @@ -2722,14 +2752,14 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(159)) { + if (IsSavegameVersionBefore(SLV_159)) { /* If the savegame is old (before version 100), then the value of 255 * for these settings did not mean "disabled". As such everything * before then did reverse. * To simplify stuff we disable all turning around or we do not * disable anything at all. So, if some reversing was disabled we * will keep reversing disabled, otherwise it'll be turned on. */ - _settings_game.pf.reverse_at_signals = IsSavegameVersionBefore(100) || (_settings_game.pf.wait_oneway_signal != 255 && _settings_game.pf.wait_twoway_signal != 255 && _settings_game.pf.wait_for_pbs_path != 255); + _settings_game.pf.reverse_at_signals = IsSavegameVersionBefore(SLV_100) || (_settings_game.pf.wait_oneway_signal != 255 && _settings_game.pf.wait_twoway_signal != 255 && _settings_game.pf.wait_for_pbs_path != 255); Train *t; FOR_ALL_TRAINS(t) { @@ -2737,7 +2767,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(160)) { + if (IsSavegameVersionBefore(SLV_160)) { /* Setting difficulty industry_density other than zero get bumped to +1 * since a new option (minimal at position 1) has been added */ if (_settings_game.difficulty.industry_density > 0) { @@ -2745,10 +2775,10 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(161)) { + if (IsSavegameVersionBefore(SLV_161)) { /* Before savegame version 161, persistent storages were not stored in a pool. */ - if (!IsSavegameVersionBefore(76)) { + if (!IsSavegameVersionBefore(SLV_76)) { Industry *ind; FOR_ALL_INDUSTRIES(ind) { assert(ind->psa != NULL); @@ -2771,7 +2801,7 @@ bool AfterLoadGame() } } - if (!IsSavegameVersionBefore(145)) { + if (!IsSavegameVersionBefore(SLV_145)) { Station *st; FOR_ALL_STATIONS(st) { if (!(st->facilities & FACIL_AIRPORT)) continue; @@ -2798,11 +2828,11 @@ bool AfterLoadGame() } /* This triggers only when old snow_lines were copied into the snow_line_height. */ - if (IsSavegameVersionBefore(164) && _settings_game.game_creation.snow_line_height >= MIN_SNOWLINE_HEIGHT * TILE_HEIGHT) { + if (IsSavegameVersionBefore(SLV_164) && _settings_game.game_creation.snow_line_height >= MIN_SNOWLINE_HEIGHT * TILE_HEIGHT) { _settings_game.game_creation.snow_line_height /= TILE_HEIGHT; } - if (IsSavegameVersionBefore(164) && !IsSavegameVersionBefore(32)) { + if (IsSavegameVersionBefore(SLV_164) && !IsSavegameVersionBefore(SLV_32)) { /* We store 4 fences in the field tiles instead of only SE and SW. */ for (TileIndex t = 0; t < map_size; t++) { if (!IsTileType(t, MP_CLEAR) && !IsTileType(t, MP_TREES)) continue; @@ -2821,9 +2851,9 @@ bool AfterLoadGame() } /* The center of train vehicles was changed, fix up spacing. */ - if (IsSavegameVersionBefore(164)) FixupTrainLengths(); + if (IsSavegameVersionBefore(SLV_164)) FixupTrainLengths(); - if (IsSavegameVersionBefore(165)) { + if (IsSavegameVersionBefore(SLV_165)) { Town *t; FOR_ALL_TOWNS(t) { @@ -2841,7 +2871,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(165)) { + if (IsSavegameVersionBefore(SLV_165)) { /* Adjust zoom level to account for new levels */ _saved_scrollpos_zoom = _saved_scrollpos_zoom + ZOOM_LVL_SHIFT; _saved_scrollpos_x *= ZOOM_LVL_BASE; @@ -2853,7 +2883,7 @@ bool AfterLoadGame() * which is done by StartupEngines(). */ if (gcf_res != GLC_ALL_GOOD) StartupEngines(); - if (IsSavegameVersionBefore(166)) { + if (IsSavegameVersionBefore(SLV_166)) { /* Update cargo acceptance map of towns. */ for (TileIndex t = 0; t < map_size; t++) { if (!IsTileType(t, MP_HOUSE)) continue; @@ -2867,7 +2897,7 @@ bool AfterLoadGame() } /* The road owner of standard road stops was not properly accounted for. */ - if (IsSavegameVersionBefore(172)) { + if (IsSavegameVersionBefore(SLV_172)) { for (TileIndex t = 0; t < map_size; t++) { if (!IsStandardRoadStopTile(t)) continue; Owner o = GetTileOwner(t); @@ -2876,13 +2906,13 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(175)) { + if (IsSavegameVersionBefore(SLV_175)) { /* Introduced tree planting limit. */ Company *c; FOR_ALL_COMPANIES(c) c->tree_limit = _settings_game.construction.tree_frame_burst << 16; } - if (IsSavegameVersionBefore(177)) { + if (IsSavegameVersionBefore(SLV_177)) { /* Fix too high inflation rates */ if (_economy.inflation_prices > MAX_INFLATION) _economy.inflation_prices = MAX_INFLATION; if (_economy.inflation_payment > MAX_INFLATION) _economy.inflation_payment = MAX_INFLATION; @@ -2893,13 +2923,13 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(178)) { + if (IsSavegameVersionBefore(SLV_178)) { extern uint8 _old_diff_level; /* Initialise script settings profile */ _settings_game.script.settings_profile = IsInsideMM(_old_diff_level, SP_BEGIN, SP_END) ? _old_diff_level : (uint)SP_MEDIUM; } - if (IsSavegameVersionBefore(182)) { + if (IsSavegameVersionBefore(SLV_182)) { Aircraft *v; /* Aircraft acceleration variable was bonkers */ FOR_ALL_AIRCRAFT(v) { @@ -2918,7 +2948,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(184)) { + if (IsSavegameVersionBefore(SLV_184)) { /* The global units configuration is split up in multiple configurations. */ extern uint8 _old_units; _settings_game.locale.units_velocity = Clamp(_old_units, 0, 2); @@ -2929,7 +2959,7 @@ bool AfterLoadGame() _settings_game.locale.units_height = Clamp(_old_units, 0, 2); } - if (IsSavegameVersionBefore(186)) { + if (IsSavegameVersionBefore(SLV_186)) { /* Move ObjectType from map to pool */ for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_OBJECT)) { @@ -2940,7 +2970,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(188)) { + if (IsSavegameVersionBefore(SLV_188)) { /* Fix articulated road vehicles. * Some curves were shorter than other curves. * Now they have the same length, but that means that trailing articulated parts will @@ -3003,9 +3033,9 @@ bool AfterLoadGame() * Only keep order-backups for network clients (and when replaying). * If we are a network server or not networking, then we just loaded a previously * saved-by-server savegame. There are no clients with a backup, so clear it. - * Furthermore before savegame version 192 the actual content was always corrupt. + * Furthermore before savegame version SLV_192 the actual content was always corrupt. */ - if (!_networking || _network_server || IsSavegameVersionBefore(192)) { + if (!_networking || _network_server || IsSavegameVersionBefore(SLV_192)) { #ifndef DEBUG_DUMP_COMMANDS /* Note: We cannot use CleanPool since that skips part of the destructor * and then leaks un-reachable Orders in the order pool. */ @@ -3016,9 +3046,88 @@ bool AfterLoadGame() #endif } + if (IsSavegameVersionBefore(SLV_198)) { + /* Convert towns growth_rate and grow_counter to ticks */ + Town *t; + FOR_ALL_TOWNS(t) { + /* 0x8000 = TOWN_GROWTH_RATE_CUSTOM previously */ + if (t->growth_rate & 0x8000) SetBit(t->flags, TOWN_CUSTOM_GROWTH); + if (t->growth_rate != TOWN_GROWTH_RATE_NONE) { + t->growth_rate = TownTicksToGameTicks(t->growth_rate & ~0x8000); + } + /* Add t->index % TOWN_GROWTH_TICKS to spread growth across ticks. */ + t->grow_counter = TownTicksToGameTicks(t->grow_counter) + t->index % TOWN_GROWTH_TICKS; + } + } + + if (IsSavegameVersionBefore(SLV_EXTEND_INDUSTRY_CARGO_SLOTS)) { + /* Make sure added industry cargo slots are cleared */ + Industry *i; + FOR_ALL_INDUSTRIES(i) { + for (size_t ci = 2; ci < lengthof(i->produced_cargo); ci++) { + i->produced_cargo[ci] = CT_INVALID; + i->produced_cargo_waiting[ci] = 0; + i->production_rate[ci] = 0; + i->last_month_production[ci] = 0; + i->last_month_transported[ci] = 0; + i->last_month_pct_transported[ci] = 0; + i->this_month_production[ci] = 0; + i->this_month_transported[ci] = 0; + } + for (size_t ci = 3; ci < lengthof(i->accepts_cargo); ci++) { + i->accepts_cargo[ci] = CT_INVALID; + i->incoming_cargo_waiting[ci] = 0; + } + /* Make sure last_cargo_accepted_at is copied to elements for every valid input cargo. + * The loading routine should put the original singular value into the first array element. */ + for (size_t ci = 0; ci < lengthof(i->accepts_cargo); ci++) { + if (i->accepts_cargo[ci] != CT_INVALID) { + i->last_cargo_accepted_at[ci] = i->last_cargo_accepted_at[0]; + } else { + i->last_cargo_accepted_at[ci] = 0; + } + } + } + } + + if (IsSavegameVersionBefore(SLV_SHIPS_STOP_IN_LOCKS)) { + /* Move ships from lock slope to upper or lower position. */ + Ship *s; + FOR_ALL_SHIPS(s) { + /* Suitable tile? */ + if (!IsTileType(s->tile, MP_WATER) || !IsLock(s->tile) || GetLockPart(s->tile) != LOCK_PART_MIDDLE) continue; + + /* We don't need to adjust position when at the tile centre */ + int x = s->x_pos & 0xF; + int y = s->y_pos & 0xF; + if (x == 8 && y == 8) continue; + + /* Test if ship is on the second half of the tile */ + bool second_half; + DiagDirection shipdiagdir = DirToDiagDir(s->direction); + switch (shipdiagdir) { + default: NOT_REACHED(); + case DIAGDIR_NE: second_half = x < 8; break; + case DIAGDIR_NW: second_half = y < 8; break; + case DIAGDIR_SW: second_half = x > 8; break; + case DIAGDIR_SE: second_half = y > 8; break; + } + + DiagDirection slopediagdir = GetInclinedSlopeDirection(GetTileSlope(s->tile)); + + /* Heading up slope == passed half way */ + if ((shipdiagdir == slopediagdir) == second_half) { + /* On top half of lock */ + s->z_pos = GetTileMaxZ(s->tile) * (int)TILE_HEIGHT; + } else { + /* On lower half of lock */ + s->z_pos = GetTileZ(s->tile) * (int)TILE_HEIGHT; + } + } + } /* Station acceptance is some kind of cache */ - if (IsSavegameVersionBefore(127)) { + if (IsSavegameVersionBefore(SLV_127)) { Station *st; FOR_ALL_STATIONS(st) UpdateStationAcceptance(st, false); } diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp index 698abbf13f..2492bb666a 100644 --- a/src/saveload/ai_sl.cpp +++ b/src/saveload/ai_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: ai_sl.cpp 26493 2014-04-24 04:41:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -30,8 +30,8 @@ static bool _ai_saveload_is_random; static const SaveLoad _ai_company[] = { SLEG_STR(_ai_saveload_name, SLE_STRB), SLEG_STR(_ai_saveload_settings, SLE_STRB), - SLEG_CONDVAR(_ai_saveload_version, SLE_UINT32, 108, SL_MAX_VERSION), - SLEG_CONDVAR(_ai_saveload_is_random, SLE_BOOL, 136, SL_MAX_VERSION), + SLEG_CONDVAR(_ai_saveload_version, SLE_UINT32, SLV_108, SL_MAX_VERSION), + SLEG_CONDVAR(_ai_saveload_is_random, SLE_BOOL, SLV_136, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/airport_sl.cpp b/src/saveload/airport_sl.cpp index 6eca52574c..1172d2593e 100644 --- a/src/saveload/airport_sl.cpp +++ b/src/saveload/airport_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: airport_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/animated_tile_sl.cpp b/src/saveload/animated_tile_sl.cpp index cf1235fc2a..c54c4724ab 100644 --- a/src/saveload/animated_tile_sl.cpp +++ b/src/saveload/animated_tile_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: animated_tile_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,22 +12,21 @@ #include "../stdafx.h" #include "../tile_type.h" #include "../core/alloc_func.hpp" +#include "../core/smallvec_type.hpp" #include "saveload.h" #include "../safeguards.h" -extern TileIndex *_animated_tile_list; -extern uint _animated_tile_count; -extern uint _animated_tile_allocated; +extern SmallVector _animated_tiles; /** * Save the ANIT chunk. */ static void Save_ANIT() { - SlSetLength(_animated_tile_count * sizeof(*_animated_tile_list)); - SlArray(_animated_tile_list, _animated_tile_count, SLE_UINT32); + SlSetLength(_animated_tiles.Length() * sizeof(*_animated_tiles.Begin())); + SlArray(_animated_tiles.Begin(), _animated_tiles.Length(), SLE_UINT32); } /** @@ -36,24 +35,22 @@ static void Save_ANIT() static void Load_ANIT() { /* Before version 80 we did NOT have a variable length animated tile table */ - if (IsSavegameVersionBefore(80)) { + if (IsSavegameVersionBefore(SLV_80)) { /* In pre version 6, we has 16bit per tile, now we have 32bit per tile, convert it ;) */ - SlArray(_animated_tile_list, 256, IsSavegameVersionBefore(6) ? (SLE_FILE_U16 | SLE_VAR_U32) : SLE_UINT32); + TileIndex anim_list[256]; + SlArray(anim_list, 256, IsSavegameVersionBefore(SLV_6) ? (SLE_FILE_U16 | SLE_VAR_U32) : SLE_UINT32); - for (_animated_tile_count = 0; _animated_tile_count < 256; _animated_tile_count++) { - if (_animated_tile_list[_animated_tile_count] == 0) break; + for (int i = 0; i < 256; i++) { + if (anim_list[i] == 0) break; + *_animated_tiles.Append() = anim_list[i]; } return; } - _animated_tile_count = (uint)SlGetFieldLength() / sizeof(*_animated_tile_list); - - /* Determine a nice rounded size for the amount of allocated tiles */ - _animated_tile_allocated = 256; - while (_animated_tile_allocated < _animated_tile_count) _animated_tile_allocated *= 2; - - _animated_tile_list = ReallocT(_animated_tile_list, _animated_tile_allocated); - SlArray(_animated_tile_list, _animated_tile_count, SLE_UINT32); + uint count = (uint)SlGetFieldLength() / sizeof(*_animated_tiles.Begin()); + _animated_tiles.Clear(); + _animated_tiles.Append(count); + SlArray(_animated_tiles.Begin(), count, SLE_UINT32); } /** diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp index 2bab024da1..1798df1ada 100644 --- a/src/saveload/autoreplace_sl.cpp +++ b/src/saveload/autoreplace_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: autoreplace_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,8 +21,8 @@ static const SaveLoad _engine_renew_desc[] = { SLE_VAR(EngineRenew, to, SLE_UINT16), SLE_REF(EngineRenew, next, REF_ENGINE_RENEWS), - SLE_CONDVAR(EngineRenew, group_id, SLE_UINT16, 60, SL_MAX_VERSION), - SLE_CONDVAR(EngineRenew, replace_when_old, SLE_BOOL, 175, SL_MAX_VERSION), + SLE_CONDVAR(EngineRenew, group_id, SLE_UINT16, SLV_60, SL_MAX_VERSION), + SLE_CONDVAR(EngineRenew, replace_when_old, SLE_BOOL, SLV_175, SL_MAX_VERSION), SLE_END() }; @@ -45,9 +45,9 @@ static void Load_ERNW() SlObject(er, _engine_renew_desc); /* Advanced vehicle lists, ungrouped vehicles got added */ - if (IsSavegameVersionBefore(60)) { + if (IsSavegameVersionBefore(SLV_60)) { er->group_id = ALL_GROUP; - } else if (IsSavegameVersionBefore(71)) { + } else if (IsSavegameVersionBefore(SLV_71)) { if (er->group_id == DEFAULT_GROUP) er->group_id = ALL_GROUP; } } diff --git a/src/saveload/cargomonitor_sl.cpp b/src/saveload/cargomonitor_sl.cpp index a6a4e0b895..9a313970ff 100644 --- a/src/saveload/cargomonitor_sl.cpp +++ b/src/saveload/cargomonitor_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: cargomonitor_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -29,6 +29,21 @@ static const SaveLoad _cargomonitor_pair_desc[] = { SLE_END() }; +static CargoMonitorID FixupCargoMonitor(CargoMonitorID number) +{ + /* Between SLV_EXTEND_CARGOTYPES and SLV_FIX_CARGO_MONITOR, the + * CargoMonitorID structure had insufficient packing for more + * than 32 cargo types. Here we have to shuffle bits to account + * for the change. + * Company moved from bits 24-31 to 25-28. + * Cargo type increased from bits 19-23 to 19-24. + */ + SB(number, 25, 4, GB(number, 24, 4)); + SB(number, 29, 3, 0); + ClrBit(number, 24); + return number; +} + /** Save the #_cargo_deliveries monitoring map. */ static void SaveDelivery() { @@ -52,12 +67,15 @@ static void SaveDelivery() static void LoadDelivery() { TempStorage storage; + bool fix = IsSavegameVersionBefore(SLV_FIX_CARGO_MONITOR); ClearCargoDeliveryMonitoring(); for (;;) { if (SlIterateArray() < 0) break; SlObject(&storage, _cargomonitor_pair_desc); + if (fix) storage.number = FixupCargoMonitor(storage.number); + std::pair p(storage.number, storage.amount); _cargo_deliveries.insert(p); } @@ -87,12 +105,15 @@ static void SavePickup() static void LoadPickup() { TempStorage storage; + bool fix = IsSavegameVersionBefore(SLV_FIX_CARGO_MONITOR); ClearCargoPickupMonitoring(); for (;;) { if (SlIterateArray() < 0) break; SlObject(&storage, _cargomonitor_pair_desc); + if (fix) storage.number = FixupCargoMonitor(storage.number); + std::pair p(storage.number, storage.amount); _cargo_pickups.insert(p); } diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp index 51e64e7552..e3f372e9a8 100644 --- a/src/saveload/cargopacket_sl.cpp +++ b/src/saveload/cargopacket_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: cargopacket_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -22,7 +22,7 @@ */ /* static */ void CargoPacket::AfterLoad() { - if (IsSavegameVersionBefore(44)) { + if (IsSavegameVersionBefore(SLV_44)) { Vehicle *v; /* If we remove a station while cargo from it is still en route, payment calculation will assume * 0, 0 to be the source of the cargo, resulting in very high payments usually. v->source_xy @@ -59,7 +59,7 @@ } } - if (IsSavegameVersionBefore(120)) { + if (IsSavegameVersionBefore(SLV_120)) { /* CargoPacket's source should be either INVALID_STATION or a valid station */ CargoPacket *cp; FOR_ALL_CARGOPACKETS(cp) { @@ -67,7 +67,7 @@ } } - if (!IsSavegameVersionBefore(68)) { + if (!IsSavegameVersionBefore(SLV_68)) { /* Only since version 68 we have cargo packets. Savegames from before used * 'new CargoPacket' + cargolist.Append so their caches are already * correct and do not need rebuilding. */ @@ -80,7 +80,7 @@ } } - if (IsSavegameVersionBefore(181)) { + if (IsSavegameVersionBefore(SLV_181)) { Vehicle *v; FOR_ALL_VEHICLES(v) v->cargo.KeepAll(); } @@ -100,11 +100,11 @@ const SaveLoad *GetCargoPacketDesc() SLE_VAR(CargoPacket, count, SLE_UINT16), SLE_VAR(CargoPacket, days_in_transit, SLE_UINT8), SLE_VAR(CargoPacket, feeder_share, SLE_INT64), - SLE_CONDVAR(CargoPacket, source_type, SLE_UINT8, 125, SL_MAX_VERSION), - SLE_CONDVAR(CargoPacket, source_id, SLE_UINT16, 125, SL_MAX_VERSION), + SLE_CONDVAR(CargoPacket, source_type, SLE_UINT8, SLV_125, SL_MAX_VERSION), + SLE_CONDVAR(CargoPacket, source_id, SLE_UINT16, SLV_125, SL_MAX_VERSION), /* Used to be paid_for, but that got changed. */ - SLE_CONDNULL(1, 0, 120), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_121), SLE_END() }; diff --git a/src/saveload/cheat_sl.cpp b/src/saveload/cheat_sl.cpp index b0a6a4faa4..4616b7e852 100644 --- a/src/saveload/cheat_sl.cpp +++ b/src/saveload/cheat_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: cheat_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/citymania_sl.cpp b/src/saveload/citymania_sl.cpp index 37c38453ad..2c584f4696 100644 --- a/src/saveload/citymania_sl.cpp +++ b/src/saveload/citymania_sl.cpp @@ -6,7 +6,7 @@ #define CM_DATA_FORMAT_VERSION 1 -assert_compile(NUM_CARGO == 32); +assert_compile(NUM_CARGO < 256); static void CM_EncodeTownsExtraInfo(BitOStream &bs) diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp index 2c9a9888f3..a51f8081b0 100644 --- a/src/saveload/company_sl.cpp +++ b/src/saveload/company_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: company_sl.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -242,115 +242,116 @@ void AfterLoadCompanyStats() static const SaveLoad _company_desc[] = { SLE_VAR(CompanyProperties, name_2, SLE_UINT32), SLE_VAR(CompanyProperties, name_1, SLE_STRINGID), - SLE_CONDSTR(CompanyProperties, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), + SLE_CONDSTR(CompanyProperties, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), SLE_VAR(CompanyProperties, president_name_1, SLE_STRINGID), SLE_VAR(CompanyProperties, president_name_2, SLE_UINT32), - SLE_CONDSTR(CompanyProperties, president_name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), + SLE_CONDSTR(CompanyProperties, president_name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), SLE_VAR(CompanyProperties, face, SLE_UINT32), /* money was changed to a 64 bit field in savegame version 1. */ - SLE_CONDVAR(CompanyProperties, money, SLE_VAR_I64 | SLE_FILE_I32, 0, 0), - SLE_CONDVAR(CompanyProperties, money, SLE_INT64, 1, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, money, SLE_VAR_I64 | SLE_FILE_I32, SL_MIN_VERSION, SLV_1), + SLE_CONDVAR(CompanyProperties, money, SLE_INT64, SLV_1, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, current_loan, SLE_VAR_I64 | SLE_FILE_I32, 0, 64), - SLE_CONDVAR(CompanyProperties, current_loan, SLE_INT64, 65, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, current_loan, SLE_VAR_I64 | SLE_FILE_I32, SL_MIN_VERSION, SLV_65), + SLE_CONDVAR(CompanyProperties, current_loan, SLE_INT64, SLV_65, SL_MAX_VERSION), SLE_VAR(CompanyProperties, colour, SLE_UINT8), SLE_VAR(CompanyProperties, money_fraction, SLE_UINT8), - SLE_CONDVAR(CompanyProperties, avail_railtypes, SLE_VAR_I32 | SLE_FILE_I8, 0, 57), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_58), ///< avail_railtypes SLE_VAR(CompanyProperties, block_preview, SLE_UINT8), - SLE_CONDNULL(2, 0, 93), ///< cargo_types - SLE_CONDNULL(4, 94, 169), ///< cargo_types - SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_94), ///< cargo_types + SLE_CONDNULL(4, SLV_94, SLV_170), ///< cargo_types + SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_INT32, SLV_31, SL_MAX_VERSION), SLE_ARR(CompanyProperties, share_owners, SLE_UINT8, 4), SLE_VAR(CompanyProperties, num_valid_stat_ent, SLE_UINT8), SLE_VAR(CompanyProperties, months_of_bankruptcy, SLE_UINT8), - SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), - SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_UINT16, 104, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_104), + SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_UINT16, SLV_104, SL_MAX_VERSION), SLE_VAR(CompanyProperties, bankrupt_timeout, SLE_INT16), - SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_VAR_I64 | SLE_FILE_I32, 0, 64), - SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_INT64, 65, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_VAR_I64 | SLE_FILE_I32, SL_MIN_VERSION, SLV_65), + SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_INT64, SLV_65, SL_MAX_VERSION), /* yearly expenses was changed to 64-bit in savegame version 2. */ - SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, 0, 1), - SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_INT64, 3 * 13, 2, SL_MAX_VERSION), + SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, SL_MIN_VERSION, SLV_2), + SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_INT64, 3 * 13, SLV_2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, is_ai, SLE_BOOL, 2, SL_MAX_VERSION), - SLE_CONDNULL(1, 107, 111), ///< is_noai - SLE_CONDNULL(1, 4, 99), + SLE_CONDVAR(CompanyProperties, is_ai, SLE_BOOL, SLV_2, SL_MAX_VERSION), + SLE_CONDNULL(1, SLV_107, SLV_112), ///< is_noai + SLE_CONDNULL(1, SLV_4, SLV_100), - SLE_CONDVAR(CompanyProperties, terraform_limit, SLE_UINT32, 156, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, clear_limit, SLE_UINT32, 156, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, tree_limit, SLE_UINT32, 175, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, terraform_limit, SLE_UINT32, SLV_156, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, clear_limit, SLE_UINT32, SLV_156, SL_MAX_VERSION), + SLE_CONDVAR(CompanyProperties, tree_limit, SLE_UINT32, SLV_175, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _company_settings_desc[] = { /* Engine renewal settings */ - SLE_CONDNULL(512, 16, 18), - SLE_CONDREF(Company, engine_renew_list, REF_ENGINE_RENEWS, 19, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.engine_renew, SLE_BOOL, 16, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.engine_renew_months, SLE_INT16, 16, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.engine_renew_money, SLE_UINT32, 16, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.renew_keep_length, SLE_BOOL, 2, SL_MAX_VERSION), + SLE_CONDNULL(512, SLV_16, SLV_19), + SLE_CONDREF(Company, engine_renew_list, REF_ENGINE_RENEWS, SLV_19, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.engine_renew, SLE_BOOL, SLV_16, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.engine_renew_months, SLE_INT16, SLV_16, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.engine_renew_money, SLE_UINT32, SLV_16, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.renew_keep_length, SLE_BOOL, SLV_2, SL_MAX_VERSION), /* Default vehicle settings */ - SLE_CONDVAR(Company, settings.vehicle.servint_ispercent, SLE_BOOL, 120, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.vehicle.servint_trains, SLE_UINT16, 120, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.vehicle.servint_roadveh, SLE_UINT16, 120, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.vehicle.servint_aircraft, SLE_UINT16, 120, SL_MAX_VERSION), - SLE_CONDVAR(Company, settings.vehicle.servint_ships, SLE_UINT16, 120, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.vehicle.servint_ispercent, SLE_BOOL, SLV_120, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.vehicle.servint_trains, SLE_UINT16, SLV_120, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.vehicle.servint_roadveh, SLE_UINT16, SLV_120, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.vehicle.servint_aircraft, SLE_UINT16, SLV_120, SL_MAX_VERSION), + SLE_CONDVAR(Company, settings.vehicle.servint_ships, SLE_UINT16, SLV_120, SL_MAX_VERSION), - SLE_CONDNULL(63, 2, 143), // old reserved space + SLE_CONDNULL(63, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _company_settings_skip_desc[] = { /* Engine renewal settings */ - SLE_CONDNULL(512, 16, 18), - SLE_CONDNULL(2, 19, 68), // engine_renew_list - SLE_CONDNULL(4, 69, SL_MAX_VERSION), // engine_renew_list - SLE_CONDNULL(1, 16, SL_MAX_VERSION), // settings.engine_renew - SLE_CONDNULL(2, 16, SL_MAX_VERSION), // settings.engine_renew_months - SLE_CONDNULL(4, 16, SL_MAX_VERSION), // settings.engine_renew_money - SLE_CONDNULL(1, 2, SL_MAX_VERSION), // settings.renew_keep_length + SLE_CONDNULL(512, SLV_16, SLV_19), + SLE_CONDNULL(2, SLV_19, SLV_69), // engine_renew_list + SLE_CONDNULL(4, SLV_69, SL_MAX_VERSION), // engine_renew_list + SLE_CONDNULL(1, SLV_16, SL_MAX_VERSION), // settings.engine_renew + SLE_CONDNULL(2, SLV_16, SL_MAX_VERSION), // settings.engine_renew_months + SLE_CONDNULL(4, SLV_16, SL_MAX_VERSION), // settings.engine_renew_money + SLE_CONDNULL(1, SLV_2, SL_MAX_VERSION), // settings.renew_keep_length /* Default vehicle settings */ - SLE_CONDNULL(1, 120, SL_MAX_VERSION), // settings.vehicle.servint_ispercent - SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_trains - SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_roadveh - SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_aircraft - SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_ships + SLE_CONDNULL(1, SLV_120, SL_MAX_VERSION), // settings.vehicle.servint_ispercent + SLE_CONDNULL(2, SLV_120, SL_MAX_VERSION), // settings.vehicle.servint_trains + SLE_CONDNULL(2, SLV_120, SL_MAX_VERSION), // settings.vehicle.servint_roadveh + SLE_CONDNULL(2, SLV_120, SL_MAX_VERSION), // settings.vehicle.servint_aircraft + SLE_CONDNULL(2, SLV_120, SL_MAX_VERSION), // settings.vehicle.servint_ships - SLE_CONDNULL(63, 2, 143), // old reserved space + SLE_CONDNULL(63, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _company_economy_desc[] = { /* these were changed to 64-bit in savegame format 2 */ - SLE_CONDVAR(CompanyEconomyEntry, income, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), - SLE_CONDVAR(CompanyEconomyEntry, income, SLE_INT64, 2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), - SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_INT64, 2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), - SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_INT64, 2, SL_MAX_VERSION), + SLE_CONDVAR(CompanyEconomyEntry, income, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_2), + SLE_CONDVAR(CompanyEconomyEntry, income, SLE_INT64, SLV_2, SL_MAX_VERSION), + SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_2), + SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_INT64, SLV_2, SL_MAX_VERSION), + SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_2), + SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_INT64, SLV_2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyEconomyEntry, delivered_cargo[NUM_CARGO - 1], SLE_INT32, 0, 169), - SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, NUM_CARGO, 170, SL_MAX_VERSION), + SLE_CONDVAR(CompanyEconomyEntry, delivered_cargo[NUM_CARGO - 1], SLE_INT32, SL_MIN_VERSION, SLV_170), + SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, 32, SLV_170, SLV_EXTEND_CARGOTYPES), + SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, NUM_CARGO, SLV_EXTEND_CARGOTYPES, SL_MAX_VERSION), SLE_VAR(CompanyEconomyEntry, performance_history, SLE_INT32), SLE_END() @@ -362,49 +363,49 @@ struct CompanyOldAI { }; static const SaveLoad _company_ai_desc[] = { - SLE_CONDNULL(2, 0, 106), - SLE_CONDNULL(2, 0, 12), - SLE_CONDNULL(4, 13, 106), - SLE_CONDNULL(8, 0, 106), - SLE_CONDVAR(CompanyOldAI, num_build_rec, SLE_UINT8, 0, 106), - SLE_CONDNULL(3, 0, 106), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_107), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_13), + SLE_CONDNULL(4, SLV_13, SLV_107), + SLE_CONDNULL(8, SL_MIN_VERSION, SLV_107), + SLE_CONDVAR(CompanyOldAI, num_build_rec, SLE_UINT8, SL_MIN_VERSION, SLV_107), + SLE_CONDNULL(3, SL_MIN_VERSION, SLV_107), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 106), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), + SLE_CONDNULL(4, SLV_6, SLV_107), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), + SLE_CONDNULL(4, SLV_6, SLV_107), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_107), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 106), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), + SLE_CONDNULL(4, SLV_6, SLV_107), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), + SLE_CONDNULL(4, SLV_6, SLV_107), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_107), - SLE_CONDNULL(2, 0, 68), - SLE_CONDNULL(4, 69, 106), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_69), + SLE_CONDNULL(4, SLV_69, SLV_107), - SLE_CONDNULL(18, 0, 106), - SLE_CONDNULL(20, 0, 106), - SLE_CONDNULL(32, 0, 106), + SLE_CONDNULL(18, SL_MIN_VERSION, SLV_107), + SLE_CONDNULL(20, SL_MIN_VERSION, SLV_107), + SLE_CONDNULL(32, SL_MIN_VERSION, SLV_107), - SLE_CONDNULL(64, 2, 106), + SLE_CONDNULL(64, SLV_2, SLV_107), SLE_END() }; static const SaveLoad _company_ai_build_rec_desc[] = { - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(8, 0, 106), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), + SLE_CONDNULL(4, SLV_6, SLV_107), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), + SLE_CONDNULL(4, SLV_6, SLV_107), + SLE_CONDNULL(8, SL_MIN_VERSION, SLV_107), SLE_END() }; static const SaveLoad _company_livery_desc[] = { - SLE_CONDVAR(Livery, in_use, SLE_BOOL, 34, SL_MAX_VERSION), - SLE_CONDVAR(Livery, colour1, SLE_UINT8, 34, SL_MAX_VERSION), - SLE_CONDVAR(Livery, colour2, SLE_UINT8, 34, SL_MAX_VERSION), + SLE_CONDVAR(Livery, in_use, SLE_UINT8, SLV_34, SL_MAX_VERSION), + SLE_CONDVAR(Livery, colour1, SLE_UINT8, SLV_34, SL_MAX_VERSION), + SLE_CONDVAR(Livery, colour2, SLE_UINT8, SLV_34, SL_MAX_VERSION), SLE_END() }; @@ -421,7 +422,7 @@ static void SaveLoad_PLYR_common(Company *c, CompanyProperties *cprops) } /* Keep backwards compatible for savegames, so load the old AI block */ - if (IsSavegameVersionBefore(107) && cprops->is_ai) { + if (IsSavegameVersionBefore(SLV_107) && cprops->is_ai) { CompanyOldAI old_ai; char nothing; @@ -441,10 +442,19 @@ static void SaveLoad_PLYR_common(Company *c, CompanyProperties *cprops) } /* Write each livery entry. */ - int num_liveries = IsSavegameVersionBefore(63) ? LS_END - 4 : (IsSavegameVersionBefore(85) ? LS_END - 2: LS_END); + int num_liveries = IsSavegameVersionBefore(SLV_63) ? LS_END - 4 : (IsSavegameVersionBefore(SLV_85) ? LS_END - 2: LS_END); + bool update_in_use = IsSavegameVersionBefore(SLV_GROUP_LIVERIES); if (c != NULL) { for (i = 0; i < num_liveries; i++) { SlObject(&c->livery[i], _company_livery_desc); + if (update_in_use && i != LS_DEFAULT) { + if (c->livery[i].in_use == 0) { + c->livery[i].colour1 = c->livery[LS_DEFAULT].colour1; + c->livery[i].colour2 = c->livery[LS_DEFAULT].colour2; + } else { + c->livery[i].in_use = 3; + } + } } if (num_liveries < LS_END) { @@ -497,11 +507,10 @@ static void Check_PLYR() int index; while ((index = SlIterateArray()) != -1) { CompanyProperties *cprops = new CompanyProperties(); - memset(cprops, 0, sizeof(*cprops)); SaveLoad_PLYR_common(NULL, cprops); /* We do not load old custom names */ - if (IsSavegameVersionBefore(84)) { + if (IsSavegameVersionBefore(SLV_84)) { if (GetStringTab(cprops->name_1) == TEXT_TAB_OLD_CUSTOM) { cprops->name_1 = STR_GAME_SAVELOAD_NOT_AVAILABLE; } diff --git a/src/saveload/depot_sl.cpp b/src/saveload/depot_sl.cpp index ad7c17166f..b92417693c 100644 --- a/src/saveload/depot_sl.cpp +++ b/src/saveload/depot_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: depot_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -20,13 +20,13 @@ static TownID _town_index; static const SaveLoad _depot_desc[] = { - SLE_CONDVAR(Depot, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Depot, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLEG_CONDVAR(_town_index, SLE_UINT16, 0, 140), - SLE_CONDREF(Depot, town, REF_TOWN, 141, SL_MAX_VERSION), - SLE_CONDVAR(Depot, town_cn, SLE_UINT16, 141, SL_MAX_VERSION), - SLE_CONDSTR(Depot, name, SLE_STR, 0, 141, SL_MAX_VERSION), - SLE_CONDVAR(Depot, build_date, SLE_INT32, 142, SL_MAX_VERSION), + SLE_CONDVAR(Depot, xy, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Depot, xy, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLEG_CONDVAR(_town_index, SLE_UINT16, SL_MIN_VERSION, SLV_141), + SLE_CONDREF(Depot, town, REF_TOWN, SLV_141, SL_MAX_VERSION), + SLE_CONDVAR(Depot, town_cn, SLE_UINT16, SLV_141, SL_MAX_VERSION), + SLE_CONDSTR(Depot, name, SLE_STR, 0, SLV_141, SL_MAX_VERSION), + SLE_CONDVAR(Depot, build_date, SLE_INT32, SLV_142, SL_MAX_VERSION), SLE_END() }; @@ -49,7 +49,7 @@ static void Load_DEPT() SlObject(depot, _depot_desc); /* Set the town 'pointer' so we can restore it later. */ - if (IsSavegameVersionBefore(141)) depot->town = (Town *)(size_t)_town_index; + if (IsSavegameVersionBefore(SLV_141)) depot->town = (Town *)(size_t)_town_index; } } @@ -59,7 +59,7 @@ static void Ptrs_DEPT() FOR_ALL_DEPOTS(depot) { SlObject(depot, _depot_desc); - if (IsSavegameVersionBefore(141)) depot->town = Town::Get((size_t)depot->town); + if (IsSavegameVersionBefore(SLV_141)) depot->town = Town::Get((size_t)depot->town); } } diff --git a/src/saveload/economy_sl.cpp b/src/saveload/economy_sl.cpp index b0ea7afca8..0ddab13514 100644 --- a/src/saveload/economy_sl.cpp +++ b/src/saveload/economy_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: economy_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,7 @@ static void Load_PRIC() { /* Old games store 49 base prices, very old games store them as int32 */ - int vt = IsSavegameVersionBefore(65) ? SLE_FILE_I32 : SLE_FILE_I64; + int vt = IsSavegameVersionBefore(SLV_65) ? SLE_FILE_I32 : SLE_FILE_I64; SlArray(NULL, 49, vt | SLE_VAR_NULL); SlArray(NULL, 49, SLE_FILE_U16 | SLE_VAR_NULL); } @@ -29,25 +29,25 @@ static void Load_PRIC() /** Cargo payment rates in pre 126 savegames */ static void Load_CAPR() { - uint num_cargo = IsSavegameVersionBefore(55) ? 12 : NUM_CARGO; - int vt = IsSavegameVersionBefore(65) ? SLE_FILE_I32 : SLE_FILE_I64; + uint num_cargo = IsSavegameVersionBefore(SLV_55) ? 12 : IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; + int vt = IsSavegameVersionBefore(SLV_65) ? SLE_FILE_I32 : SLE_FILE_I64; SlArray(NULL, num_cargo, vt | SLE_VAR_NULL); SlArray(NULL, num_cargo, SLE_FILE_U16 | SLE_VAR_NULL); } static const SaveLoad _economy_desc[] = { - SLE_CONDNULL(4, 0, 64), // max_loan - SLE_CONDNULL(8, 65, 143), // max_loan - SLE_CONDVAR(Economy, old_max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), - SLE_CONDVAR(Economy, old_max_loan_unround, SLE_INT64, 65, 125), - SLE_CONDVAR(Economy, old_max_loan_unround_fract, SLE_UINT16, 70, 125), - SLE_CONDVAR(Economy, inflation_prices, SLE_UINT64, 126, SL_MAX_VERSION), - SLE_CONDVAR(Economy, inflation_payment, SLE_UINT64, 126, SL_MAX_VERSION), + SLE_CONDNULL(4, SL_MIN_VERSION, SLV_65), // max_loan + SLE_CONDNULL(8, SLV_65, SLV_144), // max_loan + SLE_CONDVAR(Economy, old_max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_65), + SLE_CONDVAR(Economy, old_max_loan_unround, SLE_INT64, SLV_65, SLV_126), + SLE_CONDVAR(Economy, old_max_loan_unround_fract, SLE_UINT16, SLV_70, SLV_126), + SLE_CONDVAR(Economy, inflation_prices, SLE_UINT64, SLV_126, SL_MAX_VERSION), + SLE_CONDVAR(Economy, inflation_payment, SLE_UINT64, SLV_126, SL_MAX_VERSION), SLE_VAR(Economy, fluct, SLE_INT16), SLE_VAR(Economy, interest_rate, SLE_UINT8), SLE_VAR(Economy, infl_amount, SLE_UINT8), SLE_VAR(Economy, infl_amount_pr, SLE_UINT8), - SLE_CONDVAR(Economy, industry_daily_change_counter, SLE_UINT32, 102, SL_MAX_VERSION), + SLE_CONDVAR(Economy, industry_daily_change_counter, SLE_UINT32, SLV_102, SL_MAX_VERSION), SLE_END() }; @@ -61,14 +61,14 @@ static void Save_ECMY() static void Load_ECMY() { SlObject(&_economy, _economy_desc); - StartupIndustryDailyChanges(IsSavegameVersionBefore(102)); // old savegames will need to be initialized + StartupIndustryDailyChanges(IsSavegameVersionBefore(SLV_102)); // old savegames will need to be initialized } static const SaveLoad _cargopayment_desc[] = { SLE_REF(CargoPayment, front, REF_VEHICLE), SLE_VAR(CargoPayment, route_profit, SLE_INT64), SLE_VAR(CargoPayment, visual_profit, SLE_INT64), - SLE_CONDVAR(CargoPayment, visual_transfer, SLE_INT64, 181, SL_MAX_VERSION), + SLE_CONDVAR(CargoPayment, visual_transfer, SLE_INT64, SLV_181, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/engine_sl.cpp b/src/saveload/engine_sl.cpp index bd5e3e9ab3..5221d1bbdc 100644 --- a/src/saveload/engine_sl.cpp +++ b/src/saveload/engine_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: engine_sl.cpp 27243 2015-04-23 20:07:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,10 +18,10 @@ #include "../safeguards.h" static const SaveLoad _engine_desc[] = { - SLE_CONDVAR(Engine, intro_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Engine, intro_date, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Engine, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Engine, age, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Engine, intro_date, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Engine, intro_date, SLE_INT32, SLV_31, SL_MAX_VERSION), + SLE_CONDVAR(Engine, age, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Engine, age, SLE_INT32, SLV_31, SL_MAX_VERSION), SLE_VAR(Engine, reliability, SLE_UINT16), SLE_VAR(Engine, reliability_spd_dec, SLE_UINT16), SLE_VAR(Engine, reliability_start, SLE_UINT16), @@ -31,19 +31,19 @@ static const SaveLoad _engine_desc[] = { SLE_VAR(Engine, duration_phase_2, SLE_UINT16), SLE_VAR(Engine, duration_phase_3, SLE_UINT16), - SLE_CONDNULL(1, 0, 120), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_121), SLE_VAR(Engine, flags, SLE_UINT8), - SLE_CONDNULL(1, 0, 178), // old preview_company_rank - SLE_CONDVAR(Engine, preview_asked, SLE_UINT16, 179, SL_MAX_VERSION), - SLE_CONDVAR(Engine, preview_company, SLE_UINT8, 179, SL_MAX_VERSION), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_179), // old preview_company_rank + SLE_CONDVAR(Engine, preview_asked, SLE_UINT16, SLV_179, SL_MAX_VERSION), + SLE_CONDVAR(Engine, preview_company, SLE_UINT8, SLV_179, SL_MAX_VERSION), SLE_VAR(Engine, preview_wait, SLE_UINT8), - SLE_CONDNULL(1, 0, 44), - SLE_CONDVAR(Engine, company_avail, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), - SLE_CONDVAR(Engine, company_avail, SLE_UINT16, 104, SL_MAX_VERSION), - SLE_CONDVAR(Engine, company_hidden, SLE_UINT16, 193, SL_MAX_VERSION), - SLE_CONDSTR(Engine, name, SLE_STR, 0, 84, SL_MAX_VERSION), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_45), + SLE_CONDVAR(Engine, company_avail, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_104), + SLE_CONDVAR(Engine, company_avail, SLE_UINT16, SLV_104, SL_MAX_VERSION), + SLE_CONDVAR(Engine, company_hidden, SLE_UINT16, SLV_193, SL_MAX_VERSION), + SLE_CONDSTR(Engine, name, SLE_STR, 0, SLV_84, SL_MAX_VERSION), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(16, SLV_2, SLV_144), // old reserved space SLE_END() }; @@ -105,7 +105,7 @@ static void Load_ENGN() Engine *e = GetTempDataEngine(index); SlObject(e, _engine_desc); - if (IsSavegameVersionBefore(179)) { + if (IsSavegameVersionBefore(SLV_179)) { /* preview_company_rank was replaced with preview_company and preview_asked. * Just cancel any previews. */ e->flags &= ~4; // ENGINE_OFFER_WINDOW_OPEN diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp index 4135b74d89..325ae1c9d4 100644 --- a/src/saveload/game_sl.cpp +++ b/src/saveload/game_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: game_sl.cpp 27003 2014-10-12 18:41:53Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/gamelog_sl.cpp b/src/saveload/gamelog_sl.cpp index e36e0d11fb..d1c502d3be 100644 --- a/src/saveload/gamelog_sl.cpp +++ b/src/saveload/gamelog_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: gamelog_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -29,7 +29,7 @@ static const SaveLoad _glog_mode_desc[] = { }; static const SaveLoad _glog_revision_desc[] = { - SLE_ARR(LoggedChange, revision.text, SLE_UINT8, NETWORK_REVISION_LENGTH), + SLE_ARR(LoggedChange, revision.text, SLE_UINT8, GAMELOG_REVISION_LENGTH), SLE_VAR(LoggedChange, revision.newgrf, SLE_UINT32), SLE_VAR(LoggedChange, revision.slver, SLE_UINT16), SLE_VAR(LoggedChange, revision.modified, SLE_UINT8), diff --git a/src/saveload/goal_sl.cpp b/src/saveload/goal_sl.cpp index 2e37117972..a8cdc2305d 100644 --- a/src/saveload/goal_sl.cpp +++ b/src/saveload/goal_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: goal_sl.cpp 26593 2014-05-17 17:18:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,8 +21,8 @@ static const SaveLoad _goals_desc[] = { SLE_VAR(Goal, type, SLE_FILE_U16 | SLE_VAR_U8), SLE_VAR(Goal, dst, SLE_UINT32), SLE_STR(Goal, text, SLE_STR | SLF_ALLOW_CONTROL, 0), - SLE_CONDSTR(Goal, progress, SLE_STR | SLF_ALLOW_CONTROL, 0, 182, SL_MAX_VERSION), - SLE_CONDVAR(Goal, completed, SLE_BOOL, 182, SL_MAX_VERSION), + SLE_CONDSTR(Goal, progress, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_182, SL_MAX_VERSION), + SLE_CONDVAR(Goal, completed, SLE_BOOL, SLV_182, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/group_sl.cpp b/src/saveload/group_sl.cpp index 115cbf8a55..025c8ee3a7 100644 --- a/src/saveload/group_sl.cpp +++ b/src/saveload/group_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: group_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -11,19 +11,23 @@ #include "../stdafx.h" #include "../group.h" +#include "../company_base.h" #include "saveload.h" #include "../safeguards.h" static const SaveLoad _group_desc[] = { - SLE_CONDVAR(Group, name, SLE_NAME, 0, 83), - SLE_CONDSTR(Group, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDNULL(2, 0, 163), // num_vehicle + SLE_CONDVAR(Group, name, SLE_NAME, SL_MIN_VERSION, SLV_84), + SLE_CONDSTR(Group, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_164), // num_vehicle SLE_VAR(Group, owner, SLE_UINT8), SLE_VAR(Group, vehicle_type, SLE_UINT8), SLE_VAR(Group, replace_protection, SLE_BOOL), - SLE_CONDVAR(Group, parent, SLE_UINT16, 189, SL_MAX_VERSION), + SLE_CONDVAR(Group, livery.in_use, SLE_UINT8, SLV_GROUP_LIVERIES, SL_MAX_VERSION), + SLE_CONDVAR(Group, livery.colour1, SLE_UINT8, SLV_GROUP_LIVERIES, SL_MAX_VERSION), + SLE_CONDVAR(Group, livery.colour2, SLE_UINT8, SLV_GROUP_LIVERIES, SL_MAX_VERSION), + SLE_CONDVAR(Group, parent, SLE_UINT16, SLV_189, SL_MAX_VERSION), SLE_END() }; @@ -46,7 +50,13 @@ static void Load_GRPS() Group *g = new (index) Group(); SlObject(g, _group_desc); - if (IsSavegameVersionBefore(189)) g->parent = INVALID_GROUP; + if (IsSavegameVersionBefore(SLV_189)) g->parent = INVALID_GROUP; + + if (IsSavegameVersionBefore(SLV_GROUP_LIVERIES)) { + const Company *c = Company::Get(g->owner); + g->livery.colour1 = c->livery[LS_DEFAULT].colour1; + g->livery.colour2 = c->livery[LS_DEFAULT].colour2; + } } } diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index 3474b67055..9e81861c4e 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: industry_sl.cpp 27929 2017-10-25 15:38:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -20,47 +20,58 @@ static OldPersistentStorage _old_ind_persistent_storage; static const SaveLoad _industry_desc[] = { - SLE_CONDVAR(Industry, location.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Industry, location.tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Industry, location.tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Industry, location.tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), SLE_VAR(Industry, location.w, SLE_FILE_U8 | SLE_VAR_U16), SLE_VAR(Industry, location.h, SLE_FILE_U8 | SLE_VAR_U16), SLE_REF(Industry, town, REF_TOWN), - SLE_CONDNULL( 2, 0, 60), ///< used to be industry's produced_cargo - SLE_CONDARR(Industry, produced_cargo, SLE_UINT8, 2, 78, SL_MAX_VERSION), - SLE_CONDARR(Industry, incoming_cargo_waiting, SLE_UINT16, 3, 70, SL_MAX_VERSION), - SLE_ARR(Industry, produced_cargo_waiting, SLE_UINT16, 2), - SLE_ARR(Industry, production_rate, SLE_UINT8, 2), - SLE_CONDNULL( 3, 0, 60), ///< used to be industry's accepts_cargo - SLE_CONDARR(Industry, accepts_cargo, SLE_UINT8, 3, 78, SL_MAX_VERSION), + SLE_CONDNULL( 2, SL_MIN_VERSION, SLV_61), ///< used to be industry's produced_cargo + SLE_CONDARR(Industry, produced_cargo, SLE_UINT8, 2, SLV_78, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, produced_cargo, SLE_UINT8, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, incoming_cargo_waiting, SLE_UINT16, 3, SLV_70, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, incoming_cargo_waiting, SLE_UINT16, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, produced_cargo_waiting, SLE_UINT16, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, produced_cargo_waiting, SLE_UINT16, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, production_rate, SLE_UINT8, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, production_rate, SLE_UINT8, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDNULL( 3, SL_MIN_VERSION, SLV_61), ///< used to be industry's accepts_cargo + SLE_CONDARR(Industry, accepts_cargo, SLE_UINT8, 3, SLV_78, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, accepts_cargo, SLE_UINT8, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), SLE_VAR(Industry, prod_level, SLE_UINT8), - SLE_ARR(Industry, this_month_production, SLE_UINT16, 2), - SLE_ARR(Industry, this_month_transported, SLE_UINT16, 2), - SLE_ARR(Industry, last_month_pct_transported, SLE_UINT8, 2), - SLE_ARR(Industry, last_month_production, SLE_UINT16, 2), - SLE_ARR(Industry, last_month_transported, SLE_UINT16, 2), + SLE_CONDARR(Industry, this_month_production, SLE_UINT16, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, this_month_production, SLE_UINT16, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, this_month_transported, SLE_UINT16, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, this_month_transported, SLE_UINT16, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, last_month_pct_transported, SLE_UINT8, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, last_month_pct_transported, SLE_UINT8, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, last_month_production, SLE_UINT16, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, last_month_production, SLE_UINT16, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDARR(Industry, last_month_transported, SLE_UINT16, 2, SL_MIN_VERSION, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, last_month_transported, SLE_UINT16, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), SLE_VAR(Industry, counter, SLE_UINT16), SLE_VAR(Industry, type, SLE_UINT8), SLE_VAR(Industry, owner, SLE_UINT8), SLE_VAR(Industry, random_colour, SLE_UINT8), - SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, SLV_31, SL_MAX_VERSION), SLE_VAR(Industry, was_cargo_delivered, SLE_UINT8), - SLE_CONDVAR(Industry, founder, SLE_UINT8, 70, SL_MAX_VERSION), - SLE_CONDVAR(Industry, construction_date, SLE_INT32, 70, SL_MAX_VERSION), - SLE_CONDVAR(Industry, construction_type, SLE_UINT8, 70, SL_MAX_VERSION), - SLE_CONDVAR(Industry, last_cargo_accepted_at, SLE_INT32, 70, SL_MAX_VERSION), - SLE_CONDVAR(Industry, selected_layout, SLE_UINT8, 73, SL_MAX_VERSION), + SLE_CONDVAR(Industry, founder, SLE_UINT8, SLV_70, SL_MAX_VERSION), + SLE_CONDVAR(Industry, construction_date, SLE_INT32, SLV_70, SL_MAX_VERSION), + SLE_CONDVAR(Industry, construction_type, SLE_UINT8, SLV_70, SL_MAX_VERSION), + SLE_CONDVAR(Industry, last_cargo_accepted_at[0], SLE_INT32, SLV_70, SLV_EXTEND_INDUSTRY_CARGO_SLOTS), + SLE_CONDARR(Industry, last_cargo_accepted_at, SLE_INT32, 16, SLV_EXTEND_INDUSTRY_CARGO_SLOTS, SL_MAX_VERSION), + SLE_CONDVAR(Industry, selected_layout, SLE_UINT8, SLV_73, SL_MAX_VERSION), - SLEG_CONDARR(_old_ind_persistent_storage.storage, SLE_UINT32, 16, 76, 160), - SLE_CONDREF(Industry, psa, REF_STORAGE, 161, SL_MAX_VERSION), + SLEG_CONDARR(_old_ind_persistent_storage.storage, SLE_UINT32, 16, SLV_76, SLV_161), + SLE_CONDREF(Industry, psa, REF_STORAGE, SLV_161, SL_MAX_VERSION), - SLE_CONDNULL(1, 82, 196), // random_triggers - SLE_CONDVAR(Industry, random, SLE_UINT16, 82, SL_MAX_VERSION), + SLE_CONDNULL(1, SLV_82, SLV_197), // random_triggers + SLE_CONDVAR(Industry, random, SLE_UINT16, SLV_82, SL_MAX_VERSION), - SLE_CONDNULL(32, 2, 143), // old reserved space + SLE_CONDNULL(32, SLV_2, SLV_144), // old reserved space SLE_END() }; @@ -97,11 +108,11 @@ static void Load_INDY() SlObject(i, _industry_desc); /* Before savegame version 161, persistent storages were not stored in a pool. */ - if (IsSavegameVersionBefore(161) && !IsSavegameVersionBefore(76)) { + if (IsSavegameVersionBefore(SLV_161) && !IsSavegameVersionBefore(SLV_76)) { /* Store the old persistent storage. The GRFID will be added later. */ assert(PersistentStorage::CanAllocateItem()); i->psa = new PersistentStorage(0, 0, 0); - memcpy(i->psa->storage, _old_ind_persistent_storage.storage, sizeof(i->psa->storage)); + memcpy(i->psa->storage, _old_ind_persistent_storage.storage, sizeof(_old_ind_persistent_storage.storage)); } Industry::IncIndustryTypeCount(i->type); } diff --git a/src/saveload/labelmaps_sl.cpp b/src/saveload/labelmaps_sl.cpp index ea6b82ddfd..3b898a3b87 100644 --- a/src/saveload/labelmaps_sl.cpp +++ b/src/saveload/labelmaps_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: labelmaps_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp index c6c890ed9a..76390a0101 100644 --- a/src/saveload/linkgraph_sl.cpp +++ b/src/saveload/linkgraph_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: linkgraph_sl.cpp 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -109,7 +109,7 @@ const SaveLoad *GetLinkGraphScheduleDesc() * SaveLoad desc for a link graph node. */ static const SaveLoad _node_desc[] = { - SLE_CONDVAR(Node, xy, SLE_UINT32, 191, SL_MAX_VERSION), + SLE_CONDVAR(Node, xy, SLE_UINT32, SLV_191, SL_MAX_VERSION), SLE_VAR(Node, supply, SLE_UINT32), SLE_VAR(Node, demand, SLE_UINT32), SLE_VAR(Node, station, SLE_UINT16), @@ -121,18 +121,18 @@ static const SaveLoad _node_desc[] = { * SaveLoad desc for a link graph edge. */ static const SaveLoad _edge_desc[] = { - SLE_CONDNULL(4, 0, 190), // distance + SLE_CONDNULL(4, SL_MIN_VERSION, SLV_191), // distance SLE_VAR(Edge, capacity, SLE_UINT32), SLE_VAR(Edge, usage, SLE_UINT32), SLE_VAR(Edge, last_unrestricted_update, SLE_INT32), - SLE_CONDVAR(Edge, last_restricted_update, SLE_INT32, 187, SL_MAX_VERSION), + SLE_CONDVAR(Edge, last_restricted_update, SLE_INT32, SLV_187, SL_MAX_VERSION), SLE_VAR(Edge, next_edge, SLE_UINT16), SLE_END() }; /** * Save/load a link graph. - * @param comp Link graph to be saved or loaded. + * @param lg Link graph to be saved or loaded. */ void SaveLoad_LinkGraph(LinkGraph &lg) { @@ -140,7 +140,7 @@ void SaveLoad_LinkGraph(LinkGraph &lg) for (NodeID from = 0; from < size; ++from) { Node *node = &lg.nodes[from]; SlObject(node, _node_desc); - if (IsSavegameVersionBefore(191)) { + if (IsSavegameVersionBefore(SLV_191)) { /* We used to save the full matrix ... */ for (NodeID to = 0; to < size; ++to) { SlObject(&lg.edges[from][to], _edge_desc); @@ -229,7 +229,7 @@ static void Load_LGRS() */ void AfterLoadLinkGraphs() { - if (IsSavegameVersionBefore(191)) { + if (IsSavegameVersionBefore(SLV_191)) { LinkGraph *lg; FOR_ALL_LINK_GRAPHS(lg) { for (NodeID node_id = 0; node_id < lg->Size(); ++node_id) { diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index 3d7acfb3b8..5402ecc0d2 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: map_sl.cpp 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -22,8 +22,8 @@ static uint32 _map_dim_x; static uint32 _map_dim_y; static const SaveLoadGlobVarList _map_dimensions[] = { - SLEG_CONDVAR(_map_dim_x, SLE_UINT32, 6, SL_MAX_VERSION), - SLEG_CONDVAR(_map_dim_y, SLE_UINT32, 6, SL_MAX_VERSION), + SLEG_CONDVAR(_map_dim_x, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLEG_CONDVAR(_map_dim_y, SLE_UINT32, SLV_6, SL_MAX_VERSION), SLEG_END() }; @@ -126,7 +126,7 @@ static void Load_MAP2() for (TileIndex i = 0; i != size;) { SlArray(buf, MAP_SL_BUF_SIZE, /* In those versions the m2 was 8 bits */ - IsSavegameVersionBefore(5) ? SLE_FILE_U8 | SLE_VAR_U16 : SLE_UINT16 + IsSavegameVersionBefore(SLV_5) ? SLE_FILE_U8 | SLE_VAR_U16 : SLE_UINT16 ); for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) _m[i++].m2 = buf[j]; } @@ -218,7 +218,7 @@ static void Load_MAP6() SmallStackSafeStackAlloc buf; TileIndex size = MapSize(); - if (IsSavegameVersionBefore(42)) { + if (IsSavegameVersionBefore(SLV_42)) { for (TileIndex i = 0; i != size;) { /* 1024, otherwise we overflow on 64x64 maps! */ SlArray(buf, 1024, SLE_UINT8); @@ -272,6 +272,30 @@ static void Save_MAP7() } } +static void Load_MAP8() +{ + SmallStackSafeStackAlloc buf; + TileIndex size = MapSize(); + + for (TileIndex i = 0; i != size;) { + SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT16); + for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) _me[i++].m8 = buf[j]; + } +} + +static void Save_MAP8() +{ + SmallStackSafeStackAlloc buf; + TileIndex size = MapSize(); + + SlSetLength(size * sizeof(uint16)); + for (TileIndex i = 0; i != size;) { + for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = _me[i++].m8; + SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT16); + } +} + + extern const ChunkHandler _map_chunk_handlers[] = { { 'MAPS', Save_MAPS, Load_MAPS, NULL, Check_MAPS, CH_RIFF }, { 'MAPT', Save_MAPT, Load_MAPT, NULL, NULL, CH_RIFF }, @@ -282,5 +306,6 @@ extern const ChunkHandler _map_chunk_handlers[] = { { 'M3HI', Save_MAP4, Load_MAP4, NULL, NULL, CH_RIFF }, { 'MAP5', Save_MAP5, Load_MAP5, NULL, NULL, CH_RIFF }, { 'MAPE', Save_MAP6, Load_MAP6, NULL, NULL, CH_RIFF }, - { 'MAP7', Save_MAP7, Load_MAP7, NULL, NULL, CH_RIFF | CH_LAST }, + { 'MAP7', Save_MAP7, Load_MAP7, NULL, NULL, CH_RIFF }, + { 'MAP8', Save_MAP8, Load_MAP8, NULL, NULL, CH_RIFF | CH_LAST }, }; diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index d56be29842..cca3365b57 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: misc_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -71,52 +71,52 @@ void ResetViewportAfterLoadGame() byte _age_cargo_skip_counter; ///< Skip aging of cargo? Used before savegame version 162. static const SaveLoadGlobVarList _date_desc[] = { - SLEG_CONDVAR(_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLEG_CONDVAR(_date, SLE_INT32, 31, SL_MAX_VERSION), + SLEG_CONDVAR(_date, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLEG_CONDVAR(_date, SLE_INT32, SLV_31, SL_MAX_VERSION), SLEG_VAR(_date_fract, SLE_UINT16), SLEG_VAR(_tick_counter, SLE_UINT16), - SLE_CONDNULL(2, 0, 156), // _vehicle_id_ctr_day - SLEG_CONDVAR(_age_cargo_skip_counter, SLE_UINT8, 0, 161), - SLE_CONDNULL(1, 0, 45), - SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLEG_CONDVAR(_cur_tileloop_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_157), // _vehicle_id_ctr_day + SLEG_CONDVAR(_age_cargo_skip_counter, SLE_UINT8, SL_MIN_VERSION, SLV_162), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_46), + SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLEG_CONDVAR(_cur_tileloop_tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), SLEG_VAR(_disaster_delay, SLE_UINT16), - SLE_CONDNULL(2, 0, 119), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_120), SLEG_VAR(_random.state[0], SLE_UINT32), SLEG_VAR(_random.state[1], SLE_UINT32), - SLE_CONDNULL(1, 0, 9), - SLE_CONDNULL(4, 10, 119), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_10), + SLE_CONDNULL(4, SLV_10, SLV_120), SLEG_VAR(_cur_company_tick_index, SLE_FILE_U8 | SLE_VAR_U32), - SLEG_CONDVAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32, 0, 108), - SLEG_CONDVAR(_next_competitor_start, SLE_UINT32, 109, SL_MAX_VERSION), + SLEG_CONDVAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_109), + SLEG_CONDVAR(_next_competitor_start, SLE_UINT32, SLV_109, SL_MAX_VERSION), SLEG_VAR(_trees_tick_ctr, SLE_UINT8), - SLEG_CONDVAR(_pause_mode, SLE_UINT8, 4, SL_MAX_VERSION), - SLE_CONDNULL(4, 11, 119), + SLEG_CONDVAR(_pause_mode, SLE_UINT8, SLV_4, SL_MAX_VERSION), + SLE_CONDNULL(4, SLV_11, SLV_120), SLEG_END() }; static const SaveLoadGlobVarList _date_check_desc[] = { - SLEG_CONDVAR(_load_check_data.current_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLEG_CONDVAR(_load_check_data.current_date, SLE_INT32, 31, SL_MAX_VERSION), + SLEG_CONDVAR(_load_check_data.current_date, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLEG_CONDVAR(_load_check_data.current_date, SLE_INT32, SLV_31, SL_MAX_VERSION), SLE_NULL(2), // _date_fract SLE_NULL(2), // _tick_counter - SLE_CONDNULL(2, 0, 156), // _vehicle_id_ctr_day - SLE_CONDNULL(1, 0, 161), // _age_cargo_skip_counter - SLE_CONDNULL(1, 0, 45), - SLE_CONDNULL(2, 0, 5), // _cur_tileloop_tile - SLE_CONDNULL(4, 6, SL_MAX_VERSION), // _cur_tileloop_tile + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_157), // _vehicle_id_ctr_day + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_162), // _age_cargo_skip_counter + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_46), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), // _cur_tileloop_tile + SLE_CONDNULL(4, SLV_6, SL_MAX_VERSION), // _cur_tileloop_tile SLE_NULL(2), // _disaster_delay - SLE_CONDNULL(2, 0, 119), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_120), SLE_NULL(4), // _random.state[0] SLE_NULL(4), // _random.state[1] - SLE_CONDNULL(1, 0, 9), - SLE_CONDNULL(4, 10, 119), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_10), + SLE_CONDNULL(4, SLV_10, SLV_120), SLE_NULL(1), // _cur_company_tick_index - SLE_CONDNULL(2, 0, 108), // _next_competitor_start - SLE_CONDNULL(4, 109, SL_MAX_VERSION), // _next_competitor_start + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_109), // _next_competitor_start + SLE_CONDNULL(4, SLV_109, SL_MAX_VERSION), // _next_competitor_start SLE_NULL(1), // _trees_tick_ctr - SLE_CONDNULL(1, 4, SL_MAX_VERSION), // _pause_mode - SLE_CONDNULL(4, 11, 119), + SLE_CONDNULL(1, SLV_4, SL_MAX_VERSION), // _pause_mode + SLE_CONDNULL(4, SLV_11, SLV_120), SLEG_END() }; @@ -130,17 +130,17 @@ static void SaveLoad_DATE() static void Check_DATE() { SlGlobList(_date_check_desc); - if (IsSavegameVersionBefore(31)) { + if (IsSavegameVersionBefore(SLV_31)) { _load_check_data.current_date += DAYS_TILL_ORIGINAL_BASE_YEAR; } } static const SaveLoadGlobVarList _view_desc[] = { - SLEG_CONDVAR(_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLEG_CONDVAR(_saved_scrollpos_x, SLE_INT32, 6, SL_MAX_VERSION), - SLEG_CONDVAR(_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLEG_CONDVAR(_saved_scrollpos_y, SLE_INT32, 6, SL_MAX_VERSION), + SLEG_CONDVAR(_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_6), + SLEG_CONDVAR(_saved_scrollpos_x, SLE_INT32, SLV_6, SL_MAX_VERSION), + SLEG_CONDVAR(_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_6), + SLEG_CONDVAR(_saved_scrollpos_y, SLE_INT32, SLV_6, SL_MAX_VERSION), SLEG_VAR(_saved_scrollpos_zoom, SLE_UINT8), SLEG_END() }; diff --git a/src/saveload/newgrf_sl.cpp b/src/saveload/newgrf_sl.cpp index 6c2f3b2937..e40b45926c 100644 --- a/src/saveload/newgrf_sl.cpp +++ b/src/saveload/newgrf_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: newgrf_sl.cpp 27772 2017-03-07 20:18:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -61,10 +61,10 @@ static const SaveLoad _grfconfig_desc[] = { SLE_STR(GRFConfig, filename, SLE_STR, 0x40), SLE_VAR(GRFConfig, ident.grfid, SLE_UINT32), SLE_ARR(GRFConfig, ident.md5sum, SLE_UINT8, 16), - SLE_CONDVAR(GRFConfig, version, SLE_UINT32, 151, SL_MAX_VERSION), + SLE_CONDVAR(GRFConfig, version, SLE_UINT32, SLV_151, SL_MAX_VERSION), SLE_ARR(GRFConfig, param, SLE_UINT32, 0x80), SLE_VAR(GRFConfig, num_params, SLE_UINT8), - SLE_CONDVAR(GRFConfig, palette, SLE_UINT8, 101, SL_MAX_VERSION), + SLE_CONDVAR(GRFConfig, palette, SLE_UINT8, SLV_101, SL_MAX_VERSION), SLE_END() }; @@ -87,7 +87,7 @@ static void Load_NGRF_common(GRFConfig *&grfconfig) while (SlIterateArray() != -1) { GRFConfig *c = new GRFConfig(); SlObject(c, _grfconfig_desc); - if (IsSavegameVersionBefore(101)) c->SetSuitablePalette(); + if (IsSavegameVersionBefore(SLV_101)) c->SetSuitablePalette(); AppendToGRFConfigList(&grfconfig, c); } } diff --git a/src/saveload/newgrf_sl.h b/src/saveload/newgrf_sl.h index eedaca1341..c0714d65d6 100644 --- a/src/saveload/newgrf_sl.h +++ b/src/saveload/newgrf_sl.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_sl.h 21886 2011-01-22 09:53:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/object_sl.cpp b/src/saveload/object_sl.cpp index f43ff66e75..6b0b99e479 100644 --- a/src/saveload/object_sl.cpp +++ b/src/saveload/object_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: object_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -24,9 +24,9 @@ static const SaveLoad _object_desc[] = { SLE_VAR(Object, location.h, SLE_FILE_U8 | SLE_VAR_U16), SLE_REF(Object, town, REF_TOWN), SLE_VAR(Object, build_date, SLE_UINT32), - SLE_CONDVAR(Object, colour, SLE_UINT8, 148, SL_MAX_VERSION), - SLE_CONDVAR(Object, view, SLE_UINT8, 155, SL_MAX_VERSION), - SLE_CONDVAR(Object, type, SLE_UINT16, 186, SL_MAX_VERSION), + SLE_CONDVAR(Object, colour, SLE_UINT8, SLV_148, SL_MAX_VERSION), + SLE_CONDVAR(Object, view, SLE_UINT8, SLV_155, SL_MAX_VERSION), + SLE_CONDVAR(Object, type, SLE_UINT16, SLV_186, SL_MAX_VERSION), SLE_END() }; @@ -56,7 +56,7 @@ static void Ptrs_OBJS() Object *o; FOR_ALL_OBJECTS(o) { SlObject(o, _object_desc); - if (IsSavegameVersionBefore(148) && !IsTileType(o->location.tile, MP_OBJECT)) { + if (IsSavegameVersionBefore(SLV_148) && !IsTileType(o->location.tile, MP_OBJECT)) { /* Due to a small bug stale objects could remain. */ delete o; } diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp index b9d8cadcfb..e0ad0e732a 100644 --- a/src/saveload/oldloader.cpp +++ b/src/saveload/oldloader.cpp @@ -1,4 +1,4 @@ -/* $Id: oldloader.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -265,7 +265,7 @@ static SavegameType DetermineOldSavegameType(FILE *f, char *title, const char *l case SGT_TTD: title = strecpy(title, "(TTD) ", last); break; default: title = strecpy(title, "(broken) ", last); break; } - title = strecpy(title, temp, last); + strecpy(title, temp, last); } return type; diff --git a/src/saveload/oldloader.h b/src/saveload/oldloader.h index f92aa31f32..5483440ea6 100644 --- a/src/saveload/oldloader.h +++ b/src/saveload/oldloader.h @@ -1,4 +1,4 @@ -/* $Id: oldloader.h 23595 2011-12-19 17:48:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 35c6eafc3a..1974bb31fa 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: oldloader_sl.cpp 27668 2016-10-16 14:59:44Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,6 +28,7 @@ #include "../engine_func.h" #include "../company_base.h" #include "../disaster_vehicle.h" +#include "../core/smallvec_type.hpp" #include "saveload_internal.h" #include "oldloader.h" @@ -490,8 +491,7 @@ static inline uint RemapOrderIndex(uint x) return _savegame_type == SGT_TTO ? (x - 0x1AC4) / 2 : (x - 0x1C18) / 2; } -extern TileIndex *_animated_tile_list; -extern uint _animated_tile_count; +extern SmallVector _animated_tiles; extern char *_old_name_array; static uint32 _old_town_index; @@ -640,22 +640,18 @@ static bool LoadOldOrder(LoadgameState *ls, int num) static bool LoadOldAnimTileList(LoadgameState *ls, int num) { - /* This is slightly hackish - we must load a chunk into an array whose - * address isn't static, but instead pointed to by _animated_tile_list. - * To achieve that, create an OldChunks list on the stack on the fly. - * The list cannot be static because the value of _animated_tile_list - * can change between calls. */ - + TileIndex anim_list[256]; const OldChunks anim_chunk[] = { - OCL_VAR ( OC_TILE, 256, _animated_tile_list ), + OCL_VAR ( OC_TILE, 256, anim_list ), OCL_END () }; if (!LoadChunk(ls, NULL, anim_chunk)) return false; - /* Update the animated tile counter by counting till the first zero in the array */ - for (_animated_tile_count = 0; _animated_tile_count < 256; _animated_tile_count++) { - if (_animated_tile_list[_animated_tile_count] == 0) break; + /* The first zero in the loaded array indicates the end of the list. */ + for (int i = 0; i < 256; i++) { + if (anim_list[i] == 0) break; + *_animated_tiles.Append() = anim_list[i]; } return true; @@ -950,7 +946,7 @@ static const OldChunks _company_chunk[] = { OCL_SVAR( OC_UINT8, Company, block_preview ), OCL_CNULL( OC_TTD, 1 ), // Old AI - OCL_SVAR( OC_TTD | OC_UINT8, Company, avail_railtypes ), + OCL_CNULL( OC_TTD, 1 ), // avail_railtypes OCL_SVAR( OC_TILE, Company, location_of_HQ ), OCL_SVAR( OC_TTD | OC_UINT8, Company, share_owners[0] ), OCL_SVAR( OC_TTD | OC_UINT8, Company, share_owners[1] ), diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp index a19010d4b7..b89514d479 100644 --- a/src/saveload/order_sl.cpp +++ b/src/saveload/order_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: order_sl.cpp 26819 2014-09-14 15:11:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,7 +28,7 @@ void Order::ConvertFromOldSavegame() this->flags = 0; /* First handle non-stop - use value from savegame if possible, else use value from config file */ - if (_settings_client.gui.sg_new_nonstop || (IsSavegameVersionBefore(22) && _savegame_type != SGT_TTO && _savegame_type != SGT_TTD && _settings_client.gui.new_nonstop)) { + if (_settings_client.gui.sg_new_nonstop || (IsSavegameVersionBefore(SLV_22) && _savegame_type != SGT_TTO && _savegame_type != SGT_TTD && _settings_client.gui.new_nonstop)) { /* OFB_NON_STOP */ this->SetNonStopType((old_flags & 8) ? ONSF_NO_STOP_AT_ANY_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS); } else { @@ -49,7 +49,7 @@ void Order::ConvertFromOldSavegame() this->SetLoadType(OLF_LOAD_IF_POSSIBLE); } else { /* old OTTD versions stored full_load_any in config file - assume it was enabled when loading */ - this->SetLoadType(_settings_client.gui.sg_full_load_any || IsSavegameVersionBefore(22) ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD); + this->SetLoadType(_settings_client.gui.sg_full_load_any || IsSavegameVersionBefore(SLV_22) ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD); } if (this->IsType(OT_GOTO_STATION)) this->SetStopLocation(OSL_PLATFORM_FAR_END); @@ -108,15 +108,15 @@ const SaveLoad *GetOrderDescription() SLE_VAR(Order, flags, SLE_UINT8), SLE_VAR(Order, dest, SLE_UINT16), SLE_REF(Order, next, REF_ORDER), - SLE_CONDVAR(Order, refit_cargo, SLE_UINT8, 36, SL_MAX_VERSION), - SLE_CONDNULL(1, 36, 181), // refit_subtype - SLE_CONDVAR(Order, wait_time, SLE_UINT16, 67, SL_MAX_VERSION), - SLE_CONDVAR(Order, travel_time, SLE_UINT16, 67, SL_MAX_VERSION), - SLE_CONDVAR(Order, max_speed, SLE_UINT16, 172, SL_MAX_VERSION), + SLE_CONDVAR(Order, refit_cargo, SLE_UINT8, SLV_36, SL_MAX_VERSION), + SLE_CONDNULL(1, SLV_36, SLV_182), // refit_subtype + SLE_CONDVAR(Order, wait_time, SLE_UINT16, SLV_67, SL_MAX_VERSION), + SLE_CONDVAR(Order, travel_time, SLE_UINT16, SLV_67, SL_MAX_VERSION), + SLE_CONDVAR(Order, max_speed, SLE_UINT16, SLV_172, SL_MAX_VERSION), /* Leftover from the minor savegame version stuff * We will never use those free bytes, but we have to keep this line to allow loading of old savegames */ - SLE_CONDNULL(10, 5, 35), + SLE_CONDNULL(10, SLV_5, SLV_36), SLE_END() }; @@ -135,12 +135,12 @@ static void Save_ORDR() static void Load_ORDR() { - if (IsSavegameVersionBefore(5, 2)) { + if (IsSavegameVersionBefore(SLV_5, 2)) { /* Version older than 5.2 did not have a ->next pointer. Convert them * (in the old days, the orderlist was 5000 items big) */ size_t len = SlGetFieldLength(); - if (IsSavegameVersionBefore(5)) { + if (IsSavegameVersionBefore(SLV_5)) { /* Pre-version 5 had another layout for orders * (uint16 instead of uint32) */ len /= sizeof(uint16); @@ -154,7 +154,7 @@ static void Load_ORDR() } free(orders); - } else if (IsSavegameVersionBefore(5, 2)) { + } else if (IsSavegameVersionBefore(SLV_5, 2)) { len /= sizeof(uint32); uint32 *orders = MallocT(len + 1); @@ -186,7 +186,7 @@ static void Load_ORDR() while ((index = SlIterateArray()) != -1) { Order *order = new (index) Order(); SlObject(order, GetOrderDescription()); - if (IsSavegameVersionBefore(190)) { + if (IsSavegameVersionBefore(SLV_190)) { order->SetTravelTimetabled(order->GetTravelTime() > 0); order->SetWaitTimetabled(order->GetWaitTime() > 0); } @@ -197,7 +197,7 @@ static void Load_ORDR() static void Ptrs_ORDR() { /* Orders from old savegames have pointers corrected in Load_ORDR */ - if (IsSavegameVersionBefore(5, 2)) return; + if (IsSavegameVersionBefore(SLV_5, 2)) return; Order *o; @@ -253,18 +253,18 @@ const SaveLoad *GetOrderBackupDescription() SLE_VAR(OrderBackup, user, SLE_UINT32), SLE_VAR(OrderBackup, tile, SLE_UINT32), SLE_VAR(OrderBackup, group, SLE_UINT16), - SLE_CONDVAR(OrderBackup, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 0, 191), - SLE_CONDVAR(OrderBackup, service_interval, SLE_UINT16, 192, SL_MAX_VERSION), + SLE_CONDVAR(OrderBackup, service_interval, SLE_FILE_U32 | SLE_VAR_U16, SL_MIN_VERSION, SLV_192), + SLE_CONDVAR(OrderBackup, service_interval, SLE_UINT16, SLV_192, SL_MAX_VERSION), SLE_STR(OrderBackup, name, SLE_STR, 0), - SLE_CONDNULL(2, 0, 191), // clone (2 bytes of pointer, i.e. garbage) - SLE_CONDREF(OrderBackup, clone, REF_VEHICLE, 192, SL_MAX_VERSION), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_192), // clone (2 bytes of pointer, i.e. garbage) + SLE_CONDREF(OrderBackup, clone, REF_VEHICLE, SLV_192, SL_MAX_VERSION), SLE_VAR(OrderBackup, cur_real_order_index, SLE_UINT8), - SLE_CONDVAR(OrderBackup, cur_implicit_order_index, SLE_UINT8, 176, SL_MAX_VERSION), - SLE_CONDVAR(OrderBackup, current_order_time, SLE_UINT32, 176, SL_MAX_VERSION), - SLE_CONDVAR(OrderBackup, lateness_counter, SLE_INT32, 176, SL_MAX_VERSION), - SLE_CONDVAR(OrderBackup, timetable_start, SLE_INT32, 176, SL_MAX_VERSION), - SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 176, 179), - SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_UINT16, 180, SL_MAX_VERSION), + SLE_CONDVAR(OrderBackup, cur_implicit_order_index, SLE_UINT8, SLV_176, SL_MAX_VERSION), + SLE_CONDVAR(OrderBackup, current_order_time, SLE_UINT32, SLV_176, SL_MAX_VERSION), + SLE_CONDVAR(OrderBackup, lateness_counter, SLE_INT32, SLV_176, SL_MAX_VERSION), + SLE_CONDVAR(OrderBackup, timetable_start, SLE_INT32, SLV_176, SL_MAX_VERSION), + SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, SLV_176, SLV_180), + SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_UINT16, SLV_180, SL_MAX_VERSION), SLE_REF(OrderBackup, orders, REF_ORDER), SLE_END() }; diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 0df7108404..9be9506b15 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1,4 +1,4 @@ -/* $Id: saveload.cpp 27990 2018-03-14 18:05:06Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,6 +21,8 @@ *
  • repeat this until everything is done, and flush any remaining output to file * */ +#include + #include "../stdafx.h" #include "../debug.h" #include "../station_base.h" @@ -51,231 +53,16 @@ #include "../safeguards.h" -/* - * Previous savegame versions, the trunk revision where they were - * introduced and the released version that had that particular - * savegame version. - * Up to savegame version 18 there is a minor version as well. - * - * 1.0 0.1.x, 0.2.x - * 2.0 0.3.0 - * 2.1 0.3.1, 0.3.2 - * 3.x lost - * 4.0 1 - * 4.1 122 0.3.3, 0.3.4 - * 4.2 1222 0.3.5 - * 4.3 1417 - * 4.4 1426 - * 5.0 1429 - * 5.1 1440 - * 5.2 1525 0.3.6 - * 6.0 1721 - * 6.1 1768 - * 7.0 1770 - * 8.0 1786 - * 9.0 1909 - * 10.0 2030 - * 11.0 2033 - * 11.1 2041 - * 12.1 2046 - * 13.1 2080 0.4.0, 0.4.0.1 - * 14.0 2441 - * 15.0 2499 - * 16.0 2817 - * 16.1 3155 - * 17.0 3212 - * 17.1 3218 - * 18 3227 - * 19 3396 - * 20 3403 - * 21 3472 0.4.x - * 22 3726 - * 23 3915 - * 24 4150 - * 25 4259 - * 26 4466 - * 27 4757 - * 28 4987 - * 29 5070 - * 30 5946 - * 31 5999 - * 32 6001 - * 33 6440 - * 34 6455 - * 35 6602 - * 36 6624 - * 37 7182 - * 38 7195 - * 39 7269 - * 40 7326 - * 41 7348 0.5.x - * 42 7573 - * 43 7642 - * 44 8144 - * 45 8501 - * 46 8705 - * 47 8735 - * 48 8935 - * 49 8969 - * 50 8973 - * 51 8978 - * 52 9066 - * 53 9316 - * 54 9613 - * 55 9638 - * 56 9667 - * 57 9691 - * 58 9762 - * 59 9779 - * 60 9874 - * 61 9892 - * 62 9905 - * 63 9956 - * 64 10006 - * 65 10210 - * 66 10211 - * 67 10236 - * 68 10266 - * 69 10319 - * 70 10541 - * 71 10567 - * 72 10601 - * 73 10903 - * 74 11030 - * 75 11107 - * 76 11139 - * 77 11172 - * 78 11176 - * 79 11188 - * 80 11228 - * 81 11244 - * 82 11410 - * 83 11589 - * 84 11822 - * 85 11874 - * 86 12042 - * 87 12129 - * 88 12134 - * 89 12160 - * 90 12293 - * 91 12347 - * 92 12381 0.6.x - * 93 12648 - * 94 12816 - * 95 12924 - * 96 13226 - * 97 13256 - * 98 13375 - * 99 13838 - * 100 13952 - * 101 14233 - * 102 14332 - * 103 14598 - * 104 14735 - * 105 14803 - * 106 14919 - * 107 15027 - * 108 15045 - * 109 15075 - * 110 15148 - * 111 15190 - * 112 15290 - * 113 15340 - * 114 15601 - * 115 15695 - * 116 15893 0.7.x - * 117 16037 - * 118 16129 - * 119 16242 - * 120 16439 - * 121 16694 - * 122 16855 - * 123 16909 - * 124 16993 - * 125 17113 - * 126 17433 - * 127 17439 - * 128 18281 - * 129 18292 - * 130 18404 - * 131 18481 - * 132 18522 - * 133 18674 - * 134 18703 - * 135 18719 - * 136 18764 - * 137 18912 - * 138 18942 1.0.x - * 139 19346 - * 140 19382 - * 141 19799 - * 142 20003 - * 143 20048 - * 144 20334 - * 145 20376 - * 146 20446 - * 147 20621 - * 148 20659 - * 149 20832 - * 150 20857 - * 151 20918 - * 152 21171 - * 153 21263 - * 154 21426 - * 155 21453 - * 156 21728 - * 157 21862 - * 158 21933 - * 159 21962 - * 160 21974 1.1.x - * 161 22567 - * 162 22713 - * 163 22767 - * 164 23290 - * 165 23304 - * 166 23415 - * 167 23504 - * 168 23637 - * 169 23816 - * 170 23826 - * 171 23835 - * 172 23947 - * 173 23967 1.2.0-RC1 - * 174 23973 1.2.x - * 175 24136 - * 176 24446 - * 177 24619 - * 178 24789 - * 179 24810 - * 180 24998 1.3.x - * 181 25012 - * 182 25296 - * 183 25363 - * 184 25508 - * 185 25620 - * 186 25833 - * 187 25899 - * 188 26169 1.4.x - * 189 26450 - * 190 26547 - * 191 26646 - * 192 26700 - * 193 26802 - * 194 26881 1.5.x, 1.6.0 - * 195 27572 1.6.x - * 196 27778 1.7.x - * 197 27978 1.8.x - */ -extern const uint16 SAVEGAME_VERSION = 197; ///< Current savegame version of OpenTTD. +extern const SaveLoadVersion SAVEGAME_VERSION = (SaveLoadVersion)(SL_MAX_VERSION - 1); ///< Current savegame version of OpenTTD. SavegameType _savegame_type; ///< type of savegame we are loading FileToSaveLoad _file_to_saveload; ///< File to save or load in the openttd loop. -uint32 _ttdp_version; ///< version of TTDP savegame (if applicable) -uint16 _sl_version; ///< the major savegame version identifier -byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! -char _savegame_format[8]; ///< how to compress savegames -bool _do_autosave; ///< are we doing an autosave at the moment? +uint32 _ttdp_version; ///< version of TTDP savegame (if applicable) +SaveLoadVersion _sl_version; ///< the major savegame version identifier +byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! +char _savegame_format[8]; ///< how to compress savegames +bool _do_autosave; ///< are we doing an autosave at the moment? /** What are we currently doing? */ enum SaveLoadAction { @@ -810,7 +597,7 @@ static inline byte SlCalcConvFileLen(VarType conv) /** Return the size in bytes of a reference (pointer) */ static inline size_t SlCalcRefLen() { - return IsSavegameVersionBefore(69) ? 2 : 4; + return IsSavegameVersionBefore(SLV_69) ? 2 : 4; } void SlSetArrayIndex(uint index) @@ -1151,7 +938,7 @@ static void SlString(void *ptr, size_t length, VarType conv) StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK; if ((conv & SLF_ALLOW_CONTROL) != 0) { settings = settings | SVS_ALLOW_CONTROL_CODE; - if (IsSavegameVersionBefore(169)) { + if (IsSavegameVersionBefore(SLV_169)) { str_fix_scc_encoded((char *)ptr, (char *)ptr + len); } } @@ -1279,7 +1066,7 @@ static void *IntToReference(size_t index, SLRefType rt) /* After version 4.3 REF_VEHICLE_OLD is saved as REF_VEHICLE, * and should be loaded like that */ - if (rt == REF_VEHICLE_OLD && !IsSavegameVersionBefore(4, 4)) { + if (rt == REF_VEHICLE_OLD && !IsSavegameVersionBefore(SLV_4, 4)) { rt = REF_VEHICLE; } @@ -1298,7 +1085,7 @@ static void *IntToReference(size_t index, SLRefType rt) case REF_ORDER: if (Order::IsValidID(index)) return Order::Get(index); /* in old versions, invalid order was used to mark end of order list */ - if (IsSavegameVersionBefore(5, 2)) return NULL; + if (IsSavegameVersionBefore(SLV_5, 2)) return NULL; SlErrorCorrupt("Referencing invalid Order"); case REF_VEHICLE_OLD: @@ -1350,7 +1137,7 @@ static inline size_t SlCalcListLen(const void *list) { const std::list *l = (const std::list *) list; - int type_size = IsSavegameVersionBefore(69) ? 2 : 4; + int type_size = IsSavegameVersionBefore(SLV_69) ? 2 : 4; /* Each entry is saved as type_size bytes, plus type_size bytes are used for the length * of the list */ return l->size() * type_size + type_size; @@ -1387,11 +1174,11 @@ static void SlList(void *list, SLRefType conv) } case SLA_LOAD_CHECK: case SLA_LOAD: { - size_t length = IsSavegameVersionBefore(69) ? SlReadUint16() : SlReadUint32(); + size_t length = IsSavegameVersionBefore(SLV_69) ? SlReadUint16() : SlReadUint32(); /* Load each reference and push to the end of the list */ for (size_t i = 0; i < length; i++) { - size_t data = IsSavegameVersionBefore(69) ? SlReadUint16() : SlReadUint32(); + size_t data = IsSavegameVersionBefore(SLV_69) ? SlReadUint16() : SlReadUint32(); l->push_back((void *)data); } break; @@ -1415,10 +1202,133 @@ static void SlList(void *list, SLRefType conv) } +/** + * Template class to help with std::deque. + */ +template +class SlDequeHelper { + typedef std::deque SlDequeT; +public: + /** + * Internal templated helper to return the size in bytes of a std::deque. + * @param deque The std::deque to find the size of + * @param conv VarType type of variable that is used for calculating the size + */ + static size_t SlCalcDequeLen(const void *deque, VarType conv) + { + const SlDequeT *l = (const SlDequeT *)deque; + + int type_size = 4; + /* Each entry is saved as type_size bytes, plus type_size bytes are used for the length + * of the list */ + return l->size() * SlCalcConvFileLen(conv) + type_size; + } + + /** + * Internal templated helper to save/load a std::deque. + * @param deque The std::deque being manipulated + * @param conv VarType type of variable that is used for calculating the size + */ + static void SlDeque(void *deque, VarType conv) + { + SlDequeT *l = (SlDequeT *)deque; + + switch (_sl.action) { + case SLA_SAVE: { + SlWriteUint32((uint32)l->size()); + + typename SlDequeT::iterator iter; + for (iter = l->begin(); iter != l->end(); ++iter) { + SlSaveLoadConv(&(*iter), conv); + } + break; + } + case SLA_LOAD_CHECK: + case SLA_LOAD: { + size_t length = SlReadUint32(); + + /* Load each value and push to the end of the deque */ + for (size_t i = 0; i < length; i++) { + T data; + SlSaveLoadConv(&data, conv); + l->push_back(data); + } + break; + } + case SLA_PTRS: + break; + case SLA_NULL: + l->clear(); + break; + default: NOT_REACHED(); + } + } +}; + + +/** + * Return the size in bytes of a std::deque. + * @param deque The std::deque to find the size of + * @param conv VarType type of variable that is used for calculating the size + */ +static inline size_t SlCalcDequeLen(const void *deque, VarType conv) +{ + switch (GetVarMemType(conv)) { + case SLE_VAR_BL: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I8: + case SLE_VAR_U8: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I16: + case SLE_VAR_U16: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I32: + case SLE_VAR_U32: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I64: + case SLE_VAR_U64: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + default: NOT_REACHED(); + } +} + + +/** + * Save/load a std::deque. + * @param deque The std::deque being manipulated + * @param conv VarType type of variable that is used for calculating the size + */ +static void SlDeque(void *deque, VarType conv) +{ + switch (GetVarMemType(conv)) { + case SLE_VAR_BL: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I8: + case SLE_VAR_U8: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I16: + case SLE_VAR_U16: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I32: + case SLE_VAR_U32: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I64: + case SLE_VAR_U64: + SlDequeHelper::SlDeque(deque, conv); + break; + default: NOT_REACHED(); + } +} + + /** Are we going to save this object or not? */ static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld) { - if (_sl_version < sld->version_from || _sl_version > sld->version_to) return false; + if (_sl_version < sld->version_from || _sl_version >= sld->version_to) return false; if (sld->conv & SLF_NOT_IN_SAVE) return false; return true; @@ -1466,6 +1376,7 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld) case SL_ARR: case SL_STR: case SL_LST: + case SL_DEQUE: /* CONDITIONAL saveload types depend on the savegame version */ if (!SlIsObjectValidInSavegame(sld)) break; @@ -1475,6 +1386,7 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld) case SL_ARR: return SlCalcArrayLen(sld->length, sld->conv); case SL_STR: return SlCalcStringLen(GetVariableAddress(object, sld), sld->length, sld->conv); case SL_LST: return SlCalcListLen(GetVariableAddress(object, sld)); + case SL_DEQUE: return SlCalcDequeLen(GetVariableAddress(object, sld), sld->conv); default: NOT_REACHED(); } break; @@ -1543,6 +1455,7 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) case SL_ARR: case SL_STR: case SL_LST: + case SL_DEQUE: /* CONDITIONAL saveload types depend on the savegame version */ if (!SlIsObjectValidInSavegame(sld)) return false; if (SlSkipVariableOnLoad(sld)) return false; @@ -1556,7 +1469,7 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) break; case SLA_LOAD_CHECK: case SLA_LOAD: - *(size_t *)ptr = IsSavegameVersionBefore(69) ? SlReadUint16() : SlReadUint32(); + *(size_t *)ptr = IsSavegameVersionBefore(SLV_69) ? SlReadUint16() : SlReadUint32(); break; case SLA_PTRS: *(void **)ptr = IntToReference(*(size_t *)ptr, (SLRefType)conv); @@ -1570,21 +1483,20 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) case SL_ARR: SlArray(ptr, sld->length, conv); break; case SL_STR: SlString(ptr, sld->length, sld->conv); break; case SL_LST: SlList(ptr, (SLRefType)conv); break; + case SL_DEQUE: SlDeque(ptr, conv); break; default: NOT_REACHED(); } break; - /* SL_WRITEBYTE translates a value of a variable to another one upon - * saving or loading. - * XXX - variable renaming abuse - * game_value: the value of the variable ingame is abused by sld->version_from - * file_value: the value of the variable in the savegame is abused by sld->version_to */ + /* SL_WRITEBYTE writes a value to the savegame to identify the type of an object. + * When loading, the value is read explictly with SlReadByte() to determine which + * object description to use. */ case SL_WRITEBYTE: switch (_sl.action) { - case SLA_SAVE: SlWriteByte(sld->version_to); break; + case SLA_SAVE: SlWriteByte(*(uint8 *)ptr); break; case SLA_LOAD_CHECK: - case SLA_LOAD: *(byte *)ptr = sld->version_from; break; - case SLA_PTRS: break; + case SLA_LOAD: + case SLA_PTRS: case SLA_NULL: break; default: NOT_REACHED(); } @@ -2003,7 +1915,7 @@ struct LZOLoadFilter : LoadFilter { /* Check if size is bad */ ((uint32*)out)[0] = size = tmp[1]; - if (_sl_version != 0) { + if (_sl_version != SL_MIN_VERSION) { tmp[0] = TO_BE32(tmp[0]); size = TO_BE32(size); } @@ -2650,7 +2562,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check) if (fmt == endof(_saveload_formats)) { DEBUG(sl, 0, "Unknown savegame type, trying to load it as the buggy format"); _sl.lf->Reset(); - _sl_version = 0; + _sl_version = SL_MIN_VERSION; _sl_minor_version = 0; /* Try to find the LZO savegame format; it uses 'OTTD' as tag. */ @@ -2668,7 +2580,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check) if (fmt->tag == hdr[0]) { /* check version number */ - _sl_version = TO_BE32(hdr[1]) >> 16; + _sl_version = (SaveLoadVersion)(TO_BE32(hdr[1]) >> 16); /* Minor is not used anymore from version 18.0, but it is still needed * in versions before that (4 cases) which can't be removed easy. * Therefore it is loaded, but never saved (or, it saves a 0 in any scenario). */ @@ -2703,7 +2615,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check) GamelogReset(); - if (IsSavegameVersionBefore(4)) { + if (IsSavegameVersionBefore(SLV_4)) { /* * NewGRFs were introduced between 0.3,4 and 0.3.5, which both * shared savegame version 4. Anything before that 'obviously' @@ -2782,7 +2694,7 @@ SaveOrLoadResult LoadWithFilter(LoadFilter *reader) * Main Save or Load function where the high-level saveload functions are * handled. It opens the savegame, selects format and checks versions * @param filename The name of the savegame being created/loaded - * @param mode Save or load mode. Load can also be a TTD(Patch) game. Use #SL_LOAD, #SL_OLD_LOAD, #SL_LOAD_CHECK, or #SL_SAVE. + * @param fop Save or load mode. Load can also be a TTD(Patch) game. * @param sb The sub directory to save the savegame in * @param threaded True when threaded saving is allowed * @return Return the result of the action. #SL_OK, #SL_ERROR, or #SL_REINIT ("unload" the game) @@ -2809,7 +2721,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, SaveLoadOperation fop, Detaile ClearGRFConfigList(&_grfconfig); GamelogReset(); if (!LoadOldSaveGame(filename)) return SL_REINIT; - _sl_version = 0; + _sl_version = SL_MIN_VERSION; _sl_minor_version = 0; GamelogStartAction(GLAT_LOAD); if (!AfterLoadGame()) { diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 70d7e0b304..e5e2e1fa23 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -1,4 +1,4 @@ -/* $Id: saveload.h 27757 2017-02-26 19:41:14Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,286 @@ #include "../fileio_type.h" #include "../strings_type.h" +/** SaveLoad versions + * Previous savegame versions, the trunk revision where they were + * introduced and the released version that had that particular + * savegame version. + * Up to savegame version 18 there is a minor version as well. + * + * Older entries keep their original numbering. + * + * Newer entries should use a descriptive labels, numeric version + * and PR can be added to comment. + * + * Note that this list must not be reordered. + */ +enum SaveLoadVersion : uint16 { + SL_MIN_VERSION, ///< First savegame version + + SLV_1, ///< 1.0 0.1.x, 0.2.x + SLV_2, /**< 2.0 0.3.0 + * 2.1 0.3.1, 0.3.2 */ + SLV_3, ///< 3.x lost + SLV_4, /**< 4.0 1 + * 4.1 122 0.3.3, 0.3.4 + * 4.2 1222 0.3.5 + * 4.3 1417 + * 4.4 1426 */ + + SLV_5, /**< 5.0 1429 + * 5.1 1440 + * 5.2 1525 0.3.6 */ + SLV_6, /**< 6.0 1721 + * 6.1 1768 */ + SLV_7, ///< 7.0 1770 + SLV_8, ///< 8.0 1786 + SLV_9, ///< 9.0 1909 + + SLV_10, ///< 10.0 2030 + SLV_11, /**< 11.0 2033 + * 11.1 2041 */ + SLV_12, ///< 12.1 2046 + SLV_13, ///< 13.1 2080 0.4.0, 0.4.0.1 + SLV_14, ///< 14.0 2441 + + SLV_15, ///< 15.0 2499 + SLV_16, /**< 16.0 2817 + * 16.1 3155 */ + SLV_17, /**< 17.0 3212 + * 17.1 3218 */ + SLV_18, ///< 18 3227 + SLV_19, ///< 19 3396 + + SLV_20, ///< 20 3403 + SLV_21, ///< 21 3472 0.4.x + SLV_22, ///< 22 3726 + SLV_23, ///< 23 3915 + SLV_24, ///< 24 4150 + + SLV_25, ///< 25 4259 + SLV_26, ///< 26 4466 + SLV_27, ///< 27 4757 + SLV_28, ///< 28 4987 + SLV_29, ///< 29 5070 + + SLV_30, ///< 30 5946 + SLV_31, ///< 31 5999 + SLV_32, ///< 32 6001 + SLV_33, ///< 33 6440 + SLV_34, ///< 34 6455 + + SLV_35, ///< 35 6602 + SLV_36, ///< 36 6624 + SLV_37, ///< 37 7182 + SLV_38, ///< 38 7195 + SLV_39, ///< 39 7269 + + SLV_40, ///< 40 7326 + SLV_41, ///< 41 7348 0.5.x + SLV_42, ///< 42 7573 + SLV_43, ///< 43 7642 + SLV_44, ///< 44 8144 + + SLV_45, ///< 45 8501 + SLV_46, ///< 46 8705 + SLV_47, ///< 47 8735 + SLV_48, ///< 48 8935 + SLV_49, ///< 49 8969 + + SLV_50, ///< 50 8973 + SLV_51, ///< 51 8978 + SLV_52, ///< 52 9066 + SLV_53, ///< 53 9316 + SLV_54, ///< 54 9613 + + SLV_55, ///< 55 9638 + SLV_56, ///< 56 9667 + SLV_57, ///< 57 9691 + SLV_58, ///< 58 9762 + SLV_59, ///< 59 9779 + + SLV_60, ///< 60 9874 + SLV_61, ///< 61 9892 + SLV_62, ///< 62 9905 + SLV_63, ///< 63 9956 + SLV_64, ///< 64 10006 + + SLV_65, ///< 65 10210 + SLV_66, ///< 66 10211 + SLV_67, ///< 67 10236 + SLV_68, ///< 68 10266 + SLV_69, ///< 69 10319 + + SLV_70, ///< 70 10541 + SLV_71, ///< 71 10567 + SLV_72, ///< 72 10601 + SLV_73, ///< 73 10903 + SLV_74, ///< 74 11030 + + SLV_75, ///< 75 11107 + SLV_76, ///< 76 11139 + SLV_77, ///< 77 11172 + SLV_78, ///< 78 11176 + SLV_79, ///< 79 11188 + + SLV_80, ///< 80 11228 + SLV_81, ///< 81 11244 + SLV_82, ///< 82 11410 + SLV_83, ///< 83 11589 + SLV_84, ///< 84 11822 + + SLV_85, ///< 85 11874 + SLV_86, ///< 86 12042 + SLV_87, ///< 87 12129 + SLV_88, ///< 88 12134 + SLV_89, ///< 89 12160 + + SLV_90, ///< 90 12293 + SLV_91, ///< 91 12347 + SLV_92, ///< 92 12381 0.6.x + SLV_93, ///< 93 12648 + SLV_94, ///< 94 12816 + + SLV_95, ///< 95 12924 + SLV_96, ///< 96 13226 + SLV_97, ///< 97 13256 + SLV_98, ///< 98 13375 + SLV_99, ///< 99 13838 + + SLV_100, ///< 100 13952 + SLV_101, ///< 101 14233 + SLV_102, ///< 102 14332 + SLV_103, ///< 103 14598 + SLV_104, ///< 104 14735 + + SLV_105, ///< 105 14803 + SLV_106, ///< 106 14919 + SLV_107, ///< 107 15027 + SLV_108, ///< 108 15045 + SLV_109, ///< 109 15075 + + SLV_110, ///< 110 15148 + SLV_111, ///< 111 15190 + SLV_112, ///< 112 15290 + SLV_113, ///< 113 15340 + SLV_114, ///< 114 15601 + + SLV_115, ///< 115 15695 + SLV_116, ///< 116 15893 0.7.x + SLV_117, ///< 117 16037 + SLV_118, ///< 118 16129 + SLV_119, ///< 119 16242 + + SLV_120, ///< 120 16439 + SLV_121, ///< 121 16694 + SLV_122, ///< 122 16855 + SLV_123, ///< 123 16909 + SLV_124, ///< 124 16993 + + SLV_125, ///< 125 17113 + SLV_126, ///< 126 17433 + SLV_127, ///< 127 17439 + SLV_128, ///< 128 18281 + SLV_129, ///< 129 18292 + + SLV_130, ///< 130 18404 + SLV_131, ///< 131 18481 + SLV_132, ///< 132 18522 + SLV_133, ///< 133 18674 + SLV_134, ///< 134 18703 + + SLV_135, ///< 135 18719 + SLV_136, ///< 136 18764 + SLV_137, ///< 137 18912 + SLV_138, ///< 138 18942 1.0.x + SLV_139, ///< 139 19346 + + SLV_140, ///< 140 19382 + SLV_141, ///< 141 19799 + SLV_142, ///< 142 20003 + SLV_143, ///< 143 20048 + SLV_144, ///< 144 20334 + + SLV_145, ///< 145 20376 + SLV_146, ///< 146 20446 + SLV_147, ///< 147 20621 + SLV_148, ///< 148 20659 + SLV_149, ///< 149 20832 + + SLV_150, ///< 150 20857 + SLV_151, ///< 151 20918 + SLV_152, ///< 152 21171 + SLV_153, ///< 153 21263 + SLV_154, ///< 154 21426 + + SLV_155, ///< 155 21453 + SLV_156, ///< 156 21728 + SLV_157, ///< 157 21862 + SLV_158, ///< 158 21933 + SLV_159, ///< 159 21962 + + SLV_160, ///< 160 21974 1.1.x + SLV_161, ///< 161 22567 + SLV_162, ///< 162 22713 + SLV_163, ///< 163 22767 + SLV_164, ///< 164 23290 + + SLV_165, ///< 165 23304 + SLV_166, ///< 166 23415 + SLV_167, ///< 167 23504 + SLV_168, ///< 168 23637 + SLV_169, ///< 169 23816 + + SLV_170, ///< 170 23826 + SLV_171, ///< 171 23835 + SLV_172, ///< 172 23947 + SLV_173, ///< 173 23967 1.2.0-RC1 + SLV_174, ///< 174 23973 1.2.x + + SLV_175, ///< 175 24136 + SLV_176, ///< 176 24446 + SLV_177, ///< 177 24619 + SLV_178, ///< 178 24789 + SLV_179, ///< 179 24810 + + SLV_180, ///< 180 24998 1.3.x + SLV_181, ///< 181 25012 + SLV_182, ///< 182 25115 FS#5492, r25259, r25296 Goal status + SLV_183, ///< 183 25363 Cargodist + SLV_184, ///< 184 25508 Unit localisation split + + SLV_185, ///< 185 25620 Storybooks + SLV_186, ///< 186 25833 Objects storage + SLV_187, ///< 187 25899 Linkgraph - restricted flows + SLV_188, ///< 188 26169 FS#5831 Unify RV travel time + SLV_189, ///< 189 26450 Heirarchical vehicle subgroups + + SLV_190, ///< 190 26547 Separate order travel and wait times + SLV_191, ///< 191 26636 FS#6026 Fix disaster vehicle storage (No bump) + ///< 191 26646 FS#6041 Linkgraph - store locations + SLV_192, ///< 192 26700 FS#6066 Fix saving of order backups + SLV_193, ///< 193 26802 + SLV_194, ///< 194 26881 v1.5 + + SLV_195, ///< 195 27572 v1.6.1 + SLV_196, ///< 196 27778 v1.7 + SLV_197, ///< 197 27978 v1.8 + SLV_198, ///< 198 PR#6763 Switch town growth rate and counter to actual game ticks + SLV_EXTEND_CARGOTYPES, ///< 199 PR#6802 Extend cargotypes to 64 + + SLV_EXTEND_RAILTYPES, ///< 200 PR#6805 Extend railtypes to 64, adding uint16 to map array. + SLV_EXTEND_PERSISTENT_STORAGE, ///< 201 PR#6885 Extend NewGRF persistant storages. + SLV_EXTEND_INDUSTRY_CARGO_SLOTS, ///< 202 PR#6867 Increase industry cargo slots to 16 in, 16 out + SLV_SHIP_PATH_CACHE, ///< 203 PR#7072 Add path cache for ships + SLV_SHIP_ROTATION, ///< 204 PR#7065 Add extra rotation stages for ships. + + SLV_GROUP_LIVERIES, ///< 205 PR#7108 Livery storage change and group liveries. + SLV_SHIPS_STOP_IN_LOCKS, ///< 206 PR#7150 Ship/lock movement changes. + SLV_FIX_CARGO_MONITOR, ///< 207 PR#7175 Cargo monitor data packing fix to support 64 cargotypes. + + SL_MAX_VERSION, ///< Highest possible saveload version +}; + /** Save or load result codes. */ enum SaveOrLoadResult { SL_OK = 0, ///< completed successfully @@ -92,9 +372,6 @@ enum SLRefType { REF_LINK_GRAPH_JOB = 11, ///< Load/save a reference to a link graph job. }; -/** Highest possible savegame version. */ -#define SL_MAX_VERSION UINT16_MAX - /** Flags of a chunk. */ enum ChunkType { CH_RIFF = 0, @@ -195,6 +472,7 @@ enum SaveLoadTypes { SL_ARR = 2, ///< Save/load an array. SL_STR = 3, ///< Save/load a string. SL_LST = 4, ///< Save/load a list. + SL_DEQUE = 5, ///< Save/load a deque. /* non-normal save-load types */ SL_WRITEBYTE = 8, SL_VEH_INCLUDE = 9, @@ -210,8 +488,8 @@ struct SaveLoad { SaveLoadType cmd; ///< the action to take with the saved/loaded type, All types need different action VarType conv; ///< type of the variable to be saved, int uint16 length; ///< (conditional) length of the variable (eg. arrays) (max array size is 65536 elements) - uint16 version_from; ///< save/load the variable starting from this savegame version - uint16 version_to; ///< save/load the variable until this savegame version + SaveLoadVersion version_from; ///< save/load the variable starting from this savegame version + SaveLoadVersion version_to; ///< save/load the variable until this savegame version /* NOTE: This element either denotes the address of the variable for a global * variable, or the offset within a struct which is then bound to a variable * during runtime. Decision on which one to use is controlled by the function @@ -287,13 +565,23 @@ typedef SaveLoad SaveLoadGlobVarList; */ #define SLE_CONDLST(base, variable, type, from, to) SLE_GENERAL(SL_LST, base, variable, type, 0, from, to) +/** + * Storage of a deque in some savegame versions. + * @param base Name of the class or struct containing the list. + * @param variable Name of the variable in the class or struct referenced by \a base. + * @param type Storage of the data in memory and in the savegame. + * @param from First savegame version that has the list. + * @param to Last savegame version that has the list. + */ +#define SLE_CONDDEQUE(base, variable, type, from, to) SLE_GENERAL(SL_DEQUE, base, variable, type, 0, from, to) + /** * Storage of a variable in every version of a savegame. * @param base Name of the class or struct containing the variable. * @param variable Name of the variable in the class or struct referenced by \a base. * @param type Storage of the data in memory and in the savegame. */ -#define SLE_VAR(base, variable, type) SLE_CONDVAR(base, variable, type, 0, SL_MAX_VERSION) +#define SLE_VAR(base, variable, type) SLE_CONDVAR(base, variable, type, SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a reference in every version of a savegame. @@ -301,7 +589,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param variable Name of the variable in the class or struct referenced by \a base. * @param type Type of the reference, a value from #SLRefType. */ -#define SLE_REF(base, variable, type) SLE_CONDREF(base, variable, type, 0, SL_MAX_VERSION) +#define SLE_REF(base, variable, type) SLE_CONDREF(base, variable, type, SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of an array in every version of a savegame. @@ -310,7 +598,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param type Storage of the data in memory and in the savegame. * @param length Number of elements in the array. */ -#define SLE_ARR(base, variable, type, length) SLE_CONDARR(base, variable, type, length, 0, SL_MAX_VERSION) +#define SLE_ARR(base, variable, type, length) SLE_CONDARR(base, variable, type, length, SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a string in every savegame version. @@ -319,7 +607,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param type Storage of the data in memory and in the savegame. * @param length Number of elements in the string (only used for fixed size buffers). */ -#define SLE_STR(base, variable, type, length) SLE_CONDSTR(base, variable, type, length, 0, SL_MAX_VERSION) +#define SLE_STR(base, variable, type, length) SLE_CONDSTR(base, variable, type, length, SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a list in every savegame version. @@ -327,13 +615,13 @@ typedef SaveLoad SaveLoadGlobVarList; * @param variable Name of the variable in the class or struct referenced by \a base. * @param type Storage of the data in memory and in the savegame. */ -#define SLE_LST(base, variable, type) SLE_CONDLST(base, variable, type, 0, SL_MAX_VERSION) +#define SLE_LST(base, variable, type) SLE_CONDLST(base, variable, type, SL_MIN_VERSION, SL_MAX_VERSION) /** * Empty space in every savegame version. * @param length Length of the empty space. */ -#define SLE_NULL(length) SLE_CONDNULL(length, 0, SL_MAX_VERSION) +#define SLE_NULL(length) SLE_CONDNULL(length, SL_MIN_VERSION, SL_MAX_VERSION) /** * Empty space in some savegame versions. @@ -344,13 +632,13 @@ typedef SaveLoad SaveLoadGlobVarList; #define SLE_CONDNULL(length, from, to) SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL | SLF_NOT_IN_CONFIG, length, from, to) /** Translate values ingame to different values in the savegame and vv. */ -#define SLE_WRITEBYTE(base, variable, value) SLE_GENERAL(SL_WRITEBYTE, base, variable, 0, 0, value, value) +#define SLE_WRITEBYTE(base, variable) SLE_GENERAL(SL_WRITEBYTE, base, variable, 0, 0, SL_MIN_VERSION, SL_MAX_VERSION) -#define SLE_VEH_INCLUDE() {false, SL_VEH_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL, 0} -#define SLE_ST_INCLUDE() {false, SL_ST_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL, 0} +#define SLE_VEH_INCLUDE() {false, SL_VEH_INCLUDE, 0, 0, SL_MIN_VERSION, SL_MAX_VERSION, NULL, 0} +#define SLE_ST_INCLUDE() {false, SL_ST_INCLUDE, 0, 0, SL_MIN_VERSION, SL_MAX_VERSION, NULL, 0} /** End marker of a struct/class save or load. */ -#define SLE_END() {false, SL_END, 0, 0, 0, 0, NULL, 0} +#define SLE_END() {false, SL_END, 0, 0, SL_MIN_VERSION, SL_MIN_VERSION, NULL, 0} /** * Storage of global simple variables, references (pointers), and arrays. @@ -415,35 +703,35 @@ typedef SaveLoad SaveLoadGlobVarList; * @param variable Name of the global variable. * @param type Storage of the data in memory and in the savegame. */ -#define SLEG_VAR(variable, type) SLEG_CONDVAR(variable, type, 0, SL_MAX_VERSION) +#define SLEG_VAR(variable, type) SLEG_CONDVAR(variable, type, SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a global reference in every savegame version. * @param variable Name of the global variable. * @param type Storage of the data in memory and in the savegame. */ -#define SLEG_REF(variable, type) SLEG_CONDREF(variable, type, 0, SL_MAX_VERSION) +#define SLEG_REF(variable, type) SLEG_CONDREF(variable, type, SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a global array in every savegame version. * @param variable Name of the global variable. * @param type Storage of the data in memory and in the savegame. */ -#define SLEG_ARR(variable, type) SLEG_CONDARR(variable, type, lengthof(variable), 0, SL_MAX_VERSION) +#define SLEG_ARR(variable, type) SLEG_CONDARR(variable, type, lengthof(variable), SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a global string in every savegame version. * @param variable Name of the global variable. * @param type Storage of the data in memory and in the savegame. */ -#define SLEG_STR(variable, type) SLEG_CONDSTR(variable, type, lengthof(variable), 0, SL_MAX_VERSION) +#define SLEG_STR(variable, type) SLEG_CONDSTR(variable, type, sizeof(variable), SL_MIN_VERSION, SL_MAX_VERSION) /** * Storage of a global list in every savegame version. * @param variable Name of the global variable. * @param type Storage of the data in memory and in the savegame. */ -#define SLEG_LST(variable, type) SLEG_CONDLST(variable, type, 0, SL_MAX_VERSION) +#define SLEG_LST(variable, type) SLEG_CONDLST(variable, type, SL_MIN_VERSION, SL_MAX_VERSION) /** * Empty global space in some savegame versions. @@ -454,7 +742,7 @@ typedef SaveLoad SaveLoadGlobVarList; #define SLEG_CONDNULL(length, from, to) {true, SL_ARR, SLE_FILE_U8 | SLE_VAR_NULL | SLF_NOT_IN_CONFIG, length, from, to, (void*)NULL} /** End marker of global variables save or load. */ -#define SLEG_END() {true, SL_END, 0, 0, 0, 0, NULL, 0} +#define SLEG_END() {true, SL_END, 0, 0, SL_MIN_VERSION, SL_MIN_VERSION, NULL, 0} /** * Checks whether the savegame is below \a major.\a minor. @@ -462,24 +750,24 @@ typedef SaveLoad SaveLoadGlobVarList; * @param minor Minor number of the version to check against. If \a minor is 0 or not specified, only the major number is checked. * @return Savegame version is earlier than the specified version. */ -static inline bool IsSavegameVersionBefore(uint16 major, byte minor = 0) +static inline bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor = 0) { - extern uint16 _sl_version; - extern byte _sl_minor_version; + extern SaveLoadVersion _sl_version; + extern byte _sl_minor_version; return _sl_version < major || (minor > 0 && _sl_version == major && _sl_minor_version < minor); } /** * Checks if some version from/to combination falls within the range of the * active savegame version. - * @param version_from Lowest version number that falls within the range. - * @param version_to Highest version number that falls within the range. + * @param version_from Inclusive savegame version lower bound. + * @param version_to Exclusive savegame version upper bound. SL_MAX_VERSION if no upper bound. * @return Active savegame version falls within the given range. */ -static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to) +static inline bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLoadVersion version_to) { - extern const uint16 SAVEGAME_VERSION; - if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION > version_to) return false; + extern const SaveLoadVersion SAVEGAME_VERSION; + if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION >= version_to) return false; return true; } @@ -488,7 +776,7 @@ static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_ * Get the NumberType of a setting. This describes the integer type * as it is represented in memory * @param type VarType holding information about the variable-type - * @return return the SLE_VAR_* part of a variable-type description + * @return the SLE_VAR_* part of a variable-type description */ static inline VarType GetVarMemType(VarType type) { @@ -496,10 +784,10 @@ static inline VarType GetVarMemType(VarType type) } /** - * Get the #FileType of a setting. This describes the integer type + * Get the FileType of a setting. This describes the integer type * as it is represented in a savegame/file * @param type VarType holding information about the file-type - * @param return the SLE_FILE_* part of a variable-type description + * @return the SLE_FILE_* part of a variable-type description */ static inline VarType GetVarFileType(VarType type) { diff --git a/src/saveload/saveload_filter.h b/src/saveload/saveload_filter.h index 224da079fc..0cb5c86955 100644 --- a/src/saveload/saveload_filter.h +++ b/src/saveload/saveload_filter.h @@ -1,4 +1,4 @@ -/* $Id: saveload_filter.h 21395 2010-12-05 14:41:34Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/saveload_internal.h b/src/saveload/saveload_internal.h index 304608da2d..74e5b9936d 100644 --- a/src/saveload/saveload_internal.h +++ b/src/saveload/saveload_internal.h @@ -1,4 +1,4 @@ -/* $Id: saveload_internal.h 25620 2013-07-21 13:18:45Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp index 6335f936b8..545c628b36 100644 --- a/src/saveload/signs_sl.cpp +++ b/src/saveload/signs_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: signs_sl.cpp 27650 2016-09-04 12:57:43Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,15 +19,15 @@ /** Description of a sign within the savegame. */ static const SaveLoad _sign_desc[] = { - SLE_CONDVAR(Sign, name, SLE_NAME, 0, 83), - SLE_CONDSTR(Sign, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDVAR(Sign, x, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), - SLE_CONDVAR(Sign, y, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), - SLE_CONDVAR(Sign, x, SLE_INT32, 5, SL_MAX_VERSION), - SLE_CONDVAR(Sign, y, SLE_INT32, 5, SL_MAX_VERSION), - SLE_CONDVAR(Sign, owner, SLE_UINT8, 6, SL_MAX_VERSION), - SLE_CONDVAR(Sign, z, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), - SLE_CONDVAR(Sign, z, SLE_INT32, 164, SL_MAX_VERSION), + SLE_CONDVAR(Sign, name, SLE_NAME, SL_MIN_VERSION, SLV_84), + SLE_CONDSTR(Sign, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), + SLE_CONDVAR(Sign, x, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Sign, y, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Sign, x, SLE_INT32, SLV_5, SL_MAX_VERSION), + SLE_CONDVAR(Sign, y, SLE_INT32, SLV_5, SL_MAX_VERSION), + SLE_CONDVAR(Sign, owner, SLE_UINT8, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Sign, z, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_164), + SLE_CONDVAR(Sign, z, SLE_INT32, SLV_164, SL_MAX_VERSION), SLE_END() }; @@ -55,12 +55,12 @@ static void Load_SIGN() * - we can't use IsValidCompany() now, so this is fixed in AfterLoadGame() * All signs that were saved are valid (including those with just 'Sign' and INVALID_OWNER). * - so set owner to OWNER_NONE if needed (signs from pre-version 6.1 would be lost) */ - if (IsSavegameVersionBefore(6, 1) || (IsSavegameVersionBefore(83) && si->owner == INVALID_OWNER)) { + if (IsSavegameVersionBefore(SLV_6, 1) || (IsSavegameVersionBefore(SLV_83) && si->owner == INVALID_OWNER)) { si->owner = OWNER_NONE; } /* Signs placed in scenario editor shall now be OWNER_DEITY */ - if (IsSavegameVersionBefore(171) && si->owner == OWNER_NONE && _file_to_saveload.abstract_ftype == FT_SCENARIO) { + if (IsSavegameVersionBefore(SLV_171) && si->owner == OWNER_NONE && _file_to_saveload.abstract_ftype == FT_SCENARIO) { si->owner = OWNER_DEITY; } } diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index 93c4ce9f7e..995483ee6d 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: station_sl.cpp 27770 2017-03-05 17:06:14Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -150,43 +150,43 @@ void AfterLoadRoadStops() static const SaveLoad _roadstop_desc[] = { SLE_VAR(RoadStop, xy, SLE_UINT32), - SLE_CONDNULL(1, 0, 44), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_45), SLE_VAR(RoadStop, status, SLE_UINT8), /* Index was saved in some versions, but this is not needed */ - SLE_CONDNULL(4, 0, 8), - SLE_CONDNULL(2, 0, 44), - SLE_CONDNULL(1, 0, 25), + SLE_CONDNULL(4, SL_MIN_VERSION, SLV_9), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_45), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_26), SLE_REF(RoadStop, next, REF_ROADSTOPS), - SLE_CONDNULL(2, 0, 44), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_45), - SLE_CONDNULL(4, 0, 24), - SLE_CONDNULL(1, 25, 25), + SLE_CONDNULL(4, SL_MIN_VERSION, SLV_25), + SLE_CONDNULL(1, SLV_25, SLV_26), SLE_END() }; static const SaveLoad _old_station_desc[] = { - SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDNULL(4, 0, 5), ///< bus/lorry tile - SLE_CONDVAR(Station, train_station.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, train_station.tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, airport.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, airport.tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, dock_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Station, xy, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDNULL(4, SL_MIN_VERSION, SLV_6), ///< bus/lorry tile + SLE_CONDVAR(Station, train_station.tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Station, train_station.tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Station, airport.tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Station, dock_tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), SLE_REF(Station, town, REF_TOWN), SLE_VAR(Station, train_station.w, SLE_FILE_U8 | SLE_VAR_U16), - SLE_CONDVAR(Station, train_station.h, SLE_FILE_U8 | SLE_VAR_U16, 2, SL_MAX_VERSION), + SLE_CONDVAR(Station, train_station.h, SLE_FILE_U8 | SLE_VAR_U16, SLV_2, SL_MAX_VERSION), - SLE_CONDNULL(1, 0, 3), ///< alpha_order + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_4), ///< alpha_order SLE_VAR(Station, string_id, SLE_STRINGID), - SLE_CONDSTR(Station, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDVAR(Station, indtype, SLE_UINT8, 103, SL_MAX_VERSION), - SLE_CONDVAR(Station, had_vehicle_of_type, SLE_FILE_U16 | SLE_VAR_U8, 0, 121), - SLE_CONDVAR(Station, had_vehicle_of_type, SLE_UINT8, 122, SL_MAX_VERSION), + SLE_CONDSTR(Station, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), + SLE_CONDVAR(Station, indtype, SLE_UINT8, SLV_103, SL_MAX_VERSION), + SLE_CONDVAR(Station, had_vehicle_of_type, SLE_FILE_U16 | SLE_VAR_U8, SL_MIN_VERSION, SLV_122), + SLE_CONDVAR(Station, had_vehicle_of_type, SLE_UINT8, SLV_122, SL_MAX_VERSION), SLE_VAR(Station, time_since_load, SLE_UINT8), SLE_VAR(Station, time_since_unload, SLE_UINT8), @@ -195,32 +195,32 @@ static const SaveLoad _old_station_desc[] = { SLE_VAR(Station, facilities, SLE_UINT8), SLE_VAR(Station, airport.type, SLE_UINT8), - SLE_CONDNULL(2, 0, 5), ///< Truck/bus stop status - SLE_CONDNULL(1, 0, 4), ///< Blocked months + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6), ///< Truck/bus stop status + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_5), ///< Blocked months - SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U16, 0, 2), - SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U32, 3, 45), - SLE_CONDVAR(Station, airport.flags, SLE_UINT64, 46, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U16, SL_MIN_VERSION, SLV_3), + SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U32, SLV_3, SLV_46), + SLE_CONDVAR(Station, airport.flags, SLE_UINT64, SLV_46, SL_MAX_VERSION), - SLE_CONDNULL(2, 0, 25), ///< last-vehicle - SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, 26, SL_MAX_VERSION), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_26), ///< last-vehicle + SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, SLV_26, SL_MAX_VERSION), - SLE_CONDNULL(2, 3, 25), ///< custom station class and id - SLE_CONDVAR(Station, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), - SLE_CONDVAR(Station, build_date, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDNULL(2, SLV_3, SLV_26), ///< custom station class and id + SLE_CONDVAR(Station, build_date, SLE_FILE_U16 | SLE_VAR_I32, SLV_3, SLV_31), + SLE_CONDVAR(Station, build_date, SLE_INT32, SLV_31, SL_MAX_VERSION), - SLE_CONDREF(Station, bus_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), - SLE_CONDREF(Station, truck_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), + SLE_CONDREF(Station, bus_stops, REF_ROADSTOPS, SLV_6, SL_MAX_VERSION), + SLE_CONDREF(Station, truck_stops, REF_ROADSTOPS, SLV_6, SL_MAX_VERSION), /* Used by newstations for graphic variations */ - SLE_CONDVAR(Station, random_bits, SLE_UINT16, 27, SL_MAX_VERSION), - SLE_CONDVAR(Station, waiting_triggers, SLE_UINT8, 27, SL_MAX_VERSION), - SLE_CONDVAR(Station, num_specs, SLE_UINT8, 27, SL_MAX_VERSION), + SLE_CONDVAR(Station, random_bits, SLE_UINT16, SLV_27, SL_MAX_VERSION), + SLE_CONDVAR(Station, waiting_triggers, SLE_UINT8, SLV_27, SL_MAX_VERSION), + SLE_CONDVAR(Station, num_specs, SLE_UINT8, SLV_27, SL_MAX_VERSION), - SLE_CONDLST(Station, loading_vehicles, REF_VEHICLE, 57, SL_MAX_VERSION), + SLE_CONDLST(Station, loading_vehicles, REF_VEHICLE, SLV_57, SL_MAX_VERSION), /* reserve extra space in savegame here. (currently 32 bytes) */ - SLE_CONDNULL(32, 2, SL_MAX_VERSION), + SLE_CONDNULL(32, SLV_2, SL_MAX_VERSION), SLE_END() }; @@ -233,8 +233,8 @@ static uint8 _cargo_days; static Money _cargo_feeder_share; static const SaveLoad _station_speclist_desc[] = { - SLE_CONDVAR(StationSpecList, grfid, SLE_UINT32, 27, SL_MAX_VERSION), - SLE_CONDVAR(StationSpecList, localidx, SLE_UINT8, 27, SL_MAX_VERSION), + SLE_CONDVAR(StationSpecList, grfid, SLE_UINT32, SLV_27, SL_MAX_VERSION), + SLE_CONDVAR(StationSpecList, localidx, SLE_UINT8, SLV_27, SL_MAX_VERSION), SLE_END() }; @@ -254,7 +254,7 @@ static const SaveLoad _flow_desc[] = { SLE_VAR(FlowSaveLoad, source, SLE_UINT16), SLE_VAR(FlowSaveLoad, via, SLE_UINT16), SLE_VAR(FlowSaveLoad, share, SLE_UINT32), - SLE_CONDVAR(FlowSaveLoad, restricted, SLE_BOOL, 187, SL_MAX_VERSION), + SLE_CONDVAR(FlowSaveLoad, restricted, SLE_BOOL, SLV_187, SL_MAX_VERSION), SLE_END() }; @@ -266,27 +266,27 @@ static const SaveLoad _flow_desc[] = { const SaveLoad *GetGoodsDesc() { static const SaveLoad goods_desc[] = { - SLEG_CONDVAR( _waiting_acceptance, SLE_UINT16, 0, 67), - SLE_CONDVAR(GoodsEntry, status, SLE_UINT8, 68, SL_MAX_VERSION), - SLE_CONDNULL(2, 51, 67), + SLEG_CONDVAR( _waiting_acceptance, SLE_UINT16, SL_MIN_VERSION, SLV_68), + SLE_CONDVAR(GoodsEntry, status, SLE_UINT8, SLV_68, SL_MAX_VERSION), + SLE_CONDNULL(2, SLV_51, SLV_68), SLE_VAR(GoodsEntry, time_since_pickup, SLE_UINT8), SLE_VAR(GoodsEntry, rating, SLE_UINT8), - SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), - SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 67), - SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 67), - SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 67), + SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_7), + SLEG_CONDVAR( _cargo_source, SLE_UINT16, SLV_7, SLV_68), + SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, SLV_44, SLV_68), + SLEG_CONDVAR( _cargo_days, SLE_UINT8, SL_MIN_VERSION, SLV_68), SLE_VAR(GoodsEntry, last_speed, SLE_UINT8), SLE_VAR(GoodsEntry, last_age, SLE_UINT8), - SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_U32 | SLE_VAR_I64, 14, 64), - SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 67), - SLE_CONDVAR(GoodsEntry, amount_fract, SLE_UINT8, 150, SL_MAX_VERSION), - SLEG_CONDLST( _packets, REF_CARGO_PACKET, 68, 182), - SLEG_CONDVAR( _num_dests, SLE_UINT32, 183, SL_MAX_VERSION), - SLE_CONDVAR(GoodsEntry, cargo.reserved_count, SLE_UINT, 181, SL_MAX_VERSION), - SLE_CONDVAR(GoodsEntry, link_graph, SLE_UINT16, 183, SL_MAX_VERSION), - SLE_CONDVAR(GoodsEntry, node, SLE_UINT16, 183, SL_MAX_VERSION), - SLEG_CONDVAR( _num_flows, SLE_UINT32, 183, SL_MAX_VERSION), - SLE_CONDVAR(GoodsEntry, max_waiting_cargo, SLE_UINT32, 183, SL_MAX_VERSION), + SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_U32 | SLE_VAR_I64, SLV_14, SLV_65), + SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, SLV_65, SLV_68), + SLE_CONDVAR(GoodsEntry, amount_fract, SLE_UINT8, SLV_150, SL_MAX_VERSION), + SLEG_CONDLST( _packets, REF_CARGO_PACKET, SLV_68, SLV_183), + SLEG_CONDVAR( _num_dests, SLE_UINT32, SLV_183, SL_MAX_VERSION), + SLE_CONDVAR(GoodsEntry, cargo.reserved_count, SLE_UINT, SLV_181, SL_MAX_VERSION), + SLE_CONDVAR(GoodsEntry, link_graph, SLE_UINT16, SLV_183, SL_MAX_VERSION), + SLE_CONDVAR(GoodsEntry, node, SLE_UINT16, SLV_183, SL_MAX_VERSION), + SLEG_CONDVAR( _num_flows, SLE_UINT32, SLV_183, SL_MAX_VERSION), + SLE_CONDVAR(GoodsEntry, max_waiting_cargo, SLE_UINT32, SLV_183, SL_MAX_VERSION), SLE_END() }; @@ -329,6 +329,7 @@ static void Load_STNS() _cargo_days = 0; _cargo_feeder_share = 0; + uint num_cargo = IsSavegameVersionBefore(SLV_55) ? 12 : IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; int index; while ((index = SlIterateArray()) != -1) { Station *st = new (index) Station(); @@ -337,16 +338,15 @@ static void Load_STNS() _waiting_acceptance = 0; - uint num_cargo = IsSavegameVersionBefore(55) ? 12 : NUM_CARGO; for (CargoID i = 0; i < num_cargo; i++) { GoodsEntry *ge = &st->goods[i]; SlObject(ge, GetGoodsDesc()); SwapPackets(ge); - if (IsSavegameVersionBefore(68)) { + if (IsSavegameVersionBefore(SLV_68)) { SB(ge->status, GoodsEntry::GES_ACCEPTANCE, 1, HasBit(_waiting_acceptance, 15)); if (GB(_waiting_acceptance, 0, 12) != 0) { /* In old versions, enroute_from used 0xFF as INVALID_STATION */ - StationID source = (IsSavegameVersionBefore(7) && _cargo_source == 0xFF) ? INVALID_STATION : _cargo_source; + StationID source = (IsSavegameVersionBefore(SLV_7) && _cargo_source == 0xFF) ? INVALID_STATION : _cargo_source; /* Make sure we can allocate the CargoPacket. This is safe * as there can only be ~64k stations and 32 cargoes in these @@ -375,12 +375,13 @@ static void Load_STNS() static void Ptrs_STNS() { /* Don't run when savegame version is higher than or equal to 123. */ - if (!IsSavegameVersionBefore(123)) return; + if (!IsSavegameVersionBefore(SLV_123)) return; + uint num_cargo = IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; Station *st; FOR_ALL_STATIONS(st) { - if (!IsSavegameVersionBefore(68)) { - for (CargoID i = 0; i < NUM_CARGO; i++) { + if (!IsSavegameVersionBefore(SLV_68)) { + for (CargoID i = 0; i < num_cargo; i++) { GoodsEntry *ge = &st->goods[i]; SwapPackets(ge); SlObject(ge, GetGoodsDesc()); @@ -413,7 +414,7 @@ static const SaveLoad _base_station_desc[] = { static OldPersistentStorage _old_st_persistent_storage; static const SaveLoad _station_desc[] = { - SLE_WRITEBYTE(Station, facilities, FACIL_NONE), + SLE_WRITEBYTE(Station, facilities), SLE_ST_INCLUDE(), SLE_VAR(Station, train_station.tile, SLE_UINT32), @@ -424,14 +425,14 @@ static const SaveLoad _station_desc[] = { SLE_REF(Station, truck_stops, REF_ROADSTOPS), SLE_VAR(Station, dock_tile, SLE_UINT32), SLE_VAR(Station, airport.tile, SLE_UINT32), - SLE_CONDVAR(Station, airport.w, SLE_FILE_U8 | SLE_VAR_U16, 140, SL_MAX_VERSION), - SLE_CONDVAR(Station, airport.h, SLE_FILE_U8 | SLE_VAR_U16, 140, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.w, SLE_FILE_U8 | SLE_VAR_U16, SLV_140, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.h, SLE_FILE_U8 | SLE_VAR_U16, SLV_140, SL_MAX_VERSION), SLE_VAR(Station, airport.type, SLE_UINT8), - SLE_CONDVAR(Station, airport.layout, SLE_UINT8, 145, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.layout, SLE_UINT8, SLV_145, SL_MAX_VERSION), SLE_VAR(Station, airport.flags, SLE_UINT64), - SLE_CONDVAR(Station, airport.rotation, SLE_UINT8, 145, SL_MAX_VERSION), - SLEG_CONDARR(_old_st_persistent_storage.storage, SLE_UINT32, 16, 145, 160), - SLE_CONDREF(Station, airport.psa, REF_STORAGE, 161, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.rotation, SLE_UINT8, SLV_145, SL_MAX_VERSION), + SLEG_CONDARR(_old_st_persistent_storage.storage, SLE_UINT32, 16, SLV_145, SLV_161), + SLE_CONDREF(Station, airport.psa, REF_STORAGE, SLV_161, SL_MAX_VERSION), SLE_VAR(Station, indtype, SLE_UINT8), @@ -440,20 +441,21 @@ static const SaveLoad _station_desc[] = { SLE_VAR(Station, last_vehicle_type, SLE_UINT8), SLE_VAR(Station, had_vehicle_of_type, SLE_UINT8), SLE_LST(Station, loading_vehicles, REF_VEHICLE), - SLE_CONDVAR(Station, always_accepted, SLE_UINT32, 127, SL_MAX_VERSION), + SLE_CONDVAR(Station, always_accepted, SLE_FILE_U32 | SLE_VAR_U64, SLV_127, SLV_EXTEND_CARGOTYPES), + SLE_CONDVAR(Station, always_accepted, SLE_UINT64, SLV_EXTEND_CARGOTYPES, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _waypoint_desc[] = { - SLE_WRITEBYTE(Waypoint, facilities, FACIL_WAYPOINT), + SLE_WRITEBYTE(Waypoint, facilities), SLE_ST_INCLUDE(), SLE_VAR(Waypoint, town_cn, SLE_UINT16), - SLE_CONDVAR(Waypoint, train_station.tile, SLE_UINT32, 124, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, train_station.w, SLE_FILE_U8 | SLE_VAR_U16, 124, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, train_station.h, SLE_FILE_U8 | SLE_VAR_U16, 124, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, train_station.tile, SLE_UINT32, SLV_124, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, train_station.w, SLE_FILE_U8 | SLE_VAR_U16, SLV_124, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, train_station.h, SLE_FILE_U8 | SLE_VAR_U16, SLV_124, SL_MAX_VERSION), SLE_END() }; @@ -520,6 +522,7 @@ static void Load_STNN() { _num_flows = 0; + uint num_cargo = IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; int index; while ((index = SlIterateArray()) != -1) { bool waypoint = (SlReadByte() & FACIL_WAYPOINT) != 0; @@ -531,14 +534,14 @@ static void Load_STNN() Station *st = Station::From(bst); /* Before savegame version 161, persistent storages were not stored in a pool. */ - if (IsSavegameVersionBefore(161) && !IsSavegameVersionBefore(145) && st->facilities & FACIL_AIRPORT) { + if (IsSavegameVersionBefore(SLV_161) && !IsSavegameVersionBefore(SLV_145) && st->facilities & FACIL_AIRPORT) { /* Store the old persistent storage. The GRFID will be added later. */ assert(PersistentStorage::CanAllocateItem()); st->airport.psa = new PersistentStorage(0, 0, 0); - memcpy(st->airport.psa->storage, _old_st_persistent_storage.storage, sizeof(st->airport.psa->storage)); + memcpy(st->airport.psa->storage, _old_st_persistent_storage.storage, sizeof(_old_st_persistent_storage.storage)); } - for (CargoID i = 0; i < NUM_CARGO; i++) { + for (CargoID i = 0; i < num_cargo; i++) { SlObject(&st->goods[i], GetGoodsDesc()); FlowSaveLoad flow; FlowStat *fs = NULL; @@ -552,7 +555,7 @@ static void Load_STNN() } prev_source = flow.source; } - if (IsSavegameVersionBefore(183)) { + if (IsSavegameVersionBefore(SLV_183)) { SwapPackets(&st->goods[i]); } else { StationCargoPair pair; @@ -578,13 +581,14 @@ static void Load_STNN() static void Ptrs_STNN() { /* Don't run when savegame version lower than 123. */ - if (IsSavegameVersionBefore(123)) return; + if (IsSavegameVersionBefore(SLV_123)) return; + uint num_cargo = IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; Station *st; FOR_ALL_STATIONS(st) { - for (CargoID i = 0; i < NUM_CARGO; i++) { + for (CargoID i = 0; i < num_cargo; i++) { GoodsEntry *ge = &st->goods[i]; - if (IsSavegameVersionBefore(183)) { + if (IsSavegameVersionBefore(SLV_183)) { SwapPackets(ge); SlObject(ge, GetGoodsDesc()); SwapPackets(ge); diff --git a/src/saveload/storage_sl.cpp b/src/saveload/storage_sl.cpp index 4cfff6ce9b..213ed3a23f 100644 --- a/src/saveload/storage_sl.cpp +++ b/src/saveload/storage_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: storage_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,8 +21,9 @@ /** Description of the data to save and load in #PersistentStorage. */ static const SaveLoad _storage_desc[] = { - SLE_CONDVAR(PersistentStorage, grfid, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDARR(PersistentStorage, storage, SLE_UINT32, 16, 161, SL_MAX_VERSION), + SLE_CONDVAR(PersistentStorage, grfid, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDARR(PersistentStorage, storage, SLE_UINT32, 16, SLV_161, SLV_EXTEND_PERSISTENT_STORAGE), + SLE_CONDARR(PersistentStorage, storage, SLE_UINT32, 256, SLV_EXTEND_PERSISTENT_STORAGE, SL_MAX_VERSION), SLE_END() }; @@ -47,7 +48,8 @@ static void Load_PSAC() */ PersistentStorage *ps = NULL; u8vector cmdata; - + uint chunk_size = IsSavegameVersionBefore(SLV_EXTEND_PERSISTENT_STORAGE) ? 64 : 1024; + fprintf(stderr, "CHUNK SIZE %u\n", chunk_size); while ((index = SlIterateArray()) != -1) { if (ps == NULL) { assert(PersistentStorage::CanAllocateItem()); @@ -57,7 +59,7 @@ static void Load_PSAC() if (ps->grfid == CITYMANIA_GRFID) { uint8 *data = (uint8 *)(ps->storage); - cmdata.insert(cmdata.end(), data, data + 64); + cmdata.insert(cmdata.end(), data, data + chunk_size); } else { ps = NULL; } @@ -71,8 +73,8 @@ static void Save_CMDataAsPSAC() { u8vector data = CM_EncodeData(); uint8 *ptr = &data[0]; SaveLoadGlobVarList _desc[] = { - SLEG_CONDVAR(grfid, SLE_UINT32, 6, SL_MAX_VERSION), - SLEG_CONDARR(*ptr, SLE_UINT32, 16, 161, SL_MAX_VERSION), + SLEG_CONDVAR(grfid, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLEG_CONDARR(*ptr, SLE_UINT32, 256, SLV_EXTEND_PERSISTENT_STORAGE, SL_MAX_VERSION), SLEG_END() }; @@ -83,8 +85,8 @@ static void Save_CMDataAsPSAC() { index = max(index, ps->index + 1); } - int n_chunks = data.size() / 64; - for (int i = 0; i < n_chunks; i++, ptr += 64) { + int n_chunks = data.size() / 1024; + for (int i = 0; i < n_chunks; i++, ptr += 1024) { _desc[1].address = (void *)ptr; SlSetArrayIndex(index + i); SlGlobList(_desc); diff --git a/src/saveload/story_sl.cpp b/src/saveload/story_sl.cpp index 4b621f4090..f9bbf34b9b 100644 --- a/src/saveload/story_sl.cpp +++ b/src/saveload/story_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: story_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,7 +19,7 @@ /** Called after load to trash broken pages. */ void AfterLoadStoryBook() { - if (IsSavegameVersionBefore(185)) { + if (IsSavegameVersionBefore(SLV_185)) { /* Trash all story pages and page elements because * they were saved with wrong data types. */ @@ -29,11 +29,11 @@ void AfterLoadStoryBook() } static const SaveLoad _story_page_elements_desc[] = { - SLE_CONDVAR(StoryPageElement, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 184), - SLE_CONDVAR(StoryPageElement, sort_value, SLE_UINT32, 185, SL_MAX_VERSION), + SLE_CONDVAR(StoryPageElement, sort_value, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_185), + SLE_CONDVAR(StoryPageElement, sort_value, SLE_UINT32, SLV_185, SL_MAX_VERSION), SLE_VAR(StoryPageElement, page, SLE_UINT16), - SLE_CONDVAR(StoryPageElement, type, SLE_FILE_U16 | SLE_VAR_U8, 0, 184), - SLE_CONDVAR(StoryPageElement, type, SLE_UINT8, 185, SL_MAX_VERSION), + SLE_CONDVAR(StoryPageElement, type, SLE_FILE_U16 | SLE_VAR_U8, SL_MIN_VERSION, SLV_185), + SLE_CONDVAR(StoryPageElement, type, SLE_UINT8, SLV_185, SL_MAX_VERSION), SLE_VAR(StoryPageElement, referenced_id, SLE_UINT32), SLE_STR(StoryPageElement, text, SLE_STR | SLF_ALLOW_CONTROL, 0), SLE_END() @@ -66,11 +66,11 @@ static void Load_STORY_PAGE_ELEMENT() } static const SaveLoad _story_pages_desc[] = { - SLE_CONDVAR(StoryPage, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 184), - SLE_CONDVAR(StoryPage, sort_value, SLE_UINT32, 185, SL_MAX_VERSION), + SLE_CONDVAR(StoryPage, sort_value, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_185), + SLE_CONDVAR(StoryPage, sort_value, SLE_UINT32, SLV_185, SL_MAX_VERSION), SLE_VAR(StoryPage, date, SLE_UINT32), - SLE_CONDVAR(StoryPage, company, SLE_FILE_U16 | SLE_VAR_U8, 0, 184), - SLE_CONDVAR(StoryPage, company, SLE_UINT8, 185, SL_MAX_VERSION), + SLE_CONDVAR(StoryPage, company, SLE_FILE_U16 | SLE_VAR_U8, SL_MIN_VERSION, SLV_185), + SLE_CONDVAR(StoryPage, company, SLE_UINT8, SLV_185, SL_MAX_VERSION), SLE_STR(StoryPage, title, SLE_STR | SLF_ALLOW_CONTROL, 0), SLE_END() }; diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp index 0a04b808ee..d8fe81d113 100644 --- a/src/saveload/strings_sl.cpp +++ b/src/saveload/strings_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: strings_sl.cpp 27756 2017-02-26 19:40:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -63,7 +63,7 @@ char *CopyFromOldName(StringID id) /* Is this name an (old) custom name? */ if (GetStringTab(id) != TEXT_TAB_OLD_CUSTOM) return NULL; - if (IsSavegameVersionBefore(37)) { + if (IsSavegameVersionBefore(SLV_37)) { /* Allow for expansion when converted to UTF-8. */ char tmp[LEN_OLD_STRINGS * MAX_CHAR_LENGTH]; uint offs = _savegame_type == SGT_TTO ? LEN_OLD_STRINGS_TTO * GB(id, 0, 8) : LEN_OLD_STRINGS * GB(id, 0, 9); diff --git a/src/saveload/subsidy_sl.cpp b/src/saveload/subsidy_sl.cpp index d844e1107b..6f10ec8d09 100644 --- a/src/saveload/subsidy_sl.cpp +++ b/src/saveload/subsidy_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: subsidy_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,13 +19,13 @@ static const SaveLoad _subsidies_desc[] = { SLE_VAR(Subsidy, cargo_type, SLE_UINT8), SLE_VAR(Subsidy, remaining, SLE_UINT8), - SLE_CONDVAR(Subsidy, awarded, SLE_UINT8, 125, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy, src_type, SLE_UINT8, 125, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy, dst_type, SLE_UINT8, 125, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy, src, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Subsidy, src, SLE_UINT16, 5, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy, dst, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Subsidy, dst, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVAR(Subsidy, awarded, SLE_UINT8, SLV_125, SL_MAX_VERSION), + SLE_CONDVAR(Subsidy, src_type, SLE_UINT8, SLV_125, SL_MAX_VERSION), + SLE_CONDVAR(Subsidy, dst_type, SLE_UINT8, SLV_125, SL_MAX_VERSION), + SLE_CONDVAR(Subsidy, src, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Subsidy, src, SLE_UINT16, SLV_5, SL_MAX_VERSION), + SLE_CONDVAR(Subsidy, dst, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Subsidy, dst, SLE_UINT16, SLV_5, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index 5c8fa4311d..6c13be336b 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: town_sl.cpp 27756 2017-02-26 19:40:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -119,104 +119,105 @@ void UpdateHousesAndTowns() /** Save and load of towns. */ static const SaveLoad _town_desc[] = { - SLE_CONDVAR(Town, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Town, xy, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Town, xy, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Town, xy, SLE_UINT32, SLV_6, SL_MAX_VERSION), - SLE_CONDNULL(2, 0, 2), ///< population, no longer in use - SLE_CONDNULL(4, 3, 84), ///< population, no longer in use - SLE_CONDNULL(2, 0, 91), ///< num_houses, no longer in use + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_3), ///< population, no longer in use + SLE_CONDNULL(4, SLV_3, SLV_85), ///< population, no longer in use + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_92), ///< num_houses, no longer in use - SLE_CONDVAR(Town, townnamegrfid, SLE_UINT32, 66, SL_MAX_VERSION), + SLE_CONDVAR(Town, townnamegrfid, SLE_UINT32, SLV_66, SL_MAX_VERSION), SLE_VAR(Town, townnametype, SLE_UINT16), SLE_VAR(Town, townnameparts, SLE_UINT32), - SLE_CONDSTR(Town, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), + SLE_CONDSTR(Town, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), SLE_VAR(Town, flags, SLE_UINT8), - SLE_CONDVAR(Town, statues, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), - SLE_CONDVAR(Town, statues, SLE_UINT16, 104, SL_MAX_VERSION), + SLE_CONDVAR(Town, statues, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_104), + SLE_CONDVAR(Town, statues, SLE_UINT16, SLV_104, SL_MAX_VERSION), - SLE_CONDNULL(1, 0, 1), ///< sort_index, no longer in use + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_2), ///< sort_index, no longer in use - SLE_CONDVAR(Town, have_ratings, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), - SLE_CONDVAR(Town, have_ratings, SLE_UINT16, 104, SL_MAX_VERSION), - SLE_CONDARR(Town, ratings, SLE_INT16, 8, 0, 103), - SLE_CONDARR(Town, ratings, SLE_INT16, MAX_COMPANIES, 104, SL_MAX_VERSION), + SLE_CONDVAR(Town, have_ratings, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_104), + SLE_CONDVAR(Town, have_ratings, SLE_UINT16, SLV_104, SL_MAX_VERSION), + SLE_CONDARR(Town, ratings, SLE_INT16, 8, SL_MIN_VERSION, SLV_104), + SLE_CONDARR(Town, ratings, SLE_INT16, MAX_COMPANIES, SLV_104, SL_MAX_VERSION), /* failed bribe attempts are stored since savegame format 4 */ - SLE_CONDARR(Town, unwanted, SLE_INT8, 8, 4, 103), - SLE_CONDARR(Town, unwanted, SLE_INT8, MAX_COMPANIES, 104, SL_MAX_VERSION), + SLE_CONDARR(Town, unwanted, SLE_INT8, 8, SLV_4, SLV_104), + SLE_CONDARR(Town, unwanted, SLE_INT8, MAX_COMPANIES, SLV_104, SL_MAX_VERSION), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_9), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_UINT32, 9, 164), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_UINT32, SLV_9, SLV_165), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_UINT32, SLV_9, SLV_165), - SLE_CONDNULL(2, 0, 163), ///< pct_pass_transported / pct_mail_transported, now computed on the fly + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_164), ///< pct_pass_transported / pct_mail_transported, now computed on the fly - SLE_CONDVAR(Town, received[TE_FOOD].old_act, SLE_UINT16, 0, 164), - SLE_CONDVAR(Town, received[TE_WATER].old_act, SLE_UINT16, 0, 164), - SLE_CONDVAR(Town, received[TE_FOOD].new_act, SLE_UINT16, 0, 164), - SLE_CONDVAR(Town, received[TE_WATER].new_act, SLE_UINT16, 0, 164), + SLE_CONDVAR(Town, received[TE_FOOD].old_act, SLE_UINT16, SL_MIN_VERSION, SLV_165), + SLE_CONDVAR(Town, received[TE_WATER].old_act, SLE_UINT16, SL_MIN_VERSION, SLV_165), + SLE_CONDVAR(Town, received[TE_FOOD].new_act, SLE_UINT16, SL_MIN_VERSION, SLV_165), + SLE_CONDVAR(Town, received[TE_WATER].new_act, SLE_UINT16, SL_MIN_VERSION, SLV_165), - SLE_CONDARR(Town, goal, SLE_UINT32, NUM_TE, 165, SL_MAX_VERSION), + SLE_CONDARR(Town, goal, SLE_UINT32, NUM_TE, SLV_165, SL_MAX_VERSION), - SLE_CONDSTR(Town, text, SLE_STR | SLF_ALLOW_CONTROL, 0, 168, SL_MAX_VERSION), + SLE_CONDSTR(Town, text, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_168, SL_MAX_VERSION), - SLE_CONDVAR(Town, time_until_rebuild, SLE_FILE_U8 | SLE_VAR_U16, 0, 53), - SLE_CONDVAR(Town, grow_counter, SLE_FILE_U8 | SLE_VAR_U16, 0, 53), - SLE_CONDVAR(Town, growth_rate, SLE_FILE_U8 | SLE_VAR_I16, 0, 53), + SLE_CONDVAR(Town, time_until_rebuild, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_54), + SLE_CONDVAR(Town, grow_counter, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_54), + SLE_CONDVAR(Town, growth_rate, SLE_FILE_U8 | SLE_VAR_I16, SL_MIN_VERSION, SLV_54), - SLE_CONDVAR(Town, time_until_rebuild, SLE_UINT16, 54, SL_MAX_VERSION), - SLE_CONDVAR(Town, grow_counter, SLE_UINT16, 54, SL_MAX_VERSION), + SLE_CONDVAR(Town, time_until_rebuild, SLE_UINT16, SLV_54, SL_MAX_VERSION), + SLE_CONDVAR(Town, grow_counter, SLE_UINT16, SLV_54, SL_MAX_VERSION), - SLE_CONDVAR(Town, growth_rate, SLE_FILE_I16 | SLE_VAR_U16, 54, 164), - SLE_CONDVAR(Town, growth_rate, SLE_UINT16, 165, SL_MAX_VERSION), + SLE_CONDVAR(Town, growth_rate, SLE_FILE_I16 | SLE_VAR_U16, SLV_54, SLV_165), + SLE_CONDVAR(Town, growth_rate, SLE_UINT16, SLV_165, SL_MAX_VERSION), SLE_VAR(Town, fund_buildings_months, SLE_UINT8), SLE_VAR(Town, road_build_months, SLE_UINT8), - SLE_CONDVAR(Town, exclusivity, SLE_UINT8, 2, SL_MAX_VERSION), - SLE_CONDVAR(Town, exclusive_counter, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVAR(Town, exclusivity, SLE_UINT8, SLV_2, SL_MAX_VERSION), + SLE_CONDVAR(Town, exclusive_counter, SLE_UINT8, SLV_2, SL_MAX_VERSION), - SLE_CONDVAR(Town, larger_town, SLE_BOOL, 56, SL_MAX_VERSION), - SLE_CONDVAR(Town, layout, SLE_UINT8, 113, SL_MAX_VERSION), + SLE_CONDVAR(Town, larger_town, SLE_BOOL, SLV_56, SL_MAX_VERSION), + SLE_CONDVAR(Town, layout, SLE_UINT8, SLV_113, SL_MAX_VERSION), - SLE_CONDLST(Town, psa_list, REF_STORAGE, 161, SL_MAX_VERSION), + SLE_CONDLST(Town, psa_list, REF_STORAGE, SLV_161, SL_MAX_VERSION), - SLE_CONDVAR(Town, cargo_produced, SLE_UINT32, 166, SL_MAX_VERSION), + SLE_CONDVAR(Town, cargo_produced, SLE_FILE_U32 | SLE_VAR_U64, SLV_166, SLV_EXTEND_CARGOTYPES), + SLE_CONDVAR(Town, cargo_produced, SLE_UINT64, SLV_EXTEND_CARGOTYPES, SL_MAX_VERSION), /* reserve extra space in savegame here. (currently 30 bytes) */ - SLE_CONDNULL(30, 2, SL_MAX_VERSION), + SLE_CONDNULL(30, SLV_2, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _town_supplied_desc[] = { - SLE_CONDVAR(TransportedCargoStat, old_max, SLE_UINT32, 165, SL_MAX_VERSION), - SLE_CONDVAR(TransportedCargoStat, new_max, SLE_UINT32, 165, SL_MAX_VERSION), - SLE_CONDVAR(TransportedCargoStat, old_act, SLE_UINT32, 165, SL_MAX_VERSION), - SLE_CONDVAR(TransportedCargoStat, new_act, SLE_UINT32, 165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, old_max, SLE_UINT32, SLV_165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, new_max, SLE_UINT32, SLV_165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, old_act, SLE_UINT32, SLV_165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, new_act, SLE_UINT32, SLV_165, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _town_received_desc[] = { - SLE_CONDVAR(TransportedCargoStat, old_max, SLE_UINT16, 165, SL_MAX_VERSION), - SLE_CONDVAR(TransportedCargoStat, new_max, SLE_UINT16, 165, SL_MAX_VERSION), - SLE_CONDVAR(TransportedCargoStat, old_act, SLE_UINT16, 165, SL_MAX_VERSION), - SLE_CONDVAR(TransportedCargoStat, new_act, SLE_UINT16, 165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, old_max, SLE_UINT16, SLV_165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, new_max, SLE_UINT16, SLV_165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, old_act, SLE_UINT16, SLV_165, SL_MAX_VERSION), + SLE_CONDVAR(TransportedCargoStat, new_act, SLE_UINT16, SLV_165, SL_MAX_VERSION), SLE_END() }; @@ -255,7 +256,7 @@ static void RealSave_Town(Town *t) SlObject(&t->received[i], _town_received_desc); } - if (IsSavegameVersionBefore(166)) return; + if (IsSavegameVersionBefore(SLV_166)) return; SlObject(&t->cargo_accepted, GetTileMatrixDesc()); if (t->cargo_accepted.area.w != 0) { @@ -277,12 +278,13 @@ static void Save_TOWN() static void Load_TOWN() { int index; + uint num_cargo = IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; while ((index = SlIterateArray()) != -1) { Town *t = new (index) Town(); SlObject(t, _town_desc); - for (CargoID i = 0; i < NUM_CARGO; i++) { + for (CargoID i = 0; i < num_cargo; i++) { SlObject(&t->supplied[i], _town_supplied_desc); } for (int i = TE_BEGIN; i < TE_END; i++) { @@ -293,12 +295,12 @@ static void Load_TOWN() SlErrorCorrupt("Invalid town name generator"); } - if (IsSavegameVersionBefore(166)) continue; + if (IsSavegameVersionBefore(SLV_166)) continue; SlObject(&t->cargo_accepted, GetTileMatrixDesc()); if (t->cargo_accepted.area.w != 0) { uint arr_len = t->cargo_accepted.area.w / AcceptanceMatrix::GRID * t->cargo_accepted.area.h / AcceptanceMatrix::GRID; - t->cargo_accepted.data = MallocT(arr_len); + t->cargo_accepted.data = MallocT(arr_len); SlArray(t->cargo_accepted.data, arr_len, SLE_UINT32); /* Rebuild total cargo acceptance. */ @@ -311,7 +313,7 @@ static void Load_TOWN() static void Ptrs_TOWN() { /* Don't run when savegame version lower than 161. */ - if (IsSavegameVersionBefore(161)) return; + if (IsSavegameVersionBefore(SLV_161)) return; Town *t; FOR_ALL_TOWNS(t) { diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 52c7f33d2b..540416586c 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: vehicle_sl.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -273,7 +273,7 @@ void AfterLoadVehicles(bool part_of_load) FOR_ALL_VEHICLES(v) { if (v->orders.old != NULL) { - if (IsSavegameVersionBefore(105)) { // Pre-105 didn't save an OrderList + if (IsSavegameVersionBefore(SLV_105)) { // Pre-105 didn't save an OrderList if (mapping[v->orders.old] == NULL) { /* This adds the whole shared vehicle chain for case b */ @@ -285,7 +285,7 @@ void AfterLoadVehicles(bool part_of_load) } else { v->orders.list = mapping[v->orders.old]; /* For old games (case a) we must create the shared vehicle chain */ - if (IsSavegameVersionBefore(5, 2)) { + if (IsSavegameVersionBefore(SLV_5, 2)) { v->AddToShared(v->orders.list->GetFirstSharedVehicle()); } } @@ -308,7 +308,7 @@ void AfterLoadVehicles(bool part_of_load) } if (part_of_load) { - if (IsSavegameVersionBefore(105)) { + if (IsSavegameVersionBefore(SLV_105)) { /* Before 105 there was no order for shared orders, thus it messed up horribly */ FOR_ALL_VEHICLES(v) { if (v->First() != v || v->orders.list != NULL || v->previous_shared != NULL || v->next_shared == NULL) continue; @@ -322,7 +322,7 @@ void AfterLoadVehicles(bool part_of_load) } } - if (IsSavegameVersionBefore(157)) { + if (IsSavegameVersionBefore(SLV_157)) { /* The road vehicle subtype was converted to a flag. */ RoadVehicle *rv; FOR_ALL_ROADVEHICLES(rv) { @@ -339,7 +339,7 @@ void AfterLoadVehicles(bool part_of_load) } } - if (IsSavegameVersionBefore(160)) { + if (IsSavegameVersionBefore(SLV_160)) { /* In some old savegames there might be some "crap" stored. */ FOR_ALL_VEHICLES(v) { if (!v->IsPrimaryVehicle() && v->type != VEH_DISASTER) { @@ -349,14 +349,14 @@ void AfterLoadVehicles(bool part_of_load) } } - if (IsSavegameVersionBefore(162)) { + if (IsSavegameVersionBefore(SLV_162)) { /* Set the vehicle-local cargo age counter from the old global counter. */ FOR_ALL_VEHICLES(v) { v->cargo_age_counter = _age_cargo_skip_counter; } } - if (IsSavegameVersionBefore(180)) { + if (IsSavegameVersionBefore(SLV_180)) { /* Set service interval flags */ FOR_ALL_VEHICLES(v) { if (!v->IsPrimaryVehicle()) continue; @@ -368,6 +368,25 @@ void AfterLoadVehicles(bool part_of_load) v->SetServiceIntervalIsPercent(c->settings.vehicle.servint_ispercent); } } + + if (IsSavegameVersionBefore(SLV_SHIP_ROTATION)) { + /* Ship rotation added */ + Ship *s; + FOR_ALL_SHIPS(s) { + s->rotation = s->direction; + } + } else { + Ship *s; + FOR_ALL_SHIPS(s) { + if (s->rotation == s->direction) continue; + /* In case we are rotating on gameload, set the rotation position to + * the current position, otherwise the applied workaround offset would + * be with respect to 0,0. + */ + s->rotation_x_pos = s->x_pos; + s->rotation_y_pos = s->y_pos; + } + } } CheckValidVehicles(); @@ -408,7 +427,7 @@ void AfterLoadVehicles(bool part_of_load) } /* Stop non-front engines */ - if (part_of_load && IsSavegameVersionBefore(112)) { + if (part_of_load && IsSavegameVersionBefore(SLV_112)) { FOR_ALL_VEHICLES(v) { if (v->type == VEH_TRAIN) { Train *t = Train::From(v); @@ -421,7 +440,7 @@ void AfterLoadVehicles(bool part_of_load) } /* trains weren't stopping gradually in old OTTD versions (and TTO/TTD) * other vehicle types didn't have zero speed while stopped (even in 'recent' OTTD versions) */ - if ((v->vehstatus & VS_STOPPED) && (v->type != VEH_TRAIN || IsSavegameVersionBefore(2, 1))) { + if ((v->vehstatus & VS_STOPPED) && (v->type != VEH_TRAIN || IsSavegameVersionBefore(SLV_2, 1))) { v->cur_speed = 0; } } @@ -433,8 +452,8 @@ void AfterLoadVehicles(bool part_of_load) RoadVehicle *rv = RoadVehicle::From(v); rv->roadtype = HasBit(EngInfo(v->First()->engine_type)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD; rv->compatible_roadtypes = RoadTypeToRoadTypes(rv->roadtype); + FALLTHROUGH; } - FALLTHROUGH; case VEH_TRAIN: case VEH_SHIP: @@ -461,7 +480,7 @@ void AfterLoadVehicles(bool part_of_load) default: break; } - v->UpdateDeltaXY(v->direction); + v->UpdateDeltaXY(); v->coord.left = INVALID_COORD; v->UpdatePosition(); v->UpdateViewport(false); @@ -578,160 +597,160 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Vehicle, subtype, SLE_UINT8), SLE_REF(Vehicle, next, REF_VEHICLE_OLD), - SLE_CONDVAR(Vehicle, name, SLE_NAME, 0, 83), - SLE_CONDSTR(Vehicle, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, unitnumber, SLE_FILE_U8 | SLE_VAR_U16, 0, 7), - SLE_CONDVAR(Vehicle, unitnumber, SLE_UINT16, 8, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, name, SLE_NAME, SL_MIN_VERSION, SLV_84), + SLE_CONDSTR(Vehicle, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, unitnumber, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_8), + SLE_CONDVAR(Vehicle, unitnumber, SLE_UINT16, SLV_8, SL_MAX_VERSION), SLE_VAR(Vehicle, owner, SLE_UINT8), - SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, x_pos, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, y_pos, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), - SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, 164, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, x_pos, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, y_pos, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_164), + SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, SLV_164, SL_MAX_VERSION), SLE_VAR(Vehicle, direction, SLE_UINT8), - SLE_CONDNULL(2, 0, 57), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_58), SLE_VAR(Vehicle, spritenum, SLE_UINT8), - SLE_CONDNULL(5, 0, 57), + SLE_CONDNULL(5, SL_MIN_VERSION, SLV_58), SLE_VAR(Vehicle, engine_type, SLE_UINT16), - SLE_CONDNULL(2, 0, 151), + SLE_CONDNULL(2, SL_MIN_VERSION, SLV_152), SLE_VAR(Vehicle, cur_speed, SLE_UINT16), SLE_VAR(Vehicle, subspeed, SLE_UINT8), SLE_VAR(Vehicle, acceleration, SLE_UINT8), SLE_VAR(Vehicle, progress, SLE_UINT8), SLE_VAR(Vehicle, vehstatus, SLE_UINT8), - SLE_CONDVAR(Vehicle, last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Vehicle, last_station_visited, SLE_UINT16, 5, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, last_loading_station, SLE_UINT16, 182, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Vehicle, last_station_visited, SLE_UINT16, SLV_5, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, last_loading_station, SLE_UINT16, SLV_182, SL_MAX_VERSION), SLE_VAR(Vehicle, cargo_type, SLE_UINT8), - SLE_CONDVAR(Vehicle, cargo_subtype, SLE_UINT8, 35, SL_MAX_VERSION), - SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 67), - SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), - SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 67), - SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 67), + SLE_CONDVAR(Vehicle, cargo_subtype, SLE_UINT8, SLV_35, SL_MAX_VERSION), + SLEG_CONDVAR( _cargo_days, SLE_UINT8, SL_MIN_VERSION, SLV_68), + SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_7), + SLEG_CONDVAR( _cargo_source, SLE_UINT16, SLV_7, SLV_68), + SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, SLV_44, SLV_68), SLE_VAR(Vehicle, cargo_cap, SLE_UINT16), - SLE_CONDVAR(Vehicle, refit_cap, SLE_UINT16, 182, SL_MAX_VERSION), - SLEG_CONDVAR( _cargo_count, SLE_UINT16, 0, 67), - SLE_CONDLST(Vehicle, cargo.packets, REF_CARGO_PACKET, 68, SL_MAX_VERSION), - SLE_CONDARR(Vehicle, cargo.action_counts, SLE_UINT, VehicleCargoList::NUM_MOVE_TO_ACTION, 181, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, cargo_age_counter, SLE_UINT16, 162, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, refit_cap, SLE_UINT16, SLV_182, SL_MAX_VERSION), + SLEG_CONDVAR( _cargo_count, SLE_UINT16, SL_MIN_VERSION, SLV_68), + SLE_CONDLST(Vehicle, cargo.packets, REF_CARGO_PACKET, SLV_68, SL_MAX_VERSION), + SLE_CONDARR(Vehicle, cargo.action_counts, SLE_UINT, VehicleCargoList::NUM_MOVE_TO_ACTION, SLV_181, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, cargo_age_counter, SLE_UINT16, SLV_162, SL_MAX_VERSION), SLE_VAR(Vehicle, day_counter, SLE_UINT8), SLE_VAR(Vehicle, tick_counter, SLE_UINT8), - SLE_CONDVAR(Vehicle, running_ticks, SLE_UINT8, 88, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, running_ticks, SLE_UINT8, SLV_88, SL_MAX_VERSION), SLE_VAR(Vehicle, cur_implicit_order_index, SLE_UINT8), - SLE_CONDVAR(Vehicle, cur_real_order_index, SLE_UINT8, 158, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, cur_real_order_index, SLE_UINT8, SLV_158, SL_MAX_VERSION), /* num_orders is now part of OrderList and is not saved but counted */ - SLE_CONDNULL(1, 0, 104), + SLE_CONDNULL(1, SL_MIN_VERSION, SLV_105), /* This next line is for version 4 and prior compatibility.. it temporarily reads type and flags (which were both 4 bits) into type. Later on this is converted correctly */ - SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, 0, 4), - SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5), /* Orders for version 5 and on */ - SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, 5, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, current_order.flags, SLE_UINT8, 5, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, current_order.dest, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, SLV_5, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.flags, SLE_UINT8, SLV_5, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.dest, SLE_UINT16, SLV_5, SL_MAX_VERSION), /* Refit in current order */ - SLE_CONDVAR(Vehicle, current_order.refit_cargo, SLE_UINT8, 36, SL_MAX_VERSION), - SLE_CONDNULL(1, 36, 181), // refit_subtype + SLE_CONDVAR(Vehicle, current_order.refit_cargo, SLE_UINT8, SLV_36, SL_MAX_VERSION), + SLE_CONDNULL(1, SLV_36, SLV_182), // refit_subtype /* Timetable in current order */ - SLE_CONDVAR(Vehicle, current_order.wait_time, SLE_UINT16, 67, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, current_order.travel_time, SLE_UINT16, 67, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, current_order.max_speed, SLE_UINT16, 174, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, timetable_start, SLE_INT32, 129, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.wait_time, SLE_UINT16, SLV_67, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.travel_time, SLE_UINT16, SLV_67, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.max_speed, SLE_UINT16, SLV_174, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, timetable_start, SLE_INT32, SLV_129, SL_MAX_VERSION), - SLE_CONDREF(Vehicle, orders, REF_ORDER, 0, 104), - SLE_CONDREF(Vehicle, orders, REF_ORDERLIST, 105, SL_MAX_VERSION), + SLE_CONDREF(Vehicle, orders, REF_ORDER, SL_MIN_VERSION, SLV_105), + SLE_CONDREF(Vehicle, orders, REF_ORDERLIST, SLV_105, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, max_age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle, max_age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle, date_of_last_service, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 0, 30), - SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 31, 179), - SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 180, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Vehicle, age, SLE_INT32, SLV_31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, max_age, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Vehicle, max_age, SLE_INT32, SLV_31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Vehicle, date_of_last_service, SLE_INT32, SLV_31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U32 | SLE_VAR_U16, SLV_31, SLV_180), + SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, SLV_180, SL_MAX_VERSION), SLE_VAR(Vehicle, reliability, SLE_UINT16), SLE_VAR(Vehicle, reliability_spd_dec, SLE_UINT16), SLE_VAR(Vehicle, breakdown_ctr, SLE_UINT8), SLE_VAR(Vehicle, breakdown_delay, SLE_UINT8), SLE_VAR(Vehicle, breakdowns_since_last_service, SLE_UINT8), SLE_VAR(Vehicle, breakdown_chance, SLE_UINT8), - SLE_CONDVAR(Vehicle, build_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle, build_year, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, build_year, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Vehicle, build_year, SLE_INT32, SLV_31, SL_MAX_VERSION), SLE_VAR(Vehicle, load_unload_ticks, SLE_UINT16), - SLEG_CONDVAR( _cargo_paid_for, SLE_UINT16, 45, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 40, 179), - SLE_CONDVAR(Vehicle, vehicle_flags, SLE_UINT16, 180, SL_MAX_VERSION), + SLEG_CONDVAR( _cargo_paid_for, SLE_UINT16, SLV_45, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, SLV_40, SLV_180), + SLE_CONDVAR(Vehicle, vehicle_flags, SLE_UINT16, SLV_180, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, profit_this_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), - SLE_CONDVAR(Vehicle, profit_this_year, SLE_INT64, 65, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, profit_last_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), - SLE_CONDVAR(Vehicle, profit_last_year, SLE_INT64, 65, SL_MAX_VERSION), - SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_I32 | SLE_VAR_I64, 51, 64), - SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 67), - SLEG_CONDVAR( _cargo_loaded_at_xy, SLE_UINT32, 51, 67), - SLE_CONDVAR(Vehicle, value, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), - SLE_CONDVAR(Vehicle, value, SLE_INT64, 65, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, profit_this_year, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_65), + SLE_CONDVAR(Vehicle, profit_this_year, SLE_INT64, SLV_65, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, profit_last_year, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_65), + SLE_CONDVAR(Vehicle, profit_last_year, SLE_INT64, SLV_65, SL_MAX_VERSION), + SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_I32 | SLE_VAR_I64, SLV_51, SLV_65), + SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, SLV_65, SLV_68), + SLEG_CONDVAR( _cargo_loaded_at_xy, SLE_UINT32, SLV_51, SLV_68), + SLE_CONDVAR(Vehicle, value, SLE_FILE_I32 | SLE_VAR_I64, SL_MIN_VERSION, SLV_65), + SLE_CONDVAR(Vehicle, value, SLE_INT64, SLV_65, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, random_bits, SLE_UINT8, 2, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, waiting_triggers, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, random_bits, SLE_UINT8, SLV_2, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, waiting_triggers, SLE_UINT8, SLV_2, SL_MAX_VERSION), - SLE_CONDREF(Vehicle, next_shared, REF_VEHICLE, 2, SL_MAX_VERSION), - SLE_CONDNULL(2, 2, 68), - SLE_CONDNULL(4, 69, 100), + SLE_CONDREF(Vehicle, next_shared, REF_VEHICLE, SLV_2, SL_MAX_VERSION), + SLE_CONDNULL(2, SLV_2, SLV_69), + SLE_CONDNULL(4, SLV_69, SLV_101), - SLE_CONDVAR(Vehicle, group_id, SLE_UINT16, 60, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, group_id, SLE_UINT16, SLV_60, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, current_order_time, SLE_UINT32, 67, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, lateness_counter, SLE_INT32, 67, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order_time, SLE_UINT32, SLV_67, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, lateness_counter, SLE_INT32, SLV_67, SL_MAX_VERSION), - SLE_CONDNULL(10, 2, 143), // old reserved space + SLE_CONDNULL(10, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _train_desc[] = { - SLE_WRITEBYTE(Vehicle, type, VEH_TRAIN), + SLE_WRITEBYTE(Vehicle, type), SLE_VEH_INCLUDE(), SLE_VAR(Train, crash_anim_pos, SLE_UINT16), SLE_VAR(Train, force_proceed, SLE_UINT8), SLE_VAR(Train, railtype, SLE_UINT8), SLE_VAR(Train, track, SLE_UINT8), - SLE_CONDVAR(Train, flags, SLE_FILE_U8 | SLE_VAR_U16, 2, 99), - SLE_CONDVAR(Train, flags, SLE_UINT16, 100, SL_MAX_VERSION), - SLE_CONDNULL(2, 2, 59), + SLE_CONDVAR(Train, flags, SLE_FILE_U8 | SLE_VAR_U16, SLV_2, SLV_100), + SLE_CONDVAR(Train, flags, SLE_UINT16, SLV_100, SL_MAX_VERSION), + SLE_CONDNULL(2, SLV_2, SLV_60), - SLE_CONDVAR(Train, wait_counter, SLE_UINT16, 136, SL_MAX_VERSION), + SLE_CONDVAR(Train, wait_counter, SLE_UINT16, SLV_136, SL_MAX_VERSION), - SLE_CONDNULL(2, 2, 19), - SLE_CONDVAR(Train, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION), - SLE_CONDNULL(11, 2, 143), // old reserved space + SLE_CONDNULL(2, SLV_2, SLV_20), + SLE_CONDVAR(Train, gv_flags, SLE_UINT16, SLV_139, SL_MAX_VERSION), + SLE_CONDNULL(11, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _roadveh_desc[] = { - SLE_WRITEBYTE(Vehicle, type, VEH_ROAD), + SLE_WRITEBYTE(Vehicle, type), SLE_VEH_INCLUDE(), SLE_VAR(RoadVehicle, state, SLE_UINT8), SLE_VAR(RoadVehicle, frame, SLE_UINT8), @@ -741,115 +760,117 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(RoadVehicle, crashed_ctr, SLE_UINT16), SLE_VAR(RoadVehicle, reverse_ctr, SLE_UINT8), - SLE_CONDNULL(2, 6, 68), - SLE_CONDVAR(RoadVehicle, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION), - SLE_CONDNULL(4, 69, 130), - SLE_CONDNULL(2, 6, 130), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(2, SLV_6, SLV_69), + SLE_CONDVAR(RoadVehicle, gv_flags, SLE_UINT16, SLV_139, SL_MAX_VERSION), + SLE_CONDNULL(4, SLV_69, SLV_131), + SLE_CONDNULL(2, SLV_6, SLV_131), + SLE_CONDNULL(16, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _ship_desc[] = { - SLE_WRITEBYTE(Vehicle, type, VEH_SHIP), + SLE_WRITEBYTE(Vehicle, type), SLE_VEH_INCLUDE(), - SLE_VAR(Ship, state, SLE_UINT8), + SLE_VAR(Ship, state, SLE_UINT8), + SLE_CONDDEQUE(Ship, path, SLE_UINT8, SLV_SHIP_PATH_CACHE, SL_MAX_VERSION), + SLE_CONDVAR(Ship, rotation, SLE_UINT8, SLV_SHIP_ROTATION, SL_MAX_VERSION), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(16, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _aircraft_desc[] = { - SLE_WRITEBYTE(Vehicle, type, VEH_AIRCRAFT), + SLE_WRITEBYTE(Vehicle, type), SLE_VEH_INCLUDE(), SLE_VAR(Aircraft, crashed_counter, SLE_UINT16), SLE_VAR(Aircraft, pos, SLE_UINT8), - SLE_CONDVAR(Aircraft, targetairport, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Aircraft, targetairport, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVAR(Aircraft, targetairport, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Aircraft, targetairport, SLE_UINT16, SLV_5, SL_MAX_VERSION), SLE_VAR(Aircraft, state, SLE_UINT8), - SLE_CONDVAR(Aircraft, previous_pos, SLE_UINT8, 2, SL_MAX_VERSION), - SLE_CONDVAR(Aircraft, last_direction, SLE_UINT8, 2, SL_MAX_VERSION), - SLE_CONDVAR(Aircraft, number_consecutive_turns, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVAR(Aircraft, previous_pos, SLE_UINT8, SLV_2, SL_MAX_VERSION), + SLE_CONDVAR(Aircraft, last_direction, SLE_UINT8, SLV_2, SL_MAX_VERSION), + SLE_CONDVAR(Aircraft, number_consecutive_turns, SLE_UINT8, SLV_2, SL_MAX_VERSION), - SLE_CONDVAR(Aircraft, turn_counter, SLE_UINT8, 136, SL_MAX_VERSION), - SLE_CONDVAR(Aircraft, flags, SLE_UINT8, 167, SL_MAX_VERSION), + SLE_CONDVAR(Aircraft, turn_counter, SLE_UINT8, SLV_136, SL_MAX_VERSION), + SLE_CONDVAR(Aircraft, flags, SLE_UINT8, SLV_167, SL_MAX_VERSION), - SLE_CONDNULL(13, 2, 143), // old reserved space + SLE_CONDNULL(13, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _special_desc[] = { - SLE_WRITEBYTE(Vehicle, type, VEH_EFFECT), + SLE_WRITEBYTE(Vehicle, type), SLE_VAR(Vehicle, subtype, SLE_UINT8), - SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), - SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, 164, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_164), + SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, SLV_164, SL_MAX_VERSION), SLE_VAR(Vehicle, sprite_seq.seq[0].sprite, SLE_FILE_U16 | SLE_VAR_U32), - SLE_CONDNULL(5, 0, 57), + SLE_CONDNULL(5, SL_MIN_VERSION, SLV_59), SLE_VAR(Vehicle, progress, SLE_UINT8), SLE_VAR(Vehicle, vehstatus, SLE_UINT8), SLE_VAR(EffectVehicle, animation_state, SLE_UINT16), SLE_VAR(EffectVehicle, animation_substate, SLE_UINT8), - SLE_CONDVAR(Vehicle, spritenum, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, spritenum, SLE_UINT8, SLV_2, SL_MAX_VERSION), - SLE_CONDNULL(15, 2, 143), // old reserved space + SLE_CONDNULL(15, SLV_2, SLV_144), // old reserved space SLE_END() }; static const SaveLoad _disaster_desc[] = { - SLE_WRITEBYTE(Vehicle, type, VEH_DISASTER), + SLE_WRITEBYTE(Vehicle, type), SLE_REF(Vehicle, next, REF_VEHICLE_OLD), SLE_VAR(Vehicle, subtype, SLE_UINT8), - SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), - SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, 164, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_164), + SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, SLV_164, SL_MAX_VERSION), SLE_VAR(Vehicle, direction, SLE_UINT8), - SLE_CONDNULL(5, 0, 57), + SLE_CONDNULL(5, SL_MIN_VERSION, SLV_58), SLE_VAR(Vehicle, owner, SLE_UINT8), SLE_VAR(Vehicle, vehstatus, SLE_UINT8), - SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Vehicle, current_order.dest, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5), + SLE_CONDVAR(Vehicle, current_order.dest, SLE_UINT16, SLV_5, SL_MAX_VERSION), SLE_VAR(Vehicle, sprite_seq.seq[0].sprite, SLE_FILE_U16 | SLE_VAR_U32), - SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31), + SLE_CONDVAR(Vehicle, age, SLE_INT32, SLV_31, SL_MAX_VERSION), SLE_VAR(Vehicle, tick_counter, SLE_UINT8), - SLE_CONDVAR(DisasterVehicle, image_override, SLE_FILE_U16 | SLE_VAR_U32, 0, 190), - SLE_CONDVAR(DisasterVehicle, image_override, SLE_UINT32, 191, SL_MAX_VERSION), - SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_FILE_U16 | SLE_VAR_U32, 0, 190), - SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT32, 191, SL_MAX_VERSION), - SLE_CONDVAR(DisasterVehicle, flags, SLE_UINT8, 194, SL_MAX_VERSION), + SLE_CONDVAR(DisasterVehicle, image_override, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_191), + SLE_CONDVAR(DisasterVehicle, image_override, SLE_UINT32, SLV_191, SL_MAX_VERSION), + SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_191), + SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT32, SLV_191, SL_MAX_VERSION), + SLE_CONDVAR(DisasterVehicle, flags, SLE_UINT8, SLV_194, SL_MAX_VERSION), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(16, SLV_2, SLV_144), // old reserved space SLE_END() }; @@ -910,13 +931,13 @@ void Load_VEHS() } /* Old savegames used 'last_station_visited = 0xFF' */ - if (IsSavegameVersionBefore(5) && v->last_station_visited == 0xFF) { + if (IsSavegameVersionBefore(SLV_5) && v->last_station_visited == 0xFF) { v->last_station_visited = INVALID_STATION; } - if (IsSavegameVersionBefore(182)) v->last_loading_station = INVALID_STATION; + if (IsSavegameVersionBefore(SLV_182)) v->last_loading_station = INVALID_STATION; - if (IsSavegameVersionBefore(5)) { + if (IsSavegameVersionBefore(SLV_5)) { /* Convert the current_order.type (which is a mix of type and flags, because * in those versions, they both were 4 bits big) to type and flags */ v->current_order.flags = GB(v->current_order.type, 4, 4); @@ -924,7 +945,7 @@ void Load_VEHS() } /* Advanced vehicle lists got added */ - if (IsSavegameVersionBefore(60)) v->group_id = DEFAULT_GROUP; + if (IsSavegameVersionBefore(SLV_60)) v->group_id = DEFAULT_GROUP; } } diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp index 7f95e5c724..ae74d812b1 100644 --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -1,4 +1,4 @@ -/* $Id: waypoint_sl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -70,7 +70,7 @@ void MoveWaypointsToBaseStations() * waypoints to make way for storing the index in m2. The custom graphics * id which was stored in m4 is now saved as a grf/id reference in the * waypoint struct. */ - if (IsSavegameVersionBefore(17)) { + if (IsSavegameVersionBefore(SLV_17)) { for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) { if (wp->delete_ctr != 0) continue; // The waypoint was deleted @@ -113,7 +113,7 @@ void MoveWaypointsToBaseStations() TileIndex t = wp->xy; if (IsTileType(t, MP_RAILWAY) && GetRailTileType(t) == 2 /* RAIL_TILE_WAYPOINT */ && _m[t].m2 == wp->index) { /* The tile might've been reserved! */ - bool reserved = !IsSavegameVersionBefore(100) && HasBit(_m[t].m5, 4); + bool reserved = !IsSavegameVersionBefore(SLV_100) && HasBit(_m[t].m5, 4); /* The tile really has our waypoint, so reassign the map array */ MakeRailWaypoint(t, GetTileOwner(t), new_wp->index, (Axis)GB(_m[t].m5, 0, 1), 0, GetRailType(t)); @@ -150,21 +150,21 @@ void MoveWaypointsToBaseStations() } static const SaveLoad _old_waypoint_desc[] = { - SLE_CONDVAR(OldWaypoint, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(OldWaypoint, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, town_index, SLE_UINT16, 12, 121), - SLE_CONDREF(OldWaypoint, town, REF_TOWN, 122, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, town_cn, SLE_FILE_U8 | SLE_VAR_U16, 12, 88), - SLE_CONDVAR(OldWaypoint, town_cn, SLE_UINT16, 89, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, string_id, SLE_STRINGID, 0, 83), - SLE_CONDSTR(OldWaypoint, name, SLE_STR, 0, 84, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, xy, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), + SLE_CONDVAR(OldWaypoint, xy, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, town_index, SLE_UINT16, SLV_12, SLV_122), + SLE_CONDREF(OldWaypoint, town, REF_TOWN, SLV_122, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, town_cn, SLE_FILE_U8 | SLE_VAR_U16, SLV_12, SLV_89), + SLE_CONDVAR(OldWaypoint, town_cn, SLE_UINT16, SLV_89, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, string_id, SLE_STRINGID, SL_MIN_VERSION, SLV_84), + SLE_CONDSTR(OldWaypoint, name, SLE_STR, 0, SLV_84, SL_MAX_VERSION), SLE_VAR(OldWaypoint, delete_ctr, SLE_UINT8), - SLE_CONDVAR(OldWaypoint, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), - SLE_CONDVAR(OldWaypoint, build_date, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, localidx, SLE_UINT8, 3, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, grfid, SLE_UINT32, 17, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, owner, SLE_UINT8, 101, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, build_date, SLE_FILE_U16 | SLE_VAR_I32, SLV_3, SLV_31), + SLE_CONDVAR(OldWaypoint, build_date, SLE_INT32, SLV_31, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, localidx, SLE_UINT8, SLV_3, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, grfid, SLE_UINT32, SLV_17, SL_MAX_VERSION), + SLE_CONDVAR(OldWaypoint, owner, SLE_UINT8, SLV_101, SL_MAX_VERSION), SLE_END() }; @@ -190,10 +190,10 @@ static void Ptrs_WAYP() for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) { SlObject(wp, _old_waypoint_desc); - if (IsSavegameVersionBefore(12)) { + if (IsSavegameVersionBefore(SLV_12)) { wp->town_cn = (wp->string_id & 0xC000) == 0xC000 ? (wp->string_id >> 8) & 0x3F : 0; wp->town = ClosestTownFromTile(wp->xy, UINT_MAX); - } else if (IsSavegameVersionBefore(122)) { + } else if (IsSavegameVersionBefore(SLV_122)) { /* Only for versions 12 .. 122 */ if (!Town::IsValidID(wp->town_index)) { /* Upon a corrupted waypoint we'll likely get here. The next step will be to @@ -206,7 +206,7 @@ static void Ptrs_WAYP() } wp->town = Town::Get(wp->town_index); } - if (IsSavegameVersionBefore(84)) { + if (IsSavegameVersionBefore(SLV_84)) { wp->name = CopyFromOldName(wp->string_id); } } diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 4b2b9d845a..700a065669 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -1,4 +1,4 @@ -/* $Id: screenshot.cpp 26983 2014-10-09 19:52:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -71,23 +71,16 @@ struct ScreenshotFormat { /************************************************* **** SCREENSHOT CODE FOR WINDOWS BITMAP (.BMP) *************************************************/ -#if defined(_MSC_VER) || defined(__WATCOMC__) -#pragma pack(push, 1) -#endif /** BMP File Header (stored in little endian) */ -struct BitmapFileHeader { +PACK(struct BitmapFileHeader { uint16 type; uint32 size; uint32 reserved; uint32 off_bits; -} GCC_PACK; +}); assert_compile(sizeof(BitmapFileHeader) == 14); -#if defined(_MSC_VER) || defined(__WATCOMC__) -#pragma pack(pop) -#endif - /** BMP Info Header (stored in little endian) */ struct BitmapInfoHeader { uint32 size; @@ -715,7 +708,7 @@ static bool MakeSmallScreenshot(bool crashlog) /** * Configure a ViewPort for rendering (a part of) the map into a screenshot. * @param t Screenshot type - * @param [out] vp Result viewport + * @param[out] vp Result viewport */ void SetupScreenshotViewport(ScreenshotType t, ViewPort *vp) { @@ -771,7 +764,7 @@ static bool MakeLargeWorldScreenshot(ScreenshotType t) /** * Callback for generating a heightmap. Supports 8bpp grayscale only. * @param userdata Pointer to user data. - * @param buf Destination buffer. + * @param buffer Destination buffer. * @param y Line number of the first line to write. * @param pitch Number of pixels to write (1 byte for 8bpp, 4 bytes for 32bpp). @see Colour * @param n Number of lines to write. diff --git a/src/screenshot.h b/src/screenshot.h index c6e88600a2..ee03d8aff7 100644 --- a/src/screenshot.h +++ b/src/screenshot.h @@ -1,4 +1,4 @@ -/* $Id: screenshot.h 26525 2014-04-27 15:13:46Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/Doxyfile_AI b/src/script/api/Doxyfile_AI index 8d918a5c59..568859bff8 100644 --- a/src/script/api/Doxyfile_AI +++ b/src/script/api/Doxyfile_AI @@ -1,4 +1,4 @@ -# $Id: Doxyfile_AI 25595 2013-07-13 06:44:22Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/Doxyfile_Game b/src/script/api/Doxyfile_Game index 718d464e42..1edfe42c7b 100644 --- a/src/script/api/Doxyfile_Game +++ b/src/script/api/Doxyfile_Game @@ -1,4 +1,4 @@ -# $Id: Doxyfile_Game 25595 2013-07-13 06:44:22Z rubidium $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_accounting.hpp.sq b/src/script/api/ai/ai_accounting.hpp.sq index ddb44de7f8..fd68e4e7e7 100644 --- a/src/script/api/ai/ai_accounting.hpp.sq +++ b/src/script/api/ai/ai_accounting.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_accounting.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_airport.hpp.sq b/src/script/api/ai/ai_airport.hpp.sq index d9766b3623..89e7ba1258 100644 --- a/src/script/api/ai/ai_airport.hpp.sq +++ b/src/script/api/ai/ai_airport.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_airport.hpp.sq 23416 2011-12-03 23:40:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -52,6 +52,7 @@ void SQAIAirport_Register(Squirrel *engine) SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii"); SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii"); SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); + SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMonthlyMaintenanceCost, "GetMonthlyMaintenanceCost", 2, ".i"); SQAIAirport.PostRegister(engine); } diff --git a/src/script/api/ai/ai_base.hpp.sq b/src/script/api/ai/ai_base.hpp.sq index c238452b9c..68cc4a58e2 100644 --- a/src/script/api/ai/ai_base.hpp.sq +++ b/src/script/api/ai/ai_base.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_base.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_basestation.hpp.sq b/src/script/api/ai/ai_basestation.hpp.sq index e39eba7581..42cc184609 100644 --- a/src/script/api/ai/ai_basestation.hpp.sq +++ b/src/script/api/ai/ai_basestation.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_basestation.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_bridge.hpp.sq b/src/script/api/ai/ai_bridge.hpp.sq index b51283dae1..9a9b223009 100644 --- a/src/script/api/ai/ai_bridge.hpp.sq +++ b/src/script/api/ai/ai_bridge.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_bridge.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -37,7 +37,7 @@ void SQAIBridge_Register(Squirrel *engine) SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i"); SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i"); SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 2, ".i"); + SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 3, ".ii"); SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii"); SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i"); diff --git a/src/script/api/ai/ai_bridgelist.hpp.sq b/src/script/api/ai/ai_bridgelist.hpp.sq index 84c1a3482d..b5618e3337 100644 --- a/src/script/api/ai/ai_bridgelist.hpp.sq +++ b/src/script/api/ai/ai_bridgelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_bridgelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_cargo.hpp.sq b/src/script/api/ai/ai_cargo.hpp.sq index bf55d8da23..6478d44b81 100644 --- a/src/script/api/ai/ai_cargo.hpp.sq +++ b/src/script/api/ai/ai_cargo.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_cargo.hpp.sq 26396 2014-03-10 22:18:53Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_cargolist.hpp.sq b/src/script/api/ai/ai_cargolist.hpp.sq index 9378369546..cc1bbc6a28 100644 --- a/src/script/api/ai/ai_cargolist.hpp.sq +++ b/src/script/api/ai/ai_cargolist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_cargolist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_company.hpp.sq b/src/script/api/ai/ai_company.hpp.sq index 9f5a0537b9..7ed55d97b6 100644 --- a/src/script/api/ai/ai_company.hpp.sq +++ b/src/script/api/ai/ai_company.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_company.hpp.sq 23521 2011-12-15 18:40:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,15 +21,16 @@ void SQAICompany_Register(Squirrel *engine) SQAICompany.PreRegister(engine); SQAICompany.AddConstructor(engine, "x"); - SQAICompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER"); - SQAICompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF"); - SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE"); - SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE"); - SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID"); + SQAICompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER"); + SQAICompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER"); + SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST"); + SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST"); + SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID"); + SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF"); + SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR"); + SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE"); + SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE"); + SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID"); SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i"); SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::IsMine, "IsMine", 2, ".i"); diff --git a/src/script/api/ai/ai_controller.hpp.sq b/src/script/api/ai/ai_controller.hpp.sq index 80d5f31ac1..2aefdd68ef 100644 --- a/src/script/api/ai/ai_controller.hpp.sq +++ b/src/script/api/ai/ai_controller.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_controller.hpp.sq 24542 2012-09-21 20:49:43Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_date.hpp.sq b/src/script/api/ai/ai_date.hpp.sq index 980cbeaec2..7bdf9519d6 100644 --- a/src/script/api/ai/ai_date.hpp.sq +++ b/src/script/api/ai/ai_date.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_date.hpp.sq 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_depotlist.hpp.sq b/src/script/api/ai/ai_depotlist.hpp.sq index 0f73dcb88a..528683ce37 100644 --- a/src/script/api/ai/ai_depotlist.hpp.sq +++ b/src/script/api/ai/ai_depotlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_depotlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_engine.hpp.sq b/src/script/api/ai/ai_engine.hpp.sq index 406f881ee2..6dbde29099 100644 --- a/src/script/api/ai/ai_engine.hpp.sq +++ b/src/script/api/ai/ai_engine.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_engine.hpp.sq 23506 2011-12-13 00:43:59Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_enginelist.hpp.sq b/src/script/api/ai/ai_enginelist.hpp.sq index 0d068503bc..8ddc2e7ad1 100644 --- a/src/script/api/ai/ai_enginelist.hpp.sq +++ b/src/script/api/ai/ai_enginelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_enginelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_error.hpp.sq b/src/script/api/ai/ai_error.hpp.sq index 081b4c4375..54636d3a1f 100644 --- a/src/script/api/ai/ai_error.hpp.sq +++ b/src/script/api/ai/ai_error.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_error.hpp.sq 24982 2013-02-08 20:34:27Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq index 8805264d26..75098625a3 100644 --- a/src/script/api/ai/ai_event.hpp.sq +++ b/src/script/api/ai/ai_event.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_event.hpp.sq 24291 2012-05-26 14:16:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq index b26a78ed85..f3468d14ba 100644 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ b/src/script/api/ai/ai_event_types.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_event_types.hpp.sq 24291 2012-05-26 14:16:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_execmode.hpp.sq b/src/script/api/ai/ai_execmode.hpp.sq index 08b325c617..869f3fe932 100644 --- a/src/script/api/ai/ai_execmode.hpp.sq +++ b/src/script/api/ai/ai_execmode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_execmode.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_gamesettings.hpp.sq b/src/script/api/ai/ai_gamesettings.hpp.sq index 45fd87e716..1459b031d7 100644 --- a/src/script/api/ai/ai_gamesettings.hpp.sq +++ b/src/script/api/ai/ai_gamesettings.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_gamesettings.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_group.hpp.sq b/src/script/api/ai/ai_group.hpp.sq index acce050159..52ade08d56 100644 --- a/src/script/api/ai/ai_group.hpp.sq +++ b/src/script/api/ai/ai_group.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_group.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_grouplist.hpp.sq b/src/script/api/ai/ai_grouplist.hpp.sq index 53d3d0e789..9f9f2dab25 100644 --- a/src/script/api/ai/ai_grouplist.hpp.sq +++ b/src/script/api/ai/ai_grouplist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_grouplist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_industry.hpp.sq b/src/script/api/ai/ai_industry.hpp.sq index e823baa45e..4de03f1dab 100644 --- a/src/script/api/ai/ai_industry.hpp.sq +++ b/src/script/api/ai/ai_industry.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_industry.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_industrylist.hpp.sq b/src/script/api/ai/ai_industrylist.hpp.sq index 432fd1c1f3..0ae7e97799 100644 --- a/src/script/api/ai/ai_industrylist.hpp.sq +++ b/src/script/api/ai/ai_industrylist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_industrylist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_industrytype.hpp.sq b/src/script/api/ai/ai_industrytype.hpp.sq index b4f462d0fd..7c56acee9f 100644 --- a/src/script/api/ai/ai_industrytype.hpp.sq +++ b/src/script/api/ai/ai_industrytype.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_industrytype.hpp.sq 24513 2012-09-08 12:14:00Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_industrytypelist.hpp.sq b/src/script/api/ai/ai_industrytypelist.hpp.sq index 0788b95cf2..6ac836b390 100644 --- a/src/script/api/ai/ai_industrytypelist.hpp.sq +++ b/src/script/api/ai/ai_industrytypelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_industrytypelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_infrastructure.hpp.sq b/src/script/api/ai/ai_infrastructure.hpp.sq index 67bb259995..55a1e4743c 100644 --- a/src/script/api/ai/ai_infrastructure.hpp.sq +++ b/src/script/api/ai/ai_infrastructure.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_infrastructure.hpp.sq 23416 2011-12-03 23:40:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_list.hpp.sq b/src/script/api/ai/ai_list.hpp.sq index 4eeb4aa175..201113823d 100644 --- a/src/script/api/ai/ai_list.hpp.sq +++ b/src/script/api/ai/ai_list.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_list.hpp.sq 26894 2014-09-21 16:25:15Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_log.hpp.sq b/src/script/api/ai/ai_log.hpp.sq index 1957196df3..174ac2b929 100644 --- a/src/script/api/ai/ai_log.hpp.sq +++ b/src/script/api/ai/ai_log.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_log.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_map.hpp.sq b/src/script/api/ai/ai_map.hpp.sq index e7c0e518f4..f0f1cbed0c 100644 --- a/src/script/api/ai/ai_map.hpp.sq +++ b/src/script/api/ai/ai_map.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_map.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_marine.hpp.sq b/src/script/api/ai/ai_marine.hpp.sq index ea39ee3e80..843c3d8746 100644 --- a/src/script/api/ai/ai_marine.hpp.sq +++ b/src/script/api/ai/ai_marine.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_marine.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_order.hpp.sq b/src/script/api/ai/ai_order.hpp.sq index 656fac7fc7..ab25e4810d 100644 --- a/src/script/api/ai/ai_order.hpp.sq +++ b/src/script/api/ai/ai_order.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_order.hpp.sq 24006 2012-03-04 16:40:06Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -44,6 +44,7 @@ void SQAIOrder_Register(Squirrel *engine) SQAIOrder.DefSQConst(engine, ScriptOrder::OF_INVALID, "OF_INVALID"); SQAIOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE"); SQAIOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY"); + SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_RELIABILITY, "OC_MAX_RELIABILITY"); SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED"); SQAIOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE"); SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE"); diff --git a/src/script/api/ai/ai_rail.hpp.sq b/src/script/api/ai/ai_rail.hpp.sq index fcf4f64a17..ba9d7e6564 100644 --- a/src/script/api/ai/ai_rail.hpp.sq +++ b/src/script/api/ai/ai_rail.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_rail.hpp.sq 25614 2013-07-15 18:19:26Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_railtypelist.hpp.sq b/src/script/api/ai/ai_railtypelist.hpp.sq index ccbe42bae6..0f05df239a 100644 --- a/src/script/api/ai/ai_railtypelist.hpp.sq +++ b/src/script/api/ai/ai_railtypelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_railtypelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_road.hpp.sq b/src/script/api/ai/ai_road.hpp.sq index 9c247d7f0c..3da4607c90 100644 --- a/src/script/api/ai/ai_road.hpp.sq +++ b/src/script/api/ai/ai_road.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_road.hpp.sq 23416 2011-12-03 23:40:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_sign.hpp.sq b/src/script/api/ai/ai_sign.hpp.sq index d8bf5b0cb7..e3c9005e76 100644 --- a/src/script/api/ai/ai_sign.hpp.sq +++ b/src/script/api/ai/ai_sign.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_sign.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_signlist.hpp.sq b/src/script/api/ai/ai_signlist.hpp.sq index 39f2743aab..8f4f97c0c8 100644 --- a/src/script/api/ai/ai_signlist.hpp.sq +++ b/src/script/api/ai/ai_signlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_signlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_station.hpp.sq b/src/script/api/ai/ai_station.hpp.sq index 0dae652a45..1850c1e740 100644 --- a/src/script/api/ai/ai_station.hpp.sq +++ b/src/script/api/ai/ai_station.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_station.hpp.sq 26892 2014-09-21 16:20:14Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -33,7 +33,6 @@ void SQAIStation_Register(Squirrel *engine) SQAIStation.DefSQConst(engine, ScriptStation::STATION_ANY, "STATION_ANY"); ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_STATIONS_LOADING, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_TRUCK_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); diff --git a/src/script/api/ai/ai_stationlist.hpp.sq b/src/script/api/ai/ai_stationlist.hpp.sq index fe8c7df25c..93a8c6e767 100644 --- a/src/script/api/ai/ai_stationlist.hpp.sq +++ b/src/script/api/ai/ai_stationlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_stationlist.hpp.sq 26893 2014-09-21 16:20:48Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_subsidy.hpp.sq b/src/script/api/ai/ai_subsidy.hpp.sq index c570779fa2..ea9743dace 100644 --- a/src/script/api/ai/ai_subsidy.hpp.sq +++ b/src/script/api/ai/ai_subsidy.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_subsidy.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_subsidylist.hpp.sq b/src/script/api/ai/ai_subsidylist.hpp.sq index dce89620d8..f58165f556 100644 --- a/src/script/api/ai/ai_subsidylist.hpp.sq +++ b/src/script/api/ai/ai_subsidylist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_subsidylist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_testmode.hpp.sq b/src/script/api/ai/ai_testmode.hpp.sq index eed505767d..6072706f73 100644 --- a/src/script/api/ai/ai_testmode.hpp.sq +++ b/src/script/api/ai/ai_testmode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_testmode.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_tile.hpp.sq b/src/script/api/ai/ai_tile.hpp.sq index 0f886103bd..570e88cd28 100644 --- a/src/script/api/ai/ai_tile.hpp.sq +++ b/src/script/api/ai/ai_tile.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_tile.hpp.sq 25213 2013-04-30 17:16:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_tilelist.hpp.sq b/src/script/api/ai/ai_tilelist.hpp.sq index a1206350d2..4675e98fe9 100644 --- a/src/script/api/ai/ai_tilelist.hpp.sq +++ b/src/script/api/ai/ai_tilelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_tilelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_town.hpp.sq b/src/script/api/ai/ai_town.hpp.sq index ab55897e33..6b09190be8 100644 --- a/src/script/api/ai/ai_town.hpp.sq +++ b/src/script/api/ai/ai_town.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_town.hpp.sq 25969 2013-11-12 17:57:32Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_townlist.hpp.sq b/src/script/api/ai/ai_townlist.hpp.sq index 516b8a7616..74af6f45bb 100644 --- a/src/script/api/ai/ai_townlist.hpp.sq +++ b/src/script/api/ai/ai_townlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_townlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_tunnel.hpp.sq b/src/script/api/ai/ai_tunnel.hpp.sq index 52b3620351..91eb432a05 100644 --- a/src/script/api/ai/ai_tunnel.hpp.sq +++ b/src/script/api/ai/ai_tunnel.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_tunnel.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_vehicle.hpp.sq b/src/script/api/ai/ai_vehicle.hpp.sq index f1760165a3..0eb21ed672 100644 --- a/src/script/api/ai/ai_vehicle.hpp.sq +++ b/src/script/api/ai/ai_vehicle.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_vehicle.hpp.sq 23506 2011-12-13 00:43:59Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_vehiclelist.hpp.sq b/src/script/api/ai/ai_vehiclelist.hpp.sq index 78e9598797..39e5cb4598 100644 --- a/src/script/api/ai/ai_vehiclelist.hpp.sq +++ b/src/script/api/ai/ai_vehiclelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_vehiclelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_waypoint.hpp.sq b/src/script/api/ai/ai_waypoint.hpp.sq index 4d37b7d2d2..b9edc40bf7 100644 --- a/src/script/api/ai/ai_waypoint.hpp.sq +++ b/src/script/api/ai/ai_waypoint.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_waypoint.hpp.sq 23521 2011-12-15 18:40:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai/ai_waypointlist.hpp.sq b/src/script/api/ai/ai_waypointlist.hpp.sq index 313ce8645e..464c07071f 100644 --- a/src/script/api/ai/ai_waypointlist.hpp.sq +++ b/src/script/api/ai/ai_waypointlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: ai_waypointlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 28e2971be6..eb2b3a5013 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -1,4 +1,4 @@ -/* $Id: ai_changelog.hpp 27996 2018-03-21 19:39:49Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,15 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * + * \b 1.9.0 + * + * 1.9.0 is not yet released. The following changes are not set in stone yet. + * API additions: + * \li AIAirport::GetMonthlyMaintenanceCost + * + * Other changes: + * \li AIBridge::GetName takes one extra parameter to refer the vehicle type + * * \b 1.8.0 * * No changes diff --git a/src/script/api/doxygen_filter.awk b/src/script/api/doxygen_filter.awk index c049a0ac7b..3a321fb5bf 100644 --- a/src/script/api/doxygen_filter.awk +++ b/src/script/api/doxygen_filter.awk @@ -1,4 +1,4 @@ -# $Id: doxygen_filter.awk 23650 2011-12-21 14:30:08Z yexo $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/doxygen_filter.sh b/src/script/api/doxygen_filter.sh index 9e9c724dbe..31c34d4abc 100755 --- a/src/script/api/doxygen_filter.sh +++ b/src/script/api/doxygen_filter.sh @@ -1,6 +1,6 @@ #!/bin/bash -# $Id: doxygen_filter.sh 23610 2011-12-19 20:56:42Z truebrain $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_accounting.hpp.sq b/src/script/api/game/game_accounting.hpp.sq index 8b2a60618f..0e78172c0a 100644 --- a/src/script/api/game/game_accounting.hpp.sq +++ b/src/script/api/game/game_accounting.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_accounting.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_admin.hpp.sq b/src/script/api/game/game_admin.hpp.sq index 1a71656d02..f8b994e809 100644 --- a/src/script/api/game/game_admin.hpp.sq +++ b/src/script/api/game/game_admin.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_admin.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_airport.hpp.sq b/src/script/api/game/game_airport.hpp.sq index 8f0c7f85b5..d8f3a2a64c 100644 --- a/src/script/api/game/game_airport.hpp.sq +++ b/src/script/api/game/game_airport.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_airport.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -52,6 +52,7 @@ void SQGSAirport_Register(Squirrel *engine) SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii"); SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii"); SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); + SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMonthlyMaintenanceCost, "GetMonthlyMaintenanceCost", 2, ".i"); SQGSAirport.PostRegister(engine); } diff --git a/src/script/api/game/game_base.hpp.sq b/src/script/api/game/game_base.hpp.sq index 699ffd4a6d..0301b05478 100644 --- a/src/script/api/game/game_base.hpp.sq +++ b/src/script/api/game/game_base.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_base.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_basestation.hpp.sq b/src/script/api/game/game_basestation.hpp.sq index 8b69504209..f1e1797e90 100644 --- a/src/script/api/game/game_basestation.hpp.sq +++ b/src/script/api/game/game_basestation.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_basestation.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_bridge.hpp.sq b/src/script/api/game/game_bridge.hpp.sq index 149cb811f9..df0a945024 100644 --- a/src/script/api/game/game_bridge.hpp.sq +++ b/src/script/api/game/game_bridge.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_bridge.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -37,7 +37,7 @@ void SQGSBridge_Register(Squirrel *engine) SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i"); SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i"); SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 2, ".i"); + SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 3, ".ii"); SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii"); SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i"); diff --git a/src/script/api/game/game_bridgelist.hpp.sq b/src/script/api/game/game_bridgelist.hpp.sq index c01715c25d..d40c2c1e09 100644 --- a/src/script/api/game/game_bridgelist.hpp.sq +++ b/src/script/api/game/game_bridgelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_bridgelist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_cargo.hpp.sq b/src/script/api/game/game_cargo.hpp.sq index c4d03888cd..515d5ff28f 100644 --- a/src/script/api/game/game_cargo.hpp.sq +++ b/src/script/api/game/game_cargo.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_cargo.hpp.sq 26396 2014-03-10 22:18:53Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_cargolist.hpp.sq b/src/script/api/game/game_cargolist.hpp.sq index 1d5f2af42f..00b22b3d75 100644 --- a/src/script/api/game/game_cargolist.hpp.sq +++ b/src/script/api/game/game_cargolist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_cargolist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_cargomonitor.hpp.sq b/src/script/api/game/game_cargomonitor.hpp.sq index 79b38c6337..b3638c4def 100644 --- a/src/script/api/game/game_cargomonitor.hpp.sq +++ b/src/script/api/game/game_cargomonitor.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_cargomonitor.hpp.sq 24406 2012-07-15 17:11:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_client.hpp.sq b/src/script/api/game/game_client.hpp.sq new file mode 100644 index 0000000000..b4230a6d05 --- /dev/null +++ b/src/script/api/game/game_client.hpp.sq @@ -0,0 +1,34 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_client.hpp" +#include "../template/template_client.hpp.sq" + + +template <> const char *GetClassName() { return "GSClient"; } + +void SQGSClient_Register(Squirrel *engine) +{ + DefSQClass SQGSClient("GSClient"); + SQGSClient.PreRegister(engine); + SQGSClient.AddConstructor(engine, "x"); + + SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_INVALID, "CLIENT_INVALID"); + SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_SERVER, "CLIENT_SERVER"); + SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_FIRST, "CLIENT_FIRST"); + + SQGSClient.DefSQStaticMethod(engine, &ScriptClient::ResolveClientID, "ResolveClientID", 2, ".i"); + SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetName, "GetName", 2, ".i"); + SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetCompany, "GetCompany", 2, ".i"); + SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetJoinDate, "GetJoinDate", 2, ".i"); + + SQGSClient.PostRegister(engine); +} diff --git a/src/script/api/game/game_clientlist.hpp.sq b/src/script/api/game/game_clientlist.hpp.sq new file mode 100644 index 0000000000..ef02586474 --- /dev/null +++ b/src/script/api/game/game_clientlist.hpp.sq @@ -0,0 +1,37 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_clientlist.hpp" +#include "../template/template_clientlist.hpp.sq" + + +template <> const char *GetClassName() { return "GSClientList"; } + +void SQGSClientList_Register(Squirrel *engine) +{ + DefSQClass SQGSClientList("GSClientList"); + SQGSClientList.PreRegister(engine, "GSList"); + SQGSClientList.AddConstructor(engine, "x"); + + SQGSClientList.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSClientList_Company"; } + +void SQGSClientList_Company_Register(Squirrel *engine) +{ + DefSQClass SQGSClientList_Company("GSClientList_Company"); + SQGSClientList_Company.PreRegister(engine, "GSList"); + SQGSClientList_Company.AddConstructor(engine, "xi"); + + SQGSClientList_Company.PostRegister(engine); +} diff --git a/src/script/api/game/game_company.hpp.sq b/src/script/api/game/game_company.hpp.sq index 308a871d30..29476fc8aa 100644 --- a/src/script/api/game/game_company.hpp.sq +++ b/src/script/api/game/game_company.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_company.hpp.sq 25808 2013-10-02 21:44:31Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -27,6 +27,7 @@ void SQGSCompany_Register(Squirrel *engine) SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST"); SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID"); SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF"); + SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR"); SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE"); SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE"); SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID"); diff --git a/src/script/api/game/game_companymode.hpp.sq b/src/script/api/game/game_companymode.hpp.sq index b8a538ac51..038e234fa1 100644 --- a/src/script/api/game/game_companymode.hpp.sq +++ b/src/script/api/game/game_companymode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_companymode.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_controller.hpp.sq b/src/script/api/game/game_controller.hpp.sq index 475a940907..7cae77de36 100644 --- a/src/script/api/game/game_controller.hpp.sq +++ b/src/script/api/game/game_controller.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_controller.hpp.sq 24542 2012-09-21 20:49:43Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_date.hpp.sq b/src/script/api/game/game_date.hpp.sq index 8d1b31cf02..dc40989da0 100644 --- a/src/script/api/game/game_date.hpp.sq +++ b/src/script/api/game/game_date.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_date.hpp.sq 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_depotlist.hpp.sq b/src/script/api/game/game_depotlist.hpp.sq index 8ed93e94b7..59257cdad2 100644 --- a/src/script/api/game/game_depotlist.hpp.sq +++ b/src/script/api/game/game_depotlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_depotlist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_engine.hpp.sq b/src/script/api/game/game_engine.hpp.sq index d908dfe4d2..4881755473 100644 --- a/src/script/api/game/game_engine.hpp.sq +++ b/src/script/api/game/game_engine.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_engine.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_enginelist.hpp.sq b/src/script/api/game/game_enginelist.hpp.sq index 2267f261f1..1f052b8333 100644 --- a/src/script/api/game/game_enginelist.hpp.sq +++ b/src/script/api/game/game_enginelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_enginelist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_error.hpp.sq b/src/script/api/game/game_error.hpp.sq index b03dc37359..7718f14348 100644 --- a/src/script/api/game/game_error.hpp.sq +++ b/src/script/api/game/game_error.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_error.hpp.sq 24982 2013-02-08 20:34:27Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_event.hpp.sq b/src/script/api/game/game_event.hpp.sq index 734cba2c63..53b9b2ce9e 100644 --- a/src/script/api/game/game_event.hpp.sq +++ b/src/script/api/game/game_event.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_event.hpp.sq 24291 2012-05-26 14:16:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq index 8315153a21..56acdd30fd 100644 --- a/src/script/api/game/game_event_types.hpp.sq +++ b/src/script/api/game/game_event_types.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_event_types.hpp.sq 24291 2012-05-26 14:16:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_execmode.hpp.sq b/src/script/api/game/game_execmode.hpp.sq index b3d20822c6..93d980312a 100644 --- a/src/script/api/game/game_execmode.hpp.sq +++ b/src/script/api/game/game_execmode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_execmode.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_game.hpp.sq b/src/script/api/game/game_game.hpp.sq index 562b7c9079..ca7bb7a1d1 100644 --- a/src/script/api/game/game_game.hpp.sq +++ b/src/script/api/game/game_game.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_game.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_gamesettings.hpp.sq b/src/script/api/game/game_gamesettings.hpp.sq index 0ab05c2dec..9aeba71994 100644 --- a/src/script/api/game/game_gamesettings.hpp.sq +++ b/src/script/api/game/game_gamesettings.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_gamesettings.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_goal.hpp.sq b/src/script/api/game/game_goal.hpp.sq index 281ace9611..4cf15b3fc4 100644 --- a/src/script/api/game/game_goal.hpp.sq +++ b/src/script/api/game/game_goal.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_goal.hpp.sq 26012 2013-11-16 17:41:57Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -51,15 +51,16 @@ void SQGSGoal_Register(Squirrel *engine) SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_SURRENDER, "BUTTON_SURRENDER"); SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CLOSE, "BUTTON_CLOSE"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsValidGoal, "IsValidGoal", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::New, "New", 5, ".i.ii"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Remove, "Remove", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetText, "SetText", 3, ".i."); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetProgress, "SetProgress", 3, ".i."); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetCompleted, "SetCompleted", 3, ".ib"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsCompleted, "IsCompleted", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Question, "Question", 6, ".ii.ii"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::CloseQuestion, "CloseQuestion", 2, ".i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsValidGoal, "IsValidGoal", 2, ".i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::New, "New", 5, ".i.ii"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Remove, "Remove", 2, ".i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetText, "SetText", 3, ".i."); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetProgress, "SetProgress", 3, ".i."); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetCompleted, "SetCompleted", 3, ".ib"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsCompleted, "IsCompleted", 2, ".i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Question, "Question", 6, ".ii.ii"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::QuestionClient, "QuestionClient", 6, ".ii.ii"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::CloseQuestion, "CloseQuestion", 2, ".i"); SQGSGoal.PostRegister(engine); } diff --git a/src/script/api/game/game_industry.hpp.sq b/src/script/api/game/game_industry.hpp.sq index 23eec11d5f..5d50c90fa2 100644 --- a/src/script/api/game/game_industry.hpp.sq +++ b/src/script/api/game/game_industry.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_industry.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_industrylist.hpp.sq b/src/script/api/game/game_industrylist.hpp.sq index df7e6a470d..fbfc5347bf 100644 --- a/src/script/api/game/game_industrylist.hpp.sq +++ b/src/script/api/game/game_industrylist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_industrylist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_industrytype.hpp.sq b/src/script/api/game/game_industrytype.hpp.sq index 96ad248d09..460cc513c7 100644 --- a/src/script/api/game/game_industrytype.hpp.sq +++ b/src/script/api/game/game_industrytype.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_industrytype.hpp.sq 24513 2012-09-08 12:14:00Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_industrytypelist.hpp.sq b/src/script/api/game/game_industrytypelist.hpp.sq index fafbb22bc3..d2ee7d28d1 100644 --- a/src/script/api/game/game_industrytypelist.hpp.sq +++ b/src/script/api/game/game_industrytypelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_industrytypelist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_infrastructure.hpp.sq b/src/script/api/game/game_infrastructure.hpp.sq index b8e92f25a8..9608013b18 100644 --- a/src/script/api/game/game_infrastructure.hpp.sq +++ b/src/script/api/game/game_infrastructure.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_infrastructure.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_list.hpp.sq b/src/script/api/game/game_list.hpp.sq index 307acb7815..a46696def5 100644 --- a/src/script/api/game/game_list.hpp.sq +++ b/src/script/api/game/game_list.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_list.hpp.sq 26894 2014-09-21 16:25:15Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_log.hpp.sq b/src/script/api/game/game_log.hpp.sq index 986fc37616..1eb44d955d 100644 --- a/src/script/api/game/game_log.hpp.sq +++ b/src/script/api/game/game_log.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_log.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_map.hpp.sq b/src/script/api/game/game_map.hpp.sq index 11f47821e4..e43edb1467 100644 --- a/src/script/api/game/game_map.hpp.sq +++ b/src/script/api/game/game_map.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_map.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_marine.hpp.sq b/src/script/api/game/game_marine.hpp.sq index 341de4762c..0da8513202 100644 --- a/src/script/api/game/game_marine.hpp.sq +++ b/src/script/api/game/game_marine.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_marine.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_news.hpp.sq b/src/script/api/game/game_news.hpp.sq index f97e6566c4..3d7022e10e 100644 --- a/src/script/api/game/game_news.hpp.sq +++ b/src/script/api/game/game_news.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_news.hpp.sq 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_order.hpp.sq b/src/script/api/game/game_order.hpp.sq index fa94022154..e2126c603d 100644 --- a/src/script/api/game/game_order.hpp.sq +++ b/src/script/api/game/game_order.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_order.hpp.sq 24006 2012-03-04 16:40:06Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -44,6 +44,7 @@ void SQGSOrder_Register(Squirrel *engine) SQGSOrder.DefSQConst(engine, ScriptOrder::OF_INVALID, "OF_INVALID"); SQGSOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE"); SQGSOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY"); + SQGSOrder.DefSQConst(engine, ScriptOrder::OC_MAX_RELIABILITY, "OC_MAX_RELIABILITY"); SQGSOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED"); SQGSOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE"); SQGSOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE"); diff --git a/src/script/api/game/game_rail.hpp.sq b/src/script/api/game/game_rail.hpp.sq index ac0af5563a..c057360300 100644 --- a/src/script/api/game/game_rail.hpp.sq +++ b/src/script/api/game/game_rail.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_rail.hpp.sq 25614 2013-07-15 18:19:26Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_railtypelist.hpp.sq b/src/script/api/game/game_railtypelist.hpp.sq index 3b6fba371c..caa036aca6 100644 --- a/src/script/api/game/game_railtypelist.hpp.sq +++ b/src/script/api/game/game_railtypelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_railtypelist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_road.hpp.sq b/src/script/api/game/game_road.hpp.sq index 469f023917..51da4144eb 100644 --- a/src/script/api/game/game_road.hpp.sq +++ b/src/script/api/game/game_road.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_road.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_sign.hpp.sq b/src/script/api/game/game_sign.hpp.sq index e534b7dc83..0fba369cff 100644 --- a/src/script/api/game/game_sign.hpp.sq +++ b/src/script/api/game/game_sign.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_sign.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_signlist.hpp.sq b/src/script/api/game/game_signlist.hpp.sq index 3cb1a0a7af..9fc7ed7f2d 100644 --- a/src/script/api/game/game_signlist.hpp.sq +++ b/src/script/api/game/game_signlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_signlist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_station.hpp.sq b/src/script/api/game/game_station.hpp.sq index 5dea9dafb1..4c2f63b384 100644 --- a/src/script/api/game/game_station.hpp.sq +++ b/src/script/api/game/game_station.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_station.hpp.sq 26892 2014-09-21 16:20:14Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -33,7 +33,6 @@ void SQGSStation_Register(Squirrel *engine) SQGSStation.DefSQConst(engine, ScriptStation::STATION_ANY, "STATION_ANY"); ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_STATIONS_LOADING, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_TRUCK_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); diff --git a/src/script/api/game/game_stationlist.hpp.sq b/src/script/api/game/game_stationlist.hpp.sq index fcece0e1be..a3cdfaa967 100644 --- a/src/script/api/game/game_stationlist.hpp.sq +++ b/src/script/api/game/game_stationlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_stationlist.hpp.sq 26893 2014-09-21 16:20:48Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_story_page.hpp.sq b/src/script/api/game/game_story_page.hpp.sq index b3995dccf4..621399bb03 100644 --- a/src/script/api/game/game_story_page.hpp.sq +++ b/src/script/api/game/game_story_page.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_story_page.hpp.sq 26306 2014-02-06 19:48:19Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_subsidy.hpp.sq b/src/script/api/game/game_subsidy.hpp.sq index 0222e78e23..2d636f74dc 100644 --- a/src/script/api/game/game_subsidy.hpp.sq +++ b/src/script/api/game/game_subsidy.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_subsidy.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_subsidylist.hpp.sq b/src/script/api/game/game_subsidylist.hpp.sq index b24bfb10b8..73dcbd4112 100644 --- a/src/script/api/game/game_subsidylist.hpp.sq +++ b/src/script/api/game/game_subsidylist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_subsidylist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_testmode.hpp.sq b/src/script/api/game/game_testmode.hpp.sq index 453c87f601..6e1175f061 100644 --- a/src/script/api/game/game_testmode.hpp.sq +++ b/src/script/api/game/game_testmode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_testmode.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_text.hpp.sq b/src/script/api/game/game_text.hpp.sq index 03e46b582f..8a35279d0b 100644 --- a/src/script/api/game/game_text.hpp.sq +++ b/src/script/api/game/game_text.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_text.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_tile.hpp.sq b/src/script/api/game/game_tile.hpp.sq index fb3b9aae31..6224919ffb 100644 --- a/src/script/api/game/game_tile.hpp.sq +++ b/src/script/api/game/game_tile.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_tile.hpp.sq 25213 2013-04-30 17:16:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_tilelist.hpp.sq b/src/script/api/game/game_tilelist.hpp.sq index ec6294613d..a4ade9cc50 100644 --- a/src/script/api/game/game_tilelist.hpp.sq +++ b/src/script/api/game/game_tilelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_tilelist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_town.hpp.sq b/src/script/api/game/game_town.hpp.sq index 8d01978a8b..30eec6928a 100644 --- a/src/script/api/game/game_town.hpp.sq +++ b/src/script/api/game/game_town.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_town.hpp.sq 25969 2013-11-12 17:57:32Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_townlist.hpp.sq b/src/script/api/game/game_townlist.hpp.sq index 83744b1c1e..a0d8c7f1da 100644 --- a/src/script/api/game/game_townlist.hpp.sq +++ b/src/script/api/game/game_townlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_townlist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_tunnel.hpp.sq b/src/script/api/game/game_tunnel.hpp.sq index 7f4f592fca..cea1cf11c8 100644 --- a/src/script/api/game/game_tunnel.hpp.sq +++ b/src/script/api/game/game_tunnel.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_tunnel.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_vehicle.hpp.sq b/src/script/api/game/game_vehicle.hpp.sq index e69354d2ad..3dc9fe67ad 100644 --- a/src/script/api/game/game_vehicle.hpp.sq +++ b/src/script/api/game/game_vehicle.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_vehicle.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_vehiclelist.hpp.sq b/src/script/api/game/game_vehiclelist.hpp.sq index 02635fa6cc..c5c6a18a72 100644 --- a/src/script/api/game/game_vehiclelist.hpp.sq +++ b/src/script/api/game/game_vehiclelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_vehiclelist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_viewport.hpp.sq b/src/script/api/game/game_viewport.hpp.sq index 61bf87f26c..357357ae39 100644 --- a/src/script/api/game/game_viewport.hpp.sq +++ b/src/script/api/game/game_viewport.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_viewport.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,7 +21,10 @@ void SQGSViewport_Register(Squirrel *engine) SQGSViewport.PreRegister(engine); SQGSViewport.AddConstructor(engine, "x"); - SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollTo, "ScrollTo", 2, ".i"); + SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollTo, "ScrollTo", 2, ".i"); + SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollEveryoneTo, "ScrollEveryoneTo", 2, ".i"); + SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollCompanyClientsTo, "ScrollCompanyClientsTo", 3, ".ii"); + SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollClientTo, "ScrollClientTo", 3, ".ii"); SQGSViewport.PostRegister(engine); } diff --git a/src/script/api/game/game_waypoint.hpp.sq b/src/script/api/game/game_waypoint.hpp.sq index b945c57139..984e1fa2f5 100644 --- a/src/script/api/game/game_waypoint.hpp.sq +++ b/src/script/api/game/game_waypoint.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_waypoint.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_waypointlist.hpp.sq b/src/script/api/game/game_waypointlist.hpp.sq index b27379a086..ccb428ce6b 100644 --- a/src/script/api/game/game_waypointlist.hpp.sq +++ b/src/script/api/game/game_waypointlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_waypointlist.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq index aca1944013..25f9e1068b 100644 --- a/src/script/api/game/game_window.hpp.sq +++ b/src/script/api/game/game_window.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: game_window.hpp.sq 27732 2017-01-14 18:30:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -138,6 +138,8 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SPRITE_ALIGNER, "WC_SPRITE_ALIGNER"); SQGSWindow.DefSQConst(engine, ScriptWindow::WC_LINKGRAPH_LEGEND, "WC_LINKGRAPH_LEGEND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVE_PRESET, "WC_SAVE_PRESET"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMERATE_DISPLAY, "WC_FRAMERATE_DISPLAY"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMETIME_GRAPH, "WC_FRAMETIME_GRAPH"); SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INVALID, "WC_INVALID"); SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLUE, "TC_BLUE"); SQGSWindow.DefSQConst(engine, ScriptWindow::TC_SILVER, "TC_SILVER"); @@ -305,10 +307,15 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_ROAD, "WID_SCL_CLASS_ROAD"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_SHIP, "WID_SCL_CLASS_SHIP"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_AIRCRAFT, "WID_SCL_CLASS_AIRCRAFT"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_RAIL, "WID_SCL_GROUPS_RAIL"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_ROAD, "WID_SCL_GROUPS_ROAD"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_SHIP, "WID_SCL_GROUPS_SHIP"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_AIRCRAFT, "WID_SCL_GROUPS_AIRCRAFT"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_SPACER_DROPDOWN, "WID_SCL_SPACER_DROPDOWN"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_PRI_COL_DROPDOWN, "WID_SCL_PRI_COL_DROPDOWN"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_SEC_COL_DROPDOWN, "WID_SCL_SEC_COL_DROPDOWN"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_MATRIX, "WID_SCL_MATRIX"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_MATRIX_SCROLLBAR, "WID_SCL_MATRIX_SCROLLBAR"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CAPTION, "WID_SCMF_CAPTION"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TOGGLE_LARGE_SMALL, "WID_SCMF_TOGGLE_LARGE_SMALL"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SELECT_FACE, "WID_SCMF_SELECT_FACE"); @@ -436,6 +443,7 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CAPTION, "WID_SL_CAPTION"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SORT_BYNAME, "WID_SL_SORT_BYNAME"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SORT_BYDATE, "WID_SL_SORT_BYDATE"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_FILTER, "WID_SL_FILTER"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_BACKGROUND, "WID_SL_BACKGROUND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_FILE_BACKGROUND, "WID_SL_FILE_BACKGROUND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_HOME_BUTTON, "WID_SL_HOME_BUTTON"); @@ -450,6 +458,16 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_NEWGRF_INFO, "WID_SL_NEWGRF_INFO"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_LOAD_BUTTON, "WID_SL_LOAD_BUTTON"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_MISSING_NEWGRFS, "WID_SL_MISSING_NEWGRFS"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_CAPTION, "WID_FRW_CAPTION"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_RATE_GAMELOOP, "WID_FRW_RATE_GAMELOOP"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_RATE_DRAWING, "WID_FRW_RATE_DRAWING"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_RATE_FACTOR, "WID_FRW_RATE_FACTOR"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_INFO_DATA_POINTS, "WID_FRW_INFO_DATA_POINTS"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_TIMES_NAMES, "WID_FRW_TIMES_NAMES"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_TIMES_CURRENT, "WID_FRW_TIMES_CURRENT"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_TIMES_AVERAGE, "WID_FRW_TIMES_AVERAGE"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FGW_CAPTION, "WID_FGW_CAPTION"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FGW_GRAPH, "WID_FGW_GRAPH"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TEMPERATE, "WID_GL_TEMPERATE"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_ARCTIC, "WID_GL_ARCTIC"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TROPICAL, "WID_GL_TROPICAL"); @@ -550,7 +568,9 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_CREATE_GROUP, "WID_GL_CREATE_GROUP"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_DELETE_GROUP, "WID_GL_DELETE_GROUP"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RENAME_GROUP, "WID_GL_RENAME_GROUP"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIVERY_GROUP, "WID_GL_LIVERY_GROUP"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_REPLACE_PROTECTION, "WID_GL_REPLACE_PROTECTION"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_INFO, "WID_GL_INFO"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_H_BACKGROUND, "WID_H_BACKGROUND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_MATRIX_WIDGET, "WID_DPI_MATRIX_WIDGET"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_SCROLLBAR, "WID_DPI_SCROLLBAR"); @@ -626,9 +646,11 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_BACKGROUND, "WID_TF_BACKGROUND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_VSCROLLBAR, "WID_TF_VSCROLLBAR"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_HSCROLLBAR, "WID_TF_HSCROLLBAR"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CAPTION, "WID_MTS_CAPTION"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LIST_LEFT, "WID_MTS_LIST_LEFT"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_PLAYLIST, "WID_MTS_PLAYLIST"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LIST_RIGHT, "WID_MTS_LIST_RIGHT"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_MUSICSET, "WID_MTS_MUSICSET"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_ALL, "WID_MTS_ALL"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_OLD, "WID_MTS_OLD"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_NEW, "WID_MTS_NEW"); @@ -1181,7 +1203,7 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_TRAINS, "WID_TN_TRAINS"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ROADVEHS, "WID_TN_ROADVEHS"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SHIPS, "WID_TN_SHIPS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_AIRCRAFTS, "WID_TN_AIRCRAFTS"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_AIRCRAFT, "WID_TN_AIRCRAFT"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ZOOM_IN, "WID_TN_ZOOM_IN"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ZOOM_OUT, "WID_TN_ZOOM_OUT"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_BUILDING_TOOLS_START, "WID_TN_BUILDING_TOOLS_START"); diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp index a769f661d1..094449d73b 100644 --- a/src/script/api/game_changelog.hpp +++ b/src/script/api/game_changelog.hpp @@ -1,4 +1,4 @@ -/* $Id: game_changelog.hpp 27996 2018-03-21 19:39:49Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,6 +15,22 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * + * \b 1.9.0 + * + * 1.9.0 is not yet released. The following changes are not set in stone yet. + * API additions: + * \li GSAirport::GetMonthlyMaintenanceCost + * \li GSClient + * \li GSClientList + * \li GSClientList_Company + * \li GSViewport::ScrollEveryoneTo + * \li GSViewport::ScrollCompanyClientsTo + * \li GSViewport::ScrollClientTo + * \li GSGoal::QuestionClient + * + * Other changes: + * \li GSBridge::GetName takes one extra parameter to refer the vehicle type + * * \b 1.8.0 * * No changes diff --git a/src/script/api/generate_widget.awk b/src/script/api/generate_widget.awk index 1e2da61f9b..cdbe59d970 100644 --- a/src/script/api/generate_widget.awk +++ b/src/script/api/generate_widget.awk @@ -1,4 +1,4 @@ -# $Id: generate_widget.awk 24664 2012-11-05 19:53:05Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -24,6 +24,8 @@ BEGIN { skiptillend = 0; } +{ CR = (match($0, "\\r$") > 0 ? "\r" : "") } + /@enum/ { print; add_indent = gensub("[^ ]*", "", "g"); @@ -42,7 +44,7 @@ BEGIN { active_comment = 0; comment = ""; file = filearray[i]; - print add_indent "/* automatically generated from " file " */" + print add_indent "/* automatically generated from " file " */" CR while ((getline < file) > 0) { sub(rm_indent, ""); @@ -65,7 +67,7 @@ BEGIN { } # Forget doxygen comment, if no enum follows - if (active_comment == 2 && $0 != "") { + if (active_comment == 2 && $0 != "" CR) { active_comment = 0; comment = ""; } @@ -78,22 +80,21 @@ BEGIN { sub(" *//", " //"); match($0, "^( *)([A-Za-z0-9_]+),(.*)", parts); - enumwidth - length(parts[2]) - if (parts[3] == "") { - printf "%s%s%-45s= ::%s\n", add_indent, parts[1], parts[2], (parts[2] ",") + if (parts[3] == "" CR) { + printf "%s%s%-45s= ::%s\n", add_indent, parts[1], parts[2], (parts[2] "," CR) } else { - printf "%s%s%-45s= ::%-45s%s\n", add_indent, parts[1], parts[2], (parts[2] ","), parts[3]; + printf "%s%s%-45s= ::%-45s%s\n", add_indent, parts[1], parts[2], (parts[2] ","), (parts[3]); } - } else if ($0 == "") { - print ""; + } else if ($0 == "" CR) { + print "" CR; } else { print add_indent $0; } } if (match($0, "^ *\\};") > 0) { - if (active != 0) print ""; + if (active != 0) print "" CR; active = 0; } } diff --git a/src/script/api/generate_widget.sh b/src/script/api/generate_widget.sh index 89a26acd13..4bdbc31c70 100755 --- a/src/script/api/generate_widget.sh +++ b/src/script/api/generate_widget.sh @@ -1,6 +1,6 @@ #!/bin/bash -# $Id: generate_widget.sh 24664 2012-11-05 19:53:05Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/generate_widget.vbs b/src/script/api/generate_widget.vbs new file mode 100644 index 0000000000..0bd38bb299 --- /dev/null +++ b/src/script/api/generate_widget.vbs @@ -0,0 +1,192 @@ +Option Explicit + +' $Id$ +' +' This file is part of OpenTTD. +' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + +Dim FSO, filename, skiptillend, eof +Set FSO = CreateObject("Scripting.FileSystemObject") + +filename = "script_window.hpp" +skiptillend = False +eof = vbCrLf + +If Not FSO.FileExists(filename) Then + WScript.Echo filename & " not found" + WScript.Quit 1 +End If + +Function GetFiles(pattern) + Dim parent, re, files, f + Set files = CreateObject("Scripting.Dictionary") + Set re = New RegExp + + parent = FSO.GetParentFolderName(pattern) + pattern = FSO.GetFileName(pattern) + + ' Convert pattern to a valid regex + re.Global = True + re.Pattern = "\." + pattern = re.Replace(pattern, "\.") + re.Pattern = "\*" + pattern = re.Replace(pattern, ".*") + re.Pattern = pattern + + ' Get the file list + For Each f In FSO.GetFolder(parent).Files + If re.Test(f.Path) Then + f = parent & "/" & f.Name + files.Add f, f + End If + Next + + ' Sort the file list + Set GetFiles = CreateObject("Scripting.Dictionary") + While files.Count <> 0 + Dim first + first = "" + For Each f in files + If first = "" Or StrComp(first, f) = 1 Then first = f + Next + GetFiles.Add first, first + files.Remove(First) + Wend +End Function + +Sub Generate(line, file) + Dim re, add_indent, enum_pattern, file_pattern, f, active, active_comment, comment, rm_indent + Set re = New RegExp + + re.Global = True + re.Pattern = "[^ ]*" + add_indent = re.Replace(line, "") + re.Global = False + re.Pattern = ".*@enum *" + line = Split(re.Replace(line, "")) + enum_pattern = line(0) + file_pattern = line(1) + For Each f In GetFiles(file_pattern).Items + active = 0 + active_comment = 0 + comment = "" + file.Write add_indent & "/* automatically generated from " & f & " */" & eof + Set f = FSO.OpenTextFile(f, 1) + While Not f.AtEndOfStream + re.Pattern = rm_indent + line = re.Replace(f.ReadLine, "") + + ' Remember possible doxygen comment before enum declaration + re.Pattern = "/\*\*" + If active = 0 And re.Test(line) Then + comment = add_indent & line + active_comment = 1 + ElseIf active_comment = 1 Then + comment = comment & vbCrLf & add_indent & line + End If + + ' Check for enum match + re.Pattern = "^ *enum *" & enum_pattern & " *\{" + If re.Test(line) Then + re.Global = True + re.Pattern = "[^ ]*" + rm_indent = re.Replace(line, "") + re.Global = False + active = 1 + If active_comment > 0 Then file.Write comment & eof + active_comment = 0 + comment = "" + End If + + ' Forget doxygen comment, if no enum follows + If active_comment = 2 And line <> "" Then + active_comment = 0 + comment = "" + End If + re.Pattern = "\*/" + If active_comment = 1 And re.Test(line) Then active_comment = 2 + + If active <> 0 Then + re.Pattern = "^ *[A-Za-z0-9_]* *[,=]" + If re.Test(line) Then + Dim parts + ' Transform enum values + re.Pattern = " *=[^,]*" + line = re.Replace(line, "") + re.Pattern = " *//" + line = re.Replace(line, " //") + + re.Pattern = "^( *)([A-Za-z0-9_]+),(.*)" + Set parts = re.Execute(line) + + With parts.Item(0).SubMatches + If .Item(2) = "" Then + file.Write add_indent & .Item(0) & .Item(1) & String(45 - Len(.Item(1)), " ") & "= ::" & .Item(1) & "," & eof + Else + file.Write add_indent & .Item(0) & .Item(1) & String(45 - Len(.Item(1)), " ") & "= ::" & .Item(1) & "," & String(44 - Len(.Item(1)), " ") & .Item(2) & eof + End If + End With + ElseIf line = "" Then + file.Write eof + Else + file.Write add_indent & line & eof + End If + End If + + re.Pattern = "^ *\};" + If re.Test(line) Then + If active <> 0 Then file.Write eof + active = 0 + End If + Wend + f.Close + Next +End Sub + +Sub Parse(line, file) + Dim re + Set re = New RegExp + + re.pattern = "@enum" + If re.Test(line) Then + file.Write line & eof + Generate line, file + skiptillend = True + Exit Sub + End If + + re.pattern = "@endenum" + If re.Test(line) Then + file.Write line & eof + skiptillend = False + Exit Sub + End If + + If Not skiptillend Then + file.Write line & eof + End If +End Sub + +Dim file, source, lines, i + +WScript.Echo "Starting to parse " & filename +Set file = FSO.OpenTextFile(filename, 1) +If Not file.AtEndOfStream Then + source = file.ReadAll +End IF +file.Close + +lines = Split(source, eof) +If UBound(lines) = 0 Then + eof = vbLf + lines = Split(source, eof) +End If + +Set file = FSO.OpenTextFile(filename, 2) +For i = LBound(lines) To UBound(lines) - 1 ' Split adds an extra line, we must ignore it + Parse lines(i), file +Next +file.Close +WScript.Echo "Done" diff --git a/src/script/api/script_accounting.cpp b/src/script/api/script_accounting.cpp index 799a2a49d9..e6fddf9e8c 100644 --- a/src/script/api/script_accounting.cpp +++ b/src/script/api/script_accounting.cpp @@ -1,4 +1,4 @@ -/* $Id: script_accounting.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_accounting.hpp b/src/script/api/script_accounting.hpp index dfb08a5f18..aa438ab54f 100644 --- a/src/script/api/script_accounting.hpp +++ b/src/script/api/script_accounting.hpp @@ -1,4 +1,4 @@ -/* $Id: script_accounting.hpp 24008 2012-03-04 16:54:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_admin.cpp b/src/script/api/script_admin.cpp index 4ddef89fb4..f66d9fc8a8 100644 --- a/src/script/api/script_admin.cpp +++ b/src/script/api/script_admin.cpp @@ -1,4 +1,4 @@ -/* $Id: script_admin.cpp 26774 2014-09-06 17:46:56Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_admin.hpp b/src/script/api/script_admin.hpp index 8294794714..48126eac0b 100644 --- a/src/script/api/script_admin.hpp +++ b/src/script/api/script_admin.hpp @@ -1,4 +1,4 @@ -/* $Id: script_admin.hpp 25594 2013-07-13 06:38:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_airport.cpp b/src/script/api/script_airport.cpp index 3be3a0c135..8e19d257df 100644 --- a/src/script/api/script_airport.cpp +++ b/src/script/api/script_airport.cpp @@ -1,4 +1,4 @@ -/* $Id: script_airport.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -163,3 +163,10 @@ return AirportSpec::Get(type)->maintenance_cost; } + +/* static */ Money ScriptAirport::GetMonthlyMaintenanceCost(AirportType type) +{ + if (!IsAirportInformationAvailable(type)) return -1; + + return (int64)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3; +} diff --git a/src/script/api/script_airport.hpp b/src/script/api/script_airport.hpp index 858039d8bb..6073a2bdd6 100644 --- a/src/script/api/script_airport.hpp +++ b/src/script/api/script_airport.hpp @@ -1,4 +1,4 @@ -/* $Id: script_airport.hpp 25705 2013-08-09 18:43:44Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -201,6 +201,14 @@ public: * @return Maintenance cost factor of the airport type. */ static uint16 GetMaintenanceCostFactor(AirportType type); + + /** + * Get the monthly maintenance cost of an airport type. + * @param type The airport type to get the monthly maintenance cost of. + * @pre IsAirportInformationAvailable(type) + * @return Monthly maintenance cost of the airport type. + */ + static Money GetMonthlyMaintenanceCost(AirportType type); }; #endif /* SCRIPT_AIRPORT_HPP */ diff --git a/src/script/api/script_base.cpp b/src/script/api/script_base.cpp index 24c83ddbca..5b2d550b8c 100644 --- a/src/script/api/script_base.cpp +++ b/src/script/api/script_base.cpp @@ -1,4 +1,4 @@ -/* $Id: script_base.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_base.hpp b/src/script/api/script_base.hpp index 5dd70c33cf..936dee77d9 100644 --- a/src/script/api/script_base.hpp +++ b/src/script/api/script_base.hpp @@ -1,4 +1,4 @@ -/* $Id: script_base.hpp 25148 2013-04-06 11:59:27Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_basestation.cpp b/src/script/api/script_basestation.cpp index 6a1bdf9689..229abf8657 100644 --- a/src/script/api/script_basestation.cpp +++ b/src/script/api/script_basestation.cpp @@ -1,4 +1,4 @@ -/* $Id: script_basestation.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_basestation.hpp b/src/script/api/script_basestation.hpp index aa0d941bf3..9676829f67 100644 --- a/src/script/api/script_basestation.hpp +++ b/src/script/api/script_basestation.hpp @@ -1,4 +1,4 @@ -/* $Id: script_basestation.hpp 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_bridge.cpp b/src/script/api/script_bridge.cpp index c008938be7..f532f11b73 100644 --- a/src/script/api/script_bridge.cpp +++ b/src/script/api/script_bridge.cpp @@ -1,4 +1,4 @@ -/* $Id: script_bridge.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -16,6 +16,7 @@ #include "../../bridge_map.h" #include "../../strings_func.h" #include "../../date_func.h" +#include "table/strings.h" #include "../../safeguards.h" @@ -135,11 +136,12 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance) return ScriptObject::DoCommand(tile, 0, 0, CMD_LANDSCAPE_CLEAR); } -/* static */ char *ScriptBridge::GetName(BridgeID bridge_id) +/* static */ char *ScriptBridge::GetName(BridgeID bridge_id, ScriptVehicle::VehicleType vehicle_type) { + EnforcePrecondition(NULL, vehicle_type == ScriptVehicle::VT_ROAD || vehicle_type == ScriptVehicle::VT_RAIL || vehicle_type == ScriptVehicle::VT_WATER); if (!IsValidBridge(bridge_id)) return NULL; - return GetString(::GetBridgeSpec(bridge_id)->transport_name[0]); + return GetString(vehicle_type == ScriptVehicle::VT_WATER ? STR_LAI_BRIDGE_DESCRIPTION_AQUEDUCT : ::GetBridgeSpec(bridge_id)->transport_name[vehicle_type]); } /* static */ int32 ScriptBridge::GetMaxSpeed(BridgeID bridge_id) diff --git a/src/script/api/script_bridge.hpp b/src/script/api/script_bridge.hpp index 1ec2bdffe7..5327d42062 100644 --- a/src/script/api/script_bridge.hpp +++ b/src/script/api/script_bridge.hpp @@ -1,4 +1,4 @@ -/* $Id: script_bridge.hpp 26149 2013-12-08 15:44:09Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -66,10 +66,12 @@ public: /** * Get the name of a bridge. * @param bridge_id The bridge to get the name of. + * @param vehicle_type The vehicle-type of bridge to get the name of. * @pre IsValidBridge(bridge_id). + * @pre vehicle_type == ScriptVehicle::VT_ROAD || vehicle_type == ScriptVehicle::VT_RAIL || vehicle_type == ScriptVehicle::VT_WATER * @return The name the bridge has. */ - static char *GetName(BridgeID bridge_id); + static char *GetName(BridgeID bridge_id, ScriptVehicle::VehicleType vehicle_type); /** * Get the maximum speed of a bridge. diff --git a/src/script/api/script_bridgelist.cpp b/src/script/api/script_bridgelist.cpp index f9b23a7984..0969342ecb 100644 --- a/src/script/api/script_bridgelist.cpp +++ b/src/script/api/script_bridgelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_bridgelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_bridgelist.hpp b/src/script/api/script_bridgelist.hpp index c6538823d4..ed09af8b16 100644 --- a/src/script/api/script_bridgelist.hpp +++ b/src/script/api/script_bridgelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_bridgelist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_cargo.cpp b/src/script/api/script_cargo.cpp index 773770bbeb..a2643f897f 100644 --- a/src/script/api/script_cargo.cpp +++ b/src/script/api/script_cargo.cpp @@ -1,4 +1,4 @@ -/* $Id: script_cargo.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_cargo.hpp b/src/script/api/script_cargo.hpp index 0c46f6251b..d1bfdd1fcc 100644 --- a/src/script/api/script_cargo.hpp +++ b/src/script/api/script_cargo.hpp @@ -1,4 +1,4 @@ -/* $Id: script_cargo.hpp 27316 2015-06-21 18:53:23Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_cargolist.cpp b/src/script/api/script_cargolist.cpp index b0a0b0bb3a..b96cd721e9 100644 --- a/src/script/api/script_cargolist.cpp +++ b/src/script/api/script_cargolist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_cargolist.cpp 26580 2014-05-11 18:02:11Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_cargolist.hpp b/src/script/api/script_cargolist.hpp index 07284337ed..a7cd8b69b5 100644 --- a/src/script/api/script_cargolist.hpp +++ b/src/script/api/script_cargolist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_cargolist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_cargomonitor.cpp b/src/script/api/script_cargomonitor.cpp index df6ce1f6e9..3cb9b4a8e7 100644 --- a/src/script/api/script_cargomonitor.cpp +++ b/src/script/api/script_cargomonitor.cpp @@ -1,4 +1,4 @@ -/* $Id: script_cargomonitor.cpp 26685 2014-07-12 17:04:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_cargomonitor.hpp b/src/script/api/script_cargomonitor.hpp index acba9f482f..175936db26 100644 --- a/src/script/api/script_cargomonitor.hpp +++ b/src/script/api/script_cargomonitor.hpp @@ -1,4 +1,4 @@ -/* $Id: script_cargomonitor.hpp 26685 2014-07-12 17:04:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_client.cpp b/src/script/api/script_client.cpp new file mode 100644 index 0000000000..771a0ae4ec --- /dev/null +++ b/src/script/api/script_client.cpp @@ -0,0 +1,74 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file script_client.cpp Implementation of ScriptClient. */ + +#include "../../stdafx.h" +#include "script_client.hpp" +#include "../../network/network.h" +#include "../../network/network_base.h" + +#include "../../safeguards.h" + +#ifdef ENABLE_NETWORK +/** + * Finds NetworkClientInfo given client-identifier, + * is used by other methods to resolve client-identifier. + * @param client The client to get info structure for + * @return A pointer to corresponding CI struct or NULL when not found. + */ +static NetworkClientInfo *FindClientInfo(ScriptClient::ClientID client) +{ + if (client == ScriptClient::CLIENT_INVALID) return NULL; + if (!_networking) return NULL; + return NetworkClientInfo::GetByClientID((::ClientID)client); +} +#endif + +/* static */ ScriptClient::ClientID ScriptClient::ResolveClientID(ScriptClient::ClientID client) +{ +#ifdef ENABLE_NETWORK + return (FindClientInfo(client) == NULL ? ScriptClient::CLIENT_INVALID : client); +#else + return CLIENT_INVALID; +#endif +} + +/* static */ char *ScriptClient::GetName(ScriptClient::ClientID client) +{ +#ifdef ENABLE_NETWORK + NetworkClientInfo *ci = FindClientInfo(client); + if (ci == NULL) return NULL; + return stredup(ci->client_name); +#else + return NULL; +#endif +} + +/* static */ ScriptCompany::CompanyID ScriptClient::GetCompany(ScriptClient::ClientID client) +{ +#ifdef ENABLE_NETWORK + NetworkClientInfo *ci = FindClientInfo(client); + if (ci == NULL) return ScriptCompany::COMPANY_INVALID; + return (ScriptCompany::CompanyID)ci->client_playas; +#else + return ScriptCompany::COMPANY_INVALID; +#endif +} + +/* static */ ScriptDate::Date ScriptClient::GetJoinDate(ScriptClient::ClientID client) +{ +#ifdef ENABLE_NETWORK + NetworkClientInfo *ci = FindClientInfo(client); + if (ci == NULL) return ScriptDate::DATE_INVALID; + return (ScriptDate::Date)ci->join_date; +#else + return ScriptDate::DATE_INVALID; +#endif +} diff --git a/src/script/api/script_client.hpp b/src/script/api/script_client.hpp new file mode 100644 index 0000000000..423f134c07 --- /dev/null +++ b/src/script/api/script_client.hpp @@ -0,0 +1,70 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file script_client.hpp Everything to query a network client's information */ + +#ifndef SCRIPT_CLIENT_HPP +#define SCRIPT_CLIENT_HPP + +#include "script_text.hpp" +#include "script_date.hpp" +#include "script_company.hpp" +#include "../../network/network_type.h" + +/** + * Class that handles all client related functions. + * + * @api game + */ +class ScriptClient : public ScriptObject { +public: + + /** Different constants related to ClientID. */ + enum ClientID { + CLIENT_INVALID = 0, ///< Client is not part of anything + CLIENT_SERVER = 1, ///< Servers always have this ID + CLIENT_FIRST = 2, ///< The first client ID + }; + + /** + * Resolves the given client id to the correct index for the client. + * If the client with the given id does not exist it will + * return CLIENT_INVALID. + * @param client The client id to resolve. + * @return The resolved client id. + */ + static ClientID ResolveClientID(ClientID client); + + /** + * Get the name of the given client. + * @param client The client to get the name for. + * @pre ResolveClientID(client) != CLIENT_INVALID. + * @return The name of the given client. + */ + static char *GetName(ClientID client); + + /** + * Get the company in which the given client is playing. + * @param client The client to get company for. + * @pre ResolveClientID(client) != CLIENT_INVALID. + * @return The company in which client is playing or COMPANY_SPECTATOR. + */ + static ScriptCompany::CompanyID GetCompany(ClientID client); + + /** + * Get the game date when the given client has joined. + * @param client The client to get joining date for. + * @pre ResolveClientID(client) != CLIENT_INVALID. + * @return The date when client has joined. + */ + static ScriptDate::Date GetJoinDate(ClientID client); +}; + + +#endif /* SCRIPT_CLIENT_HPP */ diff --git a/src/script/api/script_clientlist.cpp b/src/script/api/script_clientlist.cpp new file mode 100644 index 0000000000..2f7a19a9ff --- /dev/null +++ b/src/script/api/script_clientlist.cpp @@ -0,0 +1,49 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file script_clientlist.cpp Implementation of ScriptClientList and friends. */ + +#include "../../stdafx.h" +#include "script_company.hpp" +#include "script_clientlist.hpp" +#include "../../network/network.h" +#include "../../network/network_base.h" + +#include "../../safeguards.h" + +ScriptClientList::ScriptClientList() +{ +#ifdef ENABLE_NETWORK + if (!_networking) return; + NetworkClientInfo *ci; + FOR_ALL_CLIENT_INFOS(ci) { + this->AddItem(ci->client_id); + } +#endif +} + +ScriptClientList_Company::ScriptClientList_Company(ScriptCompany::CompanyID company) +{ +#ifdef ENABLE_NETWORK + if (!_networking) return; + CompanyID c; + if (company == ScriptCompany::COMPANY_SPECTATOR) { + c = ::COMPANY_SPECTATOR; + } else { + company = ScriptCompany::ResolveCompanyID(company); + if (company == ScriptCompany::COMPANY_INVALID) return; + c = (CompanyID)company; + } + + NetworkClientInfo *ci; + FOR_ALL_CLIENT_INFOS(ci) { + if (ci->client_playas == c) this->AddItem(ci->client_id); + } +#endif +} diff --git a/src/script/api/script_clientlist.hpp b/src/script/api/script_clientlist.hpp new file mode 100644 index 0000000000..58d0177b21 --- /dev/null +++ b/src/script/api/script_clientlist.hpp @@ -0,0 +1,42 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file script_clientlist.hpp List all the TODO. */ + +#ifndef SCRIPT_CLIENTLIST_HPP +#define SCRIPT_CLIENTLIST_HPP + +#include "script_list.hpp" +#include "script_company.hpp" + + +/** + * Creates a list of clients that are currently in game. + * @api game + * @ingroup ScriptList + */ +class ScriptClientList : public ScriptList { +public: + ScriptClientList(); +}; + +/** + * Creates a list of clients that are playing in the company. + * @api game + * @ingroup ScriptList + */ +class ScriptClientList_Company : public ScriptList { +public: + /** + * @param company_id The company to list clients for. + */ + ScriptClientList_Company(ScriptCompany::CompanyID company); +}; + +#endif /* SCRIPT_CIENTLIST_HPP */ diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index 8cab441981..a1f40c5e1e 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -1,4 +1,4 @@ -/* $Id: script_company.cpp 27026 2014-10-21 16:58:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_company.hpp b/src/script/api/script_company.hpp index f334bbaedd..dc917500b7 100644 --- a/src/script/api/script_company.hpp +++ b/src/script/api/script_company.hpp @@ -1,4 +1,4 @@ -/* $Id: script_company.hpp 26915 2014-09-24 16:45:20Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -30,12 +30,13 @@ public: /** Different constants related to CompanyID. */ enum CompanyID { /* Note: these values represent part of the in-game Owner enum */ - COMPANY_FIRST = ::COMPANY_FIRST, ///< The first available company. - COMPANY_LAST = ::MAX_COMPANIES, ///< The last available company. + COMPANY_FIRST = ::COMPANY_FIRST, ///< The first available company. + COMPANY_LAST = ::MAX_COMPANIES, ///< The last available company. /* Custom added value, only valid for this API */ - COMPANY_INVALID = -1, ///< An invalid company. - COMPANY_SELF = 254, ///< Constant that gets resolved to the correct company index for your company. + COMPANY_INVALID = -1, ///< An invalid company. + COMPANY_SELF = 254, ///< Constant that gets resolved to the correct company index for your company. + COMPANY_SPECTATOR = 255, ///< Constant indicating that player is spectating (gets resolved to COMPANY_INVALID) }; /** Possible genders for company presidents. */ @@ -54,12 +55,12 @@ public: EXPENSES_NEW_VEHICLES = ::EXPENSES_NEW_VEHICLES, ///< New vehicles. EXPENSES_TRAIN_RUN = ::EXPENSES_TRAIN_RUN, ///< Running costs trains. EXPENSES_ROADVEH_RUN = ::EXPENSES_ROADVEH_RUN, ///< Running costs road vehicles. - EXPENSES_AIRCRAFT_RUN = ::EXPENSES_AIRCRAFT_RUN, ///< Running costs aircrafts. + EXPENSES_AIRCRAFT_RUN = ::EXPENSES_AIRCRAFT_RUN, ///< Running costs aircraft. EXPENSES_SHIP_RUN = ::EXPENSES_SHIP_RUN, ///< Running costs ships. EXPENSES_PROPERTY = ::EXPENSES_PROPERTY, ///< Property costs. EXPENSES_TRAIN_INC = ::EXPENSES_TRAIN_INC, ///< Income from trains. EXPENSES_ROADVEH_INC = ::EXPENSES_ROADVEH_INC, ///< Income from road vehicles. - EXPENSES_AIRCRAFT_INC = ::EXPENSES_AIRCRAFT_INC, ///< Income from aircrafts. + EXPENSES_AIRCRAFT_INC = ::EXPENSES_AIRCRAFT_INC, ///< Income from aircraft. EXPENSES_SHIP_INC = ::EXPENSES_SHIP_INC, ///< Income from ships. EXPENSES_LOAN_INT = ::EXPENSES_LOAN_INT, ///< Interest payments over the loan. EXPENSES_OTHER = ::EXPENSES_OTHER, ///< Other expenses. diff --git a/src/script/api/script_companymode.cpp b/src/script/api/script_companymode.cpp index f6f60445f0..a5d3963a2d 100644 --- a/src/script/api/script_companymode.cpp +++ b/src/script/api/script_companymode.cpp @@ -1,4 +1,4 @@ -/* $Id: script_companymode.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -10,6 +10,7 @@ /** @file script_companymode.cpp Implementation of ScriptCompanyMode. */ #include "../../stdafx.h" +#include "../../company_base.h" #include "script_companymode.hpp" #include "../../safeguards.h" @@ -17,6 +18,7 @@ ScriptCompanyMode::ScriptCompanyMode(int company) { if (company < OWNER_BEGIN || company >= MAX_COMPANIES) company = INVALID_COMPANY; + if (!::Company::IsValidID(company)) company = INVALID_COMPANY; this->last_company = ScriptObject::GetCompany(); ScriptObject::SetCompany((CompanyID)company); diff --git a/src/script/api/script_companymode.hpp b/src/script/api/script_companymode.hpp index b1f643363d..67787f2584 100644 --- a/src/script/api/script_companymode.hpp +++ b/src/script/api/script_companymode.hpp @@ -1,4 +1,4 @@ -/* $Id: script_companymode.hpp 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_controller.cpp b/src/script/api/script_controller.cpp index 13e5a6846b..a42c8ede9b 100644 --- a/src/script/api/script_controller.cpp +++ b/src/script/api/script_controller.cpp @@ -1,4 +1,4 @@ -/* $Id: script_controller.cpp 26774 2014-09-06 17:46:56Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_controller.hpp b/src/script/api/script_controller.hpp index 8890d1050a..9bdbe9ab79 100644 --- a/src/script/api/script_controller.hpp +++ b/src/script/api/script_controller.hpp @@ -1,4 +1,4 @@ -/* $Id: script_controller.hpp 27111 2015-01-04 15:14:13Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_date.cpp b/src/script/api/script_date.cpp index efd0dabf75..2f5b399633 100644 --- a/src/script/api/script_date.cpp +++ b/src/script/api/script_date.cpp @@ -1,4 +1,4 @@ -/* $Id: script_date.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_date.hpp b/src/script/api/script_date.hpp index cbc05f7684..b402b0a2b2 100644 --- a/src/script/api/script_date.hpp +++ b/src/script/api/script_date.hpp @@ -1,4 +1,4 @@ -/* $Id: script_date.hpp 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_depotlist.cpp b/src/script/api/script_depotlist.cpp index a6fb8e14e7..05bb4ccd04 100644 --- a/src/script/api/script_depotlist.cpp +++ b/src/script/api/script_depotlist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_depotlist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_depotlist.hpp b/src/script/api/script_depotlist.hpp index d590901f1c..c516ac758e 100644 --- a/src/script/api/script_depotlist.hpp +++ b/src/script/api/script_depotlist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_depotlist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_engine.cpp b/src/script/api/script_engine.cpp index e15142201d..1fe16321b5 100644 --- a/src/script/api/script_engine.cpp +++ b/src/script/api/script_engine.cpp @@ -1,4 +1,4 @@ -/* $Id: script_engine.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_engine.hpp b/src/script/api/script_engine.hpp index 265ee2087a..173377742d 100644 --- a/src/script/api/script_engine.hpp +++ b/src/script/api/script_engine.hpp @@ -1,4 +1,4 @@ -/* $Id: script_engine.hpp 27123 2015-01-20 19:11:31Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_enginelist.cpp b/src/script/api/script_enginelist.cpp index ea1d83a570..99ab9537be 100644 --- a/src/script/api/script_enginelist.cpp +++ b/src/script/api/script_enginelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_enginelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_enginelist.hpp b/src/script/api/script_enginelist.hpp index 49ba2cb587..1fe2c4bc18 100644 --- a/src/script/api/script_enginelist.hpp +++ b/src/script/api/script_enginelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_enginelist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_error.cpp b/src/script/api/script_error.cpp index 3d88c0971e..87d2906c55 100644 --- a/src/script/api/script_error.cpp +++ b/src/script/api/script_error.cpp @@ -1,4 +1,4 @@ -/* $Id: script_error.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_error.hpp b/src/script/api/script_error.hpp index ab8e2f0400..1817cdb7d9 100644 --- a/src/script/api/script_error.hpp +++ b/src/script/api/script_error.hpp @@ -1,4 +1,4 @@ -/* $Id: script_error.hpp 24982 2013-02-08 20:34:27Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_event.cpp b/src/script/api/script_event.cpp index 4f4663a335..0e711ca416 100644 --- a/src/script/api/script_event.cpp +++ b/src/script/api/script_event.cpp @@ -1,4 +1,4 @@ -/* $Id: script_event.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_event.hpp b/src/script/api/script_event.hpp index ed4b726259..b2dddebd67 100644 --- a/src/script/api/script_event.hpp +++ b/src/script/api/script_event.hpp @@ -1,4 +1,4 @@ -/* $Id: script_event.hpp 24291 2012-05-26 14:16:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_event_types.cpp b/src/script/api/script_event_types.cpp index 1c6c7015f5..d424e6feff 100644 --- a/src/script/api/script_event_types.cpp +++ b/src/script/api/script_event_types.cpp @@ -1,4 +1,4 @@ -/* $Id: script_event_types.cpp 27020 2014-10-15 18:31:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp index 8ce2842f43..f13e588eed 100644 --- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -1,4 +1,4 @@ -/* $Id: script_event_types.hpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -363,7 +363,7 @@ private: class ScriptEventCompanyAskMerger : public ScriptEvent { public: /** - * @param owner The company that can be bough. + * @param owner The company that can be bought. * @param value The value/costs of buying the company. */ ScriptEventCompanyAskMerger(Owner owner, int32 value) : diff --git a/src/script/api/script_execmode.cpp b/src/script/api/script_execmode.cpp index 56894ece4c..1bbce807a4 100644 --- a/src/script/api/script_execmode.cpp +++ b/src/script/api/script_execmode.cpp @@ -1,4 +1,4 @@ -/* $Id: script_execmode.cpp 27379 2015-08-10 20:04:31Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_execmode.hpp b/src/script/api/script_execmode.hpp index 4eb606737b..96d30d1e4a 100644 --- a/src/script/api/script_execmode.hpp +++ b/src/script/api/script_execmode.hpp @@ -1,4 +1,4 @@ -/* $Id: script_execmode.hpp 27543 2016-04-17 17:10:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_game.cpp b/src/script/api/script_game.cpp index ff186ebc6a..c24757a3cc 100644 --- a/src/script/api/script_game.cpp +++ b/src/script/api/script_game.cpp @@ -1,4 +1,4 @@ -/* $Id: script_game.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_game.hpp b/src/script/api/script_game.hpp index 79c6b83abd..3531c9de8f 100644 --- a/src/script/api/script_game.hpp +++ b/src/script/api/script_game.hpp @@ -1,4 +1,4 @@ -/* $Id: script_game.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_gamesettings.cpp b/src/script/api/script_gamesettings.cpp index 8672c021b9..1f8ded877e 100644 --- a/src/script/api/script_gamesettings.cpp +++ b/src/script/api/script_gamesettings.cpp @@ -1,4 +1,4 @@ -/* $Id: script_gamesettings.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_gamesettings.hpp b/src/script/api/script_gamesettings.hpp index f172d39416..6f92ca758b 100644 --- a/src/script/api/script_gamesettings.hpp +++ b/src/script/api/script_gamesettings.hpp @@ -1,4 +1,4 @@ -/* $Id: script_gamesettings.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_goal.cpp b/src/script/api/script_goal.cpp index f894f775aa..c183b75834 100644 --- a/src/script/api/script_goal.cpp +++ b/src/script/api/script_goal.cpp @@ -1,4 +1,4 @@ -/* $Id: script_goal.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -10,6 +10,7 @@ /** @file script_goal.cpp Implementation of ScriptGoal. */ #include "../../stdafx.h" +#include "script_game.hpp" #include "script_goal.hpp" #include "script_error.hpp" #include "script_industry.hpp" @@ -19,6 +20,7 @@ #include "../script_instance.hpp" #include "../../goal_base.h" #include "../../string_func.h" +#include "../../network/network_base.h" #include "../../safeguards.h" @@ -107,7 +109,7 @@ return g != NULL && g->completed; } -/* static */ bool ScriptGoal::Question(uint16 uniqueid, ScriptCompany::CompanyID company, Text *question, QuestionType type, int buttons) +/* static */ bool ScriptGoal::DoQuestion(uint16 uniqueid, uint8 target, bool is_client, Text *question, QuestionType type, int buttons) { CCountedPtr counter(question); @@ -115,15 +117,32 @@ EnforcePrecondition(false, question != NULL); const char *text = question->GetEncodedText(); EnforcePreconditionEncodedText(false, text); - EnforcePrecondition(false, company == ScriptCompany::COMPANY_INVALID || ScriptCompany::ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID); EnforcePrecondition(false, CountBits(buttons) >= 1 && CountBits(buttons) <= 3); EnforcePrecondition(false, buttons < (1 << ::GOAL_QUESTION_BUTTON_COUNT)); EnforcePrecondition(false, (int)type < ::GOAL_QUESTION_TYPE_COUNT); + return ScriptObject::DoCommand(0, uniqueid | (target << 16) | (type << 24) | (is_client ? (1 << 31) : 0), buttons, CMD_GOAL_QUESTION, text); +} + +/* static */ bool ScriptGoal::Question(uint16 uniqueid, ScriptCompany::CompanyID company, Text *question, QuestionType type, int buttons) +{ + EnforcePrecondition(false, company == ScriptCompany::COMPANY_INVALID || ScriptCompany::ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID); uint8 c = company; if (company == ScriptCompany::COMPANY_INVALID) c = INVALID_COMPANY; - return ScriptObject::DoCommand(0, uniqueid | (c << 16) | (type << 24), buttons, CMD_GOAL_QUESTION, text); + return DoQuestion(uniqueid, c, false, question, type, buttons); +} + +/* static */ bool ScriptGoal::QuestionClient(uint16 uniqueid, ScriptClient::ClientID client, Text *question, QuestionType type, int buttons) +{ + EnforcePrecondition(false, ScriptGame::IsMultiplayer()); + EnforcePrecondition(false, ScriptClient::ResolveClientID(client) != ScriptClient::CLIENT_INVALID); +#ifdef ENABLE_NETWORK + ClientIndex c = NetworkClientInfo::GetByClientID((::ClientID)client)->index; + return DoQuestion(uniqueid, c, true, question, type, buttons); +#else + return false; +#endif } /* static */ bool ScriptGoal::CloseQuestion(uint16 uniqueid) diff --git a/src/script/api/script_goal.hpp b/src/script/api/script_goal.hpp index f3fa160753..f5dfba095f 100644 --- a/src/script/api/script_goal.hpp +++ b/src/script/api/script_goal.hpp @@ -1,4 +1,4 @@ -/* $Id: script_goal.hpp 26012 2013-11-16 17:41:57Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,6 +12,7 @@ #ifndef SCRIPT_GOAL_HPP #define SCRIPT_GOAL_HPP +#include "script_client.hpp" #include "script_company.hpp" #include "../../goal_type.h" @@ -160,7 +161,7 @@ public: static bool IsCompleted(GoalID goal_id); /** - * Ask a question. + * Ask a question of all players in a company. * @param uniqueid Your unique id to distinguish results of multiple questions in the returning event. * @param company The company to ask the question, or ScriptCompany::COMPANY_INVALID for all. * @param question The question to ask (can be either a raw string, or a ScriptText object). @@ -176,6 +177,24 @@ public: */ static bool Question(uint16 uniqueid, ScriptCompany::CompanyID company, Text *question, QuestionType type, int buttons); + /** + * Ask client a question. + * @param uniqueid Your unique id to distinguish results of multiple questions in the returning event. + * @param client The client to ask the question. + * @param question The question to ask (can be either a raw string, or a ScriptText object). + * @param type The type of question that is being asked. + * @param buttons Any combinations (at least 1, up to 3) of buttons defined in QuestionButton. Like BUTTON_YES + BUTTON_NO. + * @return True if the action succeeded. + * @pre No ScriptCompanyMode may be in scope. + * @pre ScriptGame::IsMultiplayer() + * @pre question != NULL && len(question) != 0. + * @pre ResolveClientID(client) != CLIENT_INVALID. + * @pre CountBits(buttons) >= 1 && CountBits(buttons) <= 3. + * @note Replies to the question are given by you via the event ScriptEvent_GoalQuestionAnswer. + * @note There is no guarantee you ever get a reply on your question. + */ + static bool QuestionClient(uint16 uniqueid, ScriptClient::ClientID client, Text *question, QuestionType type, int buttons); + /** * Close the question on all clients. * @param uniqueid The uniqueid of the question you want to close. @@ -187,6 +206,12 @@ public: * companies, but you are only interested in the reply of the first. */ static bool CloseQuestion(uint16 uniqueid); + +protected: + /** + * Does common checks and asks the question. + */ + static bool DoQuestion(uint16 uniqueid, uint8 target, bool is_client, Text *question, QuestionType type, int buttons); }; #endif /* SCRIPT_GOAL_HPP */ diff --git a/src/script/api/script_group.cpp b/src/script/api/script_group.cpp index 226374e84b..1e8d6d774d 100644 --- a/src/script/api/script_group.cpp +++ b/src/script/api/script_group.cpp @@ -1,4 +1,4 @@ -/* $Id: script_group.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_group.hpp b/src/script/api/script_group.hpp index b239b2c4a6..fd8888a171 100644 --- a/src/script/api/script_group.hpp +++ b/src/script/api/script_group.hpp @@ -1,4 +1,4 @@ -/* $Id: script_group.hpp 24776 2012-12-01 13:12:39Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_grouplist.cpp b/src/script/api/script_grouplist.cpp index 111ebabb6c..d1071c36c6 100644 --- a/src/script/api/script_grouplist.cpp +++ b/src/script/api/script_grouplist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_grouplist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_grouplist.hpp b/src/script/api/script_grouplist.hpp index 3d08b5c86f..32e94d6494 100644 --- a/src/script/api/script_grouplist.hpp +++ b/src/script/api/script_grouplist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_grouplist.hpp 23370 2011-11-29 23:27:26Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industry.cpp b/src/script/api/script_industry.cpp index 38610bd329..c536ec5590 100644 --- a/src/script/api/script_industry.cpp +++ b/src/script/api/script_industry.cpp @@ -1,4 +1,4 @@ -/* $Id: script_industry.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industry.hpp b/src/script/api/script_industry.hpp index 36218c4b1c..83c249f9aa 100644 --- a/src/script/api/script_industry.hpp +++ b/src/script/api/script_industry.hpp @@ -1,4 +1,4 @@ -/* $Id: script_industry.hpp 23614 2011-12-19 20:57:23Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industrylist.cpp b/src/script/api/script_industrylist.cpp index d872bbbfab..d2d298fa3f 100644 --- a/src/script/api/script_industrylist.cpp +++ b/src/script/api/script_industrylist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_industrylist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industrylist.hpp b/src/script/api/script_industrylist.hpp index 1a13c9d5b1..a9ef85ecea 100644 --- a/src/script/api/script_industrylist.hpp +++ b/src/script/api/script_industrylist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_industrylist.hpp 23614 2011-12-19 20:57:23Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industrytype.cpp b/src/script/api/script_industrytype.cpp index fc19ed4192..1ac59975dc 100644 --- a/src/script/api/script_industrytype.cpp +++ b/src/script/api/script_industrytype.cpp @@ -1,4 +1,4 @@ -/* $Id: script_industrytype.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industrytype.hpp b/src/script/api/script_industrytype.hpp index 035665b164..8dccc68c91 100644 --- a/src/script/api/script_industrytype.hpp +++ b/src/script/api/script_industrytype.hpp @@ -1,4 +1,4 @@ -/* $Id: script_industrytype.hpp 26164 2013-12-17 20:41:51Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industrytypelist.cpp b/src/script/api/script_industrytypelist.cpp index 1a64e2b24b..b60361578b 100644 --- a/src/script/api/script_industrytypelist.cpp +++ b/src/script/api/script_industrytypelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_industrytypelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_industrytypelist.hpp b/src/script/api/script_industrytypelist.hpp index c0b1ccac01..efb2a4a611 100644 --- a/src/script/api/script_industrytypelist.hpp +++ b/src/script/api/script_industrytypelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_industrytypelist.hpp 23614 2011-12-19 20:57:23Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_info_docs.hpp b/src/script/api/script_info_docs.hpp index 2934f34090..e12a6a45c5 100644 --- a/src/script/api/script_info_docs.hpp +++ b/src/script/api/script_info_docs.hpp @@ -1,4 +1,4 @@ -/* $Id: script_info_docs.hpp 26038 2013-11-18 20:09:09Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_infrastructure.cpp b/src/script/api/script_infrastructure.cpp index 3aa3f6743e..d7da2747e1 100644 --- a/src/script/api/script_infrastructure.cpp +++ b/src/script/api/script_infrastructure.cpp @@ -1,4 +1,4 @@ -/* $Id: script_infrastructure.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_infrastructure.hpp b/src/script/api/script_infrastructure.hpp index 522f1d5923..f2ef641eea 100644 --- a/src/script/api/script_infrastructure.hpp +++ b/src/script/api/script_infrastructure.hpp @@ -1,4 +1,4 @@ -/* $Id: script_infrastructure.hpp 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_list.cpp b/src/script/api/script_list.cpp index cd07d91b49..d0c72b5bb1 100644 --- a/src/script/api/script_list.cpp +++ b/src/script/api/script_list.cpp @@ -1,4 +1,4 @@ -/* $Id: script_list.cpp 27594 2016-05-30 21:03:11Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_list.hpp b/src/script/api/script_list.hpp index 2b3ebdb271..1fbafe3d9f 100644 --- a/src/script/api/script_list.hpp +++ b/src/script/api/script_list.hpp @@ -1,4 +1,4 @@ -/* $Id: script_list.hpp 27104 2015-01-01 21:08:19Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_log.cpp b/src/script/api/script_log.cpp index b45ddf4de0..d9fbbde982 100644 --- a/src/script/api/script_log.cpp +++ b/src/script/api/script_log.cpp @@ -1,4 +1,4 @@ -/* $Id: script_log.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_log.hpp b/src/script/api/script_log.hpp index 4041819462..def37c938e 100644 --- a/src/script/api/script_log.hpp +++ b/src/script/api/script_log.hpp @@ -1,4 +1,4 @@ -/* $Id: script_log.hpp 24957 2013-02-02 19:46:46Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_map.cpp b/src/script/api/script_map.cpp index 3e492ea4da..6334089fdb 100644 --- a/src/script/api/script_map.cpp +++ b/src/script/api/script_map.cpp @@ -1,4 +1,4 @@ -/* $Id: script_map.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_map.hpp b/src/script/api/script_map.hpp index c68d834db9..3648ae7f39 100644 --- a/src/script/api/script_map.hpp +++ b/src/script/api/script_map.hpp @@ -1,4 +1,4 @@ -/* $Id: script_map.hpp 23614 2011-12-19 20:57:23Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_marine.cpp b/src/script/api/script_marine.cpp index 42a9a75805..434ec11acc 100644 --- a/src/script/api/script_marine.cpp +++ b/src/script/api/script_marine.cpp @@ -1,4 +1,4 @@ -/* $Id: script_marine.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_marine.hpp b/src/script/api/script_marine.hpp index cc9d8a1f46..d70121029f 100644 --- a/src/script/api/script_marine.hpp +++ b/src/script/api/script_marine.hpp @@ -1,4 +1,4 @@ -/* $Id: script_marine.hpp 23633 2011-12-19 21:05:36Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_news.cpp b/src/script/api/script_news.cpp index c3930bf868..5f84f96d69 100644 --- a/src/script/api/script_news.cpp +++ b/src/script/api/script_news.cpp @@ -1,4 +1,4 @@ -/* $Id: script_news.cpp 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_news.hpp b/src/script/api/script_news.hpp index 5c310e5f4c..ca0656608f 100644 --- a/src/script/api/script_news.hpp +++ b/src/script/api/script_news.hpp @@ -1,4 +1,4 @@ -/* $Id: script_news.hpp 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index e084b06d7a..49dba6bb73 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -1,4 +1,4 @@ -/* $Id: script_object.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index d96060925d..482e76f663 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -1,4 +1,4 @@ -/* $Id: script_object.hpp 25342 2013-06-09 12:19:09Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_order.cpp b/src/script/api/script_order.cpp index c474e66851..a1390bf8f5 100644 --- a/src/script/api/script_order.cpp +++ b/src/script/api/script_order.cpp @@ -1,4 +1,4 @@ -/* $Id: script_order.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -214,6 +214,7 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr switch (condition) { case OC_LOAD_PERCENTAGE: case OC_RELIABILITY: + case OC_MAX_RELIABILITY: case OC_MAX_SPEED: case OC_AGE: case OC_REMAINING_LIFETIME: diff --git a/src/script/api/script_order.hpp b/src/script/api/script_order.hpp index 2df3294530..a4f945511e 100644 --- a/src/script/api/script_order.hpp +++ b/src/script/api/script_order.hpp @@ -1,4 +1,4 @@ -/* $Id: script_order.hpp 25612 2013-07-14 20:21:36Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -91,6 +91,7 @@ public: /* Note: these values represent part of the in-game OrderConditionVariable enum */ OC_LOAD_PERCENTAGE = ::OCV_LOAD_PERCENTAGE, ///< Skip based on the amount of load, value is in tons. OC_RELIABILITY = ::OCV_RELIABILITY, ///< Skip based on the reliability, value is percent (0..100). + OC_MAX_RELIABILITY = ::OCV_MAX_RELIABILITY, ///< Skip based on the maximum reliability. Value in percent OC_MAX_SPEED = ::OCV_MAX_SPEED, ///< Skip based on the maximum speed, value is in OpenTTD's internal speed unit, see ScriptEngine::GetMaxSpeed. OC_AGE = ::OCV_AGE, ///< Skip based on the age, value is in years. OC_REQUIRES_SERVICE = ::OCV_REQUIRES_SERVICE, ///< Skip when the vehicle requires service, no value. diff --git a/src/script/api/script_rail.cpp b/src/script/api/script_rail.cpp index 5888d6fade..f7682cfd8f 100644 --- a/src/script/api/script_rail.cpp +++ b/src/script/api/script_rail.cpp @@ -1,4 +1,4 @@ -/* $Id: script_rail.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -157,7 +157,7 @@ EnforcePrecondition(false, station_id == ScriptStation::STATION_NEW || station_id == ScriptStation::STATION_JOIN_ADJACENT || ScriptStation::IsValidStation(station_id)); uint32 p1 = GetCurrentRailType() | (platform_length << 16) | (num_platforms << 8); - if (direction == RAILTRACK_NW_SE) p1 |= (1 << 4); + if (direction == RAILTRACK_NW_SE) p1 |= (1 << 6); if (station_id != ScriptStation::STATION_JOIN_ADJACENT) p1 |= (1 << 24); return ScriptObject::DoCommand(tile, p1, (ScriptStation::IsValidStation(station_id) ? station_id : INVALID_STATION) << 16, CMD_BUILD_RAIL_STATION); } @@ -176,7 +176,7 @@ EnforcePrecondition(false, goal_industry == ScriptIndustryType::INDUSTRYTYPE_UNKNOWN || goal_industry == ScriptIndustryType::INDUSTRYTYPE_TOWN || ScriptIndustryType::IsValidIndustryType(goal_industry)); uint32 p1 = GetCurrentRailType() | (platform_length << 16) | (num_platforms << 8); - if (direction == RAILTRACK_NW_SE) p1 |= 1 << 4; + if (direction == RAILTRACK_NW_SE) p1 |= 1 << 6; if (station_id != ScriptStation::STATION_JOIN_ADJACENT) p1 |= (1 << 24); const GRFFile *file; @@ -204,7 +204,7 @@ EnforcePrecondition(false, GetRailTracks(tile) == RAILTRACK_NE_SW || GetRailTracks(tile) == RAILTRACK_NW_SE); EnforcePrecondition(false, IsRailTypeAvailable(GetCurrentRailType())); - return ScriptObject::DoCommand(tile, GetCurrentRailType() | (GetRailTracks(tile) == RAILTRACK_NE_SW ? AXIS_X : AXIS_Y) << 4 | 1 << 8 | 1 << 16, STAT_CLASS_WAYP | INVALID_STATION << 16, CMD_BUILD_RAIL_WAYPOINT); + return ScriptObject::DoCommand(tile, GetCurrentRailType() | (GetRailTracks(tile) == RAILTRACK_NE_SW ? AXIS_X : AXIS_Y) << 6 | 1 << 8 | 1 << 16, STAT_CLASS_WAYP | INVALID_STATION << 16, CMD_BUILD_RAIL_WAYPOINT); } /* static */ bool ScriptRail::RemoveRailWaypointTileRectangle(TileIndex tile, TileIndex tile2, bool keep_rail) @@ -244,7 +244,7 @@ EnforcePrecondition(false, KillFirstBit((uint)rail_track) == 0); EnforcePrecondition(false, IsRailTypeAvailable(GetCurrentRailType())); - return ScriptObject::DoCommand(tile, tile, GetCurrentRailType() | (FindFirstTrack((::TrackBits)rail_track) << 4), CMD_BUILD_RAILROAD_TRACK); + return ScriptObject::DoCommand(tile, tile, GetCurrentRailType() | (FindFirstTrack((::TrackBits)rail_track) << 6), CMD_BUILD_RAILROAD_TRACK); } /* static */ bool ScriptRail::RemoveRailTrack(TileIndex tile, RailTrack rail_track) @@ -255,7 +255,7 @@ EnforcePrecondition(false, GetRailTracks(tile) & rail_track); EnforcePrecondition(false, KillFirstBit((uint)rail_track) == 0); - return ScriptObject::DoCommand(tile, tile, FindFirstTrack((::TrackBits)rail_track) << 4, CMD_REMOVE_RAILROAD_TRACK); + return ScriptObject::DoCommand(tile, tile, FindFirstTrack((::TrackBits)rail_track) << 6, CMD_REMOVE_RAILROAD_TRACK); } /* static */ bool ScriptRail::AreTilesConnected(TileIndex from, TileIndex tile, TileIndex to) @@ -288,16 +288,16 @@ static uint32 SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) int diag_offset = abs(abs((int)::TileX(*to) - (int)::TileX(tile)) - abs((int)::TileY(*to) - (int)::TileY(tile))); uint32 p2 = 0; if (::TileY(from) == ::TileY(*to)) { - p2 |= (TRACK_X << 4); + p2 |= (TRACK_X << 6); *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); } else if (::TileX(from) == ::TileX(*to)) { - p2 |= (TRACK_Y << 4); + p2 |= (TRACK_Y << 6); *to -= ::MapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); } else if (::TileY(from) < ::TileY(tile)) { if (::TileX(*to) < ::TileX(tile)) { - p2 |= (TRACK_UPPER << 4); + p2 |= (TRACK_UPPER << 6); } else { - p2 |= (TRACK_LEFT << 4); + p2 |= (TRACK_LEFT << 6); } if (diag_offset != 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); @@ -306,9 +306,9 @@ static uint32 SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) } } else if (::TileY(from) > ::TileY(tile)) { if (::TileX(*to) < ::TileX(tile)) { - p2 |= (TRACK_RIGHT << 4); + p2 |= (TRACK_RIGHT << 6); } else { - p2 |= (TRACK_LOWER << 4); + p2 |= (TRACK_LOWER << 6); } if (diag_offset != 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); @@ -317,9 +317,9 @@ static uint32 SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) } } else if (::TileX(from) < ::TileX(tile)) { if (::TileY(*to) < ::TileY(tile)) { - p2 |= (TRACK_UPPER << 4); + p2 |= (TRACK_UPPER << 6); } else { - p2 |= (TRACK_RIGHT << 4); + p2 |= (TRACK_RIGHT << 6); } if (diag_offset == 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); @@ -328,9 +328,9 @@ static uint32 SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) } } else if (::TileX(from) > ::TileX(tile)) { if (::TileY(*to) < ::TileY(tile)) { - p2 |= (TRACK_LEFT << 4); + p2 |= (TRACK_LEFT << 6); } else { - p2 |= (TRACK_LOWER << 4); + p2 |= (TRACK_LOWER << 6); } if (diag_offset == 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); @@ -355,7 +355,7 @@ static uint32 SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) (::TileX(from) == ::TileX(tile) && ::TileX(tile) == ::TileX(to)) || (::TileY(from) == ::TileY(tile) && ::TileY(tile) == ::TileY(to))); - uint32 p2 = SimulateDrag(from, tile, &to) | 1 << 8 | ScriptRail::GetCurrentRailType();; + uint32 p2 = SimulateDrag(from, tile, &to) | 1 << 10 | ScriptRail::GetCurrentRailType();; return ScriptObject::DoCommand(tile, to, p2, CMD_BUILD_RAILROAD_TRACK); } diff --git a/src/script/api/script_rail.hpp b/src/script/api/script_rail.hpp index 4cf4aa76da..7e2a59e7f7 100644 --- a/src/script/api/script_rail.hpp +++ b/src/script/api/script_rail.hpp @@ -1,4 +1,4 @@ -/* $Id: script_rail.hpp 25614 2013-07-15 18:19:26Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_railtypelist.cpp b/src/script/api/script_railtypelist.cpp index 4ad54b1906..016145b764 100644 --- a/src/script/api/script_railtypelist.cpp +++ b/src/script/api/script_railtypelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_railtypelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_railtypelist.hpp b/src/script/api/script_railtypelist.hpp index cdbad29fc1..478fd0d5e3 100644 --- a/src/script/api/script_railtypelist.hpp +++ b/src/script/api/script_railtypelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_railtypelist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_road.cpp b/src/script/api/script_road.cpp index a1bd367642..3dd1453b68 100644 --- a/src/script/api/script_road.cpp +++ b/src/script/api/script_road.cpp @@ -1,4 +1,4 @@ -/* $Id: script_road.cpp 27381 2015-08-10 20:24:13Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_road.hpp b/src/script/api/script_road.hpp index efece1b62f..ed4058f973 100644 --- a/src/script/api/script_road.hpp +++ b/src/script/api/script_road.hpp @@ -1,4 +1,4 @@ -/* $Id: script_road.hpp 26149 2013-12-08 15:44:09Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_sign.cpp b/src/script/api/script_sign.cpp index a6fceff404..236e1df7ef 100644 --- a/src/script/api/script_sign.cpp +++ b/src/script/api/script_sign.cpp @@ -1,4 +1,4 @@ -/* $Id: script_sign.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_sign.hpp b/src/script/api/script_sign.hpp index 8b689a8f3d..e5c2164da8 100644 --- a/src/script/api/script_sign.hpp +++ b/src/script/api/script_sign.hpp @@ -1,4 +1,4 @@ -/* $Id: script_sign.hpp 23636 2011-12-19 21:06:06Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_signlist.cpp b/src/script/api/script_signlist.cpp index f50c282af8..61ab9665aa 100644 --- a/src/script/api/script_signlist.cpp +++ b/src/script/api/script_signlist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_signlist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_signlist.hpp b/src/script/api/script_signlist.hpp index 1015a4bdaa..3b90a23ad6 100644 --- a/src/script/api/script_signlist.hpp +++ b/src/script/api/script_signlist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_signlist.hpp 23614 2011-12-19 20:57:23Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_station.cpp b/src/script/api/script_station.cpp index e460b9ed93..5ed43e0a67 100644 --- a/src/script/api/script_station.cpp +++ b/src/script/api/script_station.cpp @@ -1,4 +1,4 @@ -/* $Id: script_station.cpp 27020 2014-10-15 18:31:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_station.hpp b/src/script/api/script_station.hpp index 3764c49816..42ea412d08 100644 --- a/src/script/api/script_station.hpp +++ b/src/script/api/script_station.hpp @@ -1,4 +1,4 @@ -/* $Id: script_station.hpp 27123 2015-01-20 19:11:31Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -30,7 +30,7 @@ public: ERR_STATION_BASE = ScriptError::ERR_CAT_STATION << ScriptError::ERR_CAT_BIT_SIZE, /** The station is build too close to another station, airport or dock */ - ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, // [STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION, STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK] + ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, // [STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK] /** There are too many stations, airports and docks in the game */ ERR_STATION_TOO_MANY_STATIONS, // [STR_ERROR_TOO_MANY_STATIONS_LOADING, STR_ERROR_TOO_MANY_TRUCK_STOPS, STR_ERROR_TOO_MANY_BUS_STOPS] diff --git a/src/script/api/script_stationlist.cpp b/src/script/api/script_stationlist.cpp index d1fe28b9d1..51a06b5a74 100644 --- a/src/script/api/script_stationlist.cpp +++ b/src/script/api/script_stationlist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_stationlist.cpp 27020 2014-10-15 18:31:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -151,13 +151,13 @@ void CargoCollector::Update(StationID from, StationID via, uint amount) switch (Tselector) { case ScriptStationList_Cargo::CS_VIA_BY_FROM: if (via != this->other_station) return; - /* fall through */ + FALLTHROUGH; case ScriptStationList_Cargo::CS_BY_FROM: key = from; break; case ScriptStationList_Cargo::CS_FROM_BY_VIA: if (from != this->other_station) return; - /* fall through */ + FALLTHROUGH; case ScriptStationList_Cargo::CS_BY_VIA: key = via; break; diff --git a/src/script/api/script_stationlist.hpp b/src/script/api/script_stationlist.hpp index a8a25a7765..720a43639b 100644 --- a/src/script/api/script_stationlist.hpp +++ b/src/script/api/script_stationlist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_stationlist.hpp 27003 2014-10-12 18:41:53Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_story_page.cpp b/src/script/api/script_story_page.cpp index bc9526f7ce..11820ec3f6 100644 --- a/src/script/api/script_story_page.cpp +++ b/src/script/api/script_story_page.cpp @@ -1,4 +1,4 @@ -/* $Id: script_story_page.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_story_page.hpp b/src/script/api/script_story_page.hpp index 0c57a3cfb6..c22d4c198e 100644 --- a/src/script/api/script_story_page.hpp +++ b/src/script/api/script_story_page.hpp @@ -1,4 +1,4 @@ -/* $Id: script_story_page.hpp 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_storypageelementlist.cpp b/src/script/api/script_storypageelementlist.cpp index ffa0898cd9..3f1fa4ebbe 100644 --- a/src/script/api/script_storypageelementlist.cpp +++ b/src/script/api/script_storypageelementlist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_storypageelementlist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_storypageelementlist.hpp b/src/script/api/script_storypageelementlist.hpp index a883a6b41e..6aa2faf2d9 100644 --- a/src/script/api/script_storypageelementlist.hpp +++ b/src/script/api/script_storypageelementlist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_storypageelementlist.hpp 26305 2014-02-06 19:41:56Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_storypagelist.cpp b/src/script/api/script_storypagelist.cpp index d671fe94d6..fc32e80a37 100644 --- a/src/script/api/script_storypagelist.cpp +++ b/src/script/api/script_storypagelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_storypagelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_storypagelist.hpp b/src/script/api/script_storypagelist.hpp index 676df8767f..7aa3389f32 100644 --- a/src/script/api/script_storypagelist.hpp +++ b/src/script/api/script_storypagelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_storypagelist.hpp 26304 2014-02-06 19:36:19Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_subsidy.cpp b/src/script/api/script_subsidy.cpp index 7c5a6eef7b..640f7ab0a0 100644 --- a/src/script/api/script_subsidy.cpp +++ b/src/script/api/script_subsidy.cpp @@ -1,4 +1,4 @@ -/* $Id: script_subsidy.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_subsidy.hpp b/src/script/api/script_subsidy.hpp index 4fac91fa7b..16a6794409 100644 --- a/src/script/api/script_subsidy.hpp +++ b/src/script/api/script_subsidy.hpp @@ -1,4 +1,4 @@ -/* $Id: script_subsidy.hpp 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_subsidylist.cpp b/src/script/api/script_subsidylist.cpp index 81f808fc2b..fd7d947799 100644 --- a/src/script/api/script_subsidylist.cpp +++ b/src/script/api/script_subsidylist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_subsidylist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_subsidylist.hpp b/src/script/api/script_subsidylist.hpp index 654e24d4a4..7080ac6d88 100644 --- a/src/script/api/script_subsidylist.hpp +++ b/src/script/api/script_subsidylist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_subsidylist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_testmode.cpp b/src/script/api/script_testmode.cpp index 69a78da747..ed643c2d95 100644 --- a/src/script/api/script_testmode.cpp +++ b/src/script/api/script_testmode.cpp @@ -1,4 +1,4 @@ -/* $Id: script_testmode.cpp 27379 2015-08-10 20:04:31Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_testmode.hpp b/src/script/api/script_testmode.hpp index 6f06491866..699d4db18b 100644 --- a/src/script/api/script_testmode.hpp +++ b/src/script/api/script_testmode.hpp @@ -1,4 +1,4 @@ -/* $Id: script_testmode.hpp 27543 2016-04-17 17:10:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_text.cpp b/src/script/api/script_text.cpp index 41c488707d..e692be0ae2 100644 --- a/src/script/api/script_text.cpp +++ b/src/script/api/script_text.cpp @@ -1,4 +1,4 @@ -/* $Id: script_text.cpp 27102 2015-01-01 20:50:43Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_text.hpp b/src/script/api/script_text.hpp index 3917e7130b..ed14e391d0 100644 --- a/src/script/api/script_text.hpp +++ b/src/script/api/script_text.hpp @@ -1,4 +1,4 @@ -/* $Id: script_text.hpp 27544 2016-04-17 19:50:27Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_tile.cpp b/src/script/api/script_tile.cpp index eebf659d04..db9220acd6 100644 --- a/src/script/api/script_tile.cpp +++ b/src/script/api/script_tile.cpp @@ -1,4 +1,4 @@ -/* $Id: script_tile.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_tile.hpp b/src/script/api/script_tile.hpp index 44f4c26b8c..f4a2f0970e 100644 --- a/src/script/api/script_tile.hpp +++ b/src/script/api/script_tile.hpp @@ -1,4 +1,4 @@ -/* $Id: script_tile.hpp 25213 2013-04-30 17:16:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_tilelist.cpp b/src/script/api/script_tilelist.cpp index d8a47acc31..933a92c4cb 100644 --- a/src/script/api/script_tilelist.cpp +++ b/src/script/api/script_tilelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_tilelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_tilelist.hpp b/src/script/api/script_tilelist.hpp index fa6ea6dfa9..788432f783 100644 --- a/src/script/api/script_tilelist.hpp +++ b/src/script/api/script_tilelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_tilelist.hpp 27287 2015-05-16 14:40:45Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp index 195c8542b9..64f8e166ea 100644 --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -1,4 +1,4 @@ -/* $Id: script_town.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -159,24 +159,24 @@ /* static */ bool ScriptTown::SetGrowthRate(TownID town_id, uint32 days_between_town_growth) { EnforcePrecondition(false, IsValidTown(town_id)); - + uint16 growth_rate; switch (days_between_town_growth) { case TOWN_GROWTH_NORMAL: - days_between_town_growth = 0; + growth_rate = 0; break; case TOWN_GROWTH_NONE: - days_between_town_growth = TOWN_GROW_RATE_CUSTOM_NONE; + growth_rate = TOWN_GROWTH_RATE_NONE; break; default: - days_between_town_growth = days_between_town_growth * DAY_TICKS / TOWN_GROWTH_TICKS; - EnforcePrecondition(false, days_between_town_growth < TOWN_GROW_RATE_CUSTOM); - if (days_between_town_growth == 0) days_between_town_growth = 1; // as fast as possible + EnforcePrecondition(false, (days_between_town_growth * DAY_TICKS / TOWN_GROWTH_TICKS) <= MAX_TOWN_GROWTH_TICKS); + /* Don't use growth_rate 0 as it means GROWTH_NORMAL */ + growth_rate = max(days_between_town_growth * DAY_TICKS, 2u) - 1; break; } - return ScriptObject::DoCommand(::Town::Get(town_id)->xy, town_id, days_between_town_growth, CMD_TOWN_GROWTH_RATE); + return ScriptObject::DoCommand(::Town::Get(town_id)->xy, town_id, growth_rate, CMD_TOWN_GROWTH_RATE); } /* static */ int32 ScriptTown::GetGrowthRate(TownID town_id) @@ -185,9 +185,9 @@ const Town *t = ::Town::Get(town_id); - if (t->growth_rate == TOWN_GROW_RATE_CUSTOM_NONE) return TOWN_GROWTH_NONE; + if (t->growth_rate == TOWN_GROWTH_RATE_NONE) return TOWN_GROWTH_NONE; - return ((t->growth_rate & ~TOWN_GROW_RATE_CUSTOM) * TOWN_GROWTH_TICKS + DAY_TICKS) / DAY_TICKS; + return RoundDivSU(t->growth_rate + 1, DAY_TICKS); } /* static */ int32 ScriptTown::GetDistanceManhattanToTile(TownID town_id, TileIndex tile) diff --git a/src/script/api/script_town.hpp b/src/script/api/script_town.hpp index c4c849dd5e..7fdf8a6b39 100644 --- a/src/script/api/script_town.hpp +++ b/src/script/api/script_town.hpp @@ -1,4 +1,4 @@ -/* $Id: script_town.hpp 26915 2014-09-24 16:45:20Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -259,7 +259,7 @@ public: * @param town_id The index of the town. * @param days_between_town_growth The amount of days between town growth, TOWN_GROWTH_NONE or TOWN_GROWTH_NORMAL. * @pre IsValidTown(town_id). - * @pre days_between_town_growth <= 30000 || days_between_town_growth == TOWN_GROWTH_NONE || days_between_town_growth == TOWN_GROWTH_NORMAL. + * @pre days_between_town_growth <= 880 || days_between_town_growth == TOWN_GROWTH_NONE || days_between_town_growth == TOWN_GROWTH_NORMAL. * @return True if the action succeeded. * @note Even when setting a growth rate, towns only grow when the conditions for growth (SetCargoCoal) are met, * and the game settings (economy.town_growth_rate) allow town growth at all. diff --git a/src/script/api/script_townlist.cpp b/src/script/api/script_townlist.cpp index 577639ada8..a2e12febe1 100644 --- a/src/script/api/script_townlist.cpp +++ b/src/script/api/script_townlist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_townlist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_townlist.hpp b/src/script/api/script_townlist.hpp index 0135747835..7baa09da1f 100644 --- a/src/script/api/script_townlist.hpp +++ b/src/script/api/script_townlist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_townlist.hpp 23614 2011-12-19 20:57:23Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_tunnel.cpp b/src/script/api/script_tunnel.cpp index f2a064c562..7b891f28d0 100644 --- a/src/script/api/script_tunnel.cpp +++ b/src/script/api/script_tunnel.cpp @@ -1,4 +1,4 @@ -/* $Id: script_tunnel.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_tunnel.hpp b/src/script/api/script_tunnel.hpp index a4d7369c90..74fdaabc55 100644 --- a/src/script/api/script_tunnel.hpp +++ b/src/script/api/script_tunnel.hpp @@ -1,4 +1,4 @@ -/* $Id: script_tunnel.hpp 26149 2013-12-08 15:44:09Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_types.hpp b/src/script/api/script_types.hpp index ef7e83cff6..bd9b7c5607 100644 --- a/src/script/api/script_types.hpp +++ b/src/script/api/script_types.hpp @@ -1,4 +1,4 @@ -/* $Id: script_types.hpp 27757 2017-02-26 19:41:14Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index 5aa5c2556d..ca841f7557 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -1,4 +1,4 @@ -/* $Id: script_vehicle.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp index 11e8b572ab..f6b22c204d 100644 --- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -1,4 +1,4 @@ -/* $Id: script_vehicle.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_vehiclelist.cpp b/src/script/api/script_vehiclelist.cpp index 97af0357a8..625f0f8c4f 100644 --- a/src/script/api/script_vehiclelist.cpp +++ b/src/script/api/script_vehiclelist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_vehiclelist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_vehiclelist.hpp b/src/script/api/script_vehiclelist.hpp index c38c138636..7df3a2bb01 100644 --- a/src/script/api/script_vehiclelist.hpp +++ b/src/script/api/script_vehiclelist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_vehiclelist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_viewport.cpp b/src/script/api/script_viewport.cpp index a04a4210e4..bed3ba9923 100644 --- a/src/script/api/script_viewport.cpp +++ b/src/script/api/script_viewport.cpp @@ -1,4 +1,4 @@ -/* $Id: script_viewport.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -10,9 +10,11 @@ /** @file script_viewport.cpp Implementation of ScriptViewport. */ #include "../../stdafx.h" +#include "script_error.hpp" #include "script_viewport.hpp" #include "script_game.hpp" #include "script_map.hpp" +#include "../script_instance.hpp" #include "../../viewport_func.h" #include "../../safeguards.h" @@ -24,3 +26,34 @@ ScrollMainWindowToTile(tile); } + +/* static */ bool ScriptViewport::ScrollEveryoneTo(TileIndex tile) +{ + EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY); + EnforcePrecondition(false, ScriptMap::IsValidTile(tile)); + + return ScriptObject::DoCommand(tile, VST_EVERYONE, 0, CMD_SCROLL_VIEWPORT); +} + +/* static */ bool ScriptViewport::ScrollCompanyClientsTo(ScriptCompany::CompanyID company, TileIndex tile) +{ + EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY); + EnforcePrecondition(false, ScriptMap::IsValidTile(tile)); + + company = ScriptCompany::ResolveCompanyID(company); + EnforcePrecondition(false, company != ScriptCompany::COMPANY_INVALID); + + return ScriptObject::DoCommand(tile, VST_COMPANY, company, CMD_SCROLL_VIEWPORT); +} + +/* static */ bool ScriptViewport::ScrollClientTo(ScriptClient::ClientID client, TileIndex tile) +{ + EnforcePrecondition(false, ScriptGame::IsMultiplayer()); + EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY); + EnforcePrecondition(false, ScriptMap::IsValidTile(tile)); + + client = ScriptClient::ResolveClientID(client); + EnforcePrecondition(false, client != ScriptClient::CLIENT_INVALID); + + return ScriptObject::DoCommand(tile, VST_CLIENT, client, CMD_SCROLL_VIEWPORT); +} diff --git a/src/script/api/script_viewport.hpp b/src/script/api/script_viewport.hpp index 37f9de82e6..cae1a59300 100644 --- a/src/script/api/script_viewport.hpp +++ b/src/script/api/script_viewport.hpp @@ -1,4 +1,4 @@ -/* $Id: script_viewport.hpp 25594 2013-07-13 06:38:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -13,6 +13,8 @@ #define SCRIPT_VIEWPORT_HPP #include "script_object.hpp" +#include "script_client.hpp" +#include "script_company.hpp" /** * Class that manipulates the user's viewport. @@ -28,6 +30,38 @@ public: * @pre ScriptMap::IsValidTile(tile). */ static void ScrollTo(TileIndex tile); + + /** + * Scroll the viewport of all players to the given tile, + * where the tile will be in the center of the screen. + * @param tile The tile to put in the center of the screen. + * @pre ScriptObject::GetCompany() == OWNER_DEITY + * @pre ScriptMap::IsValidTile(tile) + */ + static bool ScrollEveryoneTo(TileIndex tile); + + /** + * Scroll the viewports of all players in the company to the given tile, + * where the tile will be in the center of the screen. + * @param company The company which players to scroll the viewport of. + * @param tile The tile to put in the center of the screen. + * @pre ScriptObject::GetCompany() == OWNER_DEITY + * @pre ScriptMap::IsValidTile(tile) + * @pre ResolveCompanyID(company) != COMPANY_INVALID + */ + static bool ScrollCompanyClientsTo(ScriptCompany::CompanyID company, TileIndex tile); + + /** + * Scroll the viewport of the client to the given tile, + * where the tile will be in the center of the screen. + * @param client The client to scroll the viewport of. + * @param tile The tile to put in the center of the screen. + * @pre ScriptGame::IsMultiplayer() + * @pre ScriptObject::GetCompany() == OWNER_DEITY + * @pre ScriptMap::IsValidTile(tile) + * @pre ResolveClientID(client) != CLIENT_INVALID + */ + static bool ScrollClientTo(ScriptClient::ClientID client, TileIndex tile); }; #endif /* SCRIPT_ADMIN_HPP */ diff --git a/src/script/api/script_waypoint.cpp b/src/script/api/script_waypoint.cpp index f871859cff..91733a38e8 100644 --- a/src/script/api/script_waypoint.cpp +++ b/src/script/api/script_waypoint.cpp @@ -1,4 +1,4 @@ -/* $Id: script_waypoint.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_waypoint.hpp b/src/script/api/script_waypoint.hpp index 455b8bcc9f..7a8b4c97b3 100644 --- a/src/script/api/script_waypoint.hpp +++ b/src/script/api/script_waypoint.hpp @@ -1,4 +1,4 @@ -/* $Id: script_waypoint.hpp 23770 2012-01-07 18:37:22Z smatz $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_waypointlist.cpp b/src/script/api/script_waypointlist.cpp index 6b568c4c50..dd641a6848 100644 --- a/src/script/api/script_waypointlist.cpp +++ b/src/script/api/script_waypointlist.cpp @@ -1,4 +1,4 @@ -/* $Id: script_waypointlist.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_waypointlist.hpp b/src/script/api/script_waypointlist.hpp index f996b44d8f..fde15c9537 100644 --- a/src/script/api/script_waypointlist.hpp +++ b/src/script/api/script_waypointlist.hpp @@ -1,4 +1,4 @@ -/* $Id: script_waypointlist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_window.cpp b/src/script/api/script_window.cpp index 383b84eda2..1252f0fc7e 100644 --- a/src/script/api/script_window.cpp +++ b/src/script/api/script_window.cpp @@ -1,4 +1,4 @@ -/* $Id: script_window.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp index 4ae105a5ad..f5ab5f4916 100644 --- a/src/script/api/script_window.hpp +++ b/src/script/api/script_window.hpp @@ -1,4 +1,4 @@ -/* $Id: script_window.hpp 27732 2017-01-14 18:30:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,6 +32,7 @@ #include "../../widgets/engine_widget.h" #include "../../widgets/error_widget.h" #include "../../widgets/fios_widget.h" +#include "../../widgets/framerate_widget.h" #include "../../widgets/genworld_widget.h" #include "../../widgets/goal_widget.h" #include "../../widgets/graph_widget.h" @@ -764,6 +765,18 @@ public: */ WC_SAVE_PRESET = ::WC_SAVE_PRESET, + /** + * Framerate display; %Window numbers: + * - 0 = #FramerateDisplayWidgets + */ + WC_FRAMERATE_DISPLAY = ::WC_FRAMERATE_DISPLAY, + + /** + * Frame time graph; %Window numbers: + * - 0 = #FrametimeGraphWindowWidgets + */ + WC_FRAMETIME_GRAPH = ::WC_FRAMETIME_GRAPH, + WC_INVALID = ::WC_INVALID, ///< Invalid window. }; @@ -988,7 +1001,7 @@ public: }; /* automatically generated from ../../widgets/cheat_widget.h */ - /** Widgets of the #CheatWindow class.. */ + /** Widgets of the #CheatWindow class. */ enum CheatWidgets { WID_C_PANEL = ::WID_C_PANEL, ///< Panel where all cheats are shown in. }; @@ -1067,10 +1080,15 @@ public: WID_SCL_CLASS_ROAD = ::WID_SCL_CLASS_ROAD, ///< Class road. WID_SCL_CLASS_SHIP = ::WID_SCL_CLASS_SHIP, ///< Class ship. WID_SCL_CLASS_AIRCRAFT = ::WID_SCL_CLASS_AIRCRAFT, ///< Class aircraft. + WID_SCL_GROUPS_RAIL = ::WID_SCL_GROUPS_RAIL, ///< Rail groups. + WID_SCL_GROUPS_ROAD = ::WID_SCL_GROUPS_ROAD, ///< Road groups. + WID_SCL_GROUPS_SHIP = ::WID_SCL_GROUPS_SHIP, ///< Ship groups. + WID_SCL_GROUPS_AIRCRAFT = ::WID_SCL_GROUPS_AIRCRAFT, ///< Aircraft groups. WID_SCL_SPACER_DROPDOWN = ::WID_SCL_SPACER_DROPDOWN, ///< Spacer for dropdown. WID_SCL_PRI_COL_DROPDOWN = ::WID_SCL_PRI_COL_DROPDOWN, ///< Dropdown for primary colour. WID_SCL_SEC_COL_DROPDOWN = ::WID_SCL_SEC_COL_DROPDOWN, ///< Dropdown for secondary colour. WID_SCL_MATRIX = ::WID_SCL_MATRIX, ///< Matrix. + WID_SCL_MATRIX_SCROLLBAR = ::WID_SCL_MATRIX_SCROLLBAR, ///< Matrix scrollbar. }; /** @@ -1259,6 +1277,7 @@ public: WID_SL_CAPTION = ::WID_SL_CAPTION, ///< Caption of the window. WID_SL_SORT_BYNAME = ::WID_SL_SORT_BYNAME, ///< Sort by name button. WID_SL_SORT_BYDATE = ::WID_SL_SORT_BYDATE, ///< Sort by date button. + WID_SL_FILTER = ::WID_SL_FILTER, ///< Filter list of files WID_SL_BACKGROUND = ::WID_SL_BACKGROUND, ///< Background of window. WID_SL_FILE_BACKGROUND = ::WID_SL_FILE_BACKGROUND, ///< Background of file selection. WID_SL_HOME_BUTTON = ::WID_SL_HOME_BUTTON, ///< Home button. @@ -1275,6 +1294,25 @@ public: WID_SL_MISSING_NEWGRFS = ::WID_SL_MISSING_NEWGRFS, ///< Button to find missing NewGRFs online. }; + /* automatically generated from ../../widgets/framerate_widget.h */ + /** Widgets of the #FramerateWindow class. */ + enum FramerateWindowWidgets { + WID_FRW_CAPTION = ::WID_FRW_CAPTION, + WID_FRW_RATE_GAMELOOP = ::WID_FRW_RATE_GAMELOOP, + WID_FRW_RATE_DRAWING = ::WID_FRW_RATE_DRAWING, + WID_FRW_RATE_FACTOR = ::WID_FRW_RATE_FACTOR, + WID_FRW_INFO_DATA_POINTS = ::WID_FRW_INFO_DATA_POINTS, + WID_FRW_TIMES_NAMES = ::WID_FRW_TIMES_NAMES, + WID_FRW_TIMES_CURRENT = ::WID_FRW_TIMES_CURRENT, + WID_FRW_TIMES_AVERAGE = ::WID_FRW_TIMES_AVERAGE, + }; + + /** Widgets of the #FrametimeGraphWindow class. */ + enum FrametimeGraphWindowWidgets { + WID_FGW_CAPTION = ::WID_FGW_CAPTION, + WID_FGW_GRAPH = ::WID_FGW_GRAPH, + }; + /* automatically generated from ../../widgets/genworld_widget.h */ /** Widgets of the #GenerateLandscapeWindow class. */ enum GenerateLandscapeWidgets { @@ -1438,7 +1476,9 @@ public: WID_GL_CREATE_GROUP = ::WID_GL_CREATE_GROUP, ///< Create group button. WID_GL_DELETE_GROUP = ::WID_GL_DELETE_GROUP, ///< Delete group button. WID_GL_RENAME_GROUP = ::WID_GL_RENAME_GROUP, ///< Rename group button. + WID_GL_LIVERY_GROUP = ::WID_GL_LIVERY_GROUP, ///< Group livery button. WID_GL_REPLACE_PROTECTION = ::WID_GL_REPLACE_PROTECTION, ///< Replace protection button. + WID_GL_INFO = ::WID_GL_INFO, ///< Group info. }; /* automatically generated from ../../widgets/highscore_widget.h */ @@ -1581,9 +1621,11 @@ public: /* automatically generated from ../../widgets/music_widget.h */ /** Widgets of the #MusicTrackSelectionWindow class. */ enum MusicTrackSelectionWidgets { + WID_MTS_CAPTION = ::WID_MTS_CAPTION, ///< Window caption. WID_MTS_LIST_LEFT = ::WID_MTS_LIST_LEFT, ///< Left button. WID_MTS_PLAYLIST = ::WID_MTS_PLAYLIST, ///< Playlist. WID_MTS_LIST_RIGHT = ::WID_MTS_LIST_RIGHT, ///< Right button. + WID_MTS_MUSICSET = ::WID_MTS_MUSICSET, ///< Music set selection. WID_MTS_ALL = ::WID_MTS_ALL, ///< All button. WID_MTS_OLD = ::WID_MTS_OLD, ///< Old button. WID_MTS_NEW = ::WID_MTS_NEW, ///< New button. @@ -2382,7 +2424,7 @@ public: WID_TN_TRAINS = ::WID_TN_TRAINS, ///< Train menu. WID_TN_ROADVEHS = ::WID_TN_ROADVEHS, ///< Road vehicle menu. WID_TN_SHIPS = ::WID_TN_SHIPS, ///< Ship menu. - WID_TN_AIRCRAFTS = ::WID_TN_AIRCRAFTS, ///< Aircraft menu. + WID_TN_AIRCRAFT = ::WID_TN_AIRCRAFT, ///< Aircraft menu. WID_TN_ZOOM_IN = ::WID_TN_ZOOM_IN, ///< Zoom in the main viewport. WID_TN_ZOOM_OUT = ::WID_TN_ZOOM_OUT, ///< Zoom out the main viewport. WID_TN_BUILDING_TOOLS_START = ::WID_TN_BUILDING_TOOLS_START, ///< Helper for the offset of the building tools diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk index c2c7108fd8..ef0a74c8db 100644 --- a/src/script/api/squirrel_export.awk +++ b/src/script/api/squirrel_export.awk @@ -1,4 +1,4 @@ -# $Id: squirrel_export.awk 27545 2016-04-17 19:51:42Z frosch $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -29,46 +29,46 @@ function dump_class_templates(name) realname = name gsub("^Script", "", realname) - print " template <> inline " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" - print " template <> inline " name " &GetParam(ForceType<" name " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" - print " template <> inline const " name " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" - print " template <> inline const " name " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" + print " template <> inline " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" CR + print " template <> inline " name " &GetParam(ForceType<" name " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" CR + print " template <> inline const " name " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" CR + print " template <> inline const " name " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" CR if (name == "ScriptEvent") { - print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" + print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" CR } else if (name == "ScriptText") { - print "" - print " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" - print " if (sq_gettype(vm, index) == OT_INSTANCE) {" - print " return GetParam(ForceType(), vm, index, ptr);" - print " }" - print " if (sq_gettype(vm, index) == OT_STRING) {" - print " return new RawText(GetParam(ForceType(), vm, index, ptr));" - print " }" - print " return NULL;" - print " }" + print "" CR + print " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" CR + print " if (sq_gettype(vm, index) == OT_INSTANCE) {" CR + print " return GetParam(ForceType(), vm, index, ptr);" CR + print " }" CR + print " if (sq_gettype(vm, index) == OT_STRING) {" CR + print " return new RawText(GetParam(ForceType(), vm, index, ptr));" CR + print " }" CR + print " return NULL;" CR + print " }" CR } else { - print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" + print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" CR } } function dump_fileheader() { # Break the Id tag, so SVN doesn't replace it - print "/* $I" "d$ */" - print "" - print "/*" - print " * This file is part of OpenTTD." - print " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." - print " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - print " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see ." - print " */" - print "" - print "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" - print "" - print "#include \"../" filename "\"" + print "/* $I" "d$ */" CR + print "" CR + print "/*" CR + print " * This file is part of OpenTTD." CR + print " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." CR + print " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." CR + print " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see ." CR + print " */" CR + print "" CR + print "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" CR + print "" CR + print "#include \"../" filename "\"" CR if (api != "Template") { gsub("script_", "template_", filename) - print "#include \"../template/" filename ".sq\"" + print "#include \"../template/" filename ".sq\"" CR } } @@ -103,11 +103,12 @@ BEGIN { start_squirrel_define_on_next_line = "false" has_fileheader = "false" cls_level = 0 - RS = "\r|\n" apis = tolower(api) if (apis == "gs") apis = "game" } +{ CR = (match($0, "\\r$") > 0 ? "\r" : "") } + /@file/ { filename = $3 gsub("^" apis "_", "script_", filename) @@ -136,13 +137,13 @@ BEGIN { if (api == "Template") { api_selected = "true" - if ($0 == "none" || $0 == "-all") api_selected = "false" + if ($0 == "none" CR || $0 == "-all" CR) api_selected = "false" next } - if ($0 == "none") { + if ($0 == "none" CR) { api_selected = "false" - } else if ($0 == "-all") { + } else if ($0 == "-all" CR) { api_selected = "false" } else if (match($0, "-" apis)) { api_selected = "false" @@ -259,7 +260,7 @@ BEGIN { } # Empty/white lines. When we may do the Squirrel export, do that export. -/^([ ]*)$/ { +/^([ ]*)\r*$/ { if (start_squirrel_define_on_next_line == "false") next if (cls_in_api != "true") { @@ -280,19 +281,19 @@ BEGIN { api_super_cls = super_cls gsub("^Script", api, api_super_cls) - print "" + print "" CR if (api == "Template") { # First check whether we have enums to print if (enum_size != 0) { if (namespace_opened == "false") { - print "namespace SQConvert {" + print "namespace SQConvert {" CR namespace_opened = "true" } - print " /* Allow enums to be used as Squirrel parameters */" + print " /* Allow enums to be used as Squirrel parameters */" CR for (i = 1; i <= enum_size; i++) { - print " template <> inline " enums[i] " GetParam(ForceType<" enums[i] ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" enums[i] ")tmp; }" - print " template <> inline int Return<" enums[i] ">(HSQUIRRELVM vm, " enums[i] " res) { sq_pushinteger(vm, (int32)res); return 1; }" + print " template <> inline " enums[i] " GetParam(ForceType<" enums[i] ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" enums[i] ")tmp; }" CR + print " template <> inline int Return<" enums[i] ">(HSQUIRRELVM vm, " enums[i] " res) { sq_pushinteger(vm, (int32)res); return 1; }" CR delete enums[i] } } @@ -300,10 +301,10 @@ BEGIN { # Then check whether we have structs/classes to print if (struct_size != 0) { if (namespace_opened == "false") { - print "namespace SQConvert {" + print "namespace SQConvert {" CR namespace_opened = "true" } - print " /* Allow inner classes/structs to be used as Squirrel parameters */" + print " /* Allow inner classes/structs to be used as Squirrel parameters */" CR for (i = 1; i <= struct_size; i++) { dump_class_templates(structs[i]) delete structs[i] @@ -311,41 +312,41 @@ BEGIN { } if (namespace_opened == "false") { - print "namespace SQConvert {" + print "namespace SQConvert {" CR namespace_opened = "true" } else { - print "" + print "" CR } - print " /* Allow " cls " to be used as Squirrel parameter */" + print " /* Allow " cls " to be used as Squirrel parameter */" CR dump_class_templates(cls) - print "} // namespace SQConvert" + print "} // namespace SQConvert" CR reset_reader() next } - print ""; - print "template <> const char *GetClassName<" cls ", ST_" toupper(api) ">() { return \"" api_cls "\"; }" - print ""; + print "" CR + print "template <> const char *GetClassName<" cls ", ST_" toupper(api) ">() { return \"" api_cls "\"; }" CR + print "" CR # Then do the registration functions of the class. */ - print "void SQ" api_cls "_Register(Squirrel *engine)" - print "{" - print " DefSQClass<" cls ", ST_" toupper(api) "> SQ" api_cls "(\"" api_cls "\");" + print "void SQ" api_cls "_Register(Squirrel *engine)" CR + print "{" CR + print " DefSQClass<" cls ", ST_" toupper(api) "> SQ" api_cls "(\"" api_cls "\");" CR if (super_cls == "Text" || super_cls == "ScriptObject" || super_cls == "AIAbstractList::Valuator") { - print " SQ" api_cls ".PreRegister(engine);" + print " SQ" api_cls ".PreRegister(engine);" CR } else { - print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");" + print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");" CR } if (super_cls != "ScriptEvent") { if (cls_param[2] == "v") { - print " SQ" api_cls ".AddSQAdvancedConstructor(engine);" + print " SQ" api_cls ".AddSQAdvancedConstructor(engine);" CR } else { - print " SQ" api_cls ".AddConstructor(engine, \"" cls_param[2] "\");" + print " SQ" api_cls ".AddConstructor(engine, \"" cls_param[2] "\");" CR } } - print "" + print "" CR # Enum values mlen = 0 @@ -353,10 +354,10 @@ BEGIN { if (mlen <= length(enum_value[i])) mlen = length(enum_value[i]) } for (i = 1; i <= enum_value_size; i++) { - print " SQ" api_cls ".DefSQConst(engine, " cls "::" enum_value[i] ", " substr(spaces, 1, mlen - length(enum_value[i])) "\"" enum_value[i] "\");" + print " SQ" api_cls ".DefSQConst(engine, " cls "::" enum_value[i] ", " substr(spaces, 1, mlen - length(enum_value[i])) "\"" enum_value[i] "\");" CR delete enum_value[i] } - if (enum_value_size != 0) print "" + if (enum_value_size != 0) print "" CR # Const values mlen = 0 @@ -364,10 +365,10 @@ BEGIN { if (mlen <= length(const_value[i])) mlen = length(const_value[i]) } for (i = 1; i <= const_size; i++) { - print " SQ" api_cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");" + print " SQ" api_cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");" CR delete const_value[i] } - if (const_size != 0) print "" + if (const_size != 0) print "" CR # Mapping of OTTD strings to errors mlen = 0 @@ -375,11 +376,11 @@ BEGIN { if (mlen <= length(enum_string_to_error_mapping_string[i])) mlen = length(enum_string_to_error_mapping_string[i]) } for (i = 1; i <= enum_string_to_error_size; i++) { - print " ScriptError::RegisterErrorMap(" enum_string_to_error_mapping_string[i] ", " substr(spaces, 1, mlen - length(enum_string_to_error_mapping_string[i])) cls "::" enum_string_to_error_mapping_error[i] ");" + print " ScriptError::RegisterErrorMap(" enum_string_to_error_mapping_string[i] ", " substr(spaces, 1, mlen - length(enum_string_to_error_mapping_string[i])) cls "::" enum_string_to_error_mapping_error[i] ");" CR delete enum_string_to_error_mapping_string[i] } - if (enum_string_to_error_size != 0) print "" + if (enum_string_to_error_size != 0) print "" CR # Mapping of errors to human 'readable' strings. mlen = 0 @@ -387,10 +388,10 @@ BEGIN { if (mlen <= length(enum_error_to_string_mapping[i])) mlen = length(enum_error_to_string_mapping[i]) } for (i = 1; i <= enum_error_to_string_size; i++) { - print " ScriptError::RegisterErrorMapString(" cls "::" enum_error_to_string_mapping[i] ", " substr(spaces, 1, mlen - length(enum_error_to_string_mapping[i])) "\"" enum_error_to_string_mapping[i] "\");" + print " ScriptError::RegisterErrorMapString(" cls "::" enum_error_to_string_mapping[i] ", " substr(spaces, 1, mlen - length(enum_error_to_string_mapping[i])) "\"" enum_error_to_string_mapping[i] "\");" CR delete enum_error_to_string_mapping[i] } - if (enum_error_to_string_size != 0) print "" + if (enum_error_to_string_size != 0) print "" CR # Static methods mlen = 0 @@ -399,13 +400,13 @@ BEGIN { } for (i = 1; i <= static_method_size; i++) { if (static_methods[i, 2] == "v") { - print " SQ" api_cls ".DefSQAdvancedStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0]) - 8) "\"" static_methods[i, 0] "\");" + print " SQ" api_cls ".DefSQAdvancedStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0]) - 8) "\"" static_methods[i, 0] "\");" CR } else { - print " SQ" api_cls ".DefSQStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "\"" static_methods[i, 0] "\", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "" static_methods[i, 1] ", \"" static_methods[i, 2] "\");" + print " SQ" api_cls ".DefSQStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "\"" static_methods[i, 0] "\", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "" static_methods[i, 1] ", \"" static_methods[i, 2] "\");" CR } delete static_methods[i] } - if (static_method_size != 0) print "" + if (static_method_size != 0) print "" CR # Non-static methods mlen = 0 @@ -414,16 +415,16 @@ BEGIN { } for (i = 1; i <= method_size; i++) { if (methods[i, 2] == "v") { - print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");" + print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");" CR } else { - print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");" + print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");" CR } delete methods[i] } - if (method_size != 0) print "" + if (method_size != 0) print "" CR - print " SQ" api_cls ".PostRegister(engine);" - print "}" + print " SQ" api_cls ".PostRegister(engine);" CR + print "}" CR reset_reader() @@ -438,6 +439,7 @@ BEGIN { if (in_enum == "true") { enum_value_size++ sub(",", "", $1) + sub("\r", "", $1) enum_value[enum_value_size] = $1 # Check if this a special error enum @@ -475,7 +477,7 @@ BEGIN { } # Add a method to the list -/^.*\(.*\).*$/ { +/^.*\(.*\).*\r*$/ { if (cls_level != 1) next if (match($0, "~")) { if (api_selected != "") { diff --git a/src/script/api/squirrel_export.sh b/src/script/api/squirrel_export.sh index acfe99d804..e1f5e8613c 100755 --- a/src/script/api/squirrel_export.sh +++ b/src/script/api/squirrel_export.sh @@ -1,6 +1,6 @@ #!/bin/bash -# $Id: squirrel_export.sh 23652 2011-12-21 15:06:00Z truebrain $ +# $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -26,7 +26,7 @@ apilc=`pwd | sed "s@/api@@;s@.*/@@"` # Check if we are in the root directory of the API, as then we generate all APIs if [ "$apilc" = "script" ]; then - for api in `find -type d | cut -b3- | grep -v '\.svn\|/'`; do + for api in `find . -type d | cut -b3-`; do if [ -z "$api" ]; then continue; fi echo "Generating for API '$api' ..." cd $api @@ -43,57 +43,34 @@ case $apilc in *) echo "Unknown API type."; exit 1 ;; esac -if [ -z "$1" ]; then - for f in `ls ../*.hpp`; do - bf=`basename ${f} | sed s@script_@${apilc}_@` +for f in `ls ../*.hpp`; do + bf=`basename ${f} | sed s@script_@${apilc}_@` - # ScriptController has custom code, and should not be generated - if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi - if [ "`basename ${f}`" = "script_object.hpp" ]; then continue; fi + # ScriptController has custom code, and should not be generated + if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi - ${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp + ${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp - if [ "`wc -l ${bf}.tmp | cut -d\ -f1`" = "0" ]; then - if [ -f "${bf}.sq" ]; then - echo "Deleted: ${bf}.sq" - svn del --force ${bf}.sq > /dev/null 2>&1 - fi - rm -f ${bf}.tmp - elif ! [ -f "${bf}.sq" ] || [ -n "`diff -I '$Id' ${bf}.tmp ${bf}.sq 2> /dev/null || echo boo`" ]; then - mv ${bf}.tmp ${bf}.sq - echo "Updated: ${bf}.sq" - svn add ${bf}.sq > /dev/null 2>&1 - svn propset svn:eol-style native ${bf}.sq > /dev/null 2>&1 - svn propset svn:keywords Id ${bf}.sq > /dev/null 2>&1 - else - rm -f ${bf}.tmp + if [ "`wc -l ${bf}.tmp | cut -d\ -f1`" = "0" ]; then + if [ -f "${bf}.sq" ]; then + echo "Deleted: ${bf}.sq" + rm -f ${bf}.sq fi - done -else - ${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk $1 > $1.tmp - if [ `wc -l $1.tmp | cut -d\ -f1` -eq "0" ]; then - if [ -f "$1.sq" ]; then - echo "Deleted: $1.sq" - svn del --force $1.sq > /dev/null 2>&1 - fi - rm -f $1.tmp - elif ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then - mv $1.tmp $1.sq - echo "Updated: $1.sq" - svn add $1.sq > /dev/null 2>&1 - svn propset svn:eol-style native $1.sq > /dev/null 2>&1 - svn propset svn:keywords Id $1.sq > /dev/null 2>&1 + rm -f ${bf}.tmp + elif ! [ -f "${bf}.sq" ] || [ -n "`diff -I '$Id' ${bf}.tmp ${bf}.sq 2> /dev/null || echo boo`" ]; then + mv ${bf}.tmp ${bf}.sq + echo "Updated: ${bf}.sq" else - rm -f $1.tmp + rm -f ${bf}.tmp fi -fi +done # Remove .hpp.sq if .hpp doesn't exist anymore for f in `ls *.hpp.sq`; do f=`echo ${f} | sed "s/.hpp.sq$/.hpp/;s@${apilc}_@script_@"` if [ ! -f ../${f} ];then echo "Deleted: ${f}.sq" - svn del --force ${f}.sq > /dev/null 2>&1 + rm -f ${f}.sq fi done diff --git a/src/script/api/squirrel_export.vbs b/src/script/api/squirrel_export.vbs new file mode 100644 index 0000000000..a13869509a --- /dev/null +++ b/src/script/api/squirrel_export.vbs @@ -0,0 +1,946 @@ +Option Explicit + +' $Id$ +' +' This file is part of OpenTTD. +' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + +Dim FSO +Dim enum_size, enums, enum_value_size, enum_value +Dim enum_string_to_error_size, enum_string_to_error_mapping_string, enum_string_to_error_mapping_error +Dim enum_error_to_string_size, enum_error_to_string_mapping, const_size, const_value +Dim struct_size, structs, method_size, methods, static_method_size, static_methods +Dim super_cls, cls, api_selected, cls_in_api, start_squirrel_define_on_next_line, has_fileheader, cls_level +Dim apis, filename, doxygen_skip, squirrel_stuff, is_public, cls_param(2), comment, in_enum + +Set FSO = CreateObject("Scripting.FileSystemObject") + +Function CompareFiles(filename1, filename2) + Dim file, lines1, lines2 + + If Not FSO.FileExists(filename1) Then + CompareFiles = False + Exit Function + End If + Set file = FSO.OpenTextFile(filename1, 1) + If Not file.AtEndOfStream Then + lines1 = file.ReadAll + End IF + file.Close + + If Not FSO.FileExists(filename2) Then + CompareFiles = False + Exit Function + End If + Set file = FSO.OpenTextFile(filename2, 1) + If Not file.AtEndOfStream Then + lines2 = file.ReadAll + End IF + file.Close + + CompareFiles = (lines1 = lines2) +End Function + +Function IsEmptyFile(filename) + Dim file + Set file = FSO.OpenTextFile(filename, 1) + IsEmptyFile = file.AtEndOfStream + file.Close +End Function + +Function DumpClassTemplates(name, file) + Dim re, realname + Set re = New RegExp + + re.Pattern = "^Script" + realname = re.Replace(name, "") + + file.WriteLine " template <> inline " & name & " *GetParam(ForceType<" & name & " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" & name & " *)instance; }" + file.WriteLine " template <> inline " & name & " &GetParam(ForceType<" & name & " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" & name & " *)instance; }" + file.WriteLine " template <> inline const " & name & " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" & name & " *)instance; }" + file.WriteLine " template <> inline const " & name & " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" & name & " *)instance; }" + If name = "ScriptEvent" Then + file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, NULL, DefSQDestructorCallback<" & name & ">, true); return 1; }" + ElseIf name = "ScriptText" Then + file.WriteLine "" + file.WriteLine " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" + file.WriteLine " if (sq_gettype(vm, index) == OT_INSTANCE) {" + file.WriteLine " return GetParam(ForceType(), vm, index, ptr);" + file.WriteLine " }" + file.WriteLine " if (sq_gettype(vm, index) == OT_STRING) {" + file.WriteLine " return new RawText(GetParam(ForceType(), vm, index, ptr));" + file.WriteLine " }" + file.WriteLine " return NULL;" + file.WriteLine " }" + Else + file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, NULL, DefSQDestructorCallback<" & name & ">, true); return 1; }" + End If +End Function + +Function DumpFileheader(api, file) + Dim re + Set re = New RegExp + ' Break the Id tag, so SVN doesn't replace it + file.WriteLine "/* $I" & "d$ */" + file.WriteLine "" + file.WriteLine "/*" + file.WriteLine " * This file is part of OpenTTD." + file.WriteLine " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." + file.WriteLine " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + file.WriteLine " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see ." + file.WriteLine " */" + file.WriteLine "" + file.WriteLine "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" + file.WriteLine "" + file.WriteLine "#include " & Chr(34) & "../" & filename & Chr(34) + If api <> "Template" Then + re.Pattern = "script_" + filename = re.Replace(filename, "template_") + file.WriteLine "#include " & Chr(34) & "../template/" & filename & ".sq" & Chr(34) + End If +End Function + +Function ResetReader() + enum_size = 0 + enums.RemoveAll + enum_value_size = 0 + enum_value.RemoveAll + enum_string_to_error_size = 0 + enum_string_to_error_mapping_string.RemoveAll + enum_string_to_error_mapping_error.RemoveAll + enum_error_to_string_size = 0 + enum_error_to_string_mapping.RemoveAll + const_size = 0 + const_value.RemoveAll + struct_size = 0 + structs.RemoveAll + method_size = 0 + methods.RemoveAll + static_method_size = 0 + static_methods.RemoveAll + cls = "" + start_squirrel_define_on_next_line = False + cls_level = 0 + cls_in_api = "" +End Function + +Sub SquirrelExportParse(api, line, file) + Dim re + Set re = New RegExp + + re.Pattern = "@file" + If re.Test(line) Then + filename = Split(line)(2) + re.Pattern = "^" & apis & "_" + filename = re.Replace(filename, "script_") + End If + + ' Ignore special doxygen blocks + re.Pattern = "^#ifndef DOXYGEN_API" + If re.Test(line) Then + doxygen_skip = "next" + Exit Sub + End If + re.Pattern = "^#ifdef DOXYGEN_API" + If re.Test(line) Then + doxygen_skip = "true" + Exit Sub + End If + re.Pattern = "^#endif /\* DOXYGEN_API \*/" + If re.Test(line) Then + doxygen_skip = "false" + Exit Sub + End If + re.Pattern = "^#else" + If re.Test(line) Then + If doxygen_skip = "next" Then + doxygen_skip = "true" + Else + doxygen_skip = "false" + End If + Exit Sub + End If + If doxygen_skip = "true" Then Exit Sub + + re.Pattern = "^([ ]*)\* @api" + If re.Test(line) Then + ' By default, classes are not selected + If cls_level = 0 Then api_selected = "false" + + re.Pattern = "^([ ]*)" + line = re.Replace(line, "") + re.Pattern = "\* @api " + line = re.Replace(line, "") + + If api = "Template" Then + api_selected = "true" + If line = "none" Or line = "-all" Then api_selected = "false" + Exit Sub + End If + + If line = "none" Then + api_selected = "false" + ElseIf line = "-all" Then + api_selected = "false" + Else + re.Pattern = "-" & apis + If re.Test(line) Then + api_selected = "false" + Else + re.Pattern = apis + If re.Test(line) Then + api_selected = "true" + End If + End If + End If + Exit Sub + End If + + ' Remove the old squirrel stuff + re.Pattern = "#ifdef DEFINE_SQUIRREL_CLASS" + If re.Test(line) Then + squirrel_stuff = True + Exit Sub + End If + re.Pattern = "^#endif /\* DEFINE_SQUIRREL_CLASS \*/" + If re.Test(line) Then + If squirrel_stuff Then squirrel_stuff = False + Exit Sub + End If + If squirrel_stuff Then Exit Sub + + ' Ignore forward declarations of classes + re.Pattern = "^( *)class(.*);" + If re.Test(line) Then Exit Sub + ' We only want to have public functions exported for now + re.Pattern = "^( *)class" + If re.Test(line) Then + line = Split(line) + If cls_level = 0 Then + If api_selected = "" Then + WScript.Echo "Class '" & line(1) & "' has no @api. It won't be published to any API." + api_selected = "false" + End If + is_public = False + cls_param(0) = "" + cls_param(1) = 1 + cls_param(2) = "x" + cls_in_api = api_selected + api_selected = "" + cls = line(1) + re.Pattern = "public|protected|private" + If UBound(line) > 2 Then + If re.Test(line(3)) Then + super_cls = line(4) + Else + super_cls = line(3) + End If + End If + ElseIf cls_level = 1 Then + If api_selected = "" Then api_selected = cls_in_api + + If api_selected = "true" Then + struct_size = struct_size + 1 + structs.Item(struct_size) = cls & "::" & line(1) + End If + api_selected = "" + End If + cls_level = cls_level + 1 + Exit Sub + End If + re.Pattern = "^( *)public" + If re.Test(line) Then + If cls_level = 1 Then is_public = True + Exit Sub + End If + re.Pattern = "^( *)protected" + If re.Test(line) Then + If cls_level = 1 Then is_public = False + Exit Sub + End If + re.Pattern = "^( *)private" + If re.Test(line) Then + If cls_level = 1 Then is_public = False + Exit Sub + End If + + ' Ignore the comments + re.Pattern = "^#" + If re.Test(line) Then Exit Sub + re.Pattern = "/\*.*\*/" + If re.Test(line) Then + comment = False + Exit Sub + End If + re.Pattern = "/\*" + If re.Test(line) Then + comment = True + Exit Sub + End If + re.Pattern = "\*/" + If re.Test(line) Then + comment = False + Exit Sub + End If + If comment Then Exit Sub + + ' We need to make specialized conversions for structs + re.Pattern = "^( *)struct" + If re.Test(line) Then + cls_level = cls_level + 1 + + ' Check if we want to publish this struct + If api_selected = "" Then api_selected = cls_in_api + If api_selected = "false" Then + api_selected = "" + Exit Sub + End If + api_selected = "" + + If Not is_public Then Exit Sub + If cls_level <> 1 Then Exit Sub + + struct_size = struct_size + 1 + structs.Item(struct_size) = cls & "::" & Split(line)(1) + Exit Sub + End If + + ' We need to make specialized conversions for enums + re.Pattern = "^( *)enum" + If re.Test(line) Then + cls_level = cls_level + 1 + + ' Check if we want to publish this enum + If api_selected = "" Then api_selected = cls_in_api + If api_selected = "false" Then + api_selected = "" + Exit Sub + End If + api_selected = "" + + If Not is_public Then Exit Sub + + in_enum = True + enum_size = enum_size + 1 + enums.Item(enum_size) = cls & "::" & Split(line)(1) + Exit Sub + End If + + ' Maybe the end of the class, if so we can start with the Squirrel export pretty soon + re.Pattern = "};" + If re.Test(line) Then + cls_level = cls_level - 1 + If cls_level <> 0 Then + in_enum = False + Exit Sub + End If + + If cls = "" Then Exit Sub + start_squirrel_define_on_next_line = True + Exit Sub + End If + + ' Empty/white lines. When we may do the Squirrel export, do that export. + re.Pattern = "^([ ]*)$" + If re.Test(line) Then + Dim namespace_opened, api_cls, api_super_cls, i, mlen, spaces + + If Not start_squirrel_define_on_next_line Then Exit Sub + + If cls_in_api <> "true" Then + ResetReader + Exit Sub + End If + If Not has_fileheader Then + DumpFileHeader api, file + has_fileheader = True + End If + + is_public = False + namespace_opened = False + + re.Pattern = "^Script" + api_cls = re.Replace(cls, api) + api_super_cls = re.Replace(super_cls, api) + + file.WriteLine "" + + If api = "Template" Then + ' First check whether we have enums to print + If enum_size <> 0 Then + If Not namespace_opened Then + file.WriteLine "namespace SQConvert {" + namespace_opened = True + End If + file.WriteLine " /* Allow enums to be used as Squirrel parameters */" + For i = 1 To enum_size + file.WriteLine " template <> inline " & enums.Item(i) & " GetParam(ForceType<" & enums.Item(i) & ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" & enums.Item(i) & ")tmp; }" + file.WriteLine " template <> inline int Return<" & enums.Item(i) & ">(HSQUIRRELVM vm, " & enums.Item(i) & " res) { sq_pushinteger(vm, (int32)res); return 1; }" + Next + End If + + ' Then check whether we have structs/classes to print + If struct_size <> 0 Then + If Not namespace_opened Then + file.WriteLine "namespace SQConvert {" + namespace_opened = True + End If + file.WriteLine " /* Allow inner classes/structs to be used as Squirrel parameters */" + For i = 1 To struct_size + DumpClassTemplates structs.Item(i), file + Next + End If + + If Not namespace_opened Then + file.WriteLine "namespace SQConvert {" + namespace_opened = True + Else + file.WriteLine "" + End If + file.WriteLine " /* Allow " & cls & " to be used as Squirrel parameter */" + DumpClassTemplates cls, file + + file.WriteLine "} // namespace SQConvert" + + ResetReader + Exit Sub + End If + + file.WriteLine "" + file.WriteLine "template <> const char *GetClassName<" & cls & ", ST_" & UCase(api) & ">() { return " & Chr(34) & api_cls & Chr(34) & "; }" + file.WriteLine "" + + ' Then do the registration functions of the class. + file.WriteLine "void SQ" & api_cls & "_Register(Squirrel *engine)" + file.WriteLine "{" + file.WriteLine " DefSQClass<" & cls & ", ST_" & UCase(api) & "> SQ" & api_cls & "(" & Chr(34) & api_cls & Chr(34) & ");" + If super_cls = "Text" Or super_cls = "ScriptObject" Or super_cls = "AIAbstractiveList::Valuator" Then + file.WriteLine " SQ" & api_cls & ".PreRegister(engine);" + Else + file.WriteLine " SQ" & api_cls & ".PreRegister(engine, " & Chr(34) & api_super_cls & Chr(34) & ");" + End If + If super_cls <> "ScriptEvent" Then + If cls_param(2) = "v" Then + file.WriteLine " SQ" & api_cls & ".AddSQAdvancedConstructor(engine);" + Else + file.WriteLine " SQ" & api_cls & ".AddConstructor(engine, " & Chr(34) & cls_param(2) & Chr(34) & ");" + End If + End If + file.WriteLine "" + + ' Enum values + mlen = 0 + For i = 1 To enum_value_size + If mlen <= Len(enum_value.Item(i)) Then mlen = Len(enum_value.Item(i)) + Next + For i = 1 To enum_value_size + file.WriteLine " SQ" & api_cls & ".DefSQConst(engine, " & cls & "::" & enum_value.Item(i) & ", " & Space(mlen - Len(enum_value.Item(i))) & Chr(34) & enum_value.Item(i) & Chr(34) & ");" + Next + If enum_value_size <> 0 Then file.WriteLine "" + + ' Const values + mlen = 0 + For i = 1 To const_size + If mlen <= Len(const_value.Item(i)) Then mlen = Len(const_value.Item(i)) + Next + For i = 1 To const_size + file.WriteLine " SQ" & api_cls & ".DefSQConst(engine, " & cls & "::" & const_value.Item(i) & ", " & Space(mlen - Len(const_value.Item(i))) & Chr(34) & const_value.Item(i) & Chr(34) & ");" + Next + If const_size <> 0 Then file.WriteLine "" + + ' Mapping of OTTD strings to errors + mlen = 0 + For i = 1 To enum_string_to_error_size + If mlen <= Len(enum_string_to_error_mapping_string.Item(i)) Then mlen = Len(enum_string_to_error_mapping_string.Item(i)) + Next + For i = 1 To enum_string_to_error_size + file.WriteLine " ScriptError::RegisterErrorMap(" & enum_string_to_error_mapping_string.Item(i) & ", " & Space(mlen - Len(enum_string_to_error_mapping_string.Item(i))) & cls & "::" & enum_string_to_error_mapping_error.Item(i) & ");" + Next + If enum_string_to_error_size <> 0 Then file.WriteLine "" + + ' Mapping of errors to human 'readable' strings. + mlen = 0 + For i = 1 To enum_error_to_string_size + If mlen <= Len(enum_error_to_string_mapping.Item(i)) Then mlen = Len(enum_error_to_string_mapping.Item(i)) + Next + For i = 1 To enum_error_to_string_size + file.WriteLine " ScriptError::RegisterErrorMapString(" & cls & "::" & enum_error_to_string_mapping.Item(i) & ", " & Space(mlen - Len(enum_error_to_string_mapping.Item(i))) & Chr(34) & enum_error_to_string_mapping.Item(i) & Chr(34) & ");" + Next + If enum_error_to_string_size <> 0 Then file.WriteLine "" + + ' Static methods + mlen = 0 + For i = 1 To static_method_size + If mlen <= Len(static_methods.Item(i)(0)) Then mlen = Len(static_methods.Item(i)(0)) + Next + For i = 1 To static_method_size + If static_methods.Item(i)(2) = "v" Then + spaces = mlen - Len(static_methods.Item(i)(0)) - 8 + If spaces < 0 Then spaces = 0 + file.WriteLine " SQ" & api_cls & ".DefSQAdvancedStaticMethod(engine, &" & cls & "::" & static_methods.Item(i)(0) & ", " & Space(spaces) & Chr(34) & static_methods.Item(i)(0) & Chr(34) & ");" + Else + file.WriteLine " SQ" & api_cls & ".DefSQStaticMethod(engine, &" & cls & "::" & static_methods.Item(i)(0) & ", " & Space(mlen - Len(static_methods.Item(i)(0))) & Chr(34) & static_methods.Item(i)(0) & Chr(34) & ", " & Space(mlen - Len(static_methods.Item(i)(0))) & static_methods.Item(i)(1) & ", " & Chr(34) & static_methods.Item(i)(2) & Chr(34) & ");" + End If + Next + If static_method_size <> 0 Then file.WriteLine "" + + ' Non-static methods + mlen = 0 + For i = 1 To method_size + If mlen <= Len(methods.Item(i)(0)) Then mlen = Len(methods.Item(i)(0)) + Next + For i = 1 To method_size + If methods.Item(i)(2) = "v" Then + spaces = mlen - Len(methods.Item(i)(0)) - 8 + If spaces < 0 Then spaces = 0 + file.WriteLine " SQ" & api_cls & ".DefSQAdvancedMethod(engine, &" & cls & "::" & methods.Item(i)(0) & ", " & Space(spaces) & Chr(34) & methods.Item(i)(0) & Chr(34) & ");" + Else + file.WriteLine " SQ" & api_cls & ".DefSQMethod(engine, &" & cls & "::" & methods.Item(i)(0) & ", " & Space(mlen - Len(methods.Item(i)(0))) & Chr(34) & methods.Item(i)(0) & Chr(34) & ", " & Space(mlen - Len(methods.Item(i)(0))) & methods.Item(i)(1) & ", " & Chr(34) & methods.Item(i)(2) & Chr(34) & ");" + End If + Next + If method_size <> 0 Then file.WriteLine "" + + file.WriteLine " SQ" & api_cls & ".PostRegister(engine);" + file.WriteLine "}" + + ResetReader + + Exit Sub + End If + + ' Skip non-public functions + If Not is_public Then Exit Sub + + ' Add enums + If in_enum Then + enum_value_size = enum_value_size + 1 + re.Pattern = "[, ]" + re.Global = True + enum_value.Item(enum_value_size) = re.Replace(split(line)(0), "") + + ' Check if this a special error enum + re.Pattern = ".*::ErrorMessages" + If re.Test(enums.Item(enum_size)) Then + ' syntax: + ' enum ErrorMessages { + ' ERR_SOME_ERROR, // [STR_ITEM1, STR_ITEM2, ...] + ' } + + ' Set the mappings + re.Pattern = "\[.*\]" + If re.Test(line) Then + Dim mappings + mappings = re.Execute(line)(0).Value + re.Pattern = "[\[ \]]" + mappings = re.Replace(mappings, "") + + mappings = Split(mappings, ",") + For i = LBound(mappings) To UBound(mappings) + enum_string_to_error_size = enum_string_to_error_size + 1 + enum_string_to_error_mapping_string.Item(enum_string_to_error_size) = mappings(i) + enum_string_to_error_mapping_error.Item(enum_string_to_error_size) = enum_value.Item(enum_value_size) + Next + + enum_error_to_string_size = enum_error_to_string_size + 1 + enum_error_to_string_mapping.Item(enum_error_to_string_size) = enum_value.Item(enum_value_size) + End If + End If + re.Global = False + Exit Sub + End If + + ' Add a const (non-enum) value + re.Pattern = "^[ ]*static const \w+ \w+ = -?\(?\w*\)?\w+;" + If re.Test(line) Then + const_size = const_size + 1 + const_value.Item(const_size) = Split(line)(3) + Exit Sub + End If + + ' Add a method to the list + re.Pattern = "^.*\(.*\).*$" + If re.Test(line) Then + Dim is_static, param_s, func, funcname, params, types + If cls_level <> 1 Then Exit Sub + re.Pattern = "~" + If re.Test(line) Then + If api_selected <> "" Then + WScript.Echo "Destructor for '" & cls & "' has @api. Tag ignored." + api_selected = "" + End If + Exit Sub + End If + + re.Pattern = "static" + is_static = re.Test(line) + re.Pattern = "\bvirtual\b" + line = re.Replace(line, "") + re.Pattern = "\bstatic\b" + line = re.Replace(line, "") + re.Pattern = "\bconst\b" + line = re.Replace(line, "") + re.Pattern = "{.*" + line = re.Replace(line, "") + param_s = line + re.Pattern = "\*" + line = re.Replace(line, "") + re.Pattern = "\(.*" + line = re.Replace(line, "") + re.Pattern = "^[ ]*" + line = re.Replace(line, "") + + re.Pattern = ".*\(" + param_s = re.Replace(param_s, "") + re.Pattern = "\).*" + param_s = re.Replace(param_s, "") + + func = Split(line) + If UBound(func) > 0 Then + funcname = func(1) + Else + funcname = "" + End If + If func(0) = cls And funcname = "" Then + If api_selected <> "" Then + WScript.Echo "Constructor for '" & cls & "' has @api. Tag ignored." + api_selected = "" + End If + cls_param(0) = param_s + If param_s = "" Then Exit Sub + ElseIf funcname = "" Then + Exit Sub + End If + + params = Split(param_s, ",") + If is_static Then + types = "." + Else + types = "x" + End If + For i = LBound(params) To UBound(params) + Do ' null loop for logic short-circuit + re.Pattern = "^[ ]*" + params(i) = re.Replace(params(i), "") + re.Pattern = "\*|&" + If re.Test(params(i)) Then + re.Pattern = "^char" + If re.test(params(i)) Then + ' Many types can be converted to string, so use '.', not 's'. (handled by our glue code) + types = types & "." + Exit Do + End If + re.Pattern = "^void" + If re.test(params(i)) Then + types = types & "p" + Exit Do + End If + re.Pattern = "^Array" + If re.test(params(i)) Then + types = types & "a" + Exit Do + End If + re.Pattern = "^struct Array" + If re.test(params(i)) Then + types = types & "a" + Exit Do + End If + re.Pattern = "^Text" + If re.test(params(i)) Then + types = types & "." + Exit Do + End If + types = types & "x" + Exit Do + End If + re.Pattern = "^bool" + If re.Test(params(i)) Then + types = types & "b" + Exit Do + End If + re.Pattern = "^HSQUIRRELVM" + If re.Test(params(i)) Then + types = "v" + Exit Do + End If + types = types & "i" + Loop While False ' end of null loop + Next + i = i + 1 + + ' Check if we want to publish this function + If api_selected = "" Then api_selected = cls_in_api + If api_selected = "false" Then + api_selected = "" + Exit Sub + End If + api_selected = "" + + If func(0) = cls And funcname = "" Then + cls_param(1) = i + cls_param(2) = types + Exit Sub + End If + If Left(funcname, 1) = "_" And types <> "v" Then Exit Sub + If is_static Then + static_method_size = static_method_size + 1 + static_methods.Item(static_method_size) = Array(funcname, i, types) + Exit Sub + End If + method_size = method_size + 1 + methods.Item(method_size) = Array(funcname, i, types) + Exit Sub + End If +End Sub + +Sub SquirrelExport(api, srcfilename, dstfilename) + Dim src, dst, line + Set src = FSO.OpenTextFile(srcfilename, 1) + Set dst = FSO.OpenTextFile(dstfilename, 2, True) + + enum_size = 0 + Set enums = CreateObject("Scripting.Dictionary") + enum_value_size = 0 + Set enum_value = CreateObject("Scripting.Dictionary") + enum_string_to_error_size = 0 + Set enum_string_to_error_mapping_string = CreateObject("Scripting.Dictionary") + Set enum_string_to_error_mapping_error = CreateObject("Scripting.Dictionary") + enum_error_to_string_size = 0 + Set enum_error_to_string_mapping = CreateObject("Scripting.Dictionary") + const_size = 0 + Set const_value = CreateObject("Scripting.Dictionary") + struct_size = 0 + Set structs = CreateObject("Scripting.Dictionary") + method_size = 0 + Set methods = CreateObject("Scripting.Dictionary") + static_method_size = 0 + Set static_methods = CreateObject("Scripting.Dictionary") + super_cls = "" + cls = "" + api_selected = "" + cls_in_api = "" + start_squirrel_define_on_next_line = False + has_fileheader = False + cls_level = 0 + apis = LCase(api) + If apis = "gs" Then apis = "game" + + While Not src.AtEndOfStream + line = src.ReadLine + SquirrelExportParse api, line, dst + Wend + + src.Close + dst.Close +End Sub + +Function SortDict(dict) + Set SortDict = CreateObject("Scripting.Dictionary") + While dict.Count <> 0 + Dim first, i + first = "" + For Each i in dict + If first = "" Or StrComp(first, i) = 1 Then first = i + Next + SortDict.Add first, first + dict.Remove(first) + Wend +End Function + +Sub ExportInstanceParse(apiuc, apilc, line, file) + Dim re, fname, f, files, r, regs + Set re = New RegExp + + re.Pattern = "\.hpp\.sq" + If re.Test(line) Then + re.Pattern = "template" + If re.Test(line) Then + file.WriteLine line + End If + Exit Sub + End If + + re.Pattern = "SQ" & apiuc & "Controller_Register" + If re.Test(line) Then + file.WriteLine line + Exit Sub + End If + + re.Pattern = "SQ" & apiuc & ".*_Register" + If re.Test(line) Then Exit Sub + + re.Pattern = "Note: this line is a marker in squirrel_export.sh. Do not change!" + If re.Test(line) Then + file.WriteLine line + Set files = CreateObject("Scripting.Dictionary") + For Each fname In FSO.GetFolder(".").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*_(.*)\.hpp\.sq" + If Not re.Test(fname) Then Exit Do + Set f = FSO.OpenTextFile(fname, 1) + fname = fname.Name + re.Pattern = "^void SQ" & apiuc & ".*Register\(Squirrel \*engine\)$" + While Not f.AtEndOfStream + If re.Test(f.ReadLine) And Not files.Exists(fname) Then + files.Add fname, fname + End If + Wend + f.Close + Loop While False ' end of null loop + Next + Set files = SortDict(files) + For Each f in files + file.WriteLine "#include " & Chr(34) & "../script/api/" & apilc & "/" & f & Chr(34) + Next + Exit Sub + End If + + re.Pattern = "/\* Register all classes \*/" + If re.Test(line) Then + file.WriteLine line + Set regs = CreateObject("Scripting.Dictionary") + ' List needs to be registered with squirrel before all List subclasses + file.WriteLine " SQ" & apiuc & "List_Register(this->engine);" + For Each fname In FSO.GetFolder(".").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*_(.*)\.hpp\.sq" + If Not re.Test(fname) Then Exit Do + Set f = FSO.OpenTextFile(fname, 1) + While Not f.AtEndOfStream + Do ' null loop for logic short-circuit + r = f.ReadLine + re.Pattern = "^void SQ" & apiuc & ".*Register\(Squirrel \*engine\)$" + If Not re.Test(r) Then Exit Do + re.Pattern = "SQ" & apiuc & "List_Register" + If re.Test(r) Then Exit Do + re.Pattern = "^.*void " + r = re.Replace(r, "") + re.Pattern = "Squirrel \*" + r = re.Replace(r, "this->") + re.Pattern = "$" + r = re.Replace(r, ";") + re.Pattern = "_Register" + r = re.Replace(r, "0000Register") + If Not regs.Exists(r) Then regs.Add r, r + Loop While False ' end of null loop + Wend + f.Close + Loop While False ' end of null loop + Next + Set regs = SortDict(regs) + re.Pattern = "0000Register" + For Each r in regs.Items + r = re.Replace(r, "_Register") + If r <> "SQ" & apiuc & "Controller_Register(this->engine);" Then file.WriteLine " " & r + Next + Exit Sub + End If + + file.WriteLine line +End Sub + +Sub ExportInstance(apiuc, apilc, srcfilename, dstfilename) + Dim src, dst, line + Set src = FSO.OpenTextFile(srcfilename, 1) + Set dst = FSO.OpenTextFile(dstfilename, 2, True) + + While Not src.AtEndOfStream + line = src.ReadLine + ExportInstanceParse apiuc, apilc, line, dst + Wend + + src.Close + dst.Close +End Sub + +' Recursive entry point +Sub Main + Dim WSH, scriptdir, apilc, re, api, apiuc, f, bf + Set WSH = CreateObject("WScript.Shell") + Set re = New RegExp + + ' This must be called from within a src/???/api directory. + scriptdir = FSO.GetParentFolderName(WScript.ScriptFullName) + apilc = WSH.CurrentDirectory + re.Pattern = "\\api" + apilc = re.Replace(apilc, "") + re.Pattern = ".*\\" + apilc = re.Replace(apilc, "") + + ' Check if we are in the root directory of the API, as then we generate all APIs + If apilc = "script" Then + For Each api In FSO.GetFolder(".").SubFolders + WScript.Echo "Generating for API '" & api.Name & "' ..." + WSH.CurrentDirectory = api + Main + Next + WScript.Quit 0 + End If + + Select Case apilc + Case "template" apiuc = "Template" + Case "ai" apiuc = "AI" + Case "game" apiuc = "GS" + Case Else + WScript.Echo "Unknown API type." + Exit Sub + End Select + + For Each f in FSO.GetFolder("..").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*\.hpp" + If Not re.Test(f) Then Exit Do + ' ScriptController has custom code, and should not be generated + If f.Name = "script_controller.hpp" Then Exit Do + re.Pattern = "script_" + bf = re.Replace(f.name, apilc & "_") + SquirrelExport apiuc, f, bf & ".tmp" + If IsEmptyFile(bf & ".tmp") Then + If FSO.FileExists(bf & ".sq") Then + WScript.Echo "Deleted: " & bf & ".sq" + FSO.DeleteFile bf & ".sq" + End If + FSO.DeleteFile bf & ".tmp" + ElseIf Not FSO.FileExists(bf & ".sq") Or Not CompareFiles(bf & ".sq", bf & ".tmp") Then + If FSO.FileExists(bf & ".sq") Then FSO.DeleteFile bf & ".sq" + FSO.MoveFile bf & ".tmp", bf & ".sq" + WScript.Echo "Updated: " & bf & ".sq" + Else + FSO.DeleteFile bf & ".tmp" + End If + Loop While False ' end of null loop + Next + + ' Remove .hpp.sq if .hpp doesn't exist anymore + For Each f in FSO.GetFolder(".").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*\.hpp\.sq" + If Not re.Test(f) Then Exit Do + f = f.Name + re.Pattern = "\.hpp\.sq$" + f = re.Replace(f, ".hpp") + re.Pattern = apilc & "_" + f = re.Replace(f, "script_") + If Not FSO.FileExists("..\" & f) Then + WScript.Echo "Deleted: " & f & ".sq" + 'FSO.DeleteFile f & ".sq" + End If + Loop While False ' end of null loop + Next + + If apilc = "template" Then Exit Sub + + ' Add stuff to ${apilc}_instance.cpp + f = "..\..\..\" & apilc & "\" & apilc & "_instance.cpp" + ExportInstance apiuc, apilc, f, f & ".tmp" + If Not FSO.FileExists(f) Or Not CompareFiles(f, f & ".tmp") Then + If FSO.FileExists(f) Then FSO.DeleteFile f + FSO.MoveFile f & ".tmp", f + WScript.Echo "Updated: " & f + Else + FSO.DeleteFile f & ".tmp" + End If +End Sub + +Main diff --git a/src/script/api/template/template_accounting.hpp.sq b/src/script/api/template/template_accounting.hpp.sq index b51ade2b66..298217a22f 100644 --- a/src/script/api/template/template_accounting.hpp.sq +++ b/src/script/api/template/template_accounting.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_accounting.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_admin.hpp.sq b/src/script/api/template/template_admin.hpp.sq index 84ddf75387..2256d674b9 100644 --- a/src/script/api/template/template_admin.hpp.sq +++ b/src/script/api/template/template_admin.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_admin.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_airport.hpp.sq b/src/script/api/template/template_airport.hpp.sq index 535bdd9bcc..402eea076d 100644 --- a/src/script/api/template/template_airport.hpp.sq +++ b/src/script/api/template/template_airport.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_airport.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_base.hpp.sq b/src/script/api/template/template_base.hpp.sq index 5e6a8d2797..0ff19bcb89 100644 --- a/src/script/api/template/template_base.hpp.sq +++ b/src/script/api/template/template_base.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_base.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_basestation.hpp.sq b/src/script/api/template/template_basestation.hpp.sq index f7ce48eb47..c11a7745e4 100644 --- a/src/script/api/template/template_basestation.hpp.sq +++ b/src/script/api/template/template_basestation.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_basestation.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_bridge.hpp.sq b/src/script/api/template/template_bridge.hpp.sq index 49af8e8dc9..f627155119 100644 --- a/src/script/api/template/template_bridge.hpp.sq +++ b/src/script/api/template/template_bridge.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_bridge.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_bridgelist.hpp.sq b/src/script/api/template/template_bridgelist.hpp.sq index 070d6986fd..1f78a78742 100644 --- a/src/script/api/template/template_bridgelist.hpp.sq +++ b/src/script/api/template/template_bridgelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_bridgelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_cargo.hpp.sq b/src/script/api/template/template_cargo.hpp.sq index 201eadd7e1..b57e5c05aa 100644 --- a/src/script/api/template/template_cargo.hpp.sq +++ b/src/script/api/template/template_cargo.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_cargo.hpp.sq 26396 2014-03-10 22:18:53Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_cargolist.hpp.sq b/src/script/api/template/template_cargolist.hpp.sq index 150dcd93f0..5b39aa66d8 100644 --- a/src/script/api/template/template_cargolist.hpp.sq +++ b/src/script/api/template/template_cargolist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_cargolist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_cargomonitor.hpp.sq b/src/script/api/template/template_cargomonitor.hpp.sq index 937c0a436c..ce0a358ace 100644 --- a/src/script/api/template/template_cargomonitor.hpp.sq +++ b/src/script/api/template/template_cargomonitor.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_cargomonitor.hpp.sq 24406 2012-07-15 17:11:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_client.hpp.sq b/src/script/api/template/template_client.hpp.sq new file mode 100644 index 0000000000..13b9d68b6a --- /dev/null +++ b/src/script/api/template/template_client.hpp.sq @@ -0,0 +1,25 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_client.hpp" + +namespace SQConvert { + /* Allow enums to be used as Squirrel parameters */ + template <> inline ScriptClient::ClientID GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptClient::ClientID)tmp; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClient::ClientID res) { sq_pushinteger(vm, (int32)res); return 1; } + + /* Allow ScriptClient to be used as Squirrel parameter */ + template <> inline ScriptClient *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClient *)instance; } + template <> inline ScriptClient &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClient *)instance; } + template <> inline const ScriptClient *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClient *)instance; } + template <> inline const ScriptClient &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClient *)instance; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClient *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Client", res, NULL, DefSQDestructorCallback, true); return 1; } +} // namespace SQConvert diff --git a/src/script/api/template/template_clientlist.hpp.sq b/src/script/api/template/template_clientlist.hpp.sq new file mode 100644 index 0000000000..74c3f4525f --- /dev/null +++ b/src/script/api/template/template_clientlist.hpp.sq @@ -0,0 +1,30 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_clientlist.hpp" + +namespace SQConvert { + /* Allow ScriptClientList to be used as Squirrel parameter */ + template <> inline ScriptClientList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList *)instance; } + template <> inline ScriptClientList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList *)instance; } + template <> inline const ScriptClientList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList *)instance; } + template <> inline const ScriptClientList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList *)instance; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClientList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList", res, NULL, DefSQDestructorCallback, true); return 1; } +} // namespace SQConvert + +namespace SQConvert { + /* Allow ScriptClientList_Company to be used as Squirrel parameter */ + template <> inline ScriptClientList_Company *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList_Company *)instance; } + template <> inline ScriptClientList_Company &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList_Company *)instance; } + template <> inline const ScriptClientList_Company *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList_Company *)instance; } + template <> inline const ScriptClientList_Company &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList_Company *)instance; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClientList_Company *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList_Company", res, NULL, DefSQDestructorCallback, true); return 1; } +} // namespace SQConvert diff --git a/src/script/api/template/template_company.hpp.sq b/src/script/api/template/template_company.hpp.sq index d2f9099485..7dc63f24bc 100644 --- a/src/script/api/template/template_company.hpp.sq +++ b/src/script/api/template/template_company.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_company.hpp.sq 25788 2013-09-21 13:07:42Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_companymode.hpp.sq b/src/script/api/template/template_companymode.hpp.sq index 690b899251..f99f1d42d5 100644 --- a/src/script/api/template/template_companymode.hpp.sq +++ b/src/script/api/template/template_companymode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_companymode.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_date.hpp.sq b/src/script/api/template/template_date.hpp.sq index b634fe7bb0..cca4a258b1 100644 --- a/src/script/api/template/template_date.hpp.sq +++ b/src/script/api/template/template_date.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_date.hpp.sq 26307 2014-02-06 19:50:34Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_depotlist.hpp.sq b/src/script/api/template/template_depotlist.hpp.sq index a86b4ce849..f5fcbcf544 100644 --- a/src/script/api/template/template_depotlist.hpp.sq +++ b/src/script/api/template/template_depotlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_depotlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_engine.hpp.sq b/src/script/api/template/template_engine.hpp.sq index 0415aa7d31..3d652df9e8 100644 --- a/src/script/api/template/template_engine.hpp.sq +++ b/src/script/api/template/template_engine.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_engine.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_enginelist.hpp.sq b/src/script/api/template/template_enginelist.hpp.sq index ce52e8e8bc..f17c244eb6 100644 --- a/src/script/api/template/template_enginelist.hpp.sq +++ b/src/script/api/template/template_enginelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_enginelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_error.hpp.sq b/src/script/api/template/template_error.hpp.sq index a74e3d9d81..8e61f08103 100644 --- a/src/script/api/template/template_error.hpp.sq +++ b/src/script/api/template/template_error.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_error.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_event.hpp.sq b/src/script/api/template/template_event.hpp.sq index 3aafe05c83..c0a8afdc93 100644 --- a/src/script/api/template/template_event.hpp.sq +++ b/src/script/api/template/template_event.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_event.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_event_types.hpp.sq b/src/script/api/template/template_event_types.hpp.sq index 986c1a2779..eb6d1f1b42 100644 --- a/src/script/api/template/template_event_types.hpp.sq +++ b/src/script/api/template/template_event_types.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_event_types.hpp.sq 24291 2012-05-26 14:16:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_execmode.hpp.sq b/src/script/api/template/template_execmode.hpp.sq index f3022ddcbf..4c8326bc17 100644 --- a/src/script/api/template/template_execmode.hpp.sq +++ b/src/script/api/template/template_execmode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_execmode.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_game.hpp.sq b/src/script/api/template/template_game.hpp.sq index a523d9682f..495aeada41 100644 --- a/src/script/api/template/template_game.hpp.sq +++ b/src/script/api/template/template_game.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_game.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_gamesettings.hpp.sq b/src/script/api/template/template_gamesettings.hpp.sq index 21cb2b5367..9c6e91746c 100644 --- a/src/script/api/template/template_gamesettings.hpp.sq +++ b/src/script/api/template/template_gamesettings.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_gamesettings.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_goal.hpp.sq b/src/script/api/template/template_goal.hpp.sq index 0aa424eb82..6aa3014eea 100644 --- a/src/script/api/template/template_goal.hpp.sq +++ b/src/script/api/template/template_goal.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_goal.hpp.sq 23827 2012-01-21 12:03:55Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_group.hpp.sq b/src/script/api/template/template_group.hpp.sq index dafb5a29c8..ac4abe5a17 100644 --- a/src/script/api/template/template_group.hpp.sq +++ b/src/script/api/template/template_group.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_group.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_grouplist.hpp.sq b/src/script/api/template/template_grouplist.hpp.sq index f2215a5bcb..858abcf015 100644 --- a/src/script/api/template/template_grouplist.hpp.sq +++ b/src/script/api/template/template_grouplist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_grouplist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_industry.hpp.sq b/src/script/api/template/template_industry.hpp.sq index eb0caa0557..e1e02263c6 100644 --- a/src/script/api/template/template_industry.hpp.sq +++ b/src/script/api/template/template_industry.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_industry.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_industrylist.hpp.sq b/src/script/api/template/template_industrylist.hpp.sq index d01a3c8316..0c0316346a 100644 --- a/src/script/api/template/template_industrylist.hpp.sq +++ b/src/script/api/template/template_industrylist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_industrylist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_industrytype.hpp.sq b/src/script/api/template/template_industrytype.hpp.sq index 0945d0765e..79495053ea 100644 --- a/src/script/api/template/template_industrytype.hpp.sq +++ b/src/script/api/template/template_industrytype.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_industrytype.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_industrytypelist.hpp.sq b/src/script/api/template/template_industrytypelist.hpp.sq index f5a52837c3..044f9ccedf 100644 --- a/src/script/api/template/template_industrytypelist.hpp.sq +++ b/src/script/api/template/template_industrytypelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_industrytypelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_infrastructure.hpp.sq b/src/script/api/template/template_infrastructure.hpp.sq index dd6c5e5928..39460e1406 100644 --- a/src/script/api/template/template_infrastructure.hpp.sq +++ b/src/script/api/template/template_infrastructure.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_infrastructure.hpp.sq 23416 2011-12-03 23:40:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_list.hpp.sq b/src/script/api/template/template_list.hpp.sq index 7513796e8d..fa8d2b36dc 100644 --- a/src/script/api/template/template_list.hpp.sq +++ b/src/script/api/template/template_list.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_list.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_log.hpp.sq b/src/script/api/template/template_log.hpp.sq index 81731b7225..91c0511d0c 100644 --- a/src/script/api/template/template_log.hpp.sq +++ b/src/script/api/template/template_log.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_log.hpp.sq 23597 2011-12-19 20:44:31Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_map.hpp.sq b/src/script/api/template/template_map.hpp.sq index a015a42223..4d34cc734b 100644 --- a/src/script/api/template/template_map.hpp.sq +++ b/src/script/api/template/template_map.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_map.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_marine.hpp.sq b/src/script/api/template/template_marine.hpp.sq index 23dd62af1c..d2415b6994 100644 --- a/src/script/api/template/template_marine.hpp.sq +++ b/src/script/api/template/template_marine.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_marine.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_news.hpp.sq b/src/script/api/template/template_news.hpp.sq index 21559090ab..445a055e10 100644 --- a/src/script/api/template/template_news.hpp.sq +++ b/src/script/api/template/template_news.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_news.hpp.sq 27164 2015-02-22 17:25:29Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_order.hpp.sq b/src/script/api/template/template_order.hpp.sq index 0564aa4665..d11fafa14f 100644 --- a/src/script/api/template/template_order.hpp.sq +++ b/src/script/api/template/template_order.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_order.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_rail.hpp.sq b/src/script/api/template/template_rail.hpp.sq index 13f0c168a8..f92f96d587 100644 --- a/src/script/api/template/template_rail.hpp.sq +++ b/src/script/api/template/template_rail.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_rail.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_railtypelist.hpp.sq b/src/script/api/template/template_railtypelist.hpp.sq index 2bf57aa015..9a768e1d5c 100644 --- a/src/script/api/template/template_railtypelist.hpp.sq +++ b/src/script/api/template/template_railtypelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_railtypelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_road.hpp.sq b/src/script/api/template/template_road.hpp.sq index 19ba97b0d9..d50bda573d 100644 --- a/src/script/api/template/template_road.hpp.sq +++ b/src/script/api/template/template_road.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_road.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_sign.hpp.sq b/src/script/api/template/template_sign.hpp.sq index 9825bbe3f6..db926fed3f 100644 --- a/src/script/api/template/template_sign.hpp.sq +++ b/src/script/api/template/template_sign.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_sign.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_signlist.hpp.sq b/src/script/api/template/template_signlist.hpp.sq index 5b025d1fb1..e5bd67ae5f 100644 --- a/src/script/api/template/template_signlist.hpp.sq +++ b/src/script/api/template/template_signlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_signlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_station.hpp.sq b/src/script/api/template/template_station.hpp.sq index 4a2eac61c1..729ae68a6d 100644 --- a/src/script/api/template/template_station.hpp.sq +++ b/src/script/api/template/template_station.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_station.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_stationlist.hpp.sq b/src/script/api/template/template_stationlist.hpp.sq index e57ee8bbfe..5f7bd28129 100644 --- a/src/script/api/template/template_stationlist.hpp.sq +++ b/src/script/api/template/template_stationlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_stationlist.hpp.sq 26893 2014-09-21 16:20:48Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_story_page.hpp.sq b/src/script/api/template/template_story_page.hpp.sq index 9a348fa812..4c322a3acf 100644 --- a/src/script/api/template/template_story_page.hpp.sq +++ b/src/script/api/template/template_story_page.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_story_page.hpp.sq 25371 2013-06-09 13:18:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_subsidy.hpp.sq b/src/script/api/template/template_subsidy.hpp.sq index 4f5fd90000..61303a645e 100644 --- a/src/script/api/template/template_subsidy.hpp.sq +++ b/src/script/api/template/template_subsidy.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_subsidy.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_subsidylist.hpp.sq b/src/script/api/template/template_subsidylist.hpp.sq index 9eb5b89fc7..4e6284f4e9 100644 --- a/src/script/api/template/template_subsidylist.hpp.sq +++ b/src/script/api/template/template_subsidylist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_subsidylist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_testmode.hpp.sq b/src/script/api/template/template_testmode.hpp.sq index 3b6a172e43..bacafa16e7 100644 --- a/src/script/api/template/template_testmode.hpp.sq +++ b/src/script/api/template/template_testmode.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_testmode.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_text.hpp.sq b/src/script/api/template/template_text.hpp.sq index bc63d97e6d..7a44daf16f 100644 --- a/src/script/api/template/template_text.hpp.sq +++ b/src/script/api/template/template_text.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_text.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_tile.hpp.sq b/src/script/api/template/template_tile.hpp.sq index a356176348..e78aaa6ace 100644 --- a/src/script/api/template/template_tile.hpp.sq +++ b/src/script/api/template/template_tile.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_tile.hpp.sq 25213 2013-04-30 17:16:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_tilelist.hpp.sq b/src/script/api/template/template_tilelist.hpp.sq index 3bb7421b83..e3d73a7c85 100644 --- a/src/script/api/template/template_tilelist.hpp.sq +++ b/src/script/api/template/template_tilelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_tilelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_town.hpp.sq b/src/script/api/template/template_town.hpp.sq index 7d14ec4723..0ec1c285d8 100644 --- a/src/script/api/template/template_town.hpp.sq +++ b/src/script/api/template/template_town.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_town.hpp.sq 25967 2013-11-12 17:56:35Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_townlist.hpp.sq b/src/script/api/template/template_townlist.hpp.sq index 3fe15ec41e..5bbd2e203a 100644 --- a/src/script/api/template/template_townlist.hpp.sq +++ b/src/script/api/template/template_townlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_townlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_tunnel.hpp.sq b/src/script/api/template/template_tunnel.hpp.sq index 75eda21db8..2d7eed91e5 100644 --- a/src/script/api/template/template_tunnel.hpp.sq +++ b/src/script/api/template/template_tunnel.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_tunnel.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_vehicle.hpp.sq b/src/script/api/template/template_vehicle.hpp.sq index 1ce89d1e3f..999a9c5078 100644 --- a/src/script/api/template/template_vehicle.hpp.sq +++ b/src/script/api/template/template_vehicle.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_vehicle.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_vehiclelist.hpp.sq b/src/script/api/template/template_vehiclelist.hpp.sq index e46ce068fd..dd1d17682e 100644 --- a/src/script/api/template/template_vehiclelist.hpp.sq +++ b/src/script/api/template/template_vehiclelist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_vehiclelist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_viewport.hpp.sq b/src/script/api/template/template_viewport.hpp.sq index 19dc3712e7..8a187ae81d 100644 --- a/src/script/api/template/template_viewport.hpp.sq +++ b/src/script/api/template/template_viewport.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_viewport.hpp.sq 23737 2012-01-03 20:37:56Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_waypoint.hpp.sq b/src/script/api/template/template_waypoint.hpp.sq index 0d7e5cf75e..88cc495c98 100644 --- a/src/script/api/template/template_waypoint.hpp.sq +++ b/src/script/api/template/template_waypoint.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_waypoint.hpp.sq 23521 2011-12-15 18:40:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_waypointlist.hpp.sq b/src/script/api/template/template_waypointlist.hpp.sq index 10e7eb5683..2e23bba148 100644 --- a/src/script/api/template/template_waypointlist.hpp.sq +++ b/src/script/api/template/template_waypointlist.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_waypointlist.hpp.sq 23379 2011-11-30 14:11:02Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq index 5842ea6034..3077215ec2 100644 --- a/src/script/api/template/template_window.hpp.sq +++ b/src/script/api/template/template_window.hpp.sq @@ -1,4 +1,4 @@ -/* $Id: template_window.hpp.sq 26610 2014-05-24 19:11:20Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -77,6 +77,10 @@ namespace SQConvert { template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::ErrorMessageWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptWindow::SaveLoadWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SaveLoadWidgets)tmp; } template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::SaveLoadWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } + template <> inline ScriptWindow::FramerateWindowWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::FramerateWindowWidgets)tmp; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::FramerateWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } + template <> inline ScriptWindow::FrametimeGraphWindowWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::FrametimeGraphWindowWidgets)tmp; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::FrametimeGraphWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptWindow::GenerateLandscapeWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GenerateLandscapeWidgets)tmp; } template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GenerateLandscapeWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptWindow::CreateScenarioWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CreateScenarioWidgets)tmp; } diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index e78c716a70..3171e67d4f 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -1,4 +1,4 @@ -/* $Id: script_config.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -36,7 +36,7 @@ void ScriptConfig::Change(const char *name, int version, bool force_exact_match, * for the Script that have the random flag to a random value. */ for (ScriptConfigItemList::const_iterator it = this->info->GetConfigList()->begin(); it != this->info->GetConfigList()->end(); it++) { if ((*it).flags & SCRIPTCONFIG_RANDOM) { - this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value - (*it).min_value) + (*it).min_value); + this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value + 1 - (*it).min_value) + (*it).min_value); } } this->AddRandomDeviation(); diff --git a/src/script/script_config.hpp b/src/script/script_config.hpp index 96c475ccf0..3dfd6bb0b2 100644 --- a/src/script/script_config.hpp +++ b/src/script/script_config.hpp @@ -1,4 +1,4 @@ -/* $Id: script_config.hpp 26493 2014-04-24 04:41:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -139,7 +139,7 @@ public: /** * Randomize all settings the Script requested to be randomized. */ - void AddRandomDeviation(); + virtual void AddRandomDeviation(); /** * Is this config attached to an Script? In other words, is there a Script diff --git a/src/script/script_fatalerror.hpp b/src/script/script_fatalerror.hpp index 4c52537ca6..fc7e05402d 100644 --- a/src/script/script_fatalerror.hpp +++ b/src/script/script_fatalerror.hpp @@ -1,4 +1,4 @@ -/* $Id: script_fatalerror.hpp 23378 2011-11-30 14:02:15Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_info.cpp b/src/script/script_info.cpp index cccffeb5d7..b95c6e366d 100644 --- a/src/script/script_info.cpp +++ b/src/script/script_info.cpp @@ -1,4 +1,4 @@ -/* $Id: script_info.cpp 26771 2014-09-06 17:30:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_info.hpp b/src/script/script_info.hpp index 00ac22cd6c..ae341a7d82 100644 --- a/src/script/script_info.hpp +++ b/src/script/script_info.hpp @@ -1,4 +1,4 @@ -/* $Id: script_info.hpp 26057 2013-11-23 13:12:19Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_info_dummy.cpp b/src/script/script_info_dummy.cpp index f308949e0d..53860386c1 100644 --- a/src/script/script_info_dummy.cpp +++ b/src/script/script_info_dummy.cpp @@ -1,4 +1,4 @@ -/* $Id: script_info_dummy.cpp 26782 2014-09-06 20:22:59Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -92,7 +92,7 @@ void Script_CreateDummy(HSQUIRRELVM vm, StringID string, const char *type) p = newline + 1; } while (newline != NULL); - dp = strecpy(dp, " }\n}\n", lastof(dummy_script)); + strecpy(dp, " }\n}\n", lastof(dummy_script)); /* 3) We translate the error message in the character format that Squirrel wants. * We can use the fact that the wchar string printing also uses %s to print diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp index e6b93fa5c0..5df06ad890 100644 --- a/src/script/script_instance.cpp +++ b/src/script/script_instance.cpp @@ -1,4 +1,4 @@ -/* $Id: script_instance.cpp 26785 2014-09-07 09:30:57Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_instance.hpp b/src/script/script_instance.hpp index 4c5c5cd1ff..e6f3c64b22 100644 --- a/src/script/script_instance.hpp +++ b/src/script/script_instance.hpp @@ -1,4 +1,4 @@ -/* $Id: script_instance.hpp 25342 2013-06-09 12:19:09Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_scanner.cpp b/src/script/script_scanner.cpp index 8c9bf98126..fe6d41cf92 100644 --- a/src/script/script_scanner.cpp +++ b/src/script/script_scanner.cpp @@ -1,4 +1,4 @@ -/* $Id: script_scanner.cpp 26617 2014-05-25 19:53:46Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -134,7 +134,7 @@ void ScriptScanner::RegisterScript(ScriptInfo *info) if (this->info_list.find(script_name) != this->info_list.end()) { /* This script was already registered */ -#ifdef WIN32 +#ifdef _WIN32 /* Windows doesn't care about the case */ if (strcasecmp(this->info_list[script_name]->GetMainScript(), info->GetMainScript()) == 0) { #else diff --git a/src/script/script_scanner.hpp b/src/script/script_scanner.hpp index 9f73aa029b..50dad02ad2 100644 --- a/src/script/script_scanner.hpp +++ b/src/script/script_scanner.hpp @@ -1,4 +1,4 @@ -/* $Id: script_scanner.hpp 26617 2014-05-25 19:53:46Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_storage.hpp b/src/script/script_storage.hpp index 88f027d50a..8fe1e17323 100644 --- a/src/script/script_storage.hpp +++ b/src/script/script_storage.hpp @@ -1,4 +1,4 @@ -/* $Id: script_storage.hpp 26057 2013-11-23 13:12:19Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/script_suspend.hpp b/src/script/script_suspend.hpp index c9e6ea63de..9f8a1513c9 100644 --- a/src/script/script_suspend.hpp +++ b/src/script/script_suspend.hpp @@ -1,4 +1,4 @@ -/* $Id: script_suspend.hpp 23378 2011-11-30 14:02:15Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp index 40965b4418..23163f6b34 100644 --- a/src/script/squirrel.cpp +++ b/src/script/squirrel.cpp @@ -1,4 +1,4 @@ -/* $Id: squirrel.cpp 26797 2014-09-07 16:03:41Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -432,13 +432,8 @@ static SQInteger _io_file_read(SQUserPointer file, SQUserPointer buf, SQInteger SQRESULT Squirrel::LoadFile(HSQUIRRELVM vm, const char *filename, SQBool printerror) { - size_t size; FILE *file; - SQInteger ret; - unsigned short us; - unsigned char uc; - SQLEXREADFUNC func; - + size_t size; if (strncmp(this->GetAPIName(), "AI", 2) == 0) { file = FioFOpenFile(filename, "rb", AI_DIR, &size); if (file == NULL) file = FioFOpenFile(filename, "rb", AI_LIBRARY_DIR, &size); @@ -449,61 +444,75 @@ SQRESULT Squirrel::LoadFile(HSQUIRRELVM vm, const char *filename, SQBool printer NOT_REACHED(); } - if (file != NULL) { - SQFile f(file, size); - ret = fread(&us, 1, sizeof(us), file); - /* Most likely an empty file */ - if (ret != 2) us = 0; - - switch (us) { - case SQ_BYTECODE_STREAM_TAG: { // BYTECODE - if (fseek(file, -2, SEEK_CUR) < 0) { - FioFCloseFile(file); - return sq_throwerror(vm, "cannot seek the file"); - } - if (SQ_SUCCEEDED(sq_readclosure(vm, _io_file_read, &f))) { - FioFCloseFile(file); - return SQ_OK; - } - FioFCloseFile(file); - return sq_throwerror(vm, "Couldn't read bytecode"); - } - case 0xFFFE: - /* Either this file is encoded as big-endian and we're on a little-endian - * machine, or this file is encoded as little-endian and we're on a big-endian - * machine. Either way, swap the bytes of every word we read. */ - func = _io_file_lexfeed_UCS2_swap; - break; - case 0xFEFF: func = _io_file_lexfeed_UCS2_no_swap; break; - case 0xBBEF: // UTF-8 - case 0xEFBB: // UTF-8 on big-endian machine - if (fread(&uc, 1, sizeof(uc), file) == 0) { - FioFCloseFile(file); - return sq_throwerror(vm, "I/O error"); - } - if (uc != 0xBF) { - FioFCloseFile(file); - return sq_throwerror(vm, "Unrecognized encoding"); - } - func = _io_file_lexfeed_UTF8; - break; - default: // ASCII - func = _io_file_lexfeed_ASCII; - if (fseek(file, -2, SEEK_CUR) < 0) { - FioFCloseFile(file); - return sq_throwerror(vm, "cannot seek the file"); - } - break; - } - - if (SQ_SUCCEEDED(sq_compile(vm, func, &f, filename, printerror))) { - FioFCloseFile(file); - return SQ_OK; - } - FioFCloseFile(file); - return SQ_ERROR; + if (file == NULL) { + return sq_throwerror(vm, "cannot open the file"); } - return sq_throwerror(vm, "cannot open the file"); + unsigned short bom = 0; + if (size >= 2) { + size_t sr = fread(&bom, 1, sizeof(bom), file); + (void)sr; // Inside tar, no point checking return value of fread + } + + SQLEXREADFUNC func; + switch (bom) { + case SQ_BYTECODE_STREAM_TAG: { // BYTECODE + if (fseek(file, -2, SEEK_CUR) < 0) { + FioFCloseFile(file); + return sq_throwerror(vm, "cannot seek the file"); + } + + SQFile f(file, size); + if (SQ_SUCCEEDED(sq_readclosure(vm, _io_file_read, &f))) { + FioFCloseFile(file); + return SQ_OK; + } + FioFCloseFile(file); + return sq_throwerror(vm, "Couldn't read bytecode"); + } + case 0xFFFE: + /* Either this file is encoded as big-endian and we're on a little-endian + * machine, or this file is encoded as little-endian and we're on a big-endian + * machine. Either way, swap the bytes of every word we read. */ + func = _io_file_lexfeed_UCS2_swap; + size -= 2; // Skip BOM + break; + case 0xFEFF: + func = _io_file_lexfeed_UCS2_no_swap; + size -= 2; // Skip BOM + break; + case 0xBBEF: // UTF-8 + case 0xEFBB: { // UTF-8 on big-endian machine + /* Similarly, check the file is actually big enough to finish checking BOM */ + if (size < 3) { + FioFCloseFile(file); + return sq_throwerror(vm, "I/O error"); + } + unsigned char uc; + if (fread(&uc, 1, sizeof(uc), file) != sizeof(uc) || uc != 0xBF) { + FioFCloseFile(file); + return sq_throwerror(vm, "Unrecognized encoding"); + } + func = _io_file_lexfeed_UTF8; + size -= 3; // Skip BOM + break; + } + default: // ASCII + func = _io_file_lexfeed_ASCII; + /* Account for when we might not have fread'd earlier */ + if (size >= 2 && fseek(file, -2, SEEK_CUR) < 0) { + FioFCloseFile(file); + return sq_throwerror(vm, "cannot seek the file"); + } + break; + } + + SQFile f(file, size); + if (SQ_SUCCEEDED(sq_compile(vm, func, &f, filename, printerror))) { + FioFCloseFile(file); + return SQ_OK; + } + FioFCloseFile(file); + return SQ_ERROR; } bool Squirrel::LoadScript(HSQUIRRELVM vm, const char *script, bool in_root) diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp index 064d7a8a3a..9e1d113a80 100644 --- a/src/script/squirrel.hpp +++ b/src/script/squirrel.hpp @@ -1,4 +1,4 @@ -/* $Id: squirrel.hpp 26771 2014-09-06 17:30:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/squirrel_class.hpp b/src/script/squirrel_class.hpp index 46063189c2..ce63e3b034 100644 --- a/src/script/squirrel_class.hpp +++ b/src/script/squirrel_class.hpp @@ -1,4 +1,4 @@ -/* $Id: squirrel_class.hpp 23651 2011-12-21 14:55:28Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp index a403671b2a..22d738d4f7 100644 --- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -1,4 +1,4 @@ -/* $Id: squirrel_helper.hpp 26774 2014-09-06 17:46:56Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/squirrel_helper_type.hpp b/src/script/squirrel_helper_type.hpp index 29d251e77d..946a59547a 100644 --- a/src/script/squirrel_helper_type.hpp +++ b/src/script/squirrel_helper_type.hpp @@ -1,4 +1,4 @@ -/* $Id: squirrel_helper_type.hpp 22406 2011-05-01 19:51:52Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/squirrel_std.cpp b/src/script/squirrel_std.cpp index 24334161e4..96f087a2a7 100644 --- a/src/script/squirrel_std.cpp +++ b/src/script/squirrel_std.cpp @@ -1,4 +1,4 @@ -/* $Id: squirrel_std.cpp 26782 2014-09-06 20:22:59Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/script/squirrel_std.hpp b/src/script/squirrel_std.hpp index 6247133a8f..b1c7b30132 100644 --- a/src/script/squirrel_std.hpp +++ b/src/script/squirrel_std.hpp @@ -1,4 +1,4 @@ -/* $Id: squirrel_std.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sdl.cpp b/src/sdl.cpp index b0afe787ff..79e9ed2927 100644 --- a/src/sdl.cpp +++ b/src/sdl.cpp @@ -1,4 +1,4 @@ -/* $Id: sdl.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sdl.h b/src/sdl.h index 466fcdb47a..9033899a59 100644 --- a/src/sdl.h +++ b/src/sdl.h @@ -1,4 +1,4 @@ -/* $Id: sdl.h 24993 2013-02-14 11:06:12Z matthijs $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,7 +15,7 @@ const char *SdlOpen(uint32 x); void SdlClose(uint32 x); -#ifdef WIN32 +#ifdef _WIN32 #define DYNAMICALLY_LOADED_SDL #endif diff --git a/src/settings.cpp b/src/settings.cpp index ac8f5930cb..b93f4d7066 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1,4 +1,4 @@ -/* $Id: settings.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -1095,7 +1095,7 @@ static bool InvalidateNewGRFChangeWindows(int32 p1) static bool InvalidateCompanyLiveryWindow(int32 p1) { - InvalidateWindowClassesData(WC_COMPANY_COLOUR); + InvalidateWindowClassesData(WC_COMPANY_COLOUR, -1); return RedrawScreen(p1); } @@ -1174,6 +1174,7 @@ static bool MaxNoAIsChange(int32 i) ShowErrorMessage(STR_WARNING_NO_SUITABLE_AI, INVALID_STRING_ID, WL_CRITICAL); } + InvalidateWindowClassesData(WC_GAME_OPTIONS, 0); return true; } @@ -1221,8 +1222,8 @@ static bool CheckFreeformEdges(int32 p1) return false; } } - for (uint i = 0; i < MapSizeX(); i++) MakeVoid(TileXY(i, 0)); - for (uint i = 0; i < MapSizeY(); i++) MakeVoid(TileXY(0, i)); + for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); } else { for (uint i = 0; i < MapMaxX(); i++) { if (TileHeight(TileXY(i, 1)) != 0) { @@ -1312,6 +1313,15 @@ static bool MaxVehiclesChanged(int32 p1) return true; } +static bool InvalidateShipPathCache(int32 p1) +{ + Ship *s; + FOR_ALL_SHIPS(s) { + s->path.clear(); + } + return true; +} + #ifdef ENABLE_NETWORK @@ -1367,7 +1377,7 @@ static void PrepareOldDiffCustom() */ static void HandleOldDiffCustom(bool savegame) { - uint options_to_load = GAME_DIFFICULTY_NUM - ((savegame && IsSavegameVersionBefore(4)) ? 1 : 0); + uint options_to_load = GAME_DIFFICULTY_NUM - ((savegame && IsSavegameVersionBefore(SLV_4)) ? 1 : 0); if (!savegame) { /* If we did read to old_diff_custom, then at least one value must be non 0. */ @@ -1459,7 +1469,7 @@ static int DecodeHexNibble(char c) * Parse a sequence of characters (supposedly hex digits) into a sequence of bytes. * After the hex number should be a \c '|' character. * @param pos First character to convert. - * @param dest [out] Output byte array to write the bytes. + * @param[out] dest Output byte array to write the bytes. * @param dest_size Number of bytes in \a dest. * @return Whether reading was successful. */ @@ -1668,9 +1678,9 @@ static void HandleSettingDescs(IniFile *ini, SettingDescProc *proc, SettingDescP { if (basic_settings) { proc(ini, (const SettingDesc*)_misc_settings, "misc", NULL); -#if defined(WIN32) && !defined(DEDICATED) +#if defined(_WIN32) && !defined(DEDICATED) proc(ini, (const SettingDesc*)_win32_settings, "win32", NULL); -#endif /* WIN32 */ +#endif /* _WIN32 */ } if (other_settings) { @@ -1748,7 +1758,7 @@ void SaveToConfig() /** * Get the list of known NewGrf presets. - * @param list[inout] Pointer to list for storing the preset names. + * @param[in,out] list Pointer to list for storing the preset names. */ void GetGRFPresetList(GRFPresetList *list) { diff --git a/src/settings_func.h b/src/settings_func.h index 2cf7c987c2..3b3387b5fd 100644 --- a/src/settings_func.h +++ b/src/settings_func.h @@ -1,4 +1,4 @@ -/* $Id: settings_func.h 25291 2013-05-26 19:27:22Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 925b261c45..e431f01206 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: settings_gui.cpp 27827 2017-03-25 12:21:17Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -115,19 +115,24 @@ static int GetCurRes() static void ShowCustCurrency(); template -static DropDownList *BuiltSetDropDownList(int *selected_index) +static DropDownList *BuildSetDropDownList(int *selected_index, bool allow_selection) { int n = T::GetNumSets(); *selected_index = T::GetIndexOfUsedSet(); DropDownList *list = new DropDownList(); for (int i = 0; i < n; i++) { - *list->Append() = new DropDownListCharStringItem(T::GetSet(i)->name, i, (_game_mode == GM_MENU) ? false : (*selected_index != i)); + *list->Append() = new DropDownListCharStringItem(T::GetSet(i)->name, i, !allow_selection && (*selected_index != i)); } return list; } +DropDownList *BuildMusicSetDropDownList(int *selected_index) +{ + return BuildSetDropDownList(selected_index, true); +} + /** Window for displaying the textfile of a BaseSet. */ template struct BaseSetTextfileWindow : public TextfileWindow { @@ -158,7 +163,7 @@ struct BaseSetTextfileWindow : public TextfileWindow { template void ShowBaseSetTextfileWindow(TextfileType file_type, const TBaseSet* baseset, StringID content_type) { - DeleteWindowByClass(WC_TEXTFILE); + DeleteWindowById(WC_TEXTFILE, file_type); new BaseSetTextfileWindow(file_type, baseset, content_type); } @@ -178,6 +183,7 @@ struct GameOptionsWindow : Window { ~GameOptionsWindow() { DeleteWindowById(WC_CUSTOM_CURRENCY, 0); + DeleteWindowByClass(WC_TEXTFILE); if (this->reload) _switch_mode = SM_MENU; } @@ -298,15 +304,15 @@ struct GameOptionsWindow : Window { } case WID_GO_BASE_GRF_DROPDOWN: - list = BuiltSetDropDownList(selected_index); + list = BuildSetDropDownList(selected_index, (_game_mode == GM_MENU)); break; case WID_GO_BASE_SFX_DROPDOWN: - list = BuiltSetDropDownList(selected_index); + list = BuildSetDropDownList(selected_index, (_game_mode == GM_MENU)); break; case WID_GO_BASE_MUSIC_DROPDOWN: - list = BuiltSetDropDownList(selected_index); + list = BuildMusicSetDropDownList(selected_index); break; default: @@ -545,7 +551,7 @@ struct GameOptionsWindow : Window { break; case WID_GO_BASE_MUSIC_DROPDOWN: - this->SetMediaSet(index); + ChangeMusicSet(index); break; } } @@ -1525,9 +1531,8 @@ static SettingsContainer &GetSettingsTree() SettingsPage *viewports = interface->Add(new SettingsPage(STR_CONFIG_SETTING_INTERFACE_VIEWPORTS)); { viewports->Add(new SettingEntry("gui.auto_scrolling")); - viewports->Add(new SettingEntry("gui.reverse_scroll")); + viewports->Add(new SettingEntry("gui.scroll_mode")); viewports->Add(new SettingEntry("gui.smooth_scroll")); - viewports->Add(new SettingEntry("gui.left_mouse_btn_scrolling")); /* While the horizontal scrollwheel scrolling is written as general code, only * the cocoa (OSX) driver generates input for it. * Since it's also able to completely disable the scrollwheel will we display it on all platforms anyway */ @@ -1604,6 +1609,7 @@ static SettingsContainer &GetSettingsTree() company->Add(new SettingEntry("gui.drag_signals_fixed_distance")); company->Add(new SettingEntry("gui.new_nonstop")); company->Add(new SettingEntry("gui.stop_location")); + company->Add(new SettingEntry("gui.starting_colour")); company->Add(new SettingEntry("company.engine_renew")); company->Add(new SettingEntry("company.engine_renew_months")); company->Add(new SettingEntry("company.engine_renew_money")); diff --git a/src/settings_gui.h b/src/settings_gui.h index b38e2f80d1..23a343219f 100644 --- a/src/settings_gui.h +++ b/src/settings_gui.h @@ -1,4 +1,4 @@ -/* $Id: settings_gui.h 26959 2014-10-04 20:34:43Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -13,6 +13,7 @@ #define SETTING_GUI_H #include "gfx_type.h" +#include "widgets/dropdown_type.h" /** Width of setting buttons */ #define SETTING_BUTTON_WIDTH ((int)NWidgetScrollbar::GetHorizontalDimension().width * 2) @@ -23,5 +24,10 @@ void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clic void DrawDropDownButton(int x, int y, Colours button_colour, bool state, bool clickable); void DrawBoolButton(int x, int y, bool state, bool clickable); +DropDownList *BuildMusicSetDropDownList(int *selected_index); + +/* Actually implemented in music_gui.cpp */ +void ChangeMusicSet(int index); + #endif /* SETTING_GUI_H */ diff --git a/src/settings_internal.h b/src/settings_internal.h index caa97a8f8a..028e977e48 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -1,4 +1,4 @@ -/* $Id: settings_internal.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/settings_type.h b/src/settings_type.h index a3c76687e7..c07036e4f8 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -1,4 +1,4 @@ -/* $Id: settings_type.h 27825 2017-03-24 18:55:16Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -71,6 +71,15 @@ struct DifficultySettings { byte town_council_tolerance; ///< minimum required town ratings to be allowed to demolish stuff }; +/** Settings relating to viewport/smallmap scrolling. */ +enum ViewportScrollMode { + VSM_VIEWPORT_RMB_FIXED, ///< Viewport moves with mouse movement on holding right mouse button, cursor position is fixed. + VSM_MAP_RMB_FIXED, ///< Map moves with mouse movement on holding right mouse button, cursor position is fixed. + VSM_MAP_RMB, ///< Map moves with mouse movement on holding right mouse button, cursor moves. + VSM_MAP_LMB, ///< Map moves with mouse movement on holding left mouse button, cursor moves. + VSM_END, ///< Number of scroll mode settings. +}; + /** Settings related to the GUI and other stuff that is not saved in the savegame. */ struct GUISettings { bool sg_full_load_any; ///< new full load calculation, any cargo must be full read from pre v93 savegames @@ -95,11 +104,11 @@ struct GUISettings { uint16 hover_delay_ms; ///< time required to activate a hover event, in milliseconds bool link_terraform_toolbar; ///< display terraform toolbar when displaying rail, road, water and airport toolbars uint8 smallmap_land_colour; ///< colour used for land and heightmap at the smallmap - bool reverse_scroll; ///< right-Click-Scrolling scrolls in the opposite direction + uint8 scroll_mode; ///< viewport scroll mode bool smooth_scroll; ///< smooth scroll viewports bool measure_tooltip; ///< show a permanent tooltip when dragging tools byte liveries; ///< options for displaying company liveries, 0=none, 1=self, 2=all - bool prefer_teamchat; ///< choose the chat message target with , true=all clients, false=your team + bool prefer_teamchat; ///< choose the chat message target with \, true=all clients, false=your team uint8 advanced_vehicle_list; ///< use the "advanced" vehicle list uint8 loading_indicators; ///< show loading indicators uint8 default_rail_type; ///< the default rail type for the rail GUI @@ -114,6 +123,7 @@ struct GUISettings { bool threaded_saves; ///< should we do threaded saves? bool keep_all_autosave; ///< name the autosave in a different way bool autosave_on_exit; ///< save an autosave when you quit the game, but do not ask "Do you really want to quit?" + bool autosave_on_network_disconnect; ///< save an autosave when you get disconnected from a network game with an error? uint8 date_format_in_default_names; ///< should the default savegame/screenshot name use long dates (31th Dec 2008), short dates (31-12-2008) or ISO dates (2008-12-31) byte max_num_autosaves; ///< controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1) bool population_in_label; ///< show the population of a town in his label? @@ -121,7 +131,6 @@ struct GUISettings { uint8 scrollwheel_scrolling; ///< scrolling using the scroll wheel? uint8 scrollwheel_multiplier; ///< how much 'wheel' per incoming event from the OS? bool timetable_arrival_departure; ///< show arrivals and departures in vehicle timetables - bool left_mouse_btn_scrolling; ///< left mouse button scroll bool right_mouse_wnd_close; ///< close window with right click bool pause_on_newgame; ///< whether to start new games paused or not bool enable_signal_gui; ///< show the signal GUI when the signal button is pressed @@ -146,6 +155,7 @@ struct GUISettings { byte missing_strings_threshold; ///< the number of missing strings before showing the warning uint8 graph_line_thickness; ///< the thickness of the lines in the various graph guis uint8 osk_activation; ///< Mouse gesture to trigger the OSK. + byte starting_colour; ///< default color scheme for the company to start a new game with uint16 console_backlog_timeout; ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity. uint16 console_backlog_length; ///< the minimum amount of items in the console backlog before items will be removed. diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index 2816625452..298539417e 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -1,4 +1,4 @@ -/* $Id: settingsgen.cpp 26506 2014-04-24 19:51:45Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,7 +18,7 @@ #include -#if (!defined(WIN32) && !defined(WIN64)) || defined(__CYGWIN__) +#if !defined(_WIN32) || defined(__CYGWIN__) #include #include #endif @@ -205,7 +205,6 @@ static const char *DEFAULTS_GROUP_NAME = "defaults"; ///< Name of the group c /** * Load the INI file. * @param filename Name of the file to load. - * @param subdir The subdirectory to load from. * @return Loaded INI data. */ static IniLoadFile *LoadIniFile(const char *filename) @@ -372,7 +371,10 @@ static bool CompareFiles(const char *n1, const char *n2) if (f2 == NULL) return false; FILE *f1 = fopen(n1, "rb"); - if (f1 == NULL) error("can't open %s", n1); + if (f1 == NULL) { + fclose(f2); + error("can't open %s", n1); + } size_t l1, l2; do { @@ -413,12 +415,12 @@ static const OptionData _opts[] = { * After loading, the [pre-amble] group is copied verbatim if it exists. * * For every group with a name that matches a template name the template is written. - * It starts with a optional '#if' line if an 'if' item exists in the group. The item - * value is used as condition. Similarly, '#ifdef' and '#ifndef' lines are also written. + * It starts with a optional \c \#if line if an 'if' item exists in the group. The item + * value is used as condition. Similarly, \c \#ifdef and \c \#ifndef lines are also written. * Below the macro processor directives, the value of the template is written * at a line with its variables replaced by item values of the group being written. * If the group has no item for the variable, the [defaults] group is tried as fall back. - * Finally, '#endif' lines are written to match the macro processor lines. + * Finally, \c \#endif lines are written to match the macro processor lines. * * Last but not least, the [post-amble] group is copied verbatim. * @@ -510,7 +512,7 @@ int CDECL main(int argc, char *argv[]) unlink(tmp_output); } else { /* Rename tmp2.xxx to output file. */ -#if defined(WIN32) || defined(WIN64) +#if defined(_WIN32) unlink(output_file); #endif if (rename(tmp_output, output_file) == -1) error("rename() failed"); diff --git a/src/ship.h b/src/ship.h index dbe13788a4..60d4466d68 100644 --- a/src/ship.h +++ b/src/ship.h @@ -1,4 +1,4 @@ -/* $Id: ship.h 27666 2016-10-16 14:57:56Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,17 +12,25 @@ #ifndef SHIP_H #define SHIP_H +#include + #include "vehicle_base.h" #include "water_map.h" void GetShipSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type); WaterClass GetEffectiveWaterClass(TileIndex tile); +typedef std::deque ShipPathCache; + /** * All ships have this type. */ struct Ship FINAL : public SpecializedVehicle { - TrackBitsByte state; ///< The "track" the ship is following. + TrackBitsByte state; ///< The "track" the ship is following. + ShipPathCache path; ///< Cached path. + DirectionByte rotation; ///< Visible direction. + int16 rotation_x_pos; ///< NOSAVE: X Position before rotation. + int16 rotation_y_pos; ///< NOSAVE: Y Position before rotation. /** We don't want GCC to zero our struct! It already is zeroed and has an index! */ Ship() : SpecializedVehicleBase() {} @@ -30,7 +38,7 @@ struct Ship FINAL : public SpecializedVehicle { virtual ~Ship() { this->PreDestructor(); } void MarkDirty(); - void UpdateDeltaXY(Direction direction); + void UpdateDeltaXY(); ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_SHIP_INC : EXPENSES_SHIP_RUN; } void PlayLeaveStationSound() const; bool IsPrimaryVehicle() const { return true; } @@ -46,8 +54,11 @@ struct Ship FINAL : public SpecializedVehicle { TileIndex GetOrderStationLocation(StationID station); bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse); void UpdateCache(); + void SetDestTile(TileIndex tile); }; +static const uint SHIP_MAX_ORDER_DISTANCE = 130; + /** * Iterate over all ships. * @param var The variable used for iteration. diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 78227561a2..23786c17d1 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: ship_cmd.cpp 27858 2017-04-23 09:19:32Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -34,6 +34,7 @@ #include "company_base.h" #include "tunnelbridge_map.h" #include "zoom_func.h" +#include "framerate_type.h" #include "table/strings.h" @@ -128,6 +129,8 @@ void Ship::GetImage(Direction direction, EngineImageType image_type, VehicleSpri { uint8 spritenum = this->spritenum; + if (image_type == EIT_ON_MAP) direction = this->rotation; + if (is_custom_sprite(spritenum)) { GetCustomVehicleSprite(this, direction, image_type, result); if (result->IsValid()) return; @@ -192,7 +195,7 @@ static void CheckIfShipNeedsService(Vehicle *v) } v->current_order.MakeGoToDepot(depot->index, ODTFB_SERVICE); - v->dest_tile = depot->xy; + v->SetDestTile(depot->xy); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } @@ -296,7 +299,7 @@ TileIndex Ship::GetOrderStationLocation(StationID station) } } -void Ship::UpdateDeltaXY(Direction direction) +void Ship::UpdateDeltaXY() { static const int8 _delta_xy_table[8][4] = { /* y_extent, x_extent, y_offs, x_offs */ @@ -310,12 +313,29 @@ void Ship::UpdateDeltaXY(Direction direction) {32, 6, -16, -3}, // NW }; - const int8 *bb = _delta_xy_table[direction]; + const int8 *bb = _delta_xy_table[this->rotation]; this->x_offs = bb[3]; this->y_offs = bb[2]; this->x_extent = bb[1]; this->y_extent = bb[0]; this->z_extent = 6; + + if (this->direction != this->rotation) { + /* If we are rotating, then it is possible the ship was moved to its next position. In that + * case, because we are still showing the old direction, the ship will appear to glitch sideways + * slightly. We can work around this by applying an additional offset to make the ship appear + * where it was before it moved. */ + this->x_offs -= this->x_pos - this->rotation_x_pos; + this->y_offs -= this->y_pos - this->rotation_y_pos; + } +} + +/** + * Test-procedure for HasVehicleOnPos to check for a ship. + */ +static Vehicle *EnsureNoVisibleShipProc(Vehicle *v, void *data) +{ + return v->type == VEH_SHIP && (v->vehstatus & VS_HIDDEN) == 0 ? v : NULL; } static bool CheckShipLeaveDepot(Ship *v) @@ -329,6 +349,13 @@ static bool CheckShipLeaveDepot(Ship *v) return true; } + /* Don't leave depot if no destination set */ + if (v->dest_tile == 0) return true; + + /* Don't leave depot if another vehicle is already entering/leaving */ + /* This helps avoid CPU load if many ships are set to start at the same time */ + if (HasVehicleOnPos(v->tile, NULL, &EnsureNoVisibleShipProc)) return true; + TileIndex tile = v->tile; Axis axis = GetShipDepotAxis(tile); @@ -354,10 +381,10 @@ static bool CheckShipLeaveDepot(Ship *v) if (north_tracks) { /* Leave towards north */ - v->direction = DiagDirToDir(north_dir); + v->rotation = v->direction = DiagDirToDir(north_dir); } else if (south_tracks) { /* Leave towards south */ - v->direction = DiagDirToDir(south_dir); + v->rotation = v->direction = DiagDirToDir(south_dir); } else { /* Both ways blocked */ return false; @@ -442,11 +469,41 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr bool path_found = true; Track track; - switch (_settings_game.pf.pathfinder_for_ships) { - case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; - case VPF_NPF: track = NPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; - case VPF_YAPF: track = YapfShipChooseTrack(v, tile, enterdir, tracks, path_found); break; - default: NOT_REACHED(); + + if (v->dest_tile == 0 || DistanceManhattan(tile, v->dest_tile) > SHIP_MAX_ORDER_DISTANCE + 5) { + /* No destination or destination too far, don't invoke pathfinder. */ + track = TrackBitsToTrack(v->state); + if (!IsDiagonalTrack(track)) track = TrackToOppositeTrack(track); + if (!HasBit(tracks, track)) { + /* Can't continue in same direction so pick first available track. */ + if (_settings_game.pf.forbid_90_deg) { + tracks &= ~TrackCrossesTracks(TrackdirToTrack(v->GetVehicleTrackdir())); + if (tracks == TRACK_BIT_NONE) return INVALID_TRACK; + } + track = FindFirstTrack(tracks); + } + path_found = false; + } else { + /* Attempt to follow cached path. */ + if (!v->path.empty()) { + track = TrackdirToTrack(v->path.front()); + + if (HasBit(tracks, track)) { + v->path.pop_front(); + /* HandlePathfindResult() is not called here because this is not a new pathfinder result. */ + return track; + } + + /* Cached path is invalid so continue with pathfinder. */ + v->path.clear(); + } + + switch (_settings_game.pf.pathfinder_for_ships) { + case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; + case VPF_NPF: track = NPFShipChooseTrack(v, path_found); break; + case VPF_YAPF: track = YapfShipChooseTrack(v, tile, enterdir, tracks, path_found, v->path); break; + default: NOT_REACHED(); + } } v->HandlePathfindingResult(path_found); @@ -493,11 +550,60 @@ static const byte _ship_subcoord[4][6][3] = { } }; +/** + * Test if a ship is in the centre of a lock and should move up or down. + * @param v Ship being tested. + * @return 0 if ship is not moving in lock, or -1 to move down, 1 to move up. + */ +static int ShipTestUpDownOnLock(const Ship *v) +{ + /* Suitable tile? */ + if (!IsTileType(v->tile, MP_WATER) || !IsLock(v->tile) || GetLockPart(v->tile) != LOCK_PART_MIDDLE) return 0; + + /* Must be at the centre of the lock */ + if ((v->x_pos & 0xF) != 8 || (v->y_pos & 0xF) != 8) return 0; + + DiagDirection diagdir = GetInclinedSlopeDirection(GetTileSlope(v->tile)); + assert(IsValidDiagDirection(diagdir)); + + if (DirToDiagDir(v->direction) == diagdir) { + /* Move up */ + return (v->z_pos < GetTileMaxZ(v->tile) * (int)TILE_HEIGHT) ? 1 : 0; + } else { + /* Move down */ + return (v->z_pos > GetTileZ(v->tile) * (int)TILE_HEIGHT) ? -1 : 0; + } +} + +/** + * Test and move a ship up or down in a lock. + * @param v Ship to move. + * @return true iff ship is moving up or down in a lock. + */ +static bool ShipMoveUpDownOnLock(Ship *v) +{ + /* Moving up/down through lock */ + int dz = ShipTestUpDownOnLock(v); + if (dz == 0) return false; + + if (v->cur_speed != 0) { + v->cur_speed = 0; + SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); + } + + if ((v->tick_counter & 7) == 0) { + v->z_pos += dz; + v->UpdatePosition(); + v->UpdateViewport(true, true); + } + + return true; +} + static void ShipController(Ship *v) { uint32 r; const byte *b; - Direction dir; Track track; TrackBits tracks; @@ -517,6 +623,18 @@ static void ShipController(Ship *v) v->ShowVisualEffect(); + /* Rotating on spot */ + if (v->direction != v->rotation) { + if ((v->tick_counter & 7) == 0) { + DirDiff diff = DirDifference(v->direction, v->rotation); + v->rotation = ChangeDir(v->rotation, diff > DIRDIFF_REVERSE ? DIRDIFF_45LEFT : DIRDIFF_45RIGHT); + v->UpdateViewport(true, true); + } + return; + } + + if (ShipMoveUpDownOnLock(v)) return; + if (!ShipAccelerate(v)) return; GetNewVehiclePosResult gp = GetNewVehiclePos(v); @@ -537,6 +655,10 @@ static void ShipController(Ship *v) if (v->current_order.IsType(OT_LEAVESTATION)) { v->current_order.Free(); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); + /* Test if continuing forward would lead to a dead-end, moving into the dock. */ + DiagDirection exitdir = VehicleExitDir(v->direction, v->state); + TileIndex tile = TileAddByDiagDir(v->tile, exitdir); + if (TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_WATER, 0, exitdir)) == TRACK_BIT_NONE) goto reverse_direction; } else if (v->dest_tile != 0) { /* We have a target, let's see if we reached it... */ if (v->current_order.IsType(OT_GOTO_WAYPOINT) && @@ -603,7 +725,25 @@ static void ShipController(Ship *v) if (old_wc != new_wc) v->UpdateCache(); } - v->direction = (Direction)b[2]; + Direction new_direction = (Direction)b[2]; + DirDiff diff = DirDifference(new_direction, v->direction); + switch (diff) { + case DIRDIFF_SAME: + case DIRDIFF_45RIGHT: + case DIRDIFF_45LEFT: + /* Continue at speed */ + v->rotation = v->direction = new_direction; + break; + + default: + /* Stop for rotation */ + v->cur_speed = 0; + v->direction = new_direction; + /* Remember our current location to avoid movement glitch */ + v->rotation_x_pos = v->x_pos; + v->rotation_y_pos = v->y_pos; + break; + } } } else { /* On a bridge */ @@ -619,7 +759,6 @@ static void ShipController(Ship *v) /* update image of ship, as well as delta XY */ v->x_pos = gp.x; v->y_pos = gp.y; - v->z_pos = GetSlopePixelZ(gp.x, gp.y); getout: v->UpdatePosition(); @@ -627,13 +766,19 @@ getout: return; reverse_direction: - dir = ReverseDir(v->direction); - v->direction = dir; + v->direction = ReverseDir(v->direction); + /* Remember our current location to avoid movement glitch */ + v->rotation_x_pos = v->x_pos; + v->rotation_y_pos = v->y_pos; + v->cur_speed = 0; + v->path.clear(); goto getout; } bool Ship::Tick() { + PerformanceAccumulator framerate(PFE_GL_SHIPS); + if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++; ShipController(this); @@ -641,13 +786,20 @@ bool Ship::Tick() return true; } +void Ship::SetDestTile(TileIndex tile) +{ + if (tile == this->dest_tile) return; + this->path.clear(); + this->dest_tile = tile; +} + /** * Build a ship. * @param tile tile of the depot where ship is built. * @param flags type of operation. * @param e the engine to build. * @param data unused. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) @@ -670,7 +822,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u v->y_pos = y; v->z_pos = GetSlopePixelZ(x, y); - v->UpdateDeltaXY(v->direction); + v->UpdateDeltaXY(); v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL; v->spritenum = svi->image_index; diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index 4694888d48..c6bf342d97 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: ship_gui.cpp 27667 2016-10-16 14:58:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signal.cpp b/src/signal.cpp index fd8b496233..b37e15074a 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -1,4 +1,4 @@ -/* $Id: signal.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signal_func.h b/src/signal_func.h index 08e9f62d8c..4597a039b0 100644 --- a/src/signal_func.h +++ b/src/signal_func.h @@ -1,4 +1,4 @@ -/* $Id: signal_func.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signal_type.h b/src/signal_type.h index 2b6b7bad6a..c7d06072a7 100644 --- a/src/signal_type.h +++ b/src/signal_type.h @@ -1,4 +1,4 @@ -/* $Id: signal_type.h 24367 2012-07-01 23:12:50Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signs.cpp b/src/signs.cpp index 9a7b680215..2a23a43c9c 100644 --- a/src/signs.cpp +++ b/src/signs.cpp @@ -1,4 +1,4 @@ -/* $Id: signs.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signs_base.h b/src/signs_base.h index f68153ecff..3e7b4c4651 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -1,4 +1,4 @@ -/* $Id: signs_base.h 23104 2011-11-04 11:09:06Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp index fd64894ec6..4badd36050 100644 --- a/src/signs_cmd.cpp +++ b/src/signs_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: signs_cmd.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signs_func.h b/src/signs_func.h index 8674c390ae..4cc89d947c 100644 --- a/src/signs_func.h +++ b/src/signs_func.h @@ -1,4 +1,4 @@ -/* $Id: signs_func.h 20516 2010-08-16 16:15:22Z terkhen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index cc3f873bb9..15adef0890 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: signs_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/signs_type.h b/src/signs_type.h index 57fb7aac3b..a539c66899 100644 --- a/src/signs_type.h +++ b/src/signs_type.h @@ -1,4 +1,4 @@ -/* $Id: signs_type.h 22406 2011-05-01 19:51:52Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/slope_func.h b/src/slope_func.h index 156c8124f5..4aff6b9d31 100644 --- a/src/slope_func.h +++ b/src/slope_func.h @@ -1,4 +1,4 @@ -/* $Id: slope_func.h 23106 2011-11-04 11:30:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/slope_type.h b/src/slope_type.h index 0a66a973dc..395b1f0fbc 100644 --- a/src/slope_type.h +++ b/src/slope_type.h @@ -1,4 +1,4 @@ -/* $Id: slope_type.h 23595 2011-12-19 17:48:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 8b193ec165..13bdbc86bf 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: smallmap_gui.cpp 27905 2017-08-31 06:48:55Z adf88 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,6 +23,7 @@ #include "sound_func.h" #include "window_func.h" #include "company_base.h" +#include "guitimer_func.h" #include "smallmap_gui.h" @@ -416,7 +417,7 @@ static const byte _tiletype_importance[] = { /** * Return the colour a tile would be displayed with in the small map in mode "Contour". * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Contour" */ static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t) @@ -429,7 +430,7 @@ static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Vehicles". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Vehicles" */ static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t) @@ -442,7 +443,7 @@ static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Industries". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Industries" */ static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t) @@ -455,7 +456,7 @@ static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Routes". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Routes" */ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t) @@ -488,7 +489,7 @@ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "link stats". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "link stats" */ static inline uint32 GetSmallMapLinkStatsPixels(TileIndex tile, TileType t) @@ -511,7 +512,7 @@ static const uint32 _vegetation_clear_bits[] = { * Return the colour a tile would be displayed with in the smallmap in mode "Vegetation". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the smallmap in mode "Vegetation" */ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t) @@ -538,7 +539,7 @@ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Owner". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Owner" */ static inline uint32 GetSmallMapOwnerPixels(TileIndex tile, TileType t) @@ -611,7 +612,7 @@ inline Point SmallMapWindow::RemapTile(int tile_x, int tile_y) const * that tile for a point in the smallmap. * @param px Horizontal coordinate of the pixel. * @param py Vertical coordinate of the pixel. - * @param sub[out] Pixel position at the tile (0..3). + * @param[out] sub Pixel position at the tile (0..3). * @param add_sub Add current #subscroll to the position. * @return Tile being displayed at the given position relative to #scroll_x and #scroll_y. * @note The #subscroll offset is already accounted for. @@ -641,11 +642,11 @@ inline Point SmallMapWindow::PixelToTile(int px, int py, int *sub, bool add_sub) /** * Compute base parameters of the smallmap such that tile (\a tx, \a ty) starts at pixel (\a x, \a y). - * @param tx Tile x coordinate. - * @param ty Tile y coordinate. - * @param x Non-negative horizontal position in the display where the tile starts. - * @param y Non-negative vertical position in the display where the tile starts. - * @param sub [out] Value of #subscroll needed. + * @param tx Tile x coordinate. + * @param ty Tile y coordinate. + * @param x Non-negative horizontal position in the display where the tile starts. + * @param y Non-negative vertical position in the display where the tile starts. + * @param[out] sub Value of #subscroll needed. * @return #scroll_x, #scroll_y values. */ Point SmallMapWindow::ComputeScroll(int tx, int ty, int x, int y, int *sub) @@ -922,8 +923,8 @@ void SmallMapWindow::DrawMapIndicators() const /* Find main viewport. */ const ViewPort *vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport; - Point upper_left_smallmap_coord = TranslateXYToTileCoord(vp, vp->left, vp->top, false); - Point lower_right_smallmap_coord = TranslateXYToTileCoord(vp, vp->left + vp->width - 1, vp->top + vp->height - 1, false); + Point upper_left_smallmap_coord = InverseRemapCoords2(vp->virtual_left, vp->virtual_top); + Point lower_right_smallmap_coord = InverseRemapCoords2(vp->virtual_left + vp->virtual_width - 1, vp->virtual_top + vp->virtual_height - 1); Point upper_left = this->RemapTile(upper_left_smallmap_coord.x / (int)TILE_SIZE, upper_left_smallmap_coord.y / (int)TILE_SIZE); upper_left.x -= this->subscroll; @@ -1055,7 +1056,7 @@ void SmallMapWindow::SetupWidgetData() this->GetWidget(WID_SM_SELECT_BUTTONS)->SetDisplayedPlane(plane); } -SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc), refresh(FORCE_REFRESH_PERIOD) +SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc), refresh(GUITimer(FORCE_REFRESH_PERIOD)) { _smallmap_industry_highlight = INVALID_INDUSTRYTYPE; this->overlay = new LinkGraphOverlay(this, WID_SM_MAP, 0, this->GetOverlayCompanyMask(), 1); @@ -1351,7 +1352,7 @@ void SmallMapWindow::SelectLegendItem(int click_pos, LegendAndColour *legend, in */ void SmallMapWindow::SetOverlayCargoMask() { - uint32 cargo_mask = 0; + CargoTypes cargo_mask = 0; for (int i = 0; i != _smallmap_cargo_count; ++i) { if (_legend_linkstats[i].show_on_map) SetBit(cargo_mask, _legend_linkstats[i].type); } @@ -1390,7 +1391,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) } if (new_highlight != _smallmap_industry_highlight) { _smallmap_industry_highlight = new_highlight; - this->refresh = _smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD; + this->refresh.SetInterval(_smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD); _smallmap_industry_highlight_state = true; this->SetDirty(); } @@ -1559,7 +1560,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) /* virtual */ void SmallMapWindow::OnMouseWheel(int wheel) { - if (_settings_client.gui.scrollwheel_scrolling == 0) { + if (_settings_client.gui.scrollwheel_scrolling != 2) { const NWidgetBase *wid = this->GetWidget(WID_SM_MAP); int cursor_x = _cursor.pos.x - this->left - wid->pos_x; int cursor_y = _cursor.pos.y - this->top - wid->pos_y; @@ -1570,10 +1571,10 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) } } -/* virtual */ void SmallMapWindow::OnTick() +/* virtual */ void SmallMapWindow::OnRealtimeTick(uint delta_ms) { /* Update the window every now and then */ - if (--this->refresh != 0) return; + if (!this->refresh.Elapsed(delta_ms)) return; if (this->map_type == SMT_LINKSTATS) { uint32 company_mask = this->GetOverlayCompanyMask(); @@ -1585,7 +1586,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) } _smallmap_industry_highlight_state = !_smallmap_industry_highlight_state; - this->refresh = _smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD; + this->refresh.SetInterval(_smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD); this->SetDirty(); } @@ -1628,7 +1629,7 @@ void SmallMapWindow::SetNewScroll(int sx, int sy, int sub) /* virtual */ void SmallMapWindow::OnScroll(Point delta) { - _cursor.fix_at = true; + if (_settings_client.gui.scroll_mode == VSM_VIEWPORT_RMB_FIXED || _settings_client.gui.scroll_mode == VSM_MAP_RMB_FIXED) _cursor.fix_at = true; /* While tile is at (delta.x, delta.y)? */ int sub; @@ -1644,7 +1645,7 @@ void SmallMapWindow::SetNewScroll(int sx, int sy, int sub) void SmallMapWindow::SmallMapCenterOnCurrentPos() { const ViewPort *vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport; - Point viewport_center = TranslateXYToTileCoord(vp, vp->left + vp->width / 2, vp->top + vp->height / 2); + Point viewport_center = InverseRemapCoords2(vp->virtual_left + vp->virtual_width / 2, vp->virtual_top + vp->virtual_height / 2); int sub; const NWidgetBase *wid = this->GetWidget(WID_SM_MAP); diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h index 6b3421f4b2..486f2a6524 100644 --- a/src/smallmap_gui.h +++ b/src/smallmap_gui.h @@ -1,4 +1,4 @@ -/* $Id: smallmap_gui.h 27905 2017-08-31 06:48:55Z adf88 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -19,6 +19,7 @@ #include "blitter/factory.hpp" #include "linkgraph/linkgraph_gui.h" #include "widgets/smallmap_widget.h" +#include "guitimer_func.h" /* set up the cargos to be displayed in the smallmap's route legend */ void BuildLinkStatsLegend(); @@ -67,8 +68,8 @@ protected: static const uint LEGEND_BLOB_WIDTH = 8; ///< Width of the coloured blob in front of a line text in the #WID_SM_LEGEND widget. static const uint INDUSTRY_MIN_NUMBER_OF_COLUMNS = 2; ///< Minimal number of columns in the #WID_SM_LEGEND widget for the #SMT_INDUSTRY legend. - static const uint FORCE_REFRESH_PERIOD = 0x1F; ///< map is redrawn after that many ticks - static const uint BLINK_PERIOD = 0x0F; ///< highlight blinking interval + static const uint FORCE_REFRESH_PERIOD = 930; ///< map is redrawn after that many milliseconds. + static const uint BLINK_PERIOD = 450; ///< highlight blinking interval in milliseconds. uint min_number_of_columns; ///< Minimal number of columns in legends. uint min_number_of_fixed_rows; ///< Minimal number of rows in the legends for the fixed layouts only (all except #SMT_INDUSTRY). @@ -79,7 +80,7 @@ protected: int32 subscroll; ///< Number of pixels (0..3) between the right end of the base tile and the pixel at the top-left corner of the smallmap display. int zoom; ///< Zoom level. Bigger number means more zoom-out (further away). - uint8 refresh; ///< Refresh counter, zeroed every FORCE_REFRESH_PERIOD ticks. + GUITimer refresh; ///< Refresh timer. LinkGraphOverlay *overlay; static void BreakIndustryChainLink(); @@ -187,7 +188,7 @@ public: virtual void OnInvalidateData(int data = 0, bool gui_scope = true); virtual bool OnRightClick(Point pt, int widget); virtual void OnMouseWheel(int wheel); - virtual void OnTick(); + virtual void OnRealtimeTick(uint delta_ms); virtual void OnScroll(Point delta); virtual void OnMouseOver(Point pt, int widget); }; diff --git a/src/sortlist_type.h b/src/sortlist_type.h index 5bf1ce26f3..1a30c3b1a8 100644 --- a/src/sortlist_type.h +++ b/src/sortlist_type.h @@ -1,4 +1,4 @@ -/* $Id: sortlist_type.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound.cpp b/src/sound.cpp index 5bbb2b7072..79dd988bfa 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -1,4 +1,4 @@ -/* $Id: sound.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp index 66db263eed..88a723ff85 100644 --- a/src/sound/allegro_s.cpp +++ b/src/sound/allegro_s.cpp @@ -1,4 +1,4 @@ -/* $Id: allegro_s.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/allegro_s.h b/src/sound/allegro_s.h index 65a91e20e8..e0a247f7b3 100644 --- a/src/sound/allegro_s.h +++ b/src/sound/allegro_s.h @@ -1,4 +1,4 @@ -/* $Id: allegro_s.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/cocoa_s.cpp b/src/sound/cocoa_s.cpp index b4c395456c..8133bf62f6 100644 --- a/src/sound/cocoa_s.cpp +++ b/src/sound/cocoa_s.cpp @@ -1,4 +1,4 @@ -/* $Id: cocoa_s.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -18,6 +18,7 @@ #ifdef WITH_COCOA #include "../stdafx.h" +#include "../os/macosx/macos.h" #include "../debug.h" #include "../driver.h" #include "../mixer.h" @@ -47,8 +48,6 @@ static OSStatus audioCallback(void *inRefCon, AudioUnitRenderActionFlags *inActi const char *SoundDriver_Cocoa::Start(const char * const *parm) { - Component comp; - ComponentDescription desc; struct AURenderCallbackStruct callback; AudioStreamBasicDescription requestedDesc; @@ -71,21 +70,49 @@ const char *SoundDriver_Cocoa::Start(const char * const *parm) MxInitialize((uint)requestedDesc.mSampleRate); - /* Locate the default output audio unit */ - desc.componentType = kAudioUnitType_Output; - desc.componentSubType = kAudioUnitSubType_HALOutput; - desc.componentManufacturer = kAudioUnitManufacturer_Apple; - desc.componentFlags = 0; - desc.componentFlagsMask = 0; +#if defined(__AUDIOCOMPONENT_H__) || defined(HAVE_OSX_107_SDK) + if (MacOSVersionIsAtLeast(10, 6, 0)) { + /* Locate the default output audio unit */ + AudioComponentDescription desc; + desc.componentType = kAudioUnitType_Output; + desc.componentSubType = kAudioUnitSubType_HALOutput; + desc.componentManufacturer = kAudioUnitManufacturer_Apple; + desc.componentFlags = 0; + desc.componentFlagsMask = 0; - comp = FindNextComponent (NULL, &desc); - if (comp == NULL) { - return "cocoa_s: Failed to start CoreAudio: FindNextComponent returned NULL"; - } + AudioComponent comp = AudioComponentFindNext (NULL, &desc); + if (comp == NULL) { + return "cocoa_s: Failed to start CoreAudio: AudioComponentFindNext returned NULL"; + } - /* Open & initialize the default output audio unit */ - if (OpenAComponent(comp, &_outputAudioUnit) != noErr) { - return "cocoa_s: Failed to start CoreAudio: OpenAComponent"; + /* Open & initialize the default output audio unit */ + if (AudioComponentInstanceNew(comp, &_outputAudioUnit) != noErr) { + return "cocoa_s: Failed to start CoreAudio: AudioComponentInstanceNew"; + } + } else +#endif + { +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) + /* Locate the default output audio unit */ + ComponentDescription desc; + desc.componentType = kAudioUnitType_Output; + desc.componentSubType = kAudioUnitSubType_HALOutput; + desc.componentManufacturer = kAudioUnitManufacturer_Apple; + desc.componentFlags = 0; + desc.componentFlagsMask = 0; + + Component comp = FindNextComponent (NULL, &desc); + if (comp == NULL) { + return "cocoa_s: Failed to start CoreAudio: FindNextComponent returned NULL"; + } + + /* Open & initialize the default output audio unit */ + if (OpenAComponent(comp, &_outputAudioUnit) != noErr) { + return "cocoa_s: Failed to start CoreAudio: OpenAComponent"; + } +#else + return "cocoa_s: Not supported on this OS X version"; +#endif } if (AudioUnitInitialize(_outputAudioUnit) != noErr) { @@ -132,9 +159,21 @@ void SoundDriver_Cocoa::Stop() return; } - if (CloseComponent(_outputAudioUnit) != noErr) { - DEBUG(driver, 0, "cocoa_s: Core_CloseAudio: CloseComponent failed"); - return; +#if defined(__AUDIOCOMPONENT_H__) || defined(HAVE_OSX_107_SDK) + if (MacOSVersionIsAtLeast(10, 6, 0)) { + if (AudioComponentInstanceDispose(_outputAudioUnit) != noErr) { + DEBUG(driver, 0, "cocoa_s: Core_CloseAudio: AudioComponentInstanceDispose failed"); + return; + } + } else +#endif + { +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) + if (CloseComponent(_outputAudioUnit) != noErr) { + DEBUG(driver, 0, "cocoa_s: Core_CloseAudio: CloseComponent failed"); + return; + } +#endif } } diff --git a/src/sound/cocoa_s.h b/src/sound/cocoa_s.h index 7d617033c9..7010914258 100644 --- a/src/sound/cocoa_s.h +++ b/src/sound/cocoa_s.h @@ -1,4 +1,4 @@ -/* $Id: cocoa_s.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/null_s.cpp b/src/sound/null_s.cpp index 5bfe2ffb1d..3dc95c46ff 100644 --- a/src/sound/null_s.cpp +++ b/src/sound/null_s.cpp @@ -1,4 +1,4 @@ -/* $Id: null_s.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/null_s.h b/src/sound/null_s.h index c923e777f7..b2acd90937 100644 --- a/src/sound/null_s.h +++ b/src/sound/null_s.h @@ -1,4 +1,4 @@ -/* $Id: null_s.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/sdl_s.cpp b/src/sound/sdl_s.cpp index e656d5f58c..e3fb99eaa7 100644 --- a/src/sound/sdl_s.cpp +++ b/src/sound/sdl_s.cpp @@ -1,4 +1,4 @@ -/* $Id: sdl_s.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/sdl_s.h b/src/sound/sdl_s.h index 7182790e32..544ce2070d 100644 --- a/src/sound/sdl_s.h +++ b/src/sound/sdl_s.h @@ -1,4 +1,4 @@ -/* $Id: sdl_s.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/sound_driver.hpp b/src/sound/sound_driver.hpp index a9b398cb0a..0df69b8b45 100644 --- a/src/sound/sound_driver.hpp +++ b/src/sound/sound_driver.hpp @@ -1,4 +1,4 @@ -/* $Id: sound_driver.hpp 26538 2014-04-28 21:06:51Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp index 7b646bb716..c9c1a8afdc 100644 --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -1,4 +1,4 @@ -/* $Id: win32_s.cpp 27673 2016-10-30 18:22:55Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound/win32_s.h b/src/sound/win32_s.h index d55de40ca2..c6c8e8d149 100644 --- a/src/sound/win32_s.h +++ b/src/sound/win32_s.h @@ -1,4 +1,4 @@ -/* $Id: win32_s.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,7 +26,7 @@ public: /** Factory for the sound driver for Windows. */ class FSoundDriver_Win32 : public DriverFactoryBase { public: - FSoundDriver_Win32() : DriverFactoryBase(Driver::DT_SOUND, 10, "win32", "Win32 WaveOut Sound Driver") {} + FSoundDriver_Win32() : DriverFactoryBase(Driver::DT_SOUND, 9, "win32", "Win32 WaveOut Sound Driver") {} /* virtual */ Driver *CreateInstance() const { return new SoundDriver_Win32(); } }; diff --git a/src/sound/xaudio2_s.cpp b/src/sound/xaudio2_s.cpp new file mode 100644 index 0000000000..60311ced20 --- /dev/null +++ b/src/sound/xaudio2_s.cpp @@ -0,0 +1,273 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file xaudio2_s.cpp XAudio2 sound driver. */ + +#ifdef WITH_XAUDIO2 + +#include "../stdafx.h" +#include "../openttd.h" +#include "../driver.h" +#include "../mixer.h" +#include "../debug.h" +#include "../core/alloc_func.hpp" +#include "../core/bitmath_func.hpp" +#include "../core/math_func.hpp" + +// Windows 8 SDK required for XAudio2 +#undef NTDDI_VERSION +#undef _WIN32_WINNT + +#define NTDDI_VERSION NTDDI_WIN8 +#define _WIN32_WINNT _WIN32_WINNT_WIN8 + +#include "xaudio2_s.h" + +#include +#include +#include +#include + +using Microsoft::WRL::ComPtr; + +#include "../os/windows/win32.h" +#include "../safeguards.h" + +// Definition of the "XAudio2Create" call used to initialise XAudio2 +typedef HRESULT(__stdcall *API_XAudio2Create)(_Outptr_ IXAudio2** ppXAudio2, UINT32 Flags, XAUDIO2_PROCESSOR XAudio2Processor); + +static FSoundDriver_XAudio2 iFSoundDriver_XAudio2; + +/** +* Implementation of the IXAudio2VoiceCallback interface. +* Provides buffered audio to XAudio2 from the OpenTTD mixer. +*/ +class StreamingVoiceContext : public IXAudio2VoiceCallback +{ +private: + int bufferLength; + char *buffer; + +public: + IXAudio2SourceVoice* SourceVoice; + + StreamingVoiceContext(int bufferLength) + { + this->bufferLength = bufferLength; + this->buffer = MallocT(bufferLength); + } + + virtual ~StreamingVoiceContext() + { + free(this->buffer); + } + + HRESULT SubmitBuffer() + { + // Ensure we do have a valid voice + if (this->SourceVoice == nullptr) + { + return E_FAIL; + } + + MxMixSamples(this->buffer, this->bufferLength / 4); + + XAUDIO2_BUFFER buf = { 0 }; + buf.AudioBytes = this->bufferLength; + buf.pAudioData = (const BYTE *) this->buffer; + + return SourceVoice->SubmitSourceBuffer(&buf); + } + + STDMETHOD_(void, OnVoiceProcessingPassStart)(UINT32) override + { + } + + STDMETHOD_(void, OnVoiceProcessingPassEnd)() override + { + } + + STDMETHOD_(void, OnStreamEnd)() override + { + } + + STDMETHOD_(void, OnBufferStart)(void*) override + { + } + + STDMETHOD_(void, OnBufferEnd)(void*) override + { + SubmitBuffer(); + } + + STDMETHOD_(void, OnLoopEnd)(void*) override + { + } + + STDMETHOD_(void, OnVoiceError)(void*, HRESULT) override + { + } +}; + +static HMODULE _xaudio_dll_handle; +static IXAudio2SourceVoice* _source_voice = nullptr; +static IXAudio2MasteringVoice* _mastering_voice = nullptr; +static ComPtr _xaudio2; +static StreamingVoiceContext* _voice_context = nullptr; + +/** +* Initialises the XAudio2 driver. +* +* @param parm Driver parameters. +* @return An error message if unsuccessful, or NULL otherwise. +* +*/ +const char *SoundDriver_XAudio2::Start(const char * const *parm) +{ + HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED); + + if (FAILED(hr)) + { + DEBUG(driver, 0, "xaudio2_s: CoInitializeEx failed (%08x)", hr); + return "Failed to initialise COM"; + } + + _xaudio_dll_handle = LoadLibraryA(XAUDIO2_DLL_A); + + if (_xaudio_dll_handle == NULL) + { + CoUninitialize(); + + DEBUG(driver, 0, "xaudio2_s: Unable to load " XAUDIO2_DLL_A); + return "Failed to load XAudio2 DLL"; + } + + API_XAudio2Create xAudio2Create = (API_XAudio2Create) GetProcAddress(_xaudio_dll_handle, "XAudio2Create"); + + if (xAudio2Create == NULL) + { + FreeLibrary(_xaudio_dll_handle); + CoUninitialize(); + + DEBUG(driver, 0, "xaudio2_s: Unable to find XAudio2Create function in DLL"); + return "Failed to load XAudio2 DLL"; + } + + // Create the XAudio engine + UINT32 flags = 0; + hr = xAudio2Create(_xaudio2.GetAddressOf(), flags, XAUDIO2_DEFAULT_PROCESSOR); + + if (FAILED(hr)) + { + FreeLibrary(_xaudio_dll_handle); + CoUninitialize(); + + DEBUG(driver, 0, "xaudio2_s: XAudio2Create failed (%08x)", hr); + return "Failed to inititialise the XAudio2 engine"; + } + + // Create a mastering voice + hr = _xaudio2->CreateMasteringVoice(&_mastering_voice); + + if (FAILED(hr)) + { + _xaudio2.Reset(); + FreeLibrary(_xaudio_dll_handle); + CoUninitialize(); + + DEBUG(driver, 0, "xaudio2_s: CreateMasteringVoice failed (%08x)", hr); + return "Failed to create a mastering voice"; + } + + // Create a source voice to stream our audio + WAVEFORMATEX wfex; + + wfex.wFormatTag = WAVE_FORMAT_PCM; + wfex.nChannels = 2; + wfex.wBitsPerSample = 16; + wfex.nSamplesPerSec = GetDriverParamInt(parm, "hz", 44100); + wfex.nBlockAlign = (wfex.nChannels * wfex.wBitsPerSample) / 8; + wfex.nAvgBytesPerSec = wfex.nSamplesPerSec * wfex.nBlockAlign; + + // Limit buffer size to prevent overflows + int bufsize = GetDriverParamInt(parm, "bufsize", 8192); + bufsize = min(bufsize, UINT16_MAX); + + _voice_context = new StreamingVoiceContext(bufsize * 4); + + if (_voice_context == nullptr) + { + _mastering_voice->DestroyVoice(); + _xaudio2.Reset(); + FreeLibrary(_xaudio_dll_handle); + CoUninitialize(); + + return "Failed to create streaming voice context"; + } + + hr = _xaudio2->CreateSourceVoice(&_source_voice, &wfex, 0, 1.0f, _voice_context); + + if (FAILED(hr)) + { + _mastering_voice->DestroyVoice(); + _xaudio2.Reset(); + FreeLibrary(_xaudio_dll_handle); + CoUninitialize(); + + DEBUG(driver, 0, "xaudio2_s: CreateSourceVoice failed (%08x)", hr); + return "Failed to create a source voice"; + } + + _voice_context->SourceVoice = _source_voice; + hr = _source_voice->Start(0, 0); + + if (FAILED(hr)) + { + DEBUG(driver, 0, "xaudio2_s: _source_voice->Start failed (%08x)", hr); + + Stop(); + return "Failed to start the source voice"; + } + + MxInitialize(wfex.nSamplesPerSec); + + // Submit the first buffer + hr = _voice_context->SubmitBuffer(); + + if (FAILED(hr)) + { + DEBUG(driver, 0, "xaudio2_s: _voice_context->SubmitBuffer failed (%08x)", hr); + + Stop(); + return "Failed to submit the first audio buffer"; + } + + return NULL; +} + +/** +* Terminates the XAudio2 driver. +*/ +void SoundDriver_XAudio2::Stop() +{ + // Clean up XAudio2 + _source_voice->DestroyVoice(); + + delete _voice_context; + _voice_context = nullptr; + + _mastering_voice->DestroyVoice(); + + _xaudio2.Reset(); + + FreeLibrary(_xaudio_dll_handle); + CoUninitialize(); +} + +#endif diff --git a/src/sound/xaudio2_s.h b/src/sound/xaudio2_s.h new file mode 100644 index 0000000000..2385f49ee2 --- /dev/null +++ b/src/sound/xaudio2_s.h @@ -0,0 +1,33 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file xaudio2_s.h Base for XAudio2 sound handling. */ + +#ifndef SOUND_XAUDIO2_H +#define SOUND_XAUDIO2_H + +#include "sound_driver.hpp" + +/** Implementation of the XAudio2 sound driver. */ +class SoundDriver_XAudio2 : public SoundDriver { +public: + /* virtual */ const char *Start(const char * const *param); + + /* virtual */ void Stop(); + /* virtual */ const char *GetName() const { return "xaudio2"; } +}; + +/** Factory for the XAudio2 sound driver. */ +class FSoundDriver_XAudio2 : public DriverFactoryBase { +public: + FSoundDriver_XAudio2() : DriverFactoryBase(Driver::DT_SOUND, 10, "xaudio2", "XAudio2 Sound Driver") {} + /* virtual */ Driver *CreateInstance() const { return new SoundDriver_XAudio2(); } +}; + +#endif /* SOUND_XAUDIO2_H */ diff --git a/src/sound_func.h b/src/sound_func.h index 8a355f9254..7117bb6466 100644 --- a/src/sound_func.h +++ b/src/sound_func.h @@ -1,4 +1,4 @@ -/* $Id: sound_func.h 22202 2011-03-05 18:00:48Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sound_type.h b/src/sound_type.h index 3a4b910853..76fe25139e 100644 --- a/src/sound_type.h +++ b/src/sound_type.h @@ -1,4 +1,4 @@ -/* $Id: sound_type.h 27507 2016-02-08 21:05:57Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sprite.cpp b/src/sprite.cpp index d6f6208c50..22210712a9 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -1,4 +1,4 @@ -/* $Id: sprite.cpp 27134 2015-02-01 20:54:24Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/sprite.h b/src/sprite.h index 7ea7f38ea5..16da834c75 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -1,4 +1,4 @@ -/* $Id: sprite.h 23706 2012-01-01 17:36:19Z smatz $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/spritecache.cpp b/src/spritecache.cpp index 381c3d337e..579791d0d4 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -1,4 +1,4 @@ -/* $Id: spritecache.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/spritecache.h b/src/spritecache.h index 5672574043..8013105183 100644 --- a/src/spritecache.h +++ b/src/spritecache.h @@ -1,4 +1,4 @@ -/* $Id: spritecache.h 27732 2017-01-14 18:30:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index a0c54246e5..b21e70b1db 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -1,4 +1,4 @@ -/* $Id: grf.cpp 27004 2014-10-12 20:43:25Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/spriteloader/grf.hpp b/src/spriteloader/grf.hpp index a2e6a57d4d..4081a9f337 100644 --- a/src/spriteloader/grf.hpp +++ b/src/spriteloader/grf.hpp @@ -1,4 +1,4 @@ -/* $Id: grf.hpp 23897 2012-02-04 22:18:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp index 58a0f37436..060e72d16b 100644 --- a/src/spriteloader/spriteloader.hpp +++ b/src/spriteloader/spriteloader.hpp @@ -1,4 +1,4 @@ -/* $Id: spriteloader.hpp 23897 2012-02-04 22:18:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/station.cpp b/src/station.cpp index 9909279453..405f40f96e 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -1,4 +1,4 @@ -/* $Id: station.cpp 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -36,9 +36,6 @@ StationPool _station_pool("Station"); INSTANTIATE_POOL_METHODS(Station) -typedef StationIDStack::SmallStackPool StationIDStackPool; -template<> StationIDStackPool StationIDStack::_pool = StationIDStackPool(); - BaseStation::~BaseStation() { free(this->name); diff --git a/src/station_base.h b/src/station_base.h index 59ad126874..086d4332c5 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -1,4 +1,4 @@ -/* $Id: station_base.h 27178 2015-03-07 18:27:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -470,7 +470,7 @@ public: byte last_vehicle_type; std::list loading_vehicles; GoodsEntry goods[NUM_CARGO]; ///< Goods at this station - uint32 always_accepted; ///< Bitmask of always accepted cargo types (by houses, HQs, industry tiles when industry doesn't accept cargo) + CargoTypes always_accepted; ///< Bitmask of always accepted cargo types (by houses, HQs, industry tiles when industry doesn't accept cargo) IndustryVector industries_near; ///< Cached list of industries near the station that can accept cargo, @see DeliverGoodsToIndustry() @@ -516,7 +516,7 @@ private: public: /** * Construct the iterator. - * @param ta Area, i.e. begin point and width/height of to-be-iterated area. + * @param st Station the airport is part of. */ AirportTileIterator(const Station *st) : OrthogonalTileIterator(st->airport), st(st) { diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0ca20cc5f4..f088ccf6e2 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: station_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -89,25 +89,25 @@ bool IsHangar(TileIndex t) } /** - * Look for a station around the given tile area. + * Look for a station owned by the given company around the given tile area. * @param ta the area to search over - * @param closest_station the closest station found so far + * @param closest_station the closest owned station found so far + * @param company the company whose stations to look for * @param st to 'return' the found station * @return Succeeded command (if zero or one station found) or failed command (for two or more stations found). */ template -CommandCost GetStationAround(TileArea ta, StationID closest_station, T **st) +CommandCost GetStationAround(TileArea ta, StationID closest_station, CompanyID company, T **st) { ta.tile -= TileDiffXY(1, 1); ta.w += 2; ta.h += 2; - /* check around to see if there's any stations there */ + /* check around to see if there are any stations there owned by the company */ TILE_AREA_LOOP(tile_cur, ta) { if (IsTileType(tile_cur, MP_STATION)) { StationID t = GetStationIndex(tile_cur); - if (!T::IsValidID(t)) continue; - + if (!T::IsValidID(t) || Station::Get(t)->owner != company) continue; if (closest_station == INVALID_STATION) { closest_station = t; } else if (closest_station != t) { @@ -440,12 +440,12 @@ void UpdateAllStationVirtCoords() * @param st Station to query * @return the expected mask */ -static uint GetAcceptanceMask(const Station *st) +static CargoTypes GetAcceptanceMask(const Station *st) { - uint mask = 0; + CargoTypes mask = 0; for (CargoID i = 0; i < NUM_CARGO; i++) { - if (HasBit(st->goods[i].status, GoodsEntry::GES_ACCEPTANCE)) mask |= 1 << i; + if (HasBit(st->goods[i].status, GoodsEntry::GES_ACCEPTANCE)) SetBit(mask, i); } return mask; } @@ -524,7 +524,7 @@ CargoArray GetProductionAroundTiles(TileIndex tile, int w, int h, int rad) * @param rad Search radius in addition to given area * @param always_accepted bitmask of cargo accepted by houses and headquarters; can be NULL */ -CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, uint32 *always_accepted) +CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, CargoTypes *always_accepted) { CargoArray acceptance; if (always_accepted != NULL) *always_accepted = 0; @@ -562,7 +562,7 @@ CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, uint3 void UpdateStationAcceptance(Station *st, bool show_msg) { /* old accepted goods types */ - uint old_acc = GetAcceptanceMask(st); + CargoTypes old_acc = GetAcceptanceMask(st); /* And retrieve the acceptance. */ CargoArray acceptance; @@ -595,7 +595,7 @@ void UpdateStationAcceptance(Station *st, bool show_msg) } /* Only show a message in case the acceptance was actually changed. */ - uint new_acc = GetAcceptanceMask(st); + CargoTypes new_acc = GetAcceptanceMask(st); if (old_acc == new_acc) return; /* show a message to report that the acceptance was changed? */ @@ -662,7 +662,7 @@ static void UpdateStationSignCoord(BaseStation *st) /** * Common part of building various station parts and possibly attaching them to an existing one. - * @param [in,out] st Station to attach to + * @param[in,out] st Station to attach to * @param flags Command flags * @param reuse Whether to try to reuse a deleted station (gray sign) if possible * @param area Area occupied by the new part @@ -676,7 +676,7 @@ static CommandCost BuildStationPart(Station **st, DoCommandFlag flags, bool reus if (*st != NULL) { if ((*st)->owner != _current_company) { - return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION); + return_cmd_error(CMD_ERROR); } CommandCost ret = (*st)->rect.BeforeAddRect(area.tile, area.w, area.h, StationRect::ADD_TEST); @@ -771,22 +771,22 @@ CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z } /** - * Tries to clear the given area. - * @param tile_area Area to check. + * Checks if an airport can be built at the given location and clear the area. + * @param tile_iter Airport tile iterator. * @param flags Operation to perform. * @return The cost in case of success, or an error code if it failed. */ -CommandCost CheckFlatLand(TileArea tile_area, DoCommandFlag flags) +static CommandCost CheckFlatLandAirport(AirportTileTableIterator tile_iter, DoCommandFlag flags) { CommandCost cost(EXPENSES_CONSTRUCTION); int allowed_z = -1; - TILE_AREA_LOOP(tile_cur, tile_area) { - CommandCost ret = CheckBuildableTile(tile_cur, 0, allowed_z, true); + for (; tile_iter != INVALID_TILE; ++tile_iter) { + CommandCost ret = CheckBuildableTile(tile_iter, 0, allowed_z, true); if (ret.Failed()) return ret; cost.AddCost(ret); - ret = DoCommand(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR); + ret = DoCommand(tile_iter, 0, 0, flags, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; cost.AddCost(ret); } @@ -960,6 +960,8 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags num_roadbits += CountBits(GetRoadBits(cur_tile, ROADTYPE_ROAD)); } + if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE) return_cmd_error(STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD); + /* There is a tram, check if we can build road+tram stop over it. */ if (HasBit(cur_rts, ROADTYPE_TRAM)) { Owner tram_owner = GetRoadOwner(cur_tile, ROADTYPE_TRAM); @@ -1103,8 +1105,8 @@ CommandCost FindJoiningBaseStation(StationID existing_station, StationID station } if (check_surrounding) { - /* Make sure there are no similar stations around us. */ - CommandCost ret = GetStationAround(ta, existing_station, st); + /* Make sure there is no more than one other station around us that is owned by us. */ + CommandCost ret = GetStationAround(ta, existing_station, _current_company, st); if (ret.Failed()) return ret; } @@ -1171,8 +1173,8 @@ static void RestoreTrainReservation(Train *v) * @param tile_org northern most position of station dragging/placement * @param flags operation to perform * @param p1 various bitstuffed elements - * - p1 = (bit 0- 3) - railtype - * - p1 = (bit 4) - orientation (Axis) + * - p1 = (bit 0- 5) - railtype + * - p1 = (bit 6) - orientation (Axis) * - p1 = (bit 8-15) - number of tracks * - p1 = (bit 16-23) - platform length * - p1 = (bit 24) - allow stations directly adjacent to other stations. @@ -1186,8 +1188,8 @@ static void RestoreTrainReservation(Train *v) CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { /* Unpack parameters */ - RailType rt = Extract(p1); - Axis axis = Extract(p1); + RailType rt = Extract(p1); + Axis axis = Extract(p1); byte numtracks = GB(p1, 8, 8); byte plat_len = GB(p1, 16, 8); bool adjacent = HasBit(p1, 24); @@ -1765,16 +1767,16 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin bool distant_join = (station_to_join != INVALID_STATION); uint8 width = (uint8)GB(p1, 0, 8); - uint8 lenght = (uint8)GB(p1, 8, 8); + uint8 length = (uint8)GB(p1, 8, 8); /* Check if the requested road stop is too big */ - if (width > _settings_game.station.station_spread || lenght > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT); + if (width > _settings_game.station.station_spread || length > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT); /* Check for incorrect width / length. */ - if (width == 0 || lenght == 0) return CMD_ERROR; + if (width == 0 || length == 0) return CMD_ERROR; /* Check if the first tile and the last tile are valid */ - if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, lenght - 1) == INVALID_TILE) return CMD_ERROR; + if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, length - 1) == INVALID_TILE) return CMD_ERROR; - TileArea roadstop_area(tile, width, lenght); + TileArea roadstop_area(tile, width, length); if (distant_join && (!_settings_game.station.distant_join_stations || !Station::IsValidID(station_to_join))) return CMD_ERROR; @@ -1978,7 +1980,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) FOR_ALL_ROADVEHICLES(v) { if (v->First() == v && v->current_order.IsType(OT_GOTO_STATION) && v->dest_tile == tile) { - v->dest_tile = v->GetOrderStationLocation(st->index); + v->SetDestTile(v->GetOrderStationLocation(st->index)); } } @@ -2216,11 +2218,11 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT); } - CommandCost cost = CheckFlatLand(airport_area, flags); + AirportTileTableIterator iter(as->table[layout], tile); + CommandCost cost = CheckFlatLandAirport(iter, flags); if (cost.Failed()) return cost; /* The noise level is the noise from the airport and reduce it to account for the distance to the town center. */ - AirportTileTableIterator iter(as->table[layout], tile); Town *nearest = AirportGetNearestTown(as, iter); uint newnoise_level = GetAirportNoiseLevelForTown(as, iter, nearest->xy); @@ -2602,7 +2604,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags) } if (s->dest_tile == docking_location) { - s->dest_tile = 0; + s->SetDestTile(0); s->current_order.Free(); } } @@ -2622,9 +2624,9 @@ const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx) * Check whether a sprite is a track sprite, which can be replaced by a non-track ground sprite and a rail overlay. * If the ground sprite is suitable, \a ground is replaced with the new non-track ground sprite, and \a overlay_offset * is set to the overlay to draw. - * @param ti Positional info for the tile to decide snowyness etc. May be NULL. - * @param [in,out] ground Groundsprite to draw. - * @param [out] overlay_offset Overlay to draw. + * @param ti Positional info for the tile to decide snowyness etc. May be NULL. + * @param[in,out] ground Groundsprite to draw. + * @param[out] overlay_offset Overlay to draw. * @return true if overlay can be drawn. */ bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrackOffset *overlay_offset) @@ -3186,7 +3188,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i void TriggerWatchedCargoCallbacks(Station *st) { /* Collect cargoes accepted since the last big tick. */ - uint cargoes = 0; + CargoTypes cargoes = 0; for (CargoID cid = 0; cid < NUM_CARGO; cid++) { if (HasBit(st->goods[cid].status, GoodsEntry::GES_ACCEPTED_BIGTICK)) SetBit(cargoes, cid); } @@ -3431,7 +3433,7 @@ void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2) /* Reroute cargo in station. */ ge.cargo.Reroute(UINT_MAX, &ge.cargo, avoid, avoid2, &ge); - /* Reroute cargo staged to be transfered. */ + /* Reroute cargo staged to be transferred. */ for (std::list::iterator it(st->loading_vehicles.begin()); it != st->loading_vehicles.end(); ++it) { for (Vehicle *v = *it; v != NULL; v = v->Next()) { if (v->cargo_type != c) continue; @@ -3441,7 +3443,7 @@ void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2) } /** - * Check all next hops of cargo packets in this station for existance of a + * Check all next hops of cargo packets in this station for existence of a * a valid link they may use to travel on. Reroute any cargo not having a valid * link and remove timed out links found like this from the linkgraph. We're * not all links here as that is expensive and useless. A link no one is using @@ -4228,7 +4230,7 @@ void FlowStat::Invalidate() } /** - * Change share for specified station. By specifing INT_MIN as parameter you + * Change share for specified station. By specifying INT_MIN as parameter you * can erase a share. Newly added flows will be unrestricted. * @param st Next Hop to be removed. * @param flow Share to be added or removed. diff --git a/src/station_func.h b/src/station_func.h index 88e4257b25..9748297f21 100644 --- a/src/station_func.h +++ b/src/station_func.h @@ -1,4 +1,4 @@ -/* $Id: station_func.h 26549 2014-05-01 14:50:52Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,7 +28,7 @@ void ShowStationViewWindow(StationID station); void UpdateAllStationVirtCoords(); CargoArray GetProductionAroundTiles(TileIndex tile, int w, int h, int rad); -CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, uint32 *always_accepted = NULL); +CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, CargoTypes *always_accepted = NULL); void UpdateStationAcceptance(Station *st, bool show_msg); diff --git a/src/station_gui.cpp b/src/station_gui.cpp index a9617c4753..c149edd114 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: station_gui.cpp 27894 2017-08-20 07:11:08Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,7 +56,7 @@ int DrawStationCoverageAreaText(int left, int right, int top, StationCoverageType sct, int rad, bool supplies) { TileIndex tile = TileVirtXY(_thd.pos.x, _thd.pos.y); - uint32 cargo_mask = 0; + CargoTypes cargo_mask = 0; if (_thd.drawstyle == HT_RECT && tile < MapSize()) { CargoArray cargoes; if (supplies) { @@ -156,8 +156,8 @@ protected: static Listing last_sorting; static byte facilities; // types of stations of interest static bool include_empty; // whether we should include stations without waiting cargo - static const uint32 cargo_filter_max; - static uint32 cargo_filter; // bitmap of cargo types to include + static const CargoTypes cargo_filter_max; + static CargoTypes cargo_filter; // bitmap of cargo types to include static const Station *last_station; /* Constants for sorting stations */ @@ -621,9 +621,8 @@ public: } } - virtual void OnTick() + virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (this->stations.NeedResort()) { DEBUG(misc, 3, "Periodic rebuild station list company %d", this->window_number); this->SetDirty(); @@ -654,11 +653,11 @@ public: Listing CompanyStationsWindow::last_sorting = {false, 0}; byte CompanyStationsWindow::facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK; bool CompanyStationsWindow::include_empty = true; -const uint32 CompanyStationsWindow::cargo_filter_max = UINT32_MAX; -uint32 CompanyStationsWindow::cargo_filter = UINT32_MAX; +const CargoTypes CompanyStationsWindow::cargo_filter_max = ALL_CARGOTYPES; +CargoTypes CompanyStationsWindow::cargo_filter = ALL_CARGOTYPES; const Station *CompanyStationsWindow::last_station = NULL; -/* Availible station sorting functions */ +/* Available station sorting functions */ GUIStationList::SortFunction * const CompanyStationsWindow::sorter_funcs[] = { &StationNameSorter, &StationTypeSorter, @@ -802,7 +801,6 @@ static const NWidgetPart _nested_station_view_widgets[] = { * @param left left most coordinate to draw on * @param right right most coordinate to draw on * @param y y coordinate - * @param width the width of the view */ static void DrawCargoIcons(CargoID i, uint waiting, int left, int right, int y) { @@ -1800,7 +1798,7 @@ struct StationViewWindow : public Window { { const Station *st = Station::Get(this->window_number); - uint32 cargo_mask = 0; + CargoTypes cargo_mask = 0; for (CargoID i = 0; i < NUM_CARGO; i++) { if (HasBit(st->goods[i].status, GoodsEntry::GES_ACCEPTANCE)) SetBit(cargo_mask, i); } @@ -2232,7 +2230,7 @@ static const T *FindStationsNearby(TileArea ta, bool distant_join) if (distant_join && min(ta.w, ta.h) >= _settings_game.station.station_spread) return NULL; uint max_dist = distant_join ? _settings_game.station.station_spread - min(ta.w, ta.h) : 1; - TileIndex tile = TILE_ADD(ctx.tile, TileOffsByDir(DIR_N)); + TileIndex tile = TileAddByDir(ctx.tile, DIR_N); CircularTileSearch(&tile, max_dist, ta.w, ta.h, AddNearbyStation, &ctx); return NULL; @@ -2338,7 +2336,7 @@ struct SelectStationWindow : WindowPopup { DeleteWindowById(WC_SELECT_STATION, 0); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { if (_thd.dirty & 2) { _thd.dirty &= ~2; diff --git a/src/station_gui.h b/src/station_gui.h index 0f2688a6c6..6640856246 100644 --- a/src/station_gui.h +++ b/src/station_gui.h @@ -1,4 +1,4 @@ -/* $Id: station_gui.h 26083 2013-11-24 14:29:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/station_map.h b/src/station_map.h index 0d1f8fda32..e591787e3b 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -1,4 +1,4 @@ -/* $Id: station_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -542,6 +542,7 @@ static inline void MakeStation(TileIndex t, Owner o, StationID sid, StationType SB(_me[t].m6, 2, 1, 0); SB(_me[t].m6, 3, 3, st); _me[t].m7 = 0; + _me[t].m8 = 0; } /** diff --git a/src/station_type.h b/src/station_type.h index 40a10da4f7..952a683d74 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -1,4 +1,4 @@ -/* $Id: station_type.h 25890 2013-10-20 13:47:11Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index ebda25c9b3..88ba495f34 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: statusbar_gui.cpp 27146 2015-02-13 21:13:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,6 +26,7 @@ #include "statusbar_gui.h" #include "toolbar_gui.h" #include "core/geometry_func.hpp" +#include "guitimer_func.h" #include "widgets/statusbar_widget.h" @@ -79,17 +80,19 @@ static bool DrawScrollingStatusText(const NewsItem *ni, int scroll_pos, int left struct StatusBarWindow : Window { bool saving; int ticker_scroll; - int reminder_timeout; + GUITimer ticker_timer; + GUITimer reminder_timeout; static const int TICKER_STOP = 1640; ///< scrolling is finished when counter reaches this value - static const int REMINDER_START = 91; ///< initial value of the reminder counter (right dot on the right) + static const int REMINDER_START = 1350; ///< time in ms for reminder notification (red dot on the right) to stay static const int REMINDER_STOP = 0; ///< reminder disappears when counter reaches this value static const int COUNTER_STEP = 2; ///< this is subtracted from active counters every tick StatusBarWindow(WindowDesc *desc) : Window(desc) { - this->ticker_scroll = TICKER_STOP; - this->reminder_timeout = REMINDER_STOP; + this->ticker_scroll = TICKER_STOP; + this->ticker_timer.SetInterval(15); + this->reminder_timeout.SetInterval(REMINDER_STOP); this->InitNested(); CLRBITS(this->flags, WF_WHITE_BORDER); @@ -179,7 +182,7 @@ struct StatusBarWindow : Window { } } - if (this->reminder_timeout > 0) { + if (!this->reminder_timeout.HasElapsed()) { Dimension icon_size = GetSpriteSize(SPR_UNREAD_NEWS); DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, r.right - WD_FRAMERECT_RIGHT - icon_size.width, r.top + WD_FRAMERECT_TOP + (int)(FONT_HEIGHT_NORMAL - icon_size.height) / 2); } @@ -200,10 +203,10 @@ struct StatusBarWindow : Window { case SBI_SAVELOAD_START: this->saving = true; break; case SBI_SAVELOAD_FINISH: this->saving = false; break; case SBI_SHOW_TICKER: this->ticker_scroll = 0; break; - case SBI_SHOW_REMINDER: this->reminder_timeout = REMINDER_START; break; + case SBI_SHOW_REMINDER: this->reminder_timeout.SetInterval(REMINDER_START); break; case SBI_NEWS_DELETED: this->ticker_scroll = TICKER_STOP; // reset ticker ... - this->reminder_timeout = REMINDER_STOP; // ... and reminder + this->reminder_timeout.SetInterval(REMINDER_STOP); // ... and reminder break; } } @@ -217,19 +220,20 @@ struct StatusBarWindow : Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { if (_pause_mode != PM_UNPAUSED) return; if (this->ticker_scroll < TICKER_STOP) { // Scrolling text - this->ticker_scroll += COUNTER_STEP; - this->SetWidgetDirty(WID_S_MIDDLE); + uint count = this->ticker_timer.CountElapsed(delta_ms); + if (count > 0) { + this->ticker_scroll += count; + this->SetWidgetDirty(WID_S_MIDDLE); + } } - if (this->reminder_timeout > REMINDER_STOP) { // Red blot to show there are new unread newsmessages - this->reminder_timeout -= COUNTER_STEP; - } else if (this->reminder_timeout < REMINDER_STOP) { - this->reminder_timeout = REMINDER_STOP; + // Red blot to show there are new unread newsmessages + if (this->reminder_timeout.Elapsed(delta_ms)) { this->SetWidgetDirty(WID_S_MIDDLE); } } diff --git a/src/statusbar_gui.h b/src/statusbar_gui.h index 2f4f9d8cb3..574a75c73f 100644 --- a/src/statusbar_gui.h +++ b/src/statusbar_gui.h @@ -1,4 +1,4 @@ -/* $Id: statusbar_gui.h 25289 2013-05-26 19:24:37Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/stdafx.h b/src/stdafx.h index 0a0f41cd27..6e96e98fde 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -1,4 +1,4 @@ -/* $Id: stdafx.h 27916 2017-09-24 13:35:27Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -100,12 +100,6 @@ #define strcasecmp stricmp #endif -#if defined(PSP) - #include - #include - #include -#endif - #if defined(SUNOS) || defined(HPUX) #include #endif @@ -134,20 +128,11 @@ #define CLIB_USERGROUP_PROTOS_H #endif /* __MORPHOS__ */ -#if defined(PSP) - /* PSP can only have 10 file-descriptors open at any given time, but this - * switch only limits reads via the Fio system. So keep 2 fds free for things - * like saving a game. */ - #define LIMITED_FDS 8 - #define printf pspDebugScreenPrintf -#endif /* PSP */ - /* Stuff for GCC */ #if defined(__GNUC__) #define NORETURN __attribute__ ((noreturn)) #define CDECL #define __int64 long long - #define GCC_PACK __attribute__((packed)) /* Warn about functions using 'printf' format syntax. First argument determines which parameter * is the format string, second argument is start of values passed to printf. */ #define WARN_FORMAT(string, args) __attribute__ ((format (printf, string, args))) @@ -172,7 +157,6 @@ #if defined(__WATCOMC__) #define NORETURN #define CDECL - #define GCC_PACK #define WARN_FORMAT(string, args) #define FINAL #define FALLTHROUGH @@ -183,7 +167,7 @@ #include // alloca() #endif -#if defined(WIN32) +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #endif @@ -203,9 +187,7 @@ #define NTDDI_VERSION NTDDI_WIN2K // Windows 2000 #define _WIN32_WINNT 0x0500 // Windows 2000 #define _WIN32_WINDOWS 0x400 // Windows 95 - #if !defined(WINCE) - #define WINVER 0x0400 // Windows NT 4.0 / Windows 95 - #endif + #define WINVER 0x0400 // Windows NT 4.0 / Windows 95 #define _WIN32_IE_ 0x0401 // 4.01 (win98 and NT4SP5+) #endif #define NOMINMAX // Disable min/max macros in windows.h. @@ -239,11 +221,7 @@ #define inline __forceinline #endif - #if !defined(WINCE) - #define CDECL _cdecl - #endif - - #define GCC_PACK + #define CDECL _cdecl #define WARN_FORMAT(string, args) #define FINAL sealed @@ -254,39 +232,35 @@ #define FALLTHROUGH #endif - #if defined(WINCE) - int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap); - #endif - - #if defined(WIN32) && !defined(_WIN64) && !defined(WIN64) +# if defined(_WIN32) && !defined(_WIN64) #if !defined(_W64) #define _W64 #endif typedef _W64 int INT_PTR, *PINT_PTR; typedef _W64 unsigned int UINT_PTR, *PUINT_PTR; - #endif /* WIN32 && !_WIN64 && !WIN64 */ +# endif /* _WIN32 && !_WIN64 */ - #if defined(_WIN64) || defined(WIN64) +# if defined(_WIN64) #define fseek _fseeki64 - #endif /* _WIN64 || WIN64 */ +# endif /* _WIN64 */ - /* This is needed to zlib uses the stdcall calling convention on visual studio */ - #if defined(WITH_ZLIB) || defined(WITH_PNG) - #if !defined(ZLIB_WINAPI) - #define ZLIB_WINAPI - #endif - #endif + /* zlib from vcpkg use cdecl calling convention without enforcing it in the headers */ +# if defined(WITH_ZLIB) +# if !defined(ZEXPORT) +# define ZEXPORT CDECL +# endif +# endif - #if defined(WINCE) - #define strcasecmp _stricmp - #define strncasecmp _strnicmp - #undef DEBUG - #else - #define strcasecmp stricmp - #define strncasecmp strnicmp - #endif + /* freetype from vcpkg use cdecl calling convention without enforcing it in the headers */ +# if defined(WITH_FREETYPE) +# if !defined(FT_EXPORT) +# define FT_EXPORT( x ) extern "C" x CDECL +# endif +# endif + #define strcasecmp stricmp + #define strncasecmp strnicmp #define strtoull _strtoui64 /* MSVC doesn't have these :( */ @@ -304,35 +278,28 @@ #define SIGBUS SIGNOFP #endif -#if defined(WINCE) - #define stredup _stredup -#endif /* WINCE */ - /* NOTE: the string returned by these functions is only valid until the next * call to the same function and is not thread- or reentrancy-safe */ #if !defined(STRGEN) && !defined(SETTINGSGEN) - #if defined(WIN32) || defined(WIN64) +# if defined(_WIN32) char *getcwd(char *buf, size_t size); #include #include - /* XXX - WinCE without MSVCRT doesn't support wfopen, so it seems */ - #if !defined(WINCE) - namespace std { using ::_tfopen; } - #define fopen(file, mode) _tfopen(OTTD2FS(file), _T(mode)) - #define unlink(file) _tunlink(OTTD2FS(file)) - #endif /* WINCE */ + namespace std { using ::_tfopen; } + #define fopen(file, mode) _tfopen(OTTD2FS(file), _T(mode)) + #define unlink(file) _tunlink(OTTD2FS(file)) const char *FS2OTTD(const TCHAR *name); const TCHAR *OTTD2FS(const char *name, bool console_cp = false); - #else +# else #define fopen(file, mode) fopen(OTTD2FS(file), mode) const char *FS2OTTD(const char *name); const char *OTTD2FS(const char *name); - #endif /* WIN32 */ +# endif /* _WIN32 */ #endif /* STRGEN || SETTINGSGEN */ -#if defined(WIN32) || defined(WIN64) || defined(__OS2__) && !defined(__INNOTEK_LIBC__) +#if defined(_WIN32) || defined(__OS2__) && !defined(__INNOTEK_LIBC__) #define PATHSEP "\\" #define PATHSEPCHAR '\\' #else @@ -340,6 +307,16 @@ #define PATHSEPCHAR '/' #endif +#if defined(_MSC_VER) || defined(__WATCOMC__) +# define PACK_N(type_dec, n) __pragma(pack(push, n)) type_dec; __pragma(pack(pop)) +#elif defined(__MINGW32__) +# define PRAGMA(x) _Pragma(#x) +# define PACK_N(type_dec, n) PRAGMA(pack(push, n)) type_dec; PRAGMA(pack(pop)) +#else +# define PACK_N(type_dec, n) type_dec __attribute__((__packed__, aligned(n))) +#endif +#define PACK(type_dec) PACK_N(type_dec, 1) + /* MSVCRT of course has to have a different syntax for long long *sigh* */ #if defined(_MSC_VER) || defined(__MINGW32__) #define OTTD_PRINTF64 "%I64d" @@ -383,8 +360,7 @@ typedef unsigned char byte; /* Compile time assertions. Prefer c++0x static_assert(). * Older compilers cannot evaluate some expressions at compile time, * typically when templates are involved, try assert_tcompile() in those cases. */ -#if defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(static_assert) || (defined(_MSC_VER) && _MSC_VER >= 1600) - /* __STDCXX_VERSION__ is c++0x feature macro, __GXX_EXPERIMENTAL_CXX0X__ is used by gcc, __GXX_EXPERIMENTAL_CPP0X__ by icc */ +#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600) #define assert_compile(expr) static_assert(expr, #expr ) #define assert_tcompile(expr) assert_compile(expr) #elif defined(__OS2__) diff --git a/src/story.cpp b/src/story.cpp index 9b341cffcc..043f93d57d 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -1,4 +1,4 @@ -/* $Id: story.cpp 27560 2016-05-11 20:48:46Z matthijs $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/story_base.h b/src/story_base.h index a99308522e..3db1ba4a86 100644 --- a/src/story_base.h +++ b/src/story_base.h @@ -1,4 +1,4 @@ -/* $Id: story_base.h 25621 2013-07-21 15:21:55Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 207433facd..003843310e 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: story_gui.cpp 27086 2014-12-18 18:22:23Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/story_type.h b/src/story_type.h index 42ec487911..392249da23 100644 --- a/src/story_type.h +++ b/src/story_type.h @@ -1,4 +1,4 @@ -/* $Id: story_type.h 25371 2013-06-09 13:18:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 2a1763e2f7..98e11e2eb6 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -1,4 +1,4 @@ -/* $Id: strgen.cpp 27759 2017-02-26 20:10:41Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -21,14 +21,14 @@ #include #include -#if (!defined(WIN32) && !defined(WIN64)) || defined(__CYGWIN__) +#if !defined(_WIN32) || defined(__CYGWIN__) #include #include #endif -#if defined WIN32 || defined __WATCOMC__ +#if defined(_WIN32) || defined(__WATCOMC__) #include -#endif /* WIN32 || __WATCOMC__ */ +#endif /* _WIN32 || __WATCOMC__ */ #ifdef __MORPHOS__ #ifdef stderr @@ -215,7 +215,10 @@ bool CompareFiles(const char *n1, const char *n2) if (f2 == NULL) return false; FILE *f1 = fopen(n1, "rb"); - if (f1 == NULL) error("can't open %s", n1); + if (f1 == NULL) { + fclose(f2); + error("can't open %s", n1); + } size_t l1, l2; do { @@ -330,9 +333,9 @@ struct HeaderFileWriter : HeaderWriter, FileWriter { unlink(this->filename); } else { /* else rename tmp.xxx into filename */ - #if defined(WIN32) || defined(WIN64) +# if defined(_WIN32) unlink(this->real_filename); - #endif +# endif if (rename(this->filename, this->real_filename) == -1) error("rename() failed"); } } @@ -374,7 +377,7 @@ static inline void ottd_mkdir(const char *directory) { /* Ignore directory creation errors; they'll surface later on, and most * of the time they are 'directory already exists' errors anyhow. */ -#if defined(WIN32) || defined(__WATCOMC__) +#if defined(_WIN32) || defined(__WATCOMC__) mkdir(directory); #else mkdir(directory, 0755); @@ -439,7 +442,7 @@ int CDECL main(int argc, char *argv[]) switch (i) { case 'v': - puts("$Revision: 27759 $"); + puts("$Revision$"); return 0; case 'C': @@ -484,7 +487,7 @@ int CDECL main(int argc, char *argv[]) case 'h': puts( - "strgen - $Revision: 27759 $\n" + "strgen - $Revision$\n" " -v | --version print version information and exit\n" " -t | --todo replace any untranslated strings with ''\n" " -w | --warning print a warning for any untranslated strings\n" @@ -537,6 +540,7 @@ int CDECL main(int argc, char *argv[]) HeaderFileWriter writer(pathbuf); writer.WriteHeader(data); writer.Finalise(data); + if (_errors != 0) return 1; } else if (mgo.numleft >= 1) { char *r; diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h index e0309d0246..ecae71a72a 100644 --- a/src/strgen/strgen.h +++ b/src/strgen/strgen.h @@ -1,4 +1,4 @@ -/* $Id: strgen.h 26511 2014-04-25 17:43:09Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index a5a41ff261..8d46b1b271 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -1,4 +1,4 @@ -/* $Id: strgen_base.cpp 27380 2015-08-10 20:21:29Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -85,7 +85,7 @@ void LangString::FreeTranslation() /** * Create a new string data container. - * @param max_strings The maximum number of strings. + * @param tabs The maximum number of strings. */ StringData::StringData(size_t tabs) : tabs(tabs), max_strings(tabs * TAB_SIZE) { diff --git a/src/string.cpp b/src/string.cpp index 5ca153bdce..ae1b556aff 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -1,4 +1,4 @@ -/* $Id: string.cpp 27380 2015-08-10 20:21:29Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -25,6 +25,18 @@ #include // required by vsnprintf implementation for MSVC #endif +#ifdef _WIN32 +#include "os/windows/win32.h" +#endif + +#ifdef WITH_UNISCRIBE +#include "os/windows/string_uniscribe.h" +#endif + +#if defined(WITH_COCOA) +#include "os/macosx/string_osx.h" +#endif + #ifdef WITH_ICU_SORT /* Required by strnatcmp. */ #include @@ -162,7 +174,7 @@ void str_fix_scc_encoded(char *str, const char *last) if ((len == 0 && str + 4 > last) || str + len > last) break; WChar c; - len = Utf8Decode(&c, str); + Utf8Decode(&c, str); if (c == '\0') break; if (c == 0xE028 || c == 0xE02A) { @@ -343,12 +355,11 @@ bool IsValidChar(WChar key, CharSetFilter afilter) case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' '; case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9'); case CS_HEXADECIMAL: return (key >= '0' && key <= '9') || (key >= 'a' && key <= 'f') || (key >= 'A' && key <= 'F'); + default: NOT_REACHED(); } - - return false; } -#ifdef WIN32 +#ifdef _WIN32 #if defined(_MSC_VER) && _MSC_VER < 1900 /** * Almost POSIX compliant implementation of \c vsnprintf for VC compiler. @@ -384,7 +395,7 @@ int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap) } #endif /* _MSC_VER */ -#endif /* WIN32 */ +#endif /* _WIN32 */ /** * Safer implementation of snprintf; same as snprintf except: @@ -572,20 +583,37 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front) s1 = SkipGarbage(s1); s2 = SkipGarbage(s2); } + #ifdef WITH_ICU_SORT if (_current_collator != NULL) { UErrorCode status = U_ZERO_ERROR; int result = _current_collator->compareUTF8(s1, s2, status); if (U_SUCCESS(status)) return result; } - #endif /* WITH_ICU_SORT */ +#if defined(_WIN32) && !defined(STRGEN) && !defined(SETTINGSGEN) + int res = OTTDStringCompare(s1, s2); + if (res != 0) return res - 2; // Convert to normal C return values. +#endif + +#if defined(WITH_COCOA) && !defined(STRGEN) && !defined(SETTINGSGEN) + int res = MacOSStringCompare(s1, s2); + if (res != 0) return res - 2; // Convert to normal C return values. +#endif + /* Do a normal comparison if ICU is missing or if we cannot create a collator. */ return strcasecmp(s1, s2); } -#ifdef WITH_ICU_SORT +#ifdef WITH_UNISCRIBE + +/* static */ StringIterator *StringIterator::Create() +{ + return new UniscribeStringIterator(); +} + +#elif defined(WITH_ICU_SORT) #include #include @@ -846,9 +874,19 @@ public: } }; +#if defined(WITH_COCOA) && !defined(STRGEN) && !defined(SETTINGSGEN) +/* static */ StringIterator *StringIterator::Create() +{ + StringIterator *i = OSXStringIterator::Create(); + if (i != NULL) return i; + + return new DefaultStringIterator(); +} +#else /* static */ StringIterator *StringIterator::Create() { return new DefaultStringIterator(); } +#endif /* defined(WITH_COCOA) && !defined(STRGEN) && !defined(SETTINGSGEN) */ #endif diff --git a/src/string_base.h b/src/string_base.h index fb17374f44..02856cf1c6 100644 --- a/src/string_base.h +++ b/src/string_base.h @@ -1,4 +1,4 @@ -/* $Id: string_base.h 25653 2013-08-05 20:35:31Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -41,9 +41,9 @@ public: /** * Change the current string cursor. - * @param p New cursor position. + * @param pos New cursor position. * @return Actual new cursor position at the next valid character boundary. - * @pre p has to be inside the current string. + * @pre pos has to be inside the current string. */ virtual size_t SetCurPosition(size_t pos) = 0; diff --git a/src/string_func.h b/src/string_func.h index c592e4fe3a..ff12f3747a 100644 --- a/src/string_func.h +++ b/src/string_func.h @@ -1,4 +1,4 @@ -/* $Id: string_func.h 26513 2014-04-25 19:25:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/string_type.h b/src/string_type.h index 45654b9848..94d4304dfe 100644 --- a/src/string_type.h +++ b/src/string_type.h @@ -1,4 +1,4 @@ -/* $Id: string_type.h 23940 2012-02-12 19:46:40Z smatz $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/stringfilter.cpp b/src/stringfilter.cpp index d07824de4e..6045c19ef4 100644 --- a/src/stringfilter.cpp +++ b/src/stringfilter.cpp @@ -1,4 +1,4 @@ -/* $Id: stringfilter.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/stringfilter_type.h b/src/stringfilter_type.h index 6e5445f953..f78b133cb4 100644 --- a/src/stringfilter_type.h +++ b/src/stringfilter_type.h @@ -1,4 +1,4 @@ -/* $Id: stringfilter_type.h 24632 2012-10-27 15:26:17Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/strings.cpp b/src/strings.cpp index 6b88c86d89..2cc3a23be2 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -1,4 +1,4 @@ -/* $Id: strings.cpp 27758 2017-02-26 19:41:30Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -52,11 +52,11 @@ const LanguageMetadata *_current_language = NULL; ///< The currently loaded lang TextDirection _current_text_dir; ///< Text direction of the currently selected language. #ifdef WITH_ICU_SORT -Collator *_current_collator = NULL; ///< Collator for the language currently in use. +icu::Collator *_current_collator = NULL; ///< Collator for the language currently in use. #endif /* WITH_ICU_SORT */ 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 #_global_string_params StringParameters _global_string_params(_global_string_params_data, 20, _global_string_params_type); /** Reset the type array. */ @@ -449,6 +449,8 @@ static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money n /* convert from negative */ if (number < 0) { + if (buff + Utf8CharLen(SCC_PUSH_COLOUR) > last) return buff; + buff += Utf8Encode(buff, SCC_PUSH_COLOUR); if (buff + Utf8CharLen(SCC_RED) > last) return buff; buff += Utf8Encode(buff, SCC_RED); buff = strecpy(buff, "-", last); @@ -485,8 +487,8 @@ static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money n if (spec->symbol_pos != 0) buff = strecpy(buff, spec->suffix, last); if (negative) { - if (buff + Utf8CharLen(SCC_PREVIOUS_COLOUR) > last) return buff; - buff += Utf8Encode(buff, SCC_PREVIOUS_COLOUR); + if (buff + Utf8CharLen(SCC_POP_COLOUR) > last) return buff; + buff += Utf8Encode(buff, SCC_POP_COLOUR); *buff = '\0'; } @@ -758,11 +760,10 @@ uint ConvertDisplaySpeedToKmhishSpeed(uint speed) } /** * Parse most format codes within a string and write the result to a buffer. - * @param buff The buffer to write the final string to. - * @param str The original string with format codes. - * @param args Pointer to extra arguments used by various string codes. - * @param case_index - * @param last Pointer to just past the end of the buff array. + * @param buff The buffer to write the final string to. + * @param str_arg The original string with format codes. + * @param args Pointer to extra arguments used by various string codes. + * @param last Pointer to just past the end of the buff array. * @param dry_run True when the argt array is not yet initialized. */ static char *FormatString(char *buff, const char *str_arg, StringParameters *args, const char *last, uint case_index, bool game_script, bool dry_run) @@ -817,7 +818,6 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg sub_args.ClearTypeInformation(); memset(sub_args_need_free, 0, sizeof(sub_args_need_free)); - const char *s = str; char *p; uint32 stringid = strtoul(str, &p, 16); if (*p != ':' && *p != '\0') { @@ -836,7 +836,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg int i = 0; while (*p != '\0' && i < 20) { uint64 param; - s = ++p; + const char *s = ++p; /* Find the next value */ bool instring = false; @@ -1145,7 +1145,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg } case SCC_CARGO_LIST: { // {CARGO_LIST} - uint32 cmask = args->GetInt32(SCC_CARGO_LIST); + CargoTypes cmask = args->GetInt64(SCC_CARGO_LIST); bool first = true; const CargoSpec *cs; @@ -1786,6 +1786,16 @@ bool ReadLanguagePack(const LanguageMetadata *lang) strecpy(_config_language_file, c_file, lastof(_config_language_file)); SetCurrentGrfLangID(_current_language->newgrflangid); +#ifdef _WIN32 + extern void Win32SetCurrentLocaleName(const char *iso_code); + Win32SetCurrentLocaleName(_current_language->isocode); +#endif + +#ifdef WITH_COCOA + extern void MacOSSetCurrentLocaleName(const char *iso_code); + MacOSSetCurrentLocaleName(_current_language->isocode); +#endif + #ifdef WITH_ICU_SORT /* Delete previous collator. */ if (_current_collator != NULL) { @@ -1795,7 +1805,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang) /* Create a collator instance for our current locale. */ UErrorCode status = U_ZERO_ERROR; - _current_collator = Collator::createInstance(Locale(_current_language->isocode), status); + _current_collator = icu::Collator::createInstance(icu::Locale(_current_language->isocode), status); /* Sort number substrings by their numerical value. */ if (_current_collator != NULL) _current_collator->setAttribute(UCOL_NUMERIC_COLLATION, UCOL_ON, status); /* Avoid using the collator if it is not correctly set. */ @@ -1827,7 +1837,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang) /* Win32 implementation in win32.cpp. * OS X implementation in os/macosx/macos.mm. */ -#if !(defined(WIN32) || defined(__APPLE__)) +#if !(defined(_WIN32) || defined(__APPLE__)) /** * Determine the current charset based on the environment * First check some default values, after this one we passed ourselves @@ -1855,7 +1865,7 @@ const char *GetCurrentLocale(const char *param) } #else const char *GetCurrentLocale(const char *param); -#endif /* !(defined(WIN32) || defined(__APPLE__)) */ +#endif /* !(defined(_WIN32) || defined(__APPLE__)) */ int CDECL StringIDSorter(const StringID *a, const StringID *b) { @@ -1996,7 +2006,7 @@ const char *GetCurrentLanguageIsoCode() /** * Check whether there are glyphs missing in the current language. - * @param Pointer to an address for storing the text pointer. + * @param[out] str Pointer to an address for storing the text pointer. * @return If glyphs are missing, return \c true, else return \c false. * @post If \c true is returned and str is not NULL, *str points to a string that is found to contain at least one missing glyph. */ @@ -2014,10 +2024,8 @@ bool MissingGlyphSearcher::FindMissingGlyphs(const char **str) FontSize size = this->DefaultSize(); if (str != NULL) *str = text; for (WChar c = Utf8Consume(&text); c != '\0'; c = Utf8Consume(&text)) { - if (c == SCC_TINYFONT) { - size = FS_SMALL; - } else if (c == SCC_BIGFONT) { - size = FS_LARGE; + if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) { + size = (FontSize)(c - SCC_FIRST_FONT); } else if (!IsInsideMM(c, SCC_SPRITE_START, SCC_SPRITE_END) && IsPrintable(c) && !IsTextDirectionChar(c) && c != '?' && GetGlyph(size, c) == question_mark[size]) { /* The character is printable, but not in the normal font. This is the case we were testing for. */ return true; @@ -2130,7 +2138,7 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher) /* Update the font with cache */ LoadStringWidthTable(searcher->Monospace()); -#if !defined(WITH_ICU_LAYOUT) +#if !defined(WITH_ICU_LAYOUT) && !defined(WITH_UNISCRIBE) && !defined(WITH_COCOA) /* * For right-to-left languages we need the ICU library. If * we do not have support for that library we warn the user diff --git a/src/strings_func.h b/src/strings_func.h index 71f5364c0b..0da711bc4d 100644 --- a/src/strings_func.h +++ b/src/strings_func.h @@ -1,4 +1,4 @@ -/* $Id: strings_func.h 27758 2017-02-26 19:41:30Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/strings_type.h b/src/strings_type.h index ed6fb20365..aa3ed788c3 100644 --- a/src/strings_type.h +++ b/src/strings_type.h @@ -1,4 +1,4 @@ -/* $Id: strings_type.h 27758 2017-02-26 19:41:30Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/subsidy.cpp b/src/subsidy.cpp index ffd5650495..d1fda0f0ac 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -1,4 +1,4 @@ -/* $Id: subsidy.cpp 26509 2014-04-25 15:40:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -334,7 +334,7 @@ bool FindSubsidyTownCargoRoute() /* Select a random town. */ const Town *src_town = Town::GetRandom(); - uint32 town_cargo_produced = src_town->cargo_produced; + CargoTypes town_cargo_produced = src_town->cargo_produced; /* Passenger subsidies are not handled here. */ ClrBit(town_cargo_produced, CT_PASSENGERS); @@ -383,15 +383,21 @@ bool FindSubsidyIndustryCargoRoute() CargoID cid; /* Randomize cargo type */ - if (src_ind->produced_cargo[1] != CT_INVALID && HasBit(Random(), 0)) { - cid = src_ind->produced_cargo[1]; - trans = src_ind->last_month_pct_transported[1]; - total = src_ind->last_month_production[1]; - } else { - cid = src_ind->produced_cargo[0]; - trans = src_ind->last_month_pct_transported[0]; - total = src_ind->last_month_production[0]; + int num_cargos = 0; + uint cargo_index; + for (cargo_index = 0; cargo_index < lengthof(src_ind->produced_cargo); cargo_index++) { + if (src_ind->produced_cargo[cargo_index] != CT_INVALID) num_cargos++; } + if (num_cargos == 0) return false; // industry produces nothing + int cargo_num = RandomRange(num_cargos) + 1; + for (cargo_index = 0; cargo_index < lengthof(src_ind->produced_cargo); cargo_index++) { + if (src_ind->produced_cargo[cargo_index] != CT_INVALID) cargo_num--; + if (cargo_num == 0) break; + } + assert(cargo_num == 0); // indicates loop didn't break as intended + cid = src_ind->produced_cargo[cargo_index]; + trans = src_ind->last_month_pct_transported[cargo_index]; + total = src_ind->last_month_production[cargo_index]; /* Quit if no production in this industry * or if the pct transported is already large enough @@ -435,14 +441,11 @@ bool FindSubsidyCargoDestination(CargoID cid, SourceType src_type, SourceID src) case ST_INDUSTRY: { /* Select a random industry. */ const Industry *dst_ind = Industry::GetRandom(); + if (dst_ind == NULL) return false; /* The industry must accept the cargo */ - if (dst_ind == NULL || - (cid != dst_ind->accepts_cargo[0] && - cid != dst_ind->accepts_cargo[1] && - cid != dst_ind->accepts_cargo[2])) { - return false; - } + bool valid = std::find(dst_ind->accepts_cargo, endof(dst_ind->accepts_cargo), cid) != endof(dst_ind->accepts_cargo); + if (!valid) return false; dst = dst_ind->index; break; diff --git a/src/subsidy_base.h b/src/subsidy_base.h index 1ff54b08b1..f12fbc4b9b 100644 --- a/src/subsidy_base.h +++ b/src/subsidy_base.h @@ -1,4 +1,4 @@ -/* $Id: subsidy_base.h 23704 2012-01-01 17:22:32Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/subsidy_func.h b/src/subsidy_func.h index 09aad2a57e..2e53e14d7a 100644 --- a/src/subsidy_func.h +++ b/src/subsidy_func.h @@ -1,4 +1,4 @@ -/* $Id: subsidy_func.h 20674 2010-08-28 20:15:45Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index bbda2620cd..04e5ae262b 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: subsidy_gui.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/subsidy_type.h b/src/subsidy_type.h index 26de8206e8..83c33a00a9 100644 --- a/src/subsidy_type.h +++ b/src/subsidy_type.h @@ -1,4 +1,4 @@ -/* $Id: subsidy_type.h 22406 2011-05-01 19:51:52Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h index 13437d22af..593e157ac3 100644 --- a/src/table/airport_defaults.h +++ b/src/table/airport_defaults.h @@ -1,4 +1,4 @@ -/* $Id: airport_defaults.h 27908 2017-08-31 06:55:38Z adf88 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/airport_movement.h b/src/table/airport_movement.h index d9fa2e7d6a..d9030f652c 100644 --- a/src/table/airport_movement.h +++ b/src/table/airport_movement.h @@ -1,4 +1,4 @@ -/* $Id: airport_movement.h 22741 2011-08-13 12:43:05Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/airporttile_ids.h b/src/table/airporttile_ids.h index 774b56442d..fa97753877 100644 --- a/src/table/airporttile_ids.h +++ b/src/table/airporttile_ids.h @@ -1,4 +1,4 @@ -/* $Id: airporttile_ids.h 19099 2010-02-11 20:52:56Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/airporttiles.h b/src/table/airporttiles.h index 906fd1ce9f..47a9631583 100644 --- a/src/table/airporttiles.h +++ b/src/table/airporttiles.h @@ -1,4 +1,4 @@ -/* $Id: airporttiles.h 20623 2010-08-26 15:31:40Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/animcursors.h b/src/table/animcursors.h index cae690dabc..08a90757a2 100644 --- a/src/table/animcursors.h +++ b/src/table/animcursors.h @@ -1,4 +1,4 @@ -/* $Id: animcursors.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/autorail.h b/src/table/autorail.h index 4e11564040..5b93668edc 100644 --- a/src/table/autorail.h +++ b/src/table/autorail.h @@ -1,4 +1,4 @@ -/* $Id: autorail.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/bridge_land.h b/src/table/bridge_land.h index 02aa6e2cae..4f6f94bb0f 100644 --- a/src/table/bridge_land.h +++ b/src/table/bridge_land.h @@ -1,4 +1,4 @@ -/* $Id: bridge_land.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/build_industry.h b/src/table/build_industry.h index 8054e17269..62264eb6f8 100644 --- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -1,4 +1,4 @@ -/* $Id: build_industry.h 27137 2015-02-06 21:54:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -293,6 +293,19 @@ static const IndustryTileTable _tile_table_oil_rig_0[] = { MK(-2, -4, 255), MK(-3, -4, 255), MK(2, 0, 255), + MK(2, -1, 255), + MK(1, -1, 255), + MK(0, -1, 255), + MK(-1, -1, 255), + MK(-1, 0, 255), + MK(-1, 1, 255), + MK(-1, 2, 255), + MK(-1, 3, 255), + MK(0, 3, 255), + MK(1, 3, 255), + MK(2, 3, 255), + MK(2, 2, 255), + MK(2, 1, 255), MKEND }; @@ -1182,8 +1195,12 @@ enum IndustryTypes { #define MI(tbl, sndc, snd, d, pc, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \ c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \ - {tbl, lengthof(tbl), d, 0, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \ - {a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, in, intx, s1, s2, s3, STR_UNDEFINED, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \ + {tbl, lengthof(tbl), d, 0, pc, {c1, c2, c3}, proc, \ + {p1, p2, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \ + {r1, r2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, m, \ + {a1, a2, a3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \ + {{im1, 0}, {im2, 0}, {im3, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, \ + pr, clim, bev, col, in, intx, s1, s2, s3, STR_UNDEFINED, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \ sndc, snd, 0, 0, true, GRFFileProps(INVALID_INDUSTRYTYPE)} /* Format: tile table count and sounds table @@ -1581,7 +1598,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { * @param a2 next frame of animation * @param a3 chooses between animation or construction state */ -#define MT(ca1, c1, ca2, c2, ca3, c3, sl, a1, a2, a3) {{c1, c2, c3}, {ca1, ca2, ca3}, sl, a1, a2, a3, 0, {0, ANIM_STATUS_NO_ANIMATION, 2, 0}, INDTILE_SPECIAL_NONE, true, GRFFileProps(INVALID_INDUSTRYTILE)} +#define MT(ca1, c1, ca2, c2, ca3, c3, sl, a1, a2, a3) {{c1, c2, c3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, {ca1, ca2, ca3}, sl, a1, a2, a3, 0, {0, ANIM_STATUS_NO_ANIMATION, 2, 0}, INDTILE_SPECIAL_NONE, true, GRFFileProps(INVALID_INDUSTRYTILE)} static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET] = { /* Coal Mine */ MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), diff --git a/src/table/cargo_const.h b/src/table/cargo_const.h index 310941482f..c2ce5bc78b 100644 --- a/src/table/cargo_const.h +++ b/src/table/cargo_const.h @@ -1,4 +1,4 @@ -/* $Id: cargo_const.h 23862 2012-01-28 14:12:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/clear_land.h b/src/table/clear_land.h index 58c41a9714..345f055c6f 100644 --- a/src/table/clear_land.h +++ b/src/table/clear_land.h @@ -1,4 +1,4 @@ -/* $Id: clear_land.h 23188 2011-11-11 18:01:41Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/company_settings.ini b/src/table/company_settings.ini index 7bcbb6954f..a6e873f659 100644 --- a/src/table/company_settings.ini +++ b/src/table/company_settings.ini @@ -1,4 +1,4 @@ -; $Id: company_settings.ini 24996 2013-02-14 17:08:56Z rubidium $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -31,7 +31,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED diff --git a/src/table/control_codes.h b/src/table/control_codes.h index beb0dcc506..d8e9673e9f 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -1,4 +1,4 @@ -/* $Id: control_codes.h 27706 2016-12-23 13:38:50Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -26,9 +26,13 @@ enum StringControlCode { /* This must be the first entry. It's encoded in strings that are saved. */ SCC_ENCODED = SCC_CONTROL_START, - /* Display control codes */ - SCC_TINYFONT, ///< Switch to small font - SCC_BIGFONT, ///< Switch to large font + /* Font selection codes, must be in same order as FontSize enum */ + SCC_FIRST_FONT, + SCC_NORMALFONT = SCC_FIRST_FONT, ///< Switch to normal size font + SCC_TINYFONT, ///< Switch to small font + SCC_BIGFONT, ///< Switch to large font + SCC_MONOFONT, ///< Switch to monospaced font + SCC_LAST_FONT = SCC_MONOFONT, /* Formatting control codes */ SCC_REVISION, @@ -111,7 +115,8 @@ enum StringControlCode { SCC_GRAY, SCC_DKBLUE, SCC_BLACK, - SCC_PREVIOUS_COLOUR, + SCC_PUSH_COLOUR, + SCC_POP_COLOUR, /** * The next variables are part of a NewGRF subsystem for creating text strings. diff --git a/src/table/currency_settings.ini b/src/table/currency_settings.ini index 5874e301f8..bcce65801b 100644 --- a/src/table/currency_settings.ini +++ b/src/table/currency_settings.ini @@ -1,4 +1,4 @@ -; $Id: currency_settings.ini 24671 2012-11-08 10:04:00Z frosch $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -25,7 +25,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h index 9c71f94c7d..6915360035 100644 --- a/src/table/elrail_data.h +++ b/src/table/elrail_data.h @@ -1,4 +1,4 @@ -/* $Id: elrail_data.h 27972 2018-03-05 21:24:48Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/engines.h b/src/table/engines.h index 40377f1d4f..3b29a8dc17 100644 --- a/src/table/engines.h +++ b/src/table/engines.h @@ -1,4 +1,4 @@ -/* $Id: engines.h 25115 2013-03-22 21:27:13Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,6 +28,19 @@ */ #define MT(a, b, c, d, e, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, e, 0, 8, 1 << EF_RAIL_FLIPS, 0, 0, STR_EMPTY, CARGO_AGING_TICKS } +/** + * Writes the properties of a multiple-unit train into the EngineInfo struct. + * @see EngineInfo + * @param a base introduction date (days since 1920-01-01) + * @param b decay speed + * @param c life length (years) + * @param d base life (years) + * @param e cargo type + * @param f Bitmask of the climates + * @note the 5 between b and f is the load amount + */ +#define MM(a, b, c, d, e, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, e, 0, 8, 1 << EF_RAIL_FLIPS | 1 << EF_RAIL_IS_MU, 0, 0, STR_EMPTY, CARGO_AGING_TICKS } + /** * Writes the properties of a train carriage into the EngineInfo struct. * @param a base introduction date (days since 1920-01-01) @@ -102,8 +115,8 @@ static const EngineInfo _orig_engine_info[] = { MT( 5114, 20, 21, 30, 0 , T ), // 8 Chaney 'Jubilee' (Steam) MT( 5479, 20, 20, 30, 0 , T ), // 9 Ginzu 'A4' (Steam) MT( 12419, 20, 23, 25, 0 , T ), // 10 SH '8P' (Steam) - MT( 13149, 20, 12, 30, CT_PASSENGERS , T ), // 11 Manley-Morel DMU (Diesel) - MT( 23376, 20, 15, 35, CT_PASSENGERS , T ), // 12 'Dash' (Diesel) + MM( 13149, 20, 12, 30, CT_PASSENGERS , T ), // 11 Manley-Morel DMU (Diesel) + MM( 23376, 20, 15, 35, CT_PASSENGERS , T ), // 12 'Dash' (Diesel) MT( 14976, 20, 18, 28, 0 , T ), // 13 SH/Hendry '25' (Diesel) MT( 14245, 20, 20, 30, 0 , T ), // 14 UU '37' (Diesel) MT( 15341, 20, 22, 33, 0 , T ), // 15 Floss '47' (Diesel) @@ -111,13 +124,13 @@ static const EngineInfo _orig_engine_info[] = { MT( 16437, 20, 20, 30, 0 , A|S ), // 17 CS 2400 (Diesel) MT( 18993, 20, 22, 30, 0 , A|S ), // 18 Centennial (Diesel) MT( 13880, 20, 22, 30, 0 , A|S ), // 19 Kelling 3100 (Diesel) - MT( 20454, 20, 22, 30, 0 , A|S ), // 20 Turner Turbo (Diesel) + MM( 20454, 20, 22, 30, 0 , A|S ), // 20 Turner Turbo (Diesel) MT( 16071, 20, 22, 30, 0 , A|S ), // 21 MJS 1000 (Diesel) MT( 20820, 20, 20, 25, CT_MAIL , T ), // 22 SH '125' (Diesel) MT( 16437, 20, 23, 30, 0 , T ), // 23 SH '30' (Electric) MT( 19359, 20, 23, 80, 0 , T ), // 24 SH '40' (Electric) - MT( 23376, 20, 25, 30, 0 , T ), // 25 'T.I.M.' (Electric) - MT( 26298, 20, 25, 50, 0 , T ), // 26 'AsiaStar' (Electric) + MM( 23376, 20, 25, 30, 0 , T ), // 25 'T.I.M.' (Electric) + MM( 26298, 20, 25, 50, 0 , T ), // 26 'AsiaStar' (Electric) MW( 1827, 20, 20, 50, CT_PASSENGERS , T|A|S|Y), // 27 Passenger Carriage MW( 1827, 20, 20, 50, CT_MAIL , T|A|S|Y), // 28 Mail Van MW( 1827, 20, 20, 50, CT_COAL , T|A ), // 29 Coal Truck diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini index ccaaa925c1..624d475c31 100644 --- a/src/table/gameopt_settings.ini +++ b/src/table/gameopt_settings.ini @@ -1,4 +1,4 @@ -; $Id: gameopt_settings.ini 26206 2014-01-02 17:55:57Z frosch $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -59,7 +59,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED @@ -77,7 +77,7 @@ def = 0 min = 0 max = 0 full = NULL -to = 3 +to = SLV_4 [SDTG_GENERAL] name = ""diff_custom"" @@ -91,7 +91,7 @@ def = 0 min = 0 max = 0 full = NULL -from = 4 +from = SLV_4 ## [SDTG_VAR] @@ -152,21 +152,21 @@ type = SLE_UINT8 def = DEF_SNOWLINE_HEIGHT * TILE_HEIGHT min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT max = MAX_SNOWLINE_HEIGHT * TILE_HEIGHT -to = 21 +to = SLV_22 [SDT_NULL] length = 1 -from = 22 -to = 164 +from = SLV_22 +to = SLV_165 [SDT_NULL] length = 1 -to = 22 +to = SLV_23 [SDTC_OMANY] var = gui.autosave type = SLE_UINT8 -from = 23 +from = SLV_23 flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC def = 1 max = 4 diff --git a/src/table/genland.h b/src/table/genland.h index 432fa2affc..fd2a07e7ab 100644 --- a/src/table/genland.h +++ b/src/table/genland.h @@ -1,4 +1,4 @@ -/* $Id: genland.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/heightmap_colours.h b/src/table/heightmap_colours.h index db320080ce..42b99eeca1 100644 --- a/src/table/heightmap_colours.h +++ b/src/table/heightmap_colours.h @@ -1,4 +1,4 @@ -/* $Id: heightmap_colours.h 26930 2014-09-27 14:51:34Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/industry_land.h b/src/table/industry_land.h index 58f7e4e1f3..fe5dd5b6e5 100644 --- a/src/table/industry_land.h +++ b/src/table/industry_land.h @@ -1,4 +1,4 @@ -/* $Id: industry_land.h 20286 2010-08-01 19:44:49Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/landscape_sprite.h b/src/table/landscape_sprite.h index 7668a86df4..ceadd3e584 100644 --- a/src/table/landscape_sprite.h +++ b/src/table/landscape_sprite.h @@ -1,4 +1,4 @@ -/* $Id: landscape_sprite.h 24877 2013-01-01 10:52:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini index f2f963e3a5..b710478fba 100644 --- a/src/table/misc_settings.ini +++ b/src/table/misc_settings.ini @@ -1,4 +1,4 @@ -; $Id: misc_settings.ini 26990 2014-10-11 13:22:37Z peter1138 $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -32,7 +32,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index e96c7ab1e9..19b411fed0 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_debug_data.h 27654 2016-09-05 19:11:01Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -272,11 +272,38 @@ static const NIFeature _nif_industrytile = { /*** NewGRF industries ***/ static const NIProperty _nip_industries[] = { - NIP(0x10, Industry, produced_cargo[0], NIT_CARGO, "produced cargo 0"), - NIP(0x10, Industry, produced_cargo[1], NIT_CARGO, "produced cargo 1"), - NIP(0x11, Industry, accepts_cargo[0], NIT_CARGO, "accepted cargo 0"), - NIP(0x11, Industry, accepts_cargo[1], NIT_CARGO, "accepted cargo 1"), - NIP(0x11, Industry, accepts_cargo[2], NIT_CARGO, "accepted cargo 2"), + NIP(0x25, Industry, produced_cargo[ 0], NIT_CARGO, "produced cargo 0"), + NIP(0x25, Industry, produced_cargo[ 1], NIT_CARGO, "produced cargo 1"), + NIP(0x25, Industry, produced_cargo[ 2], NIT_CARGO, "produced cargo 2"), + NIP(0x25, Industry, produced_cargo[ 3], NIT_CARGO, "produced cargo 3"), + NIP(0x25, Industry, produced_cargo[ 4], NIT_CARGO, "produced cargo 4"), + NIP(0x25, Industry, produced_cargo[ 5], NIT_CARGO, "produced cargo 5"), + NIP(0x25, Industry, produced_cargo[ 6], NIT_CARGO, "produced cargo 6"), + NIP(0x25, Industry, produced_cargo[ 7], NIT_CARGO, "produced cargo 7"), + NIP(0x25, Industry, produced_cargo[ 8], NIT_CARGO, "produced cargo 8"), + NIP(0x25, Industry, produced_cargo[ 9], NIT_CARGO, "produced cargo 9"), + NIP(0x25, Industry, produced_cargo[10], NIT_CARGO, "produced cargo 10"), + NIP(0x25, Industry, produced_cargo[11], NIT_CARGO, "produced cargo 11"), + NIP(0x25, Industry, produced_cargo[12], NIT_CARGO, "produced cargo 12"), + NIP(0x25, Industry, produced_cargo[13], NIT_CARGO, "produced cargo 13"), + NIP(0x25, Industry, produced_cargo[14], NIT_CARGO, "produced cargo 14"), + NIP(0x25, Industry, produced_cargo[15], NIT_CARGO, "produced cargo 15"), + NIP(0x26, Industry, accepts_cargo[ 0], NIT_CARGO, "accepted cargo 0"), + NIP(0x26, Industry, accepts_cargo[ 1], NIT_CARGO, "accepted cargo 1"), + NIP(0x26, Industry, accepts_cargo[ 2], NIT_CARGO, "accepted cargo 2"), + NIP(0x26, Industry, accepts_cargo[ 3], NIT_CARGO, "accepted cargo 3"), + NIP(0x26, Industry, accepts_cargo[ 4], NIT_CARGO, "accepted cargo 4"), + NIP(0x26, Industry, accepts_cargo[ 5], NIT_CARGO, "accepted cargo 5"), + NIP(0x26, Industry, accepts_cargo[ 6], NIT_CARGO, "accepted cargo 6"), + NIP(0x26, Industry, accepts_cargo[ 7], NIT_CARGO, "accepted cargo 7"), + NIP(0x26, Industry, accepts_cargo[ 8], NIT_CARGO, "accepted cargo 8"), + NIP(0x26, Industry, accepts_cargo[ 9], NIT_CARGO, "accepted cargo 9"), + NIP(0x26, Industry, accepts_cargo[10], NIT_CARGO, "accepted cargo 10"), + NIP(0x26, Industry, accepts_cargo[11], NIT_CARGO, "accepted cargo 11"), + NIP(0x26, Industry, accepts_cargo[12], NIT_CARGO, "accepted cargo 12"), + NIP(0x26, Industry, accepts_cargo[13], NIT_CARGO, "accepted cargo 13"), + NIP(0x26, Industry, accepts_cargo[14], NIT_CARGO, "accepted cargo 14"), + NIP(0x26, Industry, accepts_cargo[15], NIT_CARGO, "accepted cargo 15"), NIP_END() }; diff --git a/src/table/object_land.h b/src/table/object_land.h index b3a0104bb8..a19b2cb089 100644 --- a/src/table/object_land.h +++ b/src/table/object_land.h @@ -1,4 +1,4 @@ -/* $Id: object_land.h 27183 2015-03-13 19:42:49Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/palette_convert.h b/src/table/palette_convert.h index 6b4e3190e6..58c190424f 100644 --- a/src/table/palette_convert.h +++ b/src/table/palette_convert.h @@ -1,4 +1,4 @@ -/* $Id: palette_convert.h 23433 2011-12-04 19:07:24Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/palettes.h b/src/table/palettes.h index dd7174d724..93cb7385e1 100644 --- a/src/table/palettes.h +++ b/src/table/palettes.h @@ -1,4 +1,4 @@ -/* $Id: palettes.h 27340 2015-07-26 09:47:17Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/pricebase.h b/src/table/pricebase.h index d9f046136a..9dc2ee2ba7 100644 --- a/src/table/pricebase.h +++ b/src/table/pricebase.h @@ -1,4 +1,4 @@ -/* $Id: pricebase.h 23931 2012-02-11 22:43:39Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/railtypes.h b/src/table/railtypes.h index 06fde3f1c3..f52a1524bd 100644 --- a/src/table/railtypes.h +++ b/src/table/railtypes.h @@ -1,4 +1,4 @@ -/* $Id: railtypes.h 24368 2012-07-02 15:55:13Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/road_land.h b/src/table/road_land.h index db8b315320..19b8f57119 100644 --- a/src/table/road_land.h +++ b/src/table/road_land.h @@ -1,4 +1,4 @@ -/* $Id: road_land.h 19056 2010-02-07 22:22:54Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/roadveh_movement.h b/src/table/roadveh_movement.h index 30b6024156..5b202b2b59 100644 --- a/src/table/roadveh_movement.h +++ b/src/table/roadveh_movement.h @@ -1,4 +1,4 @@ -/* $Id: roadveh_movement.h 21263 2010-11-20 09:09:57Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble index da192ea70b..f475e305bc 100644 --- a/src/table/settings.h.preamble +++ b/src/table/settings.h.preamble @@ -1,4 +1,4 @@ -/* $Id: settings.h.preamble 24991 2013-02-14 11:06:01Z matthijs $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -74,7 +74,7 @@ static size_t ConvertLandscape(const char *value); SDTG_GENERAL(name, SDT_INTLIST, SL_ARR, type, flags, guiflags, var, length, def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat) #define SDTG_STR(name, type, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\ - SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, lengthof(var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat) + SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, sizeof(var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat) #define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, strhelp, strval, proc, from, to, cat)\ SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat) @@ -102,7 +102,7 @@ static size_t ConvertLandscape(const char *value); SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat) #define SDT_STR(base, var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\ - SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat) + SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, sizeof(((base*)8)->var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat) #define SDT_CHR(base, var, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\ SDT_GENERAL(#var, SDT_STRING, SL_VAR, SLE_CHAR, flags, guiflags, base, var, 1, def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat) @@ -127,7 +127,7 @@ static size_t ConvertLandscape(const char *value); SDTG_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat) #define SDTC_STR(var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\ - SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat) + SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, sizeof(_settings_client.var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat) #define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, cat)\ SDTG_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat) diff --git a/src/table/settings.ini b/src/table/settings.ini index b0d44d6605..2110638e43 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -1,4 +1,4 @@ -; $Id: settings.ini 27978 2018-03-11 12:11:09Z frosch $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -42,6 +42,7 @@ static bool InvalidateCompanyInfrastructureWindow(int32 p1); static bool InvalidateCompanyWindow(int32 p1); static bool ZoomMinMaxChanged(int32 p1); static bool MaxVehiclesChanged(int32 p1); +static bool InvalidateShipPathCache(int32 p1); #ifdef ENABLE_NETWORK static bool UpdateClientName(int32 p1); @@ -88,7 +89,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED @@ -100,7 +101,7 @@ cat = SC_ADVANCED base = GameSettings var = difficulty.max_no_competitors type = SLE_UINT8 -from = 97 +from = SLV_97 def = 0 min = 0 max = MAX_COMPANIES - 1 @@ -110,14 +111,14 @@ cat = SC_BASIC [SDT_NULL] length = 1 -from = 97 -to = 109 +from = SLV_97 +to = SLV_110 [SDT_VAR] base = GameSettings var = difficulty.number_towns type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_NEWGAME_ONLY def = 2 min = 0 @@ -130,7 +131,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.industry_density type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING def = ID_END - 1 min = 0 @@ -145,7 +146,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.max_loan type = SLE_UINT32 -from = 97 +from = SLV_97 guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO | SGF_CURRENCY def = 300000 min = 100000 @@ -160,7 +161,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.initial_interest type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO def = 2 min = 2 @@ -174,7 +175,7 @@ strval = STR_CONFIG_SETTING_PERCENTAGE base = GameSettings var = difficulty.vehicle_costs type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO | SGF_MULTISTRING def = 0 min = 0 @@ -189,7 +190,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.competitor_speed type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING def = 2 min = 0 @@ -202,14 +203,14 @@ cat = SC_BASIC [SDT_NULL] length = 1 -from = 97 -to = 109 +from = SLV_97 +to = SLV_110 [SDT_VAR] base = GameSettings var = difficulty.vehicle_breakdowns type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING def = 1 min = 0 @@ -224,7 +225,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.subsidy_multiplier type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING def = 2 min = 0 @@ -238,7 +239,7 @@ strval = STR_SUBSIDY_X1_5 base = GameSettings var = difficulty.construction_cost type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO | SGF_MULTISTRING def = 0 min = 0 @@ -253,7 +254,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.terrain_type type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY def = 1 min = 0 @@ -268,7 +269,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.quantity_sea_lakes type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_NEWGAME_ONLY def = 0 min = 0 @@ -280,7 +281,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = difficulty.economy -from = 97 +from = SLV_97 def = false str = STR_CONFIG_SETTING_RECESSIONS strhelp = STR_CONFIG_SETTING_RECESSIONS_HELPTEXT @@ -288,7 +289,7 @@ strhelp = STR_CONFIG_SETTING_RECESSIONS_HELPTEXT [SDT_BOOL] base = GameSettings var = difficulty.line_reverse_mode -from = 97 +from = SLV_97 def = false str = STR_CONFIG_SETTING_TRAIN_REVERSING strhelp = STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT @@ -296,7 +297,7 @@ strhelp = STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT [SDT_BOOL] base = GameSettings var = difficulty.disasters -from = 97 +from = SLV_97 def = false str = STR_CONFIG_SETTING_DISASTERS strhelp = STR_CONFIG_SETTING_DISASTERS_HELPTEXT @@ -306,7 +307,7 @@ cat = SC_BASIC base = GameSettings var = difficulty.town_council_tolerance type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING def = 0 min = 0 @@ -322,8 +323,8 @@ name = ""diff_level"" var = _old_diff_level type = SLE_UINT8 flags = SLF_NOT_IN_CONFIG -from = 97 -to = 177 +from = SLV_97 +to = SLV_178 def = 3 min = 0 max = 3 @@ -335,7 +336,7 @@ cat = SC_BASIC base = GameSettings var = game_creation.town_name type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_NO_NETWORK def = 0 max = 255 @@ -346,7 +347,7 @@ cat = SC_BASIC base = GameSettings var = game_creation.landscape type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY def = 0 max = 3 @@ -360,14 +361,14 @@ cat = SC_BASIC ; Snow line (or snow_line_height * TILE_HEIGHT) [SDT_NULL] length = 1 -from = 97 -to = 163 +from = SLV_97 +to = SLV_164 [SDT_OMANY] base = GameSettings var = vehicle.road_side type = SLE_UINT8 -from = 97 +from = SLV_97 guiflags = SGF_MULTISTRING | SGF_NO_NETWORK def = 1 max = 1 @@ -383,7 +384,7 @@ proc = CheckRoadSide base = GameSettings var = construction.max_heightlevel type = SLE_UINT8 -from = 194 +from = SLV_194 guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO def = DEF_MAX_HEIGHTLEVEL min = MIN_MAX_HEIGHTLEVEL @@ -406,7 +407,7 @@ cat = SC_EXPERT base = GameSettings var = construction.command_pause_level type = SLE_UINT8 -from = 154 +from = SLV_154 guiflags = SGF_MULTISTRING | SGF_NO_NETWORK def = 1 min = 0 @@ -420,7 +421,7 @@ strval = STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_NO_ACTIONS base = GameSettings var = construction.terraform_per_64k_frames type = SLE_UINT32 -from = 156 +from = SLV_156 def = 64 << 16 min = 0 max = 1 << 30 @@ -431,7 +432,7 @@ cat = SC_EXPERT base = GameSettings var = construction.terraform_frame_burst type = SLE_UINT16 -from = 156 +from = SLV_156 def = 4096 min = 0 max = 1 << 30 @@ -442,7 +443,7 @@ cat = SC_EXPERT base = GameSettings var = construction.clear_per_64k_frames type = SLE_UINT32 -from = 156 +from = SLV_156 def = 64 << 16 min = 0 max = 1 << 30 @@ -453,7 +454,7 @@ cat = SC_EXPERT base = GameSettings var = construction.clear_frame_burst type = SLE_UINT16 -from = 156 +from = SLV_156 def = 4096 min = 0 max = 1 << 30 @@ -464,7 +465,7 @@ cat = SC_EXPERT base = GameSettings var = construction.tree_per_64k_frames type = SLE_UINT32 -from = 175 +from = SLV_175 def = 64 << 16 min = 0 max = 1 << 30 @@ -475,7 +476,7 @@ cat = SC_EXPERT base = GameSettings var = construction.tree_frame_burst type = SLE_UINT16 -from = 175 +from = SLV_175 def = 4096 min = 0 max = 1 << 30 @@ -485,7 +486,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = construction.autoslope -from = 75 +from = SLV_75 def = true str = STR_CONFIG_SETTING_AUTOSLOPE strhelp = STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT @@ -502,7 +503,7 @@ strhelp = STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT base = GameSettings var = construction.max_bridge_length type = SLE_UINT16 -from = 159 +from = SLV_159 guiflags = SGF_NO_NETWORK def = 64 min = 1 @@ -516,7 +517,7 @@ strval = STR_CONFIG_SETTING_TILE_LENGTH base = GameSettings var = construction.max_bridge_height type = SLE_UINT8 -from = 194 +from = SLV_194 guiflags = SGF_NO_NETWORK def = 12 min = 1 @@ -531,7 +532,7 @@ cat = SC_EXPERT base = GameSettings var = construction.max_tunnel_length type = SLE_UINT16 -from = 159 +from = SLV_159 guiflags = SGF_NO_NETWORK def = 64 min = 1 @@ -544,7 +545,7 @@ strval = STR_CONFIG_SETTING_TILE_LENGTH # construction.longbridges [SDT_NULL] length = 1 -to = 158 +to = SLV_159 [SDT_VAR] base = GameSettings @@ -572,7 +573,7 @@ strhelp = STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT base = GameSettings var = economy.town_layout type = SLE_UINT8 -from = 59 +from = SLV_59 guiflags = SGF_MULTISTRING def = TL_ORIGINAL min = TL_BEGIN @@ -586,7 +587,7 @@ proc = TownFoundingChanged [SDT_BOOL] base = GameSettings var = economy.allow_town_roads -from = 113 +from = SLV_113 guiflags = SGF_NO_NETWORK def = true str = STR_CONFIG_SETTING_ALLOW_TOWN_ROADS @@ -596,7 +597,7 @@ strhelp = STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT base = GameSettings var = economy.found_town type = SLE_UINT8 -from = 128 +from = SLV_128 guiflags = SGF_MULTISTRING def = TF_FORBIDDEN min = TF_BEGIN @@ -611,7 +612,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = economy.allow_town_level_crossings -from = 143 +from = SLV_143 guiflags = SGF_NO_NETWORK def = true str = STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS @@ -623,7 +624,7 @@ strhelp = STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS_HELPTEXT base = GameSettings var = linkgraph.recalc_interval type = SLE_UINT16 -from = 183 +from = SLV_183 def = 4 min = 2 max = 32 @@ -636,7 +637,7 @@ strhelp = STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT base = GameSettings var = linkgraph.recalc_time type = SLE_UINT16 -from = 183 +from = SLV_183 def = 16 min = 1 max = 4096 @@ -649,7 +650,7 @@ strhelp = STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT base = GameSettings var = linkgraph.distribution_pax type = SLE_UINT8 -from = 183 +from = SLV_183 guiflags = SGF_MULTISTRING def = DT_MANUAL min = DT_MIN @@ -663,7 +664,7 @@ strhelp = STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT base = GameSettings var = linkgraph.distribution_mail type = SLE_UINT8 -from = 183 +from = SLV_183 guiflags = SGF_MULTISTRING def = DT_MANUAL min = DT_MIN @@ -677,7 +678,7 @@ strhelp = STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT base = GameSettings var = linkgraph.distribution_armoured type = SLE_UINT8 -from = 183 +from = SLV_183 guiflags = SGF_MULTISTRING def = DT_MANUAL min = DT_MIN @@ -691,7 +692,7 @@ strhelp = STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT base = GameSettings var = linkgraph.distribution_default type = SLE_UINT8 -from = 183 +from = SLV_183 guiflags = SGF_MULTISTRING def = DT_MANUAL min = DT_BEGIN @@ -705,7 +706,7 @@ strhelp = STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT base = GameSettings var = linkgraph.accuracy type = SLE_UINT8 -from = 183 +from = SLV_183 def = 16 min = 2 max = 64 @@ -718,7 +719,7 @@ strhelp = STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT base = GameSettings var = linkgraph.demand_distance type = SLE_UINT8 -from = 183 +from = SLV_183 def = 100 min = 0 max = 255 @@ -731,7 +732,7 @@ strhelp = STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT base = GameSettings var = linkgraph.demand_size type = SLE_UINT8 -from = 183 +from = SLV_183 def = 100 min = 0 max = 100 @@ -744,7 +745,7 @@ strhelp = STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT base = GameSettings var = linkgraph.short_path_saturation type = SLE_UINT8 -from = 183 +from = SLV_183 def = 80 min = 0 max = 250 @@ -773,7 +774,7 @@ proc = TrainAccelerationModelChanged base = GameSettings var = vehicle.roadveh_acceleration_model type = SLE_UINT8 -from = 139 +from = SLV_139 guiflags = SGF_MULTISTRING def = 1 min = 0 @@ -788,7 +789,7 @@ proc = RoadVehAccelerationModelChanged base = GameSettings var = vehicle.train_slope_steepness type = SLE_UINT8 -from = 133 +from = SLV_133 def = 3 min = 0 max = 10 @@ -803,7 +804,7 @@ cat = SC_EXPERT base = GameSettings var = vehicle.roadveh_slope_steepness type = SLE_UINT8 -from = 139 +from = SLV_139 def = 7 min = 0 max = 10 @@ -820,13 +821,14 @@ var = pf.forbid_90_deg def = false str = STR_CONFIG_SETTING_FORBID_90_DEG strhelp = STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT +proc = InvalidateShipPathCache cat = SC_EXPERT [SDT_VAR] base = GameSettings var = vehicle.max_train_length type = SLE_UINT8 -from = 159 +from = SLV_159 def = 7 min = 1 max = 64 @@ -839,13 +841,13 @@ cat = SC_BASIC ; vehicle.mammoth_trains [SDT_NULL] length = 1 -to = 158 +to = SLV_159 [SDT_VAR] base = GameSettings var = vehicle.smoke_amount type = SLE_UINT8 -from = 145 +from = SLV_145 guiflags = SGF_MULTISTRING def = 1 min = 0 @@ -857,7 +859,7 @@ strval = STR_CONFIG_SETTING_NONE ; order.gotodepot [SDT_NULL] length = 1 -to = 158 +to = SLV_159 ; path finder @@ -870,31 +872,31 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.new_pathfinding_all -to = 86 +to = SLV_87 def = false cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.yapf.ship_use_yapf -from = 28 -to = 86 +from = SLV_28 +to = SLV_87 def = false cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.yapf.road_use_yapf -from = 28 -to = 86 +from = SLV_28 +to = SLV_87 def = true cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.yapf.rail_use_yapf -from = 28 -to = 86 +from = SLV_28 +to = SLV_87 def = true cat = SC_EXPERT @@ -903,7 +905,7 @@ cat = SC_EXPERT base = GameSettings var = pf.pathfinder_for_trains type = SLE_UINT8 -from = 87 +from = SLV_87 guiflags = SGF_MULTISTRING def = 2 min = 1 @@ -918,7 +920,7 @@ cat = SC_EXPERT base = GameSettings var = pf.pathfinder_for_roadvehs type = SLE_UINT8 -from = 87 +from = SLV_87 guiflags = SGF_MULTISTRING def = 2 min = 1 @@ -933,7 +935,7 @@ cat = SC_EXPERT base = GameSettings var = pf.pathfinder_for_ships type = SLE_UINT8 -from = 87 +from = SLV_87 guiflags = SGF_MULTISTRING def = 2 min = 0 @@ -942,6 +944,7 @@ interval = 1 str = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS strhelp = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT strval = STR_CONFIG_SETTING_PATHFINDER_OPF +proc = InvalidateShipPathCache cat = SC_EXPERT [SDT_BOOL] @@ -1009,7 +1012,7 @@ name = NULL guiflags = SGF_NO_NETWORK var = _old_vds.servint_ispercent def = false -to = 119 +to = SLV_120 [SDTG_VAR] name = NULL @@ -1019,7 +1022,7 @@ var = _old_vds.servint_trains def = 150 min = 5 max = 800 -to = 119 +to = SLV_120 [SDTG_VAR] name = NULL @@ -1029,7 +1032,7 @@ var = _old_vds.servint_roadveh def = 150 min = 5 max = 800 -to = 119 +to = SLV_120 [SDTG_VAR] name = NULL @@ -1039,7 +1042,7 @@ var = _old_vds.servint_ships def = 360 min = 5 max = 800 -to = 119 +to = SLV_120 [SDTG_VAR] name = NULL @@ -1049,7 +1052,7 @@ var = _old_vds.servint_aircraft def = 150 min = 5 max = 800 -to = 119 +to = SLV_120 [SDT_BOOL] base = GameSettings @@ -1070,7 +1073,7 @@ proc = UpdateConsists [SDT_BOOL] base = GameSettings var = vehicle.disable_elrails -from = 38 +from = SLV_38 guiflags = SGF_NO_NETWORK def = false str = STR_CONFIG_SETTING_DISABLE_ELRAILS @@ -1082,7 +1085,7 @@ cat = SC_EXPERT base = GameSettings var = vehicle.freight_trains type = SLE_UINT8 -from = 39 +from = SLV_39 guiflags = SGF_NO_NETWORK def = 1 min = 1 @@ -1096,14 +1099,14 @@ proc = UpdateConsists ; order.timetabling [SDT_NULL] length = 1 -from = 67 -to = 158 +from = SLV_67 +to = SLV_159 [SDT_VAR] base = GameSettings var = vehicle.plane_speed type = SLE_UINT8 -from = 90 +from = SLV_90 guiflags = SGF_NO_NETWORK def = 4 min = 1 @@ -1115,7 +1118,7 @@ strval = STR_CONFIG_SETTING_PLANE_SPEED_VALUE [SDT_BOOL] base = GameSettings var = vehicle.dynamic_engines -from = 95 +from = SLV_95 guiflags = SGF_NO_NETWORK def = true proc = ChangeDynamicEngines @@ -1125,7 +1128,7 @@ cat = SC_EXPERT base = GameSettings var = vehicle.plane_crashes type = SLE_UINT8 -from = 138 +from = SLV_138 guiflags = SGF_MULTISTRING def = 2 min = 0 @@ -1139,12 +1142,12 @@ cat = SC_BASIC ; station.join_stations [SDT_NULL] length = 1 -to = 158 +to = SLV_159 [SDTC_BOOL] var = gui.sg_full_load_any -from = 22 -to = 92 +from = SLV_22 +to = SLV_93 def = true [SDT_BOOL] @@ -1162,14 +1165,14 @@ cat = SC_EXPERT [SDTC_BOOL] var = gui.sg_new_nonstop -from = 22 -to = 92 +from = SLV_22 +to = SLV_93 def = false ; station.nonuniform_stations [SDT_NULL] length = 1 -to = 158 +to = SLV_159 [SDT_VAR] base = GameSettings @@ -1204,7 +1207,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = order.gradual_loading -from = 40 +from = SLV_40 guiflags = SGF_NO_NETWORK def = true cat = SC_EXPERT @@ -1212,7 +1215,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = construction.road_stop_on_town_road -from = 47 +from = SLV_47 def = true str = STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD strhelp = STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD_HELPTEXT @@ -1221,7 +1224,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = construction.road_stop_on_competitor_road -from = 114 +from = SLV_114 def = true str = STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD strhelp = STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT @@ -1230,14 +1233,14 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = station.adjacent_stations -from = 62 +from = SLV_62 def = true cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = economy.station_noise_level -from = 96 +from = SLV_96 guiflags = SGF_NO_NETWORK def = false str = STR_CONFIG_SETTING_NOISE_LEVEL @@ -1247,7 +1250,7 @@ proc = InvalidateTownViewWindow [SDT_BOOL] base = GameSettings var = station.distant_join_stations -from = 106 +from = SLV_106 def = true str = STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS strhelp = STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT @@ -1280,7 +1283,7 @@ cat = SC_BASIC base = GameSettings var = construction.industry_platform type = SLE_UINT8 -from = 148 +from = SLV_148 def = 1 min = 0 max = 4 @@ -1298,7 +1301,7 @@ strhelp = STR_CONFIG_SETTING_MULTIPINDTOWN_HELPTEXT [SDT_NULL] length = 1 -to = 140 +to = SLV_141 [SDT_BOOL] base = GameSettings @@ -1312,7 +1315,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = economy.exclusive_rights -from = 79 +from = SLV_79 def = true str = STR_CONFIG_SETTING_ALLOW_EXCLUSIVE strhelp = STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT @@ -1322,7 +1325,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = economy.fund_buildings -from = 165 +from = SLV_165 def = true str = STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS strhelp = STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT @@ -1332,7 +1335,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = economy.fund_roads -from = 160 +from = SLV_160 def = true str = STR_CONFIG_SETTING_ALLOW_FUND_ROAD strhelp = STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT @@ -1342,7 +1345,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = economy.give_money -from = 79 +from = SLV_79 def = true str = STR_CONFIG_SETTING_ALLOW_GIVE_MONEY strhelp = STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT @@ -1363,7 +1366,7 @@ cat = SC_BASIC [SDT_NULL] length = 4 -to = 143 +to = SLV_144 [SDT_VAR] base = GameSettings @@ -1379,7 +1382,7 @@ cat = SC_BASIC [SDT_NULL] length = 4 -to = 104 +to = SLV_105 [SDT_BOOL] base = GameSettings @@ -1402,7 +1405,7 @@ proc = InvalidateCompanyWindow base = GameSettings var = economy.feeder_payment_share type = SLE_UINT8 -from = 134 +from = SLV_134 def = 75 min = 0 max = 100 @@ -1415,7 +1418,7 @@ cat = SC_EXPERT base = GameSettings var = economy.town_growth_rate type = SLE_UINT8 -from = 54 +from = SLV_54 guiflags = SGF_MULTISTRING def = 2 min = 0 @@ -1428,7 +1431,7 @@ strval = STR_CONFIG_SETTING_TOWN_GROWTH_NONE base = GameSettings var = economy.larger_towns type = SLE_UINT8 -from = 54 +from = SLV_54 guiflags = SGF_0ISDISABLED def = 4 min = 0 @@ -1442,7 +1445,7 @@ strval = STR_CONFIG_SETTING_LARGER_TOWNS_VALUE base = GameSettings var = economy.initial_city_size type = SLE_UINT8 -from = 56 +from = SLV_56 def = 2 min = 1 max = 10 @@ -1454,20 +1457,20 @@ strval = STR_JUST_COMMA [SDT_BOOL] base = GameSettings var = economy.mod_road_rebuild -from = 77 +from = SLV_77 def = true cat = SC_EXPERT ; previously ai-new setting. [SDT_NULL] length = 1 -to = 106 +to = SLV_107 [SDT_OMANY] base = GameSettings var = script.settings_profile type = SLE_UINT8 -from = 178 +from = SLV_178 guiflags = SGF_MULTISTRING def = SP_EASY min = SP_EASY @@ -1518,7 +1521,7 @@ strhelp = STR_CONFIG_SETTING_AI_BUILDS_SHIPS_HELPTEXT base = GameSettings var = script.script_max_opcode_till_suspend type = SLE_UINT32 -from = 107 +from = SLV_107 guiflags = SGF_NEWGAME_ONLY def = 10000 min = 5000 @@ -1551,7 +1554,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.reverse_at_signals -from = 159 +from = SLV_159 def = false str = STR_CONFIG_SETTING_REVERSE_AT_SIGNALS strhelp = STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT @@ -1578,7 +1581,7 @@ cat = SC_EXPERT base = GameSettings var = economy.town_noise_population[0] type = SLE_UINT16 -from = 96 +from = SLV_96 def = 800 min = 200 max = 65535 @@ -1588,7 +1591,7 @@ cat = SC_EXPERT base = GameSettings var = economy.town_noise_population[1] type = SLE_UINT16 -from = 96 +from = SLV_96 def = 2000 min = 400 max = 65535 @@ -1598,7 +1601,7 @@ cat = SC_EXPERT base = GameSettings var = economy.town_noise_population[2] type = SLE_UINT16 -from = 96 +from = SLV_96 def = 4000 min = 800 max = 65535 @@ -1607,7 +1610,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = economy.infrastructure_maintenance -from = 166 +from = SLV_166 def = false str = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE strhelp = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT @@ -1619,7 +1622,7 @@ cat = SC_BASIC base = GameSettings var = pf.wait_for_pbs_path type = SLE_UINT8 -from = 100 +from = SLV_100 def = 30 min = 2 max = 255 @@ -1628,7 +1631,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.reserve_paths -from = 100 +from = SLV_100 def = false cat = SC_EXPERT @@ -1636,7 +1639,7 @@ cat = SC_EXPERT base = GameSettings var = pf.path_backoff_interval type = SLE_UINT8 -from = 100 +from = SLV_100 def = 20 min = 1 max = 255 @@ -1738,7 +1741,7 @@ cat = SC_EXPERT base = GameSettings var = pf.npf.npf_rail_pbs_cross_penalty type = SLE_UINT -from = 100 +from = SLV_100 def = 3 * NPF_TILE_LENGTH min = 0 max = 100000 @@ -1748,7 +1751,7 @@ cat = SC_EXPERT base = GameSettings var = pf.npf.npf_rail_pbs_signal_back_penalty type = SLE_UINT -from = 100 +from = SLV_100 def = 15 * NPF_TILE_LENGTH min = 0 max = 100000 @@ -1794,7 +1797,7 @@ cat = SC_EXPERT base = GameSettings var = pf.npf.npf_road_drive_through_penalty type = SLE_UINT -from = 47 +from = SLV_47 def = 8 * NPF_TILE_LENGTH min = 0 max = 100000 @@ -1804,7 +1807,7 @@ cat = SC_EXPERT base = GameSettings var = pf.npf.npf_road_dt_occupied_penalty type = SLE_UINT -from = 130 +from = SLV_130 def = 8 * NPF_TILE_LENGTH min = 0 max = 100000 @@ -1814,7 +1817,7 @@ cat = SC_EXPERT base = GameSettings var = pf.npf.npf_road_bay_occupied_penalty type = SLE_UINT -from = 130 +from = SLV_130 def = 15 * NPF_TILE_LENGTH min = 0 max = 100000 @@ -1824,7 +1827,7 @@ cat = SC_EXPERT base = GameSettings var = pf.npf.maximum_go_to_depot_penalty type = SLE_UINT -from = 131 +from = SLV_131 def = 20 * NPF_TILE_LENGTH min = 0 max = 1000000 @@ -1834,7 +1837,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.yapf.disable_node_optimization -from = 28 +from = SLV_28 def = false cat = SC_EXPERT @@ -1842,7 +1845,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.max_search_nodes type = SLE_UINT -from = 28 +from = SLV_28 def = 10000 min = 500 max = 1000000 @@ -1851,7 +1854,7 @@ cat = SC_EXPERT [SDT_BOOL] base = GameSettings var = pf.yapf.rail_firstred_twoway_eol -from = 28 +from = SLV_28 def = false cat = SC_EXPERT @@ -1859,7 +1862,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_firstred_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 10 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1869,7 +1872,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_firstred_exit_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 100 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1879,7 +1882,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_lastred_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 10 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1889,7 +1892,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_lastred_exit_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 100 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1899,7 +1902,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_station_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 10 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1909,7 +1912,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_slope_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 2 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1919,7 +1922,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_curve45_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 1 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1929,7 +1932,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_curve90_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 6 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1939,7 +1942,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_depot_reverse_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 50 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1949,7 +1952,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_crossing_penalty type = SLE_UINT -from = 28 +from = SLV_28 def = 3 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -1959,7 +1962,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_look_ahead_max_signals type = SLE_UINT -from = 28 +from = SLV_28 def = 10 min = 1 max = 100 @@ -1969,7 +1972,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_look_ahead_signal_p0 type = SLE_INT -from = 28 +from = SLV_28 def = 500 min = -1000000 max = 1000000 @@ -1979,7 +1982,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_look_ahead_signal_p1 type = SLE_INT -from = 28 +from = SLV_28 def = -100 min = -1000000 max = 1000000 @@ -1989,7 +1992,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_look_ahead_signal_p2 type = SLE_INT -from = 28 +from = SLV_28 def = 5 min = -1000000 max = 1000000 @@ -1999,7 +2002,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_pbs_cross_penalty type = SLE_UINT -from = 100 +from = SLV_100 def = 3 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2009,7 +2012,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_pbs_station_penalty type = SLE_UINT -from = 100 +from = SLV_100 def = 8 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2019,7 +2022,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_pbs_signal_back_penalty type = SLE_UINT -from = 100 +from = SLV_100 def = 15 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2029,7 +2032,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_doubleslip_penalty type = SLE_UINT -from = 100 +from = SLV_100 def = 1 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2039,7 +2042,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_longer_platform_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 8 * YAPF_TILE_LENGTH min = 0 max = 20000 @@ -2049,7 +2052,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_longer_platform_per_tile_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 0 * YAPF_TILE_LENGTH min = 0 max = 20000 @@ -2059,7 +2062,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_shorter_platform_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 40 * YAPF_TILE_LENGTH min = 0 max = 20000 @@ -2069,7 +2072,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.rail_shorter_platform_per_tile_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 0 * YAPF_TILE_LENGTH min = 0 max = 20000 @@ -2079,7 +2082,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.road_slope_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 2 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2089,7 +2092,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.road_curve_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 1 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2099,7 +2102,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.road_crossing_penalty type = SLE_UINT -from = 33 +from = SLV_33 def = 3 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2109,7 +2112,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.road_stop_penalty type = SLE_UINT -from = 47 +from = SLV_47 def = 8 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2119,7 +2122,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.road_stop_occupied_penalty type = SLE_UINT -from = 130 +from = SLV_130 def = 8 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2129,7 +2132,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.road_stop_bay_occupied_penalty type = SLE_UINT -from = 130 +from = SLV_130 def = 15 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2139,7 +2142,7 @@ cat = SC_EXPERT base = GameSettings var = pf.yapf.maximum_go_to_depot_penalty type = SLE_UINT -from = 131 +from = SLV_131 def = 20 * YAPF_TILE_LENGTH min = 0 max = 1000000 @@ -2150,7 +2153,7 @@ cat = SC_EXPERT base = GameSettings var = game_creation.land_generator type = SLE_UINT8 -from = 30 +from = SLV_30 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY def = 1 min = 0 @@ -2163,7 +2166,7 @@ strval = STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL base = GameSettings var = game_creation.oil_refinery_limit type = SLE_UINT8 -from = 30 +from = SLV_30 def = 32 min = 12 max = 48 @@ -2175,7 +2178,7 @@ strhelp = STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT base = GameSettings var = game_creation.tgen_smoothness type = SLE_UINT8 -from = 30 +from = SLV_30 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY def = 1 min = TGEN_SMOOTHNESS_BEGIN @@ -2189,7 +2192,7 @@ cat = SC_BASIC base = GameSettings var = game_creation.variety type = SLE_UINT8 -from = 197 +from = SLV_197 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY def = 0 min = 0 @@ -2202,7 +2205,7 @@ strval = STR_VARIETY_NONE base = GameSettings var = game_creation.generation_seed type = SLE_UINT32 -from = 30 +from = SLV_30 def = GENERATE_NEW_SEED min = 0 max = UINT32_MAX @@ -2212,7 +2215,7 @@ cat = SC_EXPERT base = GameSettings var = game_creation.tree_placer type = SLE_UINT8 -from = 30 +from = SLV_30 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO def = 2 min = 0 @@ -2270,7 +2273,7 @@ cat = SC_BASIC [SDT_BOOL] base = GameSettings var = construction.freeform_edges -from = 111 +from = SLV_111 def = true proc = CheckFreeformEdges cat = SC_EXPERT @@ -2279,7 +2282,7 @@ cat = SC_EXPERT base = GameSettings var = game_creation.water_borders type = SLE_UINT8 -from = 111 +from = SLV_111 def = 15 min = 0 max = 16 @@ -2288,7 +2291,7 @@ max = 16 base = GameSettings var = game_creation.custom_town_number type = SLE_UINT16 -from = 115 +from = SLV_115 def = 1 min = 1 max = 5000 @@ -2298,7 +2301,7 @@ cat = SC_BASIC base = GameSettings var = construction.extra_tree_placement type = SLE_UINT8 -from = 132 +from = SLV_132 guiflags = SGF_MULTISTRING def = 2 min = 0 @@ -2312,7 +2315,7 @@ cat = SC_BASIC base = GameSettings var = game_creation.custom_sea_level type = SLE_UINT8 -from = 149 +from = SLV_149 def = 1 min = 2 max = 90 @@ -2322,7 +2325,7 @@ cat = SC_BASIC base = GameSettings var = game_creation.min_river_length type = SLE_UINT8 -from = 163 +from = SLV_163 def = 16 min = 2 max = 255 @@ -2332,7 +2335,7 @@ cat = SC_EXPERT base = GameSettings var = game_creation.river_route_random type = SLE_UINT8 -from = 163 +from = SLV_163 def = 5 min = 1 max = 255 @@ -2342,7 +2345,7 @@ cat = SC_EXPERT base = GameSettings var = game_creation.amount_of_rivers type = SLE_UINT8 -from = 163 +from = SLV_163 guiflags = SGF_MULTISTRING | SGF_NEWGAME_ONLY def = 2 min = 0 @@ -2357,7 +2360,7 @@ strval = STR_RIVERS_NONE base = GameSettings var = locale.currency type = SLE_UINT8 -from = 97 +from = SLV_97 flags = SLF_NO_NETWORK_SYNC def = 0 max = CURRENCY_END - 1 @@ -2369,8 +2372,8 @@ cat = SC_BASIC name = ""units"" var = _old_units type = SLE_UINT8 -from = 97 -to = 183 +from = SLV_97 +to = SLV_184 flags = SLF_NOT_IN_CONFIG def = 1 max = 2 @@ -2382,7 +2385,7 @@ cat = SC_BASIC base = GameSettings var = locale.units_velocity type = SLE_UINT8 -from = 184 +from = SLV_184 flags = SLF_NO_NETWORK_SYNC guiflags = SGF_MULTISTRING def = 1 @@ -2398,7 +2401,7 @@ strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL base = GameSettings var = locale.units_power type = SLE_UINT8 -from = 184 +from = SLV_184 flags = SLF_NO_NETWORK_SYNC guiflags = SGF_MULTISTRING def = 1 @@ -2414,7 +2417,7 @@ strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL base = GameSettings var = locale.units_weight type = SLE_UINT8 -from = 184 +from = SLV_184 flags = SLF_NO_NETWORK_SYNC guiflags = SGF_MULTISTRING def = 1 @@ -2430,7 +2433,7 @@ strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_IMPERIAL base = GameSettings var = locale.units_volume type = SLE_UINT8 -from = 184 +from = SLV_184 flags = SLF_NO_NETWORK_SYNC guiflags = SGF_MULTISTRING def = 1 @@ -2446,7 +2449,7 @@ strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL base = GameSettings var = locale.units_force type = SLE_UINT8 -from = 184 +from = SLV_184 flags = SLF_NO_NETWORK_SYNC guiflags = SGF_MULTISTRING def = 2 @@ -2462,7 +2465,7 @@ strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_IMPERIAL base = GameSettings var = locale.units_height type = SLE_UINT8 -from = 184 +from = SLV_184 flags = SLF_NO_NETWORK_SYNC guiflags = SGF_MULTISTRING def = 1 @@ -2478,7 +2481,7 @@ strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL base = GameSettings var = locale.digit_group_separator type = SLE_STRQ -from = 118 +from = SLV_118 flags = SLF_NO_NETWORK_SYNC def = NULL proc = RedrawScreen @@ -2488,7 +2491,7 @@ cat = SC_BASIC base = GameSettings var = locale.digit_group_separator_currency type = SLE_STRQ -from = 118 +from = SLV_118 flags = SLF_NO_NETWORK_SYNC def = NULL proc = RedrawScreen @@ -2498,7 +2501,7 @@ cat = SC_BASIC base = GameSettings var = locale.digit_decimal_separator type = SLE_STRQ -from = 126 +from = SLV_126 flags = SLF_NO_NETWORK_SYNC def = NULL proc = RedrawScreen @@ -2560,13 +2563,17 @@ strhelp = STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT strval = STR_CONFIG_SETTING_AUTOSCROLL_DISABLED cat = SC_BASIC -[SDTC_BOOL] -var = gui.reverse_scroll +[SDTC_VAR] +var = gui.scroll_mode +type = SLE_UINT8 flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC -def = false -str = STR_CONFIG_SETTING_REVERSE_SCROLLING -strhelp = STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT -cat = SC_BASIC +guiflags = SGF_MULTISTRING +def = 0 +min = 0 +max = 3 +str = STR_CONFIG_SETTING_SCROLLMODE +strhelp = STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT +strval = STR_CONFIG_SETTING_SCROLLMODE_DEFAULT [SDTC_BOOL] var = gui.smooth_scroll @@ -2575,14 +2582,6 @@ def = false str = STR_CONFIG_SETTING_SMOOTH_SCROLLING strhelp = STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT -[SDTC_BOOL] -var = gui.left_mouse_btn_scrolling -flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC -def = false -str = STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING -strhelp = STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT -cat = SC_BASIC - [SDTC_BOOL] var = gui.right_mouse_wnd_close flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC @@ -2759,6 +2758,18 @@ strhelp = STR_CONFIG_SETTING_LIVERIES_HELPTEXT strval = STR_CONFIG_SETTING_LIVERIES_NONE proc = InvalidateCompanyLiveryWindow +[SDTC_VAR] +var = gui.starting_colour +type = SLE_UINT8 +flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC +guiflags = SGF_MULTISTRING +def = COLOUR_END +min = 0 +max = COLOUR_END +str = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR +strhelp = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT +strval = STR_COLOUR_DARK_BLUE + [SDTC_BOOL] var = gui.prefer_teamchat flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC @@ -2991,6 +3002,12 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC def = false cat = SC_BASIC +[SDTC_BOOL] +var = gui.autosave_on_network_disconnect +flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC +def = true +cat = SC_EXPERT + [SDTC_VAR] var = gui.max_num_autosaves type = SLE_UINT8 diff --git a/src/table/sprites.h b/src/table/sprites.h index 311f3f493a..e50627c399 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -1,4 +1,4 @@ -/* $Id: sprites.h 27020 2014-10-15 18:31:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -56,7 +56,7 @@ static const SpriteID SPR_LARGE_SMALL_WINDOW = 682; /** Extra graphic spritenumbers */ static const SpriteID SPR_OPENTTD_BASE = 4896; -static const uint16 OPENTTD_SPRITE_COUNT = 175; +static const uint16 OPENTTD_SPRITE_COUNT = 179; /* Halftile-selection sprites */ static const SpriteID SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE; @@ -149,6 +149,11 @@ static const SpriteID SPR_GROUP_REPLACE_OFF_ROADVEH = SPR_OPENTTD_BASE + 131; static const SpriteID SPR_GROUP_REPLACE_OFF_SHIP = SPR_OPENTTD_BASE + 132; static const SpriteID SPR_GROUP_REPLACE_OFF_AIRCRAFT = SPR_OPENTTD_BASE + 133; +static const SpriteID SPR_GROUP_LIVERY_TRAIN = SPR_OPENTTD_BASE + 175; +static const SpriteID SPR_GROUP_LIVERY_ROADVEH = SPR_OPENTTD_BASE + 176; +static const SpriteID SPR_GROUP_LIVERY_SHIP = SPR_OPENTTD_BASE + 177; +static const SpriteID SPR_GROUP_LIVERY_AIRCRAFT = SPR_OPENTTD_BASE + 178; + static const SpriteID SPR_TOWN_RATING_NA = SPR_OPENTTD_BASE + 162; static const SpriteID SPR_TOWN_RATING_APALLING = SPR_OPENTTD_BASE + 163; static const SpriteID SPR_TOWN_RATING_MEDIOCRE = SPR_OPENTTD_BASE + 164; diff --git a/src/table/station_land.h b/src/table/station_land.h index df27dcbf2a..3327dab5dd 100644 --- a/src/table/station_land.h +++ b/src/table/station_land.h @@ -1,4 +1,4 @@ -/* $Id: station_land.h 23010 2011-10-07 07:56:30Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index 5690a12e60..6297eea3bc 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -1,4 +1,4 @@ -/* $Id: strgen_tables.h 27295 2015-05-28 17:26:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -37,8 +37,10 @@ extern void EmitGender(Buffer *buffer, char *buf, int value); static const CmdStruct _cmd_structs[] = { /* Font size */ + {"NORMAL_FONT", EmitSingleChar, SCC_NORMALFONT, 0, -1, C_NONE}, {"TINY_FONT", EmitSingleChar, SCC_TINYFONT, 0, -1, C_NONE}, {"BIG_FONT", EmitSingleChar, SCC_BIGFONT, 0, -1, C_NONE}, + {"MONO_FONT", EmitSingleChar, SCC_MONOFONT, 0, -1, C_NONE}, /* Colours */ {"BLUE", EmitSingleChar, SCC_BLUE, 0, -1, C_DONTCOUNT}, @@ -58,6 +60,8 @@ static const CmdStruct _cmd_structs[] = { {"GRAY", EmitSingleChar, SCC_GRAY, 0, -1, C_DONTCOUNT}, {"DKBLUE", EmitSingleChar, SCC_DKBLUE, 0, -1, C_DONTCOUNT}, {"BLACK", EmitSingleChar, SCC_BLACK, 0, -1, C_DONTCOUNT}, + {"PUSH_COLOUR", EmitSingleChar, SCC_PUSH_COLOUR, 0, -1, C_DONTCOUNT}, + {"POP_COLOUR", EmitSingleChar, SCC_POP_COLOUR, 0, -1, C_DONTCOUNT}, {"REV", EmitSingleChar, SCC_REVISION, 0, -1, C_NONE}, // openttd revision string diff --git a/src/table/string_colours.h b/src/table/string_colours.h index 6036d42619..ae64705a57 100644 --- a/src/table/string_colours.h +++ b/src/table/string_colours.h @@ -1,4 +1,4 @@ -/* $Id: string_colours.h 27378 2015-08-10 10:04:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/town_land.h b/src/table/town_land.h index a4730e8c19..6476015119 100644 --- a/src/table/town_land.h +++ b/src/table/town_land.h @@ -1,4 +1,4 @@ -/* $Id: town_land.h 25312 2013-06-01 07:44:53Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -1812,8 +1812,11 @@ assert_compile(lengthof(_town_draw_tile_data) == (NEW_HOUSE_OFFSET) * 4 * 4); * @see HouseSpec */ #define MS(mnd, mxd, p, rc, bn, rr, mg, ca1, ca2, ca3, bf, ba, cg1, cg2, cg3) \ - {mnd, mxd, p, rc, bn, rr, mg, {ca1, ca2, ca3}, {cg1, cg2, cg3}, bf, ba, true, \ - GRFFileProps(INVALID_HOUSE_ID), 0, {0, 0, 0, 0}, 16, NO_EXTRA_FLAG, HOUSE_NO_CLASS, {0, 2, 0, 0}, 0, 0, 0} + {mnd, mxd, p, rc, bn, rr, mg, \ + {ca1, ca2, ca3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \ + {cg1, cg2, cg3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \ + bf, ba, true, GRFFileProps(INVALID_HOUSE_ID), 0, {0, 0, 0, 0}, \ + 16, NO_EXTRA_FLAG, HOUSE_NO_CLASS, {0, 2, 0, 0}, 0, 0, 0} /** House specifications from original data */ static const HouseSpec _original_house_specs[] = { /** diff --git a/src/table/townname.h b/src/table/townname.h index cb8569527c..057583177d 100644 --- a/src/table/townname.h +++ b/src/table/townname.h @@ -1,4 +1,4 @@ -/* $Id: townname.h 27002 2014-10-12 18:26:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -639,7 +639,7 @@ static const char * const _name_spanish_real[] = { "Barcelona", "Barinas", "San Crist\xC3\xB3""bal", - "San Fransisco", + "San Francisco", "San Mart\xC3\xADn", "Guayana", "San Carlos", @@ -650,19 +650,19 @@ static const char * const _name_spanish_real[] = { "Elorza", "Arismendi", "Trujillo", - "Carupano", + "Car\xC3\xBApano", "Anaco", "Lima", "Cuzco", "Iquitos", "Callao", "Huacho", - "Camana", + "Caman\xC3\xA1", "Puerto Chala", "Santa Cruz", "Quito", "Cuenca", - "Huacho", + "Medell\xC3\xADn", "Tulc\xC3\xA1n", "Esmeraldas", "Ibarra", @@ -684,12 +684,12 @@ static const char * const _name_spanish_real[] = { "Potos\xC3\xAD", "Tupiza", "La Quiaca", - "Yacuiba", + "Yacu\xC3\xAD""ba", "San Borja", - "Fuerte Olimpio", + "Fuerte Olimpo", "Fort\xC3\xADn Esteros", "Campo Grande", - "Bogota", + "Bogot\xC3\xA1", "El Banco", "Zaragoza", "Neiva", @@ -758,7 +758,7 @@ static const char * const _name_french_real[] = { "Blois", "Troyes", "Charolles", - "Grenoble", + "Toulouse", "Chamb\xC3\xA9ry", "Tours", "St. Brieuc", @@ -769,7 +769,7 @@ static const char * const _name_french_real[] = { "Vichy", "St. Valery", "Beaujolais", - "Narbonne", + "Reims", "Albi", "Paris", "Biarritz", @@ -1942,103 +1942,103 @@ static const char * const _name_romanian_real[] = { "Alba Iulia", "Alexandria", "Babadag", - "Bac\xC3\xA3u", + "Bac\xC4\x83u", "Baia Mare", - "B\xC3\xA3ile Herculane", - "B\xC3\xA3ilesti", + "B\xC4\x83ile Herculane", + "B\xC4\x83ilesti", "B\xC3\xA2rlad", "Bicaz", - "Bistrita", + "Bistri\xC8\x9B""a", "Blaj", "Borsec", - "Botosani", - "Br\xC3\xA3ila", - "Brasov", - "Bucuresti", + "Boto\xC8\x99""ani", + "Br\xC4\x83ila", + "Bra\xC8\x9Bov", + "Bucure\xC8\x99ti", "Buftea", - "Buz\xC3\xA3u", - "C\xC3\xA3l\xC3\xA3rasi", - "Caransebes", - "Cernavod\xC3\xA3", + "Buz\xC4\x83u", + "C\xC4\x83l\xC4\x83rasi", + "Caransebe\xC8\x99", + "Cernavod\xC4\x83", "Cluj-Napoca", - "Constanta", + "Constan\xC8\x9B""a", "Covasna", "Craiova", "Dej", "Deva", "Dorohoi", - "Dr.-Tr. Severin", - "Dr\xC3\xA3g\xC3\xA3sani", - "F\xC3\xA3g\xC3\xA3ras", - "F\xC3\xA3lticeni", - "Fetesti", - "Focsani", - "Galati", + "Drobeta-Turnu Severin", + "Dr\xC4\x83g\xC4\x83sani", + "F\xC4\x83g\xC4\x83ras", + "F\xC4\x83lticeni", + "Fete\xC8\x99ti", + "Foc\xC8\x99""ani", + "Gala\xC8\x99i", "Gheorgheni", "Giurgiu", - "H\xC3\xA2rsova", + "H\xC3\xA2r\xC8\x99ova", "Hunedoara", - "Husi", - "Iasi", + "Hu\xC8\x99i", + "Ia\xC8\x99i", "Isaccea", "Lugoj", - "M\xC3\xA3""cin", + "M\xC4\x83""cin", "Mangalia", "Medgidia", - "Medias", + "Media\xC8\x99", "Miercurea Ciuc", "Mizil", "Motru", - "N\xC3\xA3s\xC3\xA3ud", - "N\xC3\xA3vodari", - "Odobesti", - "Oltenita", - "Onesti", + "N\xC4\x83s\xC4\x83ud", + "N\xC4\x83vodari", + "Odobe\xC8x99ti", + "Olteni\xC8\x9B""a", + "One\xC8\x99ti", "Oradea", - "Orsova", - "Petrosani", - "Piatra Neamt", - "Pitesti", - "Ploiesti", + "Or\xC8\x99ova", + "Petro\xC8\x99""ani", + "Piatra Neam\xC8\x9B", + "Pite\xC8\x99ti", + "Ploie\xC8\x99ti", "Predeal", "R\xC3\xA2mnicu V\xC3\xA2lcea", "Reghin", - "Resita", + "Re\xC8\x99i\xC8\x9B""a", "Roman", - "Rosiorii de Vede", + "Ro\xC8\x99iorii de Vede", "Satu Mare", - "Sebes", + "Sebe\xC8\x99", "Sf\xC3\xA2ntu Gheorghe", "Sibiu", - "Sighisoara", + "Sighi\xC8\x99oara", "Sinaia", "Slatina", "Slobozia", "Sovata", "Suceava", "Sulina", - "T\xC3\xA3nd\xC3\xA3rei", + "T\xC4\x83nd\xC4\x83rei", "T\xC3\xA2rgoviste", "T\xC3\xA2rgu Jiu", "T\xC3\xA2rgu Mures", "Tecuci", - "Timisoara", + "Timi\xC8\x99oara", "Tulcea", "Turda", - "Turnu M\xC3\xA3gurele", + "Turnu M\xC4\x83gurele", "Urziceni", "Vaslui", "Vatra Dornei", "Victoria", "Videle", - "Zal\xC3\xA3u", + "Zal\xC4\x83u", }; static const char * const _name_slovak_real[] = { "Bratislava", "Banovce nad Bebravou", - "Banska Bystrica", - "Banska Stiavnica", + "Bansk\xC3\xA1 Bystrica", + "Bansk\xC3\xA1 \xC5\xA0tiavnica", "Bardejov", "Brezno", "Brezova pod Bradlom", @@ -2046,9 +2046,9 @@ static const char * const _name_slovak_real[] = { "Cadca", "Cierna nad Tisou", "Detva", - "Detva", - "Dolny Kubin", + "Pre\xC5\xA1ov", "Dolny Kubin", + "Spi\xC5\xA1sk\xC3\xA1 Nov\xC3\xA1 Ves", "Dunajska Streda", "Gabcikovo", "Galanta", @@ -2060,8 +2060,8 @@ static const char * const _name_slovak_real[] = { "Humenne", "Hurbanovo", "Kezmarok", - "Komarno", - "Kosice", + "Kom\xC3\xA1rno", + "Ko\xC5\xA1ice", "Kremnica", "Krompachy", "Kuty", @@ -2077,15 +2077,15 @@ static const char * const _name_slovak_real[] = { "Myjava", "Namestovo", "Nitra", - "Nova Bana", - "Nove Mesto nad Vahom", - "Nove Zamky", + "Nov\xC3\xA1 Ba\xC5\x88""a", + "Nov\xC3\xA9"" Mesto nad V\xC3\xA1hom", + "Nov\xC3\xA9"" Z\xC3\xA1""mky", "Partizanske", "Pezinok", "Piestany", "Poltar", "Poprad", - "Povazska Bystrica", + "Pova\xC5\xBEsk\xC3\xA1 Bystrica", "Prievidza", "Puchov", "Revuca", @@ -2119,7 +2119,7 @@ static const char * const _name_slovak_real[] = { "Zahorska Bystrica", "Zdiar", "Ziar nad Hronom", - "Zilina", + "\xC5\xBDilina", "Zlate Moravce", "Zvolen", }; diff --git a/src/table/track_land.h b/src/table/track_land.h index 6eea862743..1916a54f6b 100644 --- a/src/table/track_land.h +++ b/src/table/track_land.h @@ -1,4 +1,4 @@ -/* $Id: track_land.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/train_cmd.h b/src/table/train_cmd.h index 8e7d614a0b..15ac6f2aab 100644 --- a/src/table/train_cmd.h +++ b/src/table/train_cmd.h @@ -1,4 +1,4 @@ -/* $Id: train_cmd.h 26130 2013-11-26 16:08:58Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/tree_land.h b/src/table/tree_land.h index 683f22d07b..64757267ec 100644 --- a/src/table/tree_land.h +++ b/src/table/tree_land.h @@ -1,4 +1,4 @@ -/* $Id: tree_land.h 17455 2009-09-07 13:38:57Z yexo $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/unicode.h b/src/table/unicode.h index 01914b5433..a83a65861c 100644 --- a/src/table/unicode.h +++ b/src/table/unicode.h @@ -1,4 +1,4 @@ -/* $Id: unicode.h 23582 2011-12-17 21:42:11Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/water_land.h b/src/table/water_land.h index cf7192fb48..d3cb0a3f98 100644 --- a/src/table/water_land.h +++ b/src/table/water_land.h @@ -1,4 +1,4 @@ -/* $Id: water_land.h 22646 2011-07-10 13:04:04Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/table/win32_settings.ini b/src/table/win32_settings.ini index 3116b789d5..bb241f50cd 100644 --- a/src/table/win32_settings.ini +++ b/src/table/win32_settings.ini @@ -1,4 +1,4 @@ -; $Id: win32_settings.ini 26522 2014-04-27 12:15:14Z frosch $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -8,14 +8,14 @@ [pre-amble] /* win32_v.cpp only settings */ -#if defined(WIN32) && !defined(DEDICATED) +#if defined(_WIN32) && !defined(DEDICATED) extern bool _force_full_redraw, _window_maximize; extern uint _display_hz; static const SettingDescGlobVarList _win32_settings[] = { [post-amble] }; -#endif /* WIN32 */ +#endif /* _WIN32 */ [templates] SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat), SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat), @@ -30,7 +30,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED diff --git a/src/table/window_settings.ini b/src/table/window_settings.ini index 28ad0c4dcc..41223586a6 100644 --- a/src/table/window_settings.ini +++ b/src/table/window_settings.ini @@ -1,4 +1,4 @@ -; $Id: window_settings.ini 25295 2013-05-26 19:30:31Z frosch $ +; $Id$ ; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -26,7 +26,7 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT strval = STR_NULL proc = NULL load = NULL -from = 0 +from = SL_MIN_VERSION to = SL_MAX_VERSION cat = SC_ADVANCED diff --git a/src/tar_type.h b/src/tar_type.h index cc25a913e5..6306fb6500 100644 --- a/src/tar_type.h +++ b/src/tar_type.h @@ -1,4 +1,4 @@ -/* $Id: tar_type.h 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index 8fd31bda6e..9839f5e34b 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: terraform_cmd.cpp 27381 2015-08-10 20:24:13Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -309,6 +309,14 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin } if (flags & DC_EXEC) { + /* Mark affected areas dirty. */ + for (TileIndexSet::const_iterator it = ts.dirty_tiles.begin(); it != ts.dirty_tiles.end(); it++) { + MarkTileDirtyByTile(*it); + TileIndexToHeightMap::const_iterator new_height = ts.tile_to_new_height.find(tile); + if (new_height == ts.tile_to_new_height.end()) continue; + MarkTileDirtyByTile(*it, 0, new_height->second); + } + /* change the height */ for (TileIndexToHeightMap::const_iterator it = ts.tile_to_new_height.begin(); it != ts.tile_to_new_height.end(); it++) { @@ -318,91 +326,6 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin SetTileHeight(tile, (uint)height); } - /* Finally mark the dirty tiles dirty */ - for (TileIndexSet::const_iterator it = ts.dirty_tiles.begin(); it != ts.dirty_tiles.end(); it++) { - MarkTileDirtyByTile(*it); - - int height = TerraformGetHeightOfTile(&ts, *it); - - /* Now, if we alter the height of the map edge, we need to take care - * about repainting the affected areas outside map as well. - * Remember: - * Outside map, we assume that our landscape descends to - * height zero as fast as possible. - * Those simulated tiles (they don't exist as datastructure, - * only as concept in code) need to be repainted properly, - * otherwise we will get ugly glitches. - * - * Furthermore, note that we have to take care about the possibility, - * that landscape was higher before the change, - * so also tiles a bit outside need to be repainted. - */ - int x = TileX(*it); - int y = TileY(*it); - if (x == 0) { - if (y == 0) { - /* Height of the northern corner is altered. */ - for (int cx = 0; cx >= -height - 1; cx--) { - for (int cy = 0; cy >= -height - 1; cy--) { - /* This means, tiles in the sector north of that - * corner need to be repainted. - */ - if (cx + cy >= -height - 2) { - /* But only tiles that actually might have changed. */ - MarkTileDirtyByTileOutsideMap(cx, cy); - } - } - } - } else if (y < (int)MapMaxY()) { - for (int cx = 0; cx >= -height - 1; cx--) { - MarkTileDirtyByTileOutsideMap(cx, y); - } - } else { - for (int cx = 0; cx >= -height - 1; cx--) { - for (int cy = (int)MapMaxY(); cy <= (int)MapMaxY() + height + 1; cy++) { - if (cx + ((int)MapMaxY() - cy) >= -height - 2) { - MarkTileDirtyByTileOutsideMap(cx, cy); - } - } - } - } - } else if (x < (int)MapMaxX()) { - if (y == 0) { - for (int cy = 0; cy >= -height - 1; cy--) { - MarkTileDirtyByTileOutsideMap(x, cy); - } - } else if (y < (int)MapMaxY()) { - /* Nothing to be done here, we are inside the map. */ - } else { - for (int cy = (int)MapMaxY(); cy <= (int)MapMaxY() + height + 1; cy++) { - MarkTileDirtyByTileOutsideMap(x, cy); - } - } - } else { - if (y == 0) { - for (int cx = (int)MapMaxX(); cx <= (int)MapMaxX() + height + 1; cx++) { - for (int cy = 0; cy >= -height - 1; cy--) { - if (((int)MapMaxX() - cx) + cy >= -height - 2) { - MarkTileDirtyByTileOutsideMap(cx, cy); - } - } - } - } else if (y < (int)MapMaxY()) { - for (int cx = (int)MapMaxX(); cx <= (int)MapMaxX() + height + 1; cx++) { - MarkTileDirtyByTileOutsideMap(cx, y); - } - } else { - for (int cx = (int)MapMaxX(); cx <= (int)MapMaxX() + height + 1; cx++) { - for (int cy = (int)MapMaxY(); cy <= (int)MapMaxY() + height + 1; cy++) { - if (((int)MapMaxX() - cx) + ((int)MapMaxY() - cy) >= -height - 2) { - MarkTileDirtyByTileOutsideMap(cx, cy); - } - } - } - } - } - } - if (c != NULL) c->terraform_limit -= (uint32)ts.tile_to_new_height.size() << 16; } return total_cost; diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 6b011b40b4..97749a8dcc 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: terraform_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/terraform_gui.h b/src/terraform_gui.h index 7d2de32bb2..26a1c5e9a1 100644 --- a/src/terraform_gui.h +++ b/src/terraform_gui.h @@ -1,4 +1,4 @@ -/* $Id: terraform_gui.h 21608 2010-12-23 14:24:34Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/textbuf.cpp b/src/textbuf.cpp index 7606dff496..61e449d3ae 100644 --- a/src/textbuf.cpp +++ b/src/textbuf.cpp @@ -1,4 +1,4 @@ -/* $Id: textbuf.cpp 26758 2014-08-24 10:34:43Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -367,7 +367,6 @@ bool Textbuf::MovePos(uint16 keycode) /** * Initialize the textbuffer by supplying it the buffer to write into * and the maximum length of this buffer - * @param buf the buffer that will be holding the data for input * @param max_bytes maximum size in bytes, including terminating '\0' * @param max_chars maximum size in chars, including terminating '\0' */ diff --git a/src/textbuf_gui.h b/src/textbuf_gui.h index 6e937a5027..ec134c11c6 100644 --- a/src/textbuf_gui.h +++ b/src/textbuf_gui.h @@ -1,4 +1,4 @@ -/* $Id: textbuf_gui.h 24323 2012-06-04 15:29:37Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/textbuf_type.h b/src/textbuf_type.h index 528a3f473a..1d927b72d9 100644 --- a/src/textbuf_type.h +++ b/src/textbuf_type.h @@ -1,4 +1,4 @@ -/* $Id: textbuf_type.h 25692 2013-08-05 20:37:57Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/texteff.cpp b/src/texteff.cpp index bd56cdbefb..ee5ce592b4 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -1,4 +1,4 @@ -/* $Id: texteff.cpp 27248 2015-04-25 11:58:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -16,6 +16,7 @@ #include "core/smallvec_type.hpp" #include "viewport_func.h" #include "settings_type.h" +#include "guitimer_func.h" #include "safeguards.h" @@ -82,20 +83,25 @@ void RemoveTextEffect(TextEffectID te_id) _text_effects[te_id].Reset(); } -void MoveAllTextEffects() +void MoveAllTextEffects(uint delta_ms) { + static GUITimer texteffecttimer = GUITimer(MILLISECONDS_PER_TICK); + uint count = texteffecttimer.CountElapsed(delta_ms); + if (count == 0) return; + const TextEffect *end = _text_effects.End(); for (TextEffect *te = _text_effects.Begin(); te != end; te++) { if (te->string_id == INVALID_STRING_ID) continue; if (te->mode != TE_RISING) continue; - if (te->duration-- == 0) { + if (te->duration < count) { te->Reset(); continue; } te->MarkDirty(ZOOM_LVL_OUT_8X); - te->top -= ZOOM_LVL_BASE; + te->duration -= count; + te->top -= count * ZOOM_LVL_BASE; te->MarkDirty(ZOOM_LVL_OUT_8X); } } diff --git a/src/texteff.hpp b/src/texteff.hpp index 4a79283c2c..114cebed02 100644 --- a/src/texteff.hpp +++ b/src/texteff.hpp @@ -1,4 +1,4 @@ -/* $Id: texteff.hpp 25011 2013-02-17 14:50:54Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -28,7 +28,7 @@ enum TextEffectMode { typedef uint16 TextEffectID; -void MoveAllTextEffects(); +void MoveAllTextEffects(uint delta_ms); TextEffectID AddTextEffect(StringID msg, int x, int y, uint8 duration, TextEffectMode mode); void InitTextEffects(); void DrawTextEffects(DrawPixelInfo *dpi); diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index 86ab111832..ff5226c2b5 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: textfile_gui.cpp 27381 2015-08-10 20:24:13Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -65,7 +65,7 @@ TextfileWindow::TextfileWindow(TextfileType file_type) : Window(&_textfile_desc) this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_TF_VSCROLLBAR); this->hscroll = this->GetScrollbar(WID_TF_HSCROLLBAR); - this->FinishInitNested(); + this->FinishInitNested(file_type); this->GetWidget(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); this->hscroll->SetStepSize(10); // Speed up horizontal scrollbar diff --git a/src/textfile_gui.h b/src/textfile_gui.h index e98c634333..9495fa3f08 100644 --- a/src/textfile_gui.h +++ b/src/textfile_gui.h @@ -1,4 +1,4 @@ -/* $Id: textfile_gui.h 25816 2013-10-06 11:29:14Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/textfile_type.h b/src/textfile_type.h index a8e5b7373e..374b4641a3 100644 --- a/src/textfile_type.h +++ b/src/textfile_type.h @@ -1,4 +1,4 @@ -/* $Id: textfile_type.h 25338 2013-06-09 09:25:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tgp.cpp b/src/tgp.cpp index ad3fc96949..4dbb79aa82 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -1,4 +1,4 @@ -/* $Id: tgp.cpp 27334 2015-07-16 17:05:40Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -47,7 +47,7 @@ * second sets the major variations to that, ... until finally the smallest * bumps are added. * - * Usefully, this routine is totally scaleable; so when 32bpp comes along, the + * Usefully, this routine is totally scalable; so when 32bpp comes along, the * terrain can be as bumpy as you like! It is also infinitely expandable; a * single random seed terrain continues in X & Y as far as you care to * calculate. In theory, we could use just one seed value, but randomly select @@ -262,7 +262,7 @@ static amplitude_t GetAmplitude(int frequency) * areas with a particular gradient so that we are able to create maps without too * many steep slopes up to the wanted height level. It's definitely not perfect since * it will bring larger rectangles with similar slopes which makes the rectangular - * behaviour of TGP more noticable. However, these height differentiations cannot + * behaviour of TGP more noticeable. However, these height differentiations cannot * happen over much smaller areas; we basically double the "range" to give a similar * slope for every doubling of map height. */ @@ -977,7 +977,7 @@ static void TgenSetTileHeight(TileIndex tile, int height) * The main new land generator using Perlin noise. Desert landscape is handled * different to all others to give a desert valley between two high mountains. * Clearly if a low height terrain (flat/very flat) is chosen, then the tropic - * areas wont be high enough, and there will be very little tropic on the map. + * areas won't be high enough, and there will be very little tropic on the map. * Thus Tropic works best on Hilly or Mountainous. */ void GenerateTerrainPerlin() @@ -995,8 +995,8 @@ void GenerateTerrainPerlin() /* First make sure the tiles at the north border are void tiles if needed. */ if (_settings_game.construction.freeform_edges) { - for (int y = 0; y < _height_map.size_y - 1; y++) MakeVoid(_height_map.size_x * y); - for (int x = 0; x < _height_map.size_x; x++) MakeVoid(x); + for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); } int max_height = H2I(TGPGetMaxHeight()); diff --git a/src/tgp.h b/src/tgp.h index 73408d705c..42f991e91d 100644 --- a/src/tgp.h +++ b/src/tgp.h @@ -1,4 +1,4 @@ -/* $Id: tgp.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/thread/thread.h b/src/thread/thread.h index f4e22d89b0..07831bb4ba 100644 --- a/src/thread/thread.h +++ b/src/thread/thread.h @@ -1,4 +1,4 @@ -/* $Id: thread.h 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/thread/thread_morphos.cpp b/src/thread/thread_morphos.cpp index 9c3f007ddc..e368663f79 100644 --- a/src/thread/thread_morphos.cpp +++ b/src/thread/thread_morphos.cpp @@ -1,4 +1,4 @@ -/* $Id: thread_morphos.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -50,14 +50,10 @@ struct OTTDThreadStartupMessage { * Default OpenTTD STDIO/ERR debug output is not very useful for this, so we * utilize serial/ramdebug instead. */ -#ifndef NO_DEBUG_MESSAGES void KPutStr(CONST_STRPTR format) { RawDoFmt(format, NULL, (void (*)())RAWFMTFUNC_SERIAL, NULL); } -#else -#define KPutStr(x) -#endif /** diff --git a/src/thread/thread_none.cpp b/src/thread/thread_none.cpp index d65664c1e4..91eb50b113 100644 --- a/src/thread/thread_none.cpp +++ b/src/thread/thread_none.cpp @@ -1,4 +1,4 @@ -/* $Id: thread_none.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/thread/thread_os2.cpp b/src/thread/thread_os2.cpp index 6af92e3c99..c66e2ad643 100644 --- a/src/thread/thread_os2.cpp +++ b/src/thread/thread_os2.cpp @@ -1,4 +1,4 @@ -/* $Id: thread_os2.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/thread/thread_pthread.cpp b/src/thread/thread_pthread.cpp index f87a11555f..8aed5ee136 100644 --- a/src/thread/thread_pthread.cpp +++ b/src/thread/thread_pthread.cpp @@ -1,4 +1,4 @@ -/* $Id: thread_pthread.cpp 27670 2016-10-30 17:29:33Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,10 @@ #include #include +#if defined(__APPLE__) +#include "../os/macosx/macos.h" +#endif + #include "../safeguards.h" /** @@ -69,6 +73,9 @@ private: pthread_setname_np(pthread_self(), self->name); } #endif +#endif +#if defined(__APPLE__) + MacOSSetThreadName(self->name); #endif self->ThreadProc(); pthread_exit(NULL); diff --git a/src/thread/thread_win32.cpp b/src/thread/thread_win32.cpp index 60b90e93e1..a01ea8e108 100644 --- a/src/thread/thread_win32.cpp +++ b/src/thread/thread_win32.cpp @@ -1,4 +1,4 @@ -/* $Id: thread_win32.cpp 27673 2016-10-30 18:22:55Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tile_cmd.h b/src/tile_cmd.h index 05f702f56d..0ab3c5a9a0 100644 --- a/src/tile_cmd.h +++ b/src/tile_cmd.h @@ -1,4 +1,4 @@ -/* $Id: tile_cmd.h 27686 2016-12-09 21:27:22Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -82,7 +82,7 @@ typedef CommandCost ClearTileProc(TileIndex tile, DoCommandFlag flags); * @param acceptance Storage destination of the cargo acceptance in 1/8 * @param always_accepted Bitmask of always accepted cargo types */ -typedef void AddAcceptedCargoProc(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted); +typedef void AddAcceptedCargoProc(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted); /** * Tile callback function signature for obtaining a tile description @@ -166,11 +166,11 @@ VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y void ChangeTileOwner(TileIndex tile, Owner old_owner, Owner new_owner); void GetTileDesc(TileIndex tile, TileDesc *td); -static inline void AddAcceptedCargo(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted) +static inline void AddAcceptedCargo(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted) { AddAcceptedCargoProc *proc = _tile_type_procs[GetTileType(tile)]->add_accepted_cargo_proc; if (proc == NULL) return; - uint32 dummy = 0; // use dummy bitmask so there don't need to be several 'always_accepted != NULL' checks + CargoTypes dummy = 0; // use dummy bitmask so there don't need to be several 'always_accepted != NULL' checks proc(tile, acceptance, always_accepted == NULL ? &dummy : always_accepted); } diff --git a/src/tile_map.cpp b/src/tile_map.cpp index 8befdd89a5..200a203089 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -1,4 +1,4 @@ -/* $Id: tile_map.cpp 27161 2015-02-22 14:42:34Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,67 +14,13 @@ #include "safeguards.h" -/** - * Returns the tile height for a coordinate outside map. Such a height is - * needed for painting the area outside map using completely black tiles. - * The idea is descending to heightlevel 0 as fast as possible. - * @param x The X-coordinate (same unit as TileX). - * @param y The Y-coordinate (same unit as TileY). - * @return The height in the same unit as TileHeight. - */ -uint TileHeightOutsideMap(int x, int y) -{ - /* In all cases: Descend to heightlevel 0 as fast as possible. - * So: If we are at the 0-side of the map (x<0 or y<0), we must - * subtract the distance to coordinate 0 from the heightlevel at - * coordinate 0. - * In other words: Subtract e.g. -x. If we are at the MapMax - * side of the map, we also need to subtract the distance to - * the edge of map, e.g. MapMaxX - x. - * - * NOTE: Assuming constant heightlevel outside map would be - * simpler here. However, then we run into painting problems, - * since whenever a heightlevel change at the map border occurs, - * we would need to repaint anything outside map. - * In contrast, by doing it this way, we can localize this change, - * which means we may assume constant heightlevel for all tiles - * at more than distance from the - * map border. - */ - if (x < 0) { - if (y < 0) { - return max((int)TileHeight(TileXY(0, 0)) - (-x) - (-y), 0); - } else if (y < (int)MapMaxY()) { - return max((int)TileHeight(TileXY(0, y)) - (-x), 0); - } else { - return max((int)TileHeight(TileXY(0, (int)MapMaxY())) - (-x) - (y - (int)MapMaxY()), 0); - } - } else if (x < (int)MapMaxX()) { - if (y < 0) { - return max((int)TileHeight(TileXY(x, 0)) - (-y), 0); - } else if (y < (int)MapMaxY()) { - return TileHeight(TileXY(x, y)); - } else { - return max((int)TileHeight(TileXY(x, (int)MapMaxY())) - (y - (int)MapMaxY()), 0); - } - } else { - if (y < 0) { - return max((int)TileHeight(TileXY((int)MapMaxX(), 0)) - (x - (int)MapMaxX()) - (-y), 0); - } else if (y < (int)MapMaxY()) { - return max((int)TileHeight(TileXY((int)MapMaxX(), y)) - (x - (int)MapMaxX()), 0); - } else { - return max((int)TileHeight(TileXY((int)MapMaxX(), (int)MapMaxY())) - (x - (int)MapMaxX()) - (y - (int)MapMaxY()), 0); - } - } -} - /** * Get a tile's slope given the heigh of its four corners. - * @param hnorth The height at the northern corner in the same unit as TileHeight. - * @param hwest The height at the western corner in the same unit as TileHeight. - * @param heast The height at the eastern corner in the same unit as TileHeight. - * @param hsouth The height at the southern corner in the same unit as TileHeight. - * @param [out] h The lowest height of the four corners. + * @param hnorth The height at the northern corner in the same unit as TileHeight. + * @param hwest The height at the western corner in the same unit as TileHeight. + * @param heast The height at the eastern corner in the same unit as TileHeight. + * @param hsouth The height at the southern corner in the same unit as TileHeight. + * @param[out] h The lowest height of the four corners. * @return The slope. */ static Slope GetTileSlopeGivenHeight(int hnorth, int hwest, int heast, int hsouth, int *h) @@ -114,29 +60,26 @@ static Slope GetTileSlopeGivenHeight(int hnorth, int hwest, int heast, int hsout */ Slope GetTileSlope(TileIndex tile, int *h) { - assert(tile < MapSize()); + uint x1 = TileX(tile); + uint y1 = TileY(tile); + uint x2 = min(x1 + 1, MapMaxX()); + uint y2 = min(y1 + 1, MapMaxY()); - uint x = TileX(tile); - uint y = TileY(tile); - if (x == MapMaxX() || y == MapMaxY()) { - if (h != NULL) *h = TileHeight(tile); - return SLOPE_FLAT; - } - - int hnorth = TileHeight(tile); // Height of the North corner. - int hwest = TileHeight(tile + TileDiffXY(1, 0)); // Height of the West corner. - int heast = TileHeight(tile + TileDiffXY(0, 1)); // Height of the East corner. - int hsouth = TileHeight(tile + TileDiffXY(1, 1)); // Height of the South corner. + int hnorth = TileHeight(tile); // Height of the North corner. + int hwest = TileHeight(TileXY(x2, y1)); // Height of the West corner. + int heast = TileHeight(TileXY(x1, y2)); // Height of the East corner. + int hsouth = TileHeight(TileXY(x2, y2)); // Height of the South corner. return GetTileSlopeGivenHeight(hnorth, hwest, heast, hsouth, h); } /** - * Return the slope of a given tile outside the map. + * Return the slope of a given tile, also for tiles outside the map (virtual "black" tiles). * - * @param tile Tile outside the map to compute slope of. - * @param h If not \c NULL, pointer to storage of z height. - * @return Slope of the tile outside map, except for the HALFTILE part. + * @param x X coordinate of the tile to compute slope of, may be ouside the map. + * @param y Y coordinate of the tile to compute slope of, may be ouside the map. + * @param h If not \c NULL, pointer to storage of z height. + * @return Slope of the tile, except for the HALFTILE part. */ Slope GetTilePixelSlopeOutsideMap(int x, int y, int *h) { @@ -158,17 +101,15 @@ Slope GetTilePixelSlopeOutsideMap(int x, int y, int *h) */ bool IsTileFlat(TileIndex tile, int *h) { - assert(tile < MapSize()); - - if (!IsInnerTile(tile)) { - if (h != NULL) *h = TileHeight(tile); - return true; - } + uint x1 = TileX(tile); + uint y1 = TileY(tile); + uint x2 = min(x1 + 1, MapMaxX()); + uint y2 = min(y1 + 1, MapMaxY()); uint z = TileHeight(tile); - if (TileHeight(tile + TileDiffXY(1, 0)) != z) return false; - if (TileHeight(tile + TileDiffXY(0, 1)) != z) return false; - if (TileHeight(tile + TileDiffXY(1, 1)) != z) return false; + if (TileHeight(TileXY(x2, y1)) != z) return false; + if (TileHeight(TileXY(x1, y2)) != z) return false; + if (TileHeight(TileXY(x2, y2)) != z) return false; if (h != NULL) *h = z; return true; @@ -181,32 +122,19 @@ bool IsTileFlat(TileIndex tile, int *h) */ int GetTileZ(TileIndex tile) { - if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) return 0; + uint x1 = TileX(tile); + uint y1 = TileY(tile); + uint x2 = min(x1 + 1, MapMaxX()); + uint y2 = min(y1 + 1, MapMaxY()); - int h = TileHeight(tile); // N corner - h = min(h, TileHeight(tile + TileDiffXY(1, 0))); // W corner - h = min(h, TileHeight(tile + TileDiffXY(0, 1))); // E corner - h = min(h, TileHeight(tile + TileDiffXY(1, 1))); // S corner + int h = TileHeight(tile); // N corner + h = min(h, TileHeight(TileXY(x2, y1))); // W corner + h = min(h, TileHeight(TileXY(x1, y2))); // E corner + h = min(h, TileHeight(TileXY(x2, y2))); // S corner return h; } -/** - * Get bottom height of the tile outside map. - * - * @param tile Tile outside the map to compute height of. - * @return Minimum height of the tile outside the map. - */ -int GetTilePixelZOutsideMap(int x, int y) -{ - uint h = TileHeightOutsideMap(x, y); // N corner. - h = min(h, TileHeightOutsideMap(x + 1, y)); // W corner. - h = min(h, TileHeightOutsideMap(x, y + 1)); // E corner. - h = min(h, TileHeightOutsideMap(x + 1, y + 1)); // S corner - - return h * TILE_HEIGHT; -} - /** * Get top height of the tile inside the map. * @param t Tile to compute height of @@ -214,30 +142,15 @@ int GetTilePixelZOutsideMap(int x, int y) */ int GetTileMaxZ(TileIndex t) { - if (TileX(t) == MapMaxX() || TileY(t) == MapMaxY()) return TileHeightOutsideMap(TileX(t), TileY(t)); + uint x1 = TileX(t); + uint y1 = TileY(t); + uint x2 = min(x1 + 1, MapMaxX()); + uint y2 = min(y1 + 1, MapMaxY()); - int h = TileHeight(t); // N corner - h = max(h, TileHeight(t + TileDiffXY(1, 0))); // W corner - h = max(h, TileHeight(t + TileDiffXY(0, 1))); // E corner - h = max(h, TileHeight(t + TileDiffXY(1, 1))); // S corner + int h = TileHeight(t); // N corner + h = max(h, TileHeight(TileXY(x2, y1))); // W corner + h = max(h, TileHeight(TileXY(x1, y2))); // E corner + h = max(h, TileHeight(TileXY(x2, y2))); // S corner return h; } - -/** - * Get top height of the tile outside the map. - * - * @see Detailed description in header. - * - * @param tile Tile outside to compute height of. - * @return Maximum height of the tile. - */ -int GetTileMaxPixelZOutsideMap(int x, int y) -{ - uint h = TileHeightOutsideMap(x, y); - h = max(h, TileHeightOutsideMap(x + 1, y)); - h = max(h, TileHeightOutsideMap(x, y + 1)); - h = max(h, TileHeightOutsideMap(x + 1, y + 1)); - - return h * TILE_HEIGHT; -} diff --git a/src/tile_map.h b/src/tile_map.h index 4facc8db1f..7a76f2b974 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -1,4 +1,4 @@ -/* $Id: tile_map.h 27148 2015-02-14 12:53:07Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -34,7 +34,17 @@ static inline uint TileHeight(TileIndex tile) return _m[tile].height; } -uint TileHeightOutsideMap(int x, int y); +/** + * Returns the height of a tile, also for tiles outside the map (virtual "black" tiles). + * + * @param x X coordinate of the tile, may be ouside the map. + * @param y Y coordinate of the tile, may be ouside the map. + * @return The height in the same unit as TileHeight. + */ +static inline uint TileHeightOutsideMap(int x, int y) +{ + return TileHeight(TileXY(Clamp(x, 0, MapMaxX()), Clamp(y, 0, MapMaxY()))); +} /** * Sets the height of a tile. @@ -44,7 +54,7 @@ uint TileHeightOutsideMap(int x, int y); * @param tile The tile to change the height * @param height The new height value of the tile * @pre tile < MapSize() - * @pre heigth <= MAX_TILE_HEIGHT + * @pre height <= MAX_TILE_HEIGHT */ static inline void SetTileHeight(TileIndex tile, uint height) { @@ -67,11 +77,10 @@ static inline uint TilePixelHeight(TileIndex tile) } /** - * Returns the tile height for a coordinate outside map. Such a height is - * needed for painting the area outside map using completely black tiles. - * The idea is descending to heightlevel 0 as fast as possible. - * @param x The X-coordinate (same unit as TileX). - * @param y The Y-coordinate (same unit as TileY). + * Returns the height of a tile in pixels, also for tiles outside the map (virtual "black" tiles). + * + * @param x X coordinate of the tile, may be ouside the map. + * @param y Y coordinate of the tile, may be ouside the map. * @return The height in pixels in the same unit as TilePixelHeight. */ static inline uint TilePixelHeightOutsideMap(int x, int y) @@ -132,9 +141,9 @@ static inline void SetTileType(TileIndex tile, TileType type) } /** - * Checks if a tile is a give tiletype. + * Checks if a tile is a given tiletype. * - * This function checks if a tile got the given tiletype. + * This function checks if a tile has the given tiletype. * * @param tile The tile to check * @param type The type to check against @@ -289,11 +298,9 @@ static inline int GetTilePixelZ(TileIndex tile) return GetTileZ(tile) * TILE_HEIGHT; } -int GetTilePixelZOutsideMap(int x, int y); - /** * Get top height of the tile - * @param t Tile to compute height of + * @param tile Tile to compute height of * @return Maximum height of the tile */ static inline int GetTileMaxPixelZ(TileIndex tile) @@ -301,9 +308,6 @@ static inline int GetTileMaxPixelZ(TileIndex tile) return GetTileMaxZ(tile) * TILE_HEIGHT; } -int GetTileMaxPixelZOutsideMap(int x, int y); - - /** * Calculate a hash value from a tile position * diff --git a/src/tile_type.h b/src/tile_type.h index c49496f627..c02ba4fc45 100644 --- a/src/tile_type.h +++ b/src/tile_type.h @@ -1,4 +1,4 @@ -/* $Id: tile_type.h 27987 2018-03-11 13:25:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tilearea.cpp b/src/tilearea.cpp index 042b788171..ec3b9aafbb 100644 --- a/src/tilearea.cpp +++ b/src/tilearea.cpp @@ -1,4 +1,4 @@ -/* $Id: tilearea.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tilearea_type.h b/src/tilearea_type.h index d88a834ab5..45bfb3d4c0 100644 --- a/src/tilearea_type.h +++ b/src/tilearea_type.h @@ -1,4 +1,4 @@ -/* $Id: tilearea_type.h 26289 2014-02-02 14:53:26Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h index ba7332bdef..3833edb3e9 100644 --- a/src/tilehighlight_func.h +++ b/src/tilehighlight_func.h @@ -1,4 +1,4 @@ -/* $Id: tilehighlight_func.h 21627 2010-12-24 15:08:19Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tilehighlight_type.h b/src/tilehighlight_type.h index 3203551017..6e89013a75 100644 --- a/src/tilehighlight_type.h +++ b/src/tilehighlight_type.h @@ -1,4 +1,4 @@ -/* $Id: tilehighlight_type.h 23595 2011-12-19 17:48:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tilematrix_type.hpp b/src/tilematrix_type.hpp index 0ea52bb6c1..f9c7392b24 100644 --- a/src/tilematrix_type.hpp +++ b/src/tilematrix_type.hpp @@ -1,4 +1,4 @@ -/* $Id: tilematrix_type.hpp 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -87,7 +87,7 @@ public: /** * Get the area of the matrix square that contains a specific tile. - * @param The tile to get the map area for. + * @param tile The tile to get the map area for. * @param extend Extend the area by this many squares on all sides. * @return Tile area containing the tile. */ diff --git a/src/timetable.h b/src/timetable.h index 47c7809d69..fe0848b564 100644 --- a/src/timetable.h +++ b/src/timetable.h @@ -1,4 +1,4 @@ -/* $Id: timetable.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 391cf3cd11..29986c353d 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: timetable_cmd.cpp 27302 2015-06-20 12:04:30Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 5e45a5f112..5dd45561f3 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: timetable_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -139,7 +139,7 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID /** * Callback for when a time has been chosen to start the time table - * @param window the window related to the setting of the date + * @param w the window related to the setting of the date * @param date the actually chosen date */ static void ChangeTimetableStartCallback(const Window *w, Date date) diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 3685f289c3..58a008e373 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: toolbar_gui.cpp 27671 2016-10-30 17:36:57Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -47,6 +47,8 @@ #include "goal_base.h" #include "story_base.h" #include "toolbar_gui.h" +#include "framerate_type.h" +#include "guitimer_func.h" #include "widgets/toolbar_widget.h" @@ -122,21 +124,14 @@ public: */ class DropDownListCompanyItem : public DropDownListItem { Dimension icon_size; - Dimension lock_icon_size; - uint line_height; + Dimension lock_size; public: bool greyed; DropDownListCompanyItem(int result, bool masked, bool greyed) : DropDownListItem(result, masked), greyed(greyed) { this->icon_size = GetSpriteSize(SPR_COMPANY_ICON); - if (_networking) { - this->lock_icon_size = GetSpriteSize(SPR_LOCK); - this->line_height = max(this->lock_icon_size.height + 2U, (uint)FONT_HEIGHT_NORMAL); - } else { - this->lock_icon_size.width = 0; - this->line_height = max(this->icon_size.height + 2U, (uint)FONT_HEIGHT_NORMAL); - } + this->lock_size = GetSpriteSize(SPR_LOCK); } virtual ~DropDownListCompanyItem() {} @@ -151,12 +146,12 @@ public: CompanyID company = (CompanyID)this->result; SetDParam(0, company); SetDParam(1, company); - return GetStringBoundingBox(STR_COMPANY_NAME_COMPANY_NUM).width + this->icon_size.width + this->lock_icon_size.width + 3; + return GetStringBoundingBox(STR_COMPANY_NAME_COMPANY_NUM).width + this->icon_size.width + this->lock_size.width + 6; } uint Height(uint width) const { - return this->line_height; + return max(max(this->icon_size.height, this->lock_size.height) + 2U, (uint)FONT_HEIGHT_NORMAL); } void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const @@ -169,12 +164,11 @@ public: int icon_offset = (bottom - top - icon_size.height) / 2; int text_offset = (bottom - top - FONT_HEIGHT_NORMAL) / 2; - int lock_icon_offset = (bottom - top - this->lock_icon_size.height) / 2; + int lock_offset = (bottom - top - lock_size.height) / 2; DrawCompanyIcon(company, rtl ? right - this->icon_size.width - WD_FRAMERECT_RIGHT : left + WD_FRAMERECT_LEFT, top + icon_offset); - int text_x_ofs = WD_FRAMERECT_LEFT + this->icon_size.width + this->lock_icon_size.width; - if (_networking && NetworkCompanyIsPassworded(company)){ - DrawSprite(SPR_LOCK, PAL_NONE, rtl ? right - this->icon_size.width - this->lock_icon_size.width - WD_FRAMERECT_RIGHT : left + WD_FRAMERECT_LEFT + this->icon_size.width + WD_FRAMERECT_LEFT, top + lock_icon_offset); + if (NetworkCompanyIsPassworded(company)) { + DrawSprite(SPR_LOCK, PAL_NONE, rtl ? left + WD_FRAMERECT_LEFT : right - this->lock_size.width - WD_FRAMERECT_RIGHT, top + lock_offset); } SetDParam(0, company); @@ -185,7 +179,7 @@ public: } else { col = sel ? TC_WHITE : TC_BLACK; } - DrawString(left + WD_FRAMERECT_LEFT + (rtl ? 0 : text_x_ofs), right - WD_FRAMERECT_RIGHT - (rtl ? text_x_ofs : 0), top + text_offset, STR_COMPANY_NAME_COMPANY_NUM, col); + DrawString(left + WD_FRAMERECT_LEFT + (rtl ? 3 + this->lock_size.width : 3 + this->icon_size.width), right - WD_FRAMERECT_RIGHT - (rtl ? 3 + this->icon_size.width : 3 + this->lock_size.width), top + text_offset, STR_COMPANY_NAME_COMPANY_NUM, col); } }; @@ -675,9 +669,9 @@ static CallBackFunction MenuClickCompany(int index) case CTMN_NEW_COMPANY: if (_network_server) { - DoCommandP(0, 0, _network_own_client_id, CMD_COMPANY_CTRL); + DoCommandP(0, CCA_NEW, _network_own_client_id, CMD_COMPANY_CTRL); } else { - NetworkSendCommand(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); + NetworkSendCommand(0, CCA_NEW, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); } return CBF_NONE; @@ -1110,7 +1104,7 @@ static CallBackFunction PlaceLandBlockInfo() static CallBackFunction ToolbarHelpClick(Window *w) { - PopupMainToolbMenu(w, WID_TN_HELP, STR_ABOUT_MENU_LAND_BLOCK_INFO, _settings_client.gui.newgrf_developer_tools ? 13 : 9); + PopupMainToolbMenu(w, WID_TN_HELP, STR_ABOUT_MENU_LAND_BLOCK_INFO, _settings_client.gui.newgrf_developer_tools ? 14 : 10); return CBF_NONE; } @@ -1218,11 +1212,12 @@ static CallBackFunction MenuClickHelp(int index) case 5: MenuClickLargeWorldScreenshot(SC_ZOOMEDIN); break; case 6: MenuClickLargeWorldScreenshot(SC_DEFAULTZOOM); break; case 7: MenuClickLargeWorldScreenshot(SC_WORLD); break; - case 8: ShowAboutWindow(); break; - case 9: ShowSpriteAlignerWindow(); break; - case 10: ToggleBoundingBoxes(); break; - case 11: ToggleDirtyBlocks(); break; - case 12: ShowLoginWindow(); break; + case 8: ShowFramerateWindow(); break; + case 9: ShowAboutWindow(); break; + case 10: ShowSpriteAlignerWindow(); break; + case 11: ToggleBoundingBoxes(); break; + case 12: ToggleDirtyBlocks(); break; + case 13: ShowLoginWindow(); break; } return CBF_NONE; } @@ -1556,7 +1551,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_ZOOM_IN, WID_TN_ZOOM_OUT, WID_TN_RAILS, @@ -1588,7 +1583,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_RAILS, WID_TN_ROADS, WID_TN_WATER, @@ -1622,7 +1617,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_RAILS, WID_TN_ROADS, WID_TN_WATER, @@ -1658,7 +1653,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_RAILS, WID_TN_ROADS, WID_TN_WATER, @@ -1717,7 +1712,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_MUSIC_SOUND, WID_TN_MESSAGES, WID_TN_HELP, @@ -1735,7 +1730,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_RAILS, WID_TN_ROADS, WID_TN_WATER, @@ -1776,7 +1771,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_RAILS, WID_TN_ROADS, WID_TN_WATER, @@ -1830,7 +1825,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, - WID_TN_AIRCRAFTS, + WID_TN_AIRCRAFT, WID_TN_ZOOM_IN, WID_TN_ZOOM_OUT, WID_TN_RAILS, @@ -2063,6 +2058,8 @@ enum MainToolbarHotkeys { /** Main toolbar. */ struct MainToolbarWindow : Window { + GUITimer timer; + MainToolbarWindow(WindowDesc *desc) : Window(desc) { this->InitNested(0); @@ -2073,6 +2070,8 @@ struct MainToolbarWindow : Window { this->SetWidgetDisabledState(WID_TN_FAST_FORWARD, _networking); // if networking, disable fast-forward button PositionMainToolbar(this); DoZoomInOutWindow(ZOOM_NONE, this); + + this->timer.SetInterval(MILLISECONDS_PER_TICK); } virtual void FindWindowPlacementAndResize(int def_width, int def_height) @@ -2087,7 +2086,7 @@ struct MainToolbarWindow : Window { * Since enabled state is the default, just disable when needed */ this->SetWidgetsDisabledState(_local_company == COMPANY_SPECTATOR, WID_TN_RAILS, WID_TN_ROADS, WID_TN_WATER, WID_TN_AIR, WID_TN_LANDSCAPE, WIDGET_LIST_END); /* disable company list drop downs, if there are no companies */ - this->SetWidgetsDisabledState(Company::GetNumItems() == 0, WID_TN_STATIONS, WID_TN_FINANCES, WID_TN_CARGOS, WID_TN_WATCH, WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, WID_TN_AIRCRAFTS, WIDGET_LIST_END); + this->SetWidgetsDisabledState(Company::GetNumItems() == 0, WID_TN_STATIONS, WID_TN_FINANCES, WID_TN_CARGOS, WID_TN_WATCH, WID_TN_TRAINS, WID_TN_ROADVEHS, WID_TN_SHIPS, WID_TN_AIRCRAFT, WIDGET_LIST_END); this->SetWidgetDisabledState(WID_TN_GOAL, Goal::GetNumItems() == 0); this->SetWidgetDisabledState(WID_TN_STORY, StoryPage::GetNumItems() == 0); @@ -2225,8 +2224,11 @@ struct MainToolbarWindow : Window { } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!this->timer.Elapsed(delta_ms)) return; + this->timer.SetInterval(MILLISECONDS_PER_TICK); + if (this->IsWidgetLowered(WID_TN_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(WID_TN_PAUSE); this->SetWidgetDirty(WID_TN_PAUSE); @@ -2454,6 +2456,8 @@ enum MainToolbarEditorHotkeys { }; struct ScenarioEditorToolbarWindow : Window { + GUITimer timer; + ScenarioEditorToolbarWindow(WindowDesc *desc) : Window(desc) { this->InitNested(0); @@ -2462,6 +2466,8 @@ struct ScenarioEditorToolbarWindow : Window { CLRBITS(this->flags, WF_WHITE_BORDER); PositionMainToolbar(this); DoZoomInOutWindow(ZOOM_NONE, this); + + this->timer.SetInterval(MILLISECONDS_PER_TICK); } virtual void FindWindowPlacementAndResize(int def_width, int def_height) @@ -2589,8 +2595,11 @@ struct ScenarioEditorToolbarWindow : Window { this->SetWidgetDirty(WID_TE_DATE_FORWARD); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!this->timer.Elapsed(delta_ms)) return; + this->timer.SetInterval(MILLISECONDS_PER_TICK); + if (this->IsWidgetLowered(WID_TE_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(WID_TE_PAUSE); this->SetDirty(); diff --git a/src/toolbar_gui.h b/src/toolbar_gui.h index 7b66e7e447..37fc8f0e9f 100644 --- a/src/toolbar_gui.h +++ b/src/toolbar_gui.h @@ -1,4 +1,4 @@ -/* $Id: toolbar_gui.h 27146 2015-02-13 21:13:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/town.h b/src/town.h index 9ae2899f8a..20832b71d8 100644 --- a/src/town.h +++ b/src/town.h @@ -1,4 +1,4 @@ -/* $Id: town.h 27105 2015-01-01 21:25:42Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -31,17 +31,17 @@ struct BuildingCounts { T class_count[HOUSE_CLASS_MAX]; }; -typedef TileMatrix AcceptanceMatrix; +typedef TileMatrix AcceptanceMatrix; static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings static const uint CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation -static const uint INVALID_TOWN = 0xFFFF; +static const TownID INVALID_TOWN = 0xFFFF; static const uint TOWN_GROWTH_WINTER = 0xFFFFFFFE; ///< The town only needs this cargo in the winter (any amount) static const uint TOWN_GROWTH_DESERT = 0xFFFFFFFF; ///< The town needs the cargo for growth when on desert (any amount) -static const uint16 TOWN_GROW_RATE_CUSTOM = 0x8000; ///< If this mask is applied to Town::growth_rate, the grow_counter will not be calculated by the system (but assumed to be set by scripts) -static const uint16 TOWN_GROW_RATE_CUSTOM_NONE = 0xFFFF; ///< Special value for Town::growth_rate to disable town growth. +static const uint16 TOWN_GROWTH_RATE_NONE = 0xFFFF; ///< Special value for Town::growth_rate to disable town growth. +static const uint16 MAX_TOWN_GROWTH_TICKS = 930; ///< Max amount of original town ticks that still fit into uint16, about equal to UINT16_MAX / TOWN_GROWTH_TICKS but sligtly less to simplify calculations typedef Pool TownPool; extern TownPool _town_pool; @@ -117,9 +117,9 @@ struct Town : TownPool::PoolItem<&_town_pool> { inline byte GetPercentTransported(CargoID cid) const { return this->supplied[cid].old_act * 256 / (this->supplied[cid].old_max + 1); } /* Cargo production and acceptance stats. */ - uint32 cargo_produced; ///< Bitmap of all cargoes produced by houses in this town. + CargoTypes cargo_produced; ///< Bitmap of all cargoes produced by houses in this town. AcceptanceMatrix cargo_accepted; ///< Bitmap of cargoes accepted by houses for each 4*4 map square of the town. - uint32 cargo_accepted_total; ///< NOSAVE: Bitmap of all cargoes accepted by houses in this town. + CargoTypes cargo_accepted_total; ///< NOSAVE: Bitmap of all cargoes accepted by houses in this town. uint16 time_until_rebuild; ///< time until we rebuild a house @@ -223,6 +223,7 @@ enum TownFlags { TOWN_IS_GROWING = 0, ///< Conditions for town growth are met. Grow according to Town::growth_rate. TOWN_HAS_CHURCH = 1, ///< There can be only one church by town. TOWN_HAS_STADIUM = 2, ///< There can be only one stadium by town. + TOWN_CUSTOM_GROWTH = 3, ///< Growth rate is controlled by GS. }; CommandCost CheckforTownRating(DoCommandFlag flags, Town *t, TownRatingCheckType type); @@ -372,6 +373,15 @@ void MakeDefaultName(T *obj) obj->town_cn = (uint16)next; // set index... } -extern uint32 _town_cargoes_accepted; +/* + * Converts original town ticks counters to plain game ticks. Note that + * tick 0 is a valid tick so actual amount is one more than the counter value. + */ +static inline uint16 TownTicksToGameTicks(uint16 ticks) { + return (min(ticks, MAX_TOWN_GROWTH_TICKS) + 1) * TOWN_GROWTH_TICKS - 1; +} + + +extern CargoTypes _town_cargoes_accepted; #endif /* TOWN_H */ diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 5c60edf549..a656b0da7b 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: town_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -65,7 +65,7 @@ TownsGrowthTilesIndex _towns_growth_tiles_last_month; TownsGrowthTilesIndex _towns_growth_tiles; TownID _new_town_id; -uint32 _town_cargoes_accepted; ///< Bitmap of all cargoes accepted by houses. +CargoTypes _town_cargoes_accepted; ///< Bitmap of all cargoes accepted by houses. /* Initialize the town-pool */ TownPool _town_pool("Town"); @@ -653,17 +653,17 @@ static void AddProducedCargo_Town(TileIndex tile, CargoArray &produced) } } -static inline void AddAcceptedCargoSetMask(CargoID cargo, uint amount, CargoArray &acceptance, uint32 *always_accepted) +static inline void AddAcceptedCargoSetMask(CargoID cargo, uint amount, CargoArray &acceptance, CargoTypes *always_accepted) { if (cargo == CT_INVALID || amount == 0) return; acceptance[cargo] += amount; SetBit(*always_accepted, cargo); } -static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted) +static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted) { const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile)); - CargoID accepts[3]; + CargoID accepts[lengthof(hs->accepts_cargo)]; /* Set the initial accepted cargo types */ for (uint8 i = 0; i < lengthof(accepts); i++) { @@ -772,7 +772,7 @@ void UpdateTownCargoTotal(Town *t) static void UpdateTownCargoes(Town *t, TileIndex start, bool update_total = true) { CargoArray accepted, produced; - uint32 dummy; + CargoTypes dummy = 0; /* Gather acceptance for all houses in an area around the start tile. * The area is composed of the square the tile is in, extended one square in all @@ -786,7 +786,7 @@ static void UpdateTownCargoes(Town *t, TileIndex start, bool update_total = true } /* Create bitmap of produced and accepted cargoes. */ - uint32 acc = 0; + CargoTypes acc = 0; for (uint cid = 0; cid < NUM_CARGO; cid++) { if (accepted[cid] >= 8) SetBit(acc, cid); if (produced[cid] > 0) SetBit(t->cargo_produced, cid); @@ -849,7 +849,6 @@ static void DoRegularFunding(Town *t) if (CB_Enabled() && !t->growing) return; - uint16 gr = (t->growth_rate & ~TOWN_GROW_RATE_CUSTOM); // Funding with grow_counter == 1 doesn't speed up next house building, // so trying to avoid it. This means no powerfunding with gr <= 1, and no @@ -857,16 +856,21 @@ static void DoRegularFunding(Town *t) // (we need to fund anyway even if it doesn't speed up next house) // And in case town is not growing ignore grow_counter and growth_rate // completely (it will start growing once we fund it) - bool not_growing = !HasBit(t->flags, TOWN_IS_GROWING); - if ((fund_regularly && t->fund_buildings_months == 0 && - ((t->grow_counter > 0 && (t->grow_counter > 1 || gr == 1)) || not_growing)) || - (do_powerfund && gr > 1 && (t->grow_counter == gr || not_growing))) { + bool is_growing = !HasBit(t->flags, TOWN_IS_GROWING); + if (fund_regularly) { + if (t->fund_buildings_months > 0) return; + if (is_growing + && t->growth_rate > 2 * TOWN_GROWTH_TICKS + && t->grow_counter <= 2 * TOWN_GROWTH_TICKS) return; + } else if (do_powerfund) { + if (t->growth_rate <= 2 * TOWN_GROWTH_TICKS) return; + if (t->grow_counter != t->growth_rate && is_growing) return; + } else return; - CompanyByte old = _current_company; - _current_company = _local_company; - DoCommandP(t->xy, t->index, HK_FUND, CMD_DO_TOWN_ACTION | CMD_NO_ESTIMATE); - _current_company = old; - } + CompanyByte old = _current_company; + _current_company = _local_company; + DoCommandP(t->xy, t->index, HK_FUND, CMD_DO_TOWN_ACTION | CMD_NO_ESTIMATE); + _current_company = old; } static void DoRegularAdvertising(Town *t) { @@ -902,11 +906,11 @@ static void DoRegularAdvertising(Town *t) { static void TownTickHandler(Town *t) { if (HasBit(t->flags, TOWN_IS_GROWING)) { - int i = t->grow_counter - 1; + int i = (int)t->grow_counter - 1; uint16 houses_prev = t->cache.num_houses; if (i < 0) { if (GrowTown(t)) { - i = t->growth_rate & (~TOWN_GROW_RATE_CUSTOM); + i = t->growth_rate; if (t->cache.num_houses <= houses_prev && (t->growing || !CB_Enabled())){ t->houses_skipped++; } @@ -914,7 +918,8 @@ static void TownTickHandler(Town *t) if (t->growing || !CB_Enabled()){ t->cycles_skipped++; } - i = 0; + /* If growth failed wait a bit before retrying */ + i = min(t->growth_rate, TOWN_GROWTH_TICKS - 1); } } t->grow_counter = i; @@ -929,10 +934,7 @@ void OnTick_Town() Town *t; FOR_ALL_TOWNS(t) { - /* Run town tick at regular intervals, but not all at once. */ - if ((_tick_counter + t->index) % TOWN_GROWTH_TICKS == 0) { - TownTickHandler(t); - } + TownTickHandler(t); } } @@ -1359,17 +1361,48 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t /* Possibly extend the road in a direction. * Randomize a direction and if it has a road, bail out. */ target_dir = RandomDiagDir(); - if (cur_rb & DiagDirToRoadBits(target_dir)) return; + RoadBits target_rb = DiagDirToRoadBits(target_dir); + TileIndex house_tile; // position of a possible house - /* This is the tile we will reach if we extend to this direction. */ - TileIndex house_tile = TileAddByDiagDir(tile, target_dir); // position of a possible house + if (cur_rb & target_rb) { + /* If it's a road turn possibly build a house in a corner. + * Use intersection with straight road as an indicator + * that we randomed corner house position. + * A turn (and we check for that later) always has only + * one common bit with a straight road so it has the same + * chance to be chosen as the house on the side of a road. + */ + if ((cur_rb & ROAD_X) != target_rb) return; + + /* Check whether it is a turn and if so determine + * position of the corner tile */ + switch (cur_rb) { + case ROAD_N: + house_tile = TileAddByDir(tile, DIR_S); + break; + case ROAD_S: + house_tile = TileAddByDir(tile, DIR_N); + break; + case ROAD_E: + house_tile = TileAddByDir(tile, DIR_W); + break; + case ROAD_W: + house_tile = TileAddByDir(tile, DIR_E); + break; + default: + return; // not a turn + } + target_dir = DIAGDIR_END; + } else { + house_tile = TileAddByDiagDir(tile, target_dir); + } /* Don't walk into water. */ if (HasTileWaterGround(house_tile)) return; if (!IsValidTile(house_tile)) return; - if (_settings_game.economy.allow_town_roads || _generating_world) { + if (target_dir != DIAGDIR_END && (_settings_game.economy.allow_town_roads || _generating_world)) { switch (t1->layout) { default: NOT_REACHED(); @@ -1379,7 +1412,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t case TL_2X2_GRID: rcmd = GetTownRoadGridElement(t1, tile, target_dir); - allow_house = (rcmd & DiagDirToRoadBits(target_dir)) == ROAD_NONE; + allow_house = (rcmd & target_rb) == ROAD_NONE; break; case TL_BETTER_ROADS: // Use original afterwards! @@ -1389,7 +1422,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t case TL_ORIGINAL: /* Allow a house at the edge. 60% chance or * always ok if no road allowed. */ - rcmd = DiagDirToRoadBits(target_dir); + rcmd = target_rb; allow_house = (!IsRoadAllowedHere(t1, house_tile, target_dir) || Chance16(6, 10)); break; } @@ -1686,6 +1719,9 @@ void UpdateTownMaxPass(Town *t) t->supplied[CT_MAIL].old_max = t->cache.population >> 4; } +static void UpdateTownGrowthRate(Town *t); +static void UpdateTownGrowth(Town *t); + //CB bool CB_Enabled(){ @@ -1825,8 +1861,10 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize UpdateTownRadius(t); t->flags = 0; t->cache.population = 0; - t->grow_counter = 0; - t->growth_rate = 250; + /* Spread growth across ticks so even if there are many + * similar towns they're unlikely to grow all in one tick */ + t->grow_counter = t->index % TOWN_GROWTH_TICKS; + t->growth_rate = TownTicksToGameTicks(250); /* Set the default cargo requirement for town growth */ switch (_settings_game.game_creation.landscape) { @@ -1902,6 +1940,7 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize t->cache.num_houses -= x; _closest_cache_ref = INVALID_TILE; UpdateTownRadius(t); + UpdateTownGrowthRate(t); UpdateTownMaxPass(t); UpdateAirportsNoise(); } @@ -2042,15 +2081,21 @@ CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if (_game_mode != GM_EDITOR) { /* 't' can't be NULL since 'random' is false outside scenedit */ assert(!random); - char company_name[MAX_LENGTH_COMPANY_NAME_CHARS * MAX_CHAR_LENGTH]; - SetDParam(0, _current_company); - GetString(company_name, STR_COMPANY_NAME, lastof(company_name)); - char *cn = stredup(company_name); - SetDParamStr(0, cn); - SetDParam(1, t->index); + if (_current_company == OWNER_DEITY) { + SetDParam(0, t->index); + AddTileNewsItem(STR_NEWS_NEW_TOWN_UNSPONSORED, NT_INDUSTRY_OPEN, tile); + } else { + char company_name[MAX_LENGTH_COMPANY_NAME_CHARS * MAX_CHAR_LENGTH]; + SetDParam(0, _current_company); + GetString(company_name, STR_COMPANY_NAME, lastof(company_name)); - AddTileNewsItem(STR_NEWS_NEW_TOWN, NT_INDUSTRY_OPEN, tile, cn); + char *cn = stredup(company_name); + SetDParamStr(0, cn); + SetDParam(1, t->index); + + AddTileNewsItem(STR_NEWS_NEW_TOWN, NT_INDUSTRY_OPEN, tile, cn); + } AI::BroadcastNewEvent(new ScriptEventTownFounded(t->index)); Game::NewEvent(new ScriptEventTownFounded(t->index)); } @@ -2664,6 +2709,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile) MakeTownHouse(tile, t, construction_counter, construction_stage, house, random_bits); UpdateTownGrowthTile(tile, TGTS_NEW_HOUSE); UpdateTownRadius(t); + UpdateTownGrowthRate(t); UpdateTownCargoes(t, tile); return true; @@ -2802,8 +2848,6 @@ const CargoSpec *FindFirstCargoWithTownEffect(TownEffect effect) return NULL; } -static void UpdateTownGrowRate(Town *t); - /** * Change the cargo goal of a town. * @param tile Unused. @@ -2832,7 +2876,7 @@ CommandCost CmdTownCargoGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uin if (flags & DC_EXEC) { t->goal[te] = p2; - UpdateTownGrowRate(t); + UpdateTownGrowth(t); InvalidateWindowData(WC_TOWN_VIEW, index); } @@ -2868,14 +2912,13 @@ CommandCost CmdTownSetText(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * @param tile Unused. * @param flags Type of operation. * @param p1 Town ID to cargo game of. - * @param p2 Amount of days between growth, or TOWN_GROW_RATE_CUSTOM_NONE, or 0 to reset custom growth rate. + * @param p2 Amount of days between growth, or TOWN_GROWTH_RATE_NONE, or 0 to reset custom growth rate. * @param text Unused. * @return Empty cost or an error. */ CommandCost CmdTownGrowthRate(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { if (_current_company != OWNER_DEITY) return CMD_ERROR; - if ((p2 & TOWN_GROW_RATE_CUSTOM) != 0 && p2 != TOWN_GROW_RATE_CUSTOM_NONE) return CMD_ERROR; if (GB(p2, 16, 16) != 0) return CMD_ERROR; Town *t = Town::GetIfValid(p1); @@ -2883,10 +2926,10 @@ CommandCost CmdTownGrowthRate(TileIndex tile, DoCommandFlag flags, uint32 p1, ui if (flags & DC_EXEC) { if (p2 == 0) { - /* Clear TOWN_GROW_RATE_CUSTOM, UpdateTownGrowRate will determine a proper value */ - t->growth_rate = 0; + /* Just clear the flag, UpdateTownGrowth will determine a proper growth rate */ + ClrBit(t->flags, TOWN_CUSTOM_GROWTH); } else { - uint old_rate = t->growth_rate & ~TOWN_GROW_RATE_CUSTOM; + uint old_rate = t->growth_rate; if (t->grow_counter >= old_rate) { /* This also catches old_rate == 0 */ t->grow_counter = p2; @@ -2894,9 +2937,10 @@ CommandCost CmdTownGrowthRate(TileIndex tile, DoCommandFlag flags, uint32 p1, ui /* Scale grow_counter, so half finished houses stay half finished */ t->grow_counter = t->grow_counter * p2 / old_rate; } - t->growth_rate = p2 | TOWN_GROW_RATE_CUSTOM; + t->growth_rate = p2; + SetBit(t->flags, TOWN_CUSTOM_GROWTH); } - UpdateTownGrowRate(t); + UpdateTownGrowth(t); InvalidateWindowData(WC_TOWN_VIEW, p1); InvalidateWindowData(WC_CB_TOWN, p1); } @@ -3180,13 +3224,21 @@ static CommandCost TownActionFundBuildings(Town *t, DoCommandFlag flags) if (!_settings_game.economy.fund_buildings) return CMD_ERROR; if (flags & DC_EXEC) { - /* Build next tick */ - t->grow_counter = 1; /* And grow for 3 months */ t->fund_buildings_months = 3; /* Enable growth (also checking GameScript's opinion) */ - UpdateTownGrowRate(t); + UpdateTownGrowth(t); + + /* Build a new house, but add a small delay to make sure + * that spamming funding doesn't let town grow any faster + * than 1 house per 2 * TOWN_GROWTH_TICKS ticks. + * Also emulate original behaviour when town was only growing in + * TOWN_GROWTH_TICKS intervals, to make sure that it's not too + * tick-perfect and gives player some time window where he can + * spam funding with the exact same efficiency. + */ + t->grow_counter = min(t->grow_counter, 2 * TOWN_GROWTH_TICKS - (t->growth_rate - t->grow_counter) % TOWN_GROWTH_TICKS); SetWindowDirty(WC_TOWN_VIEW, t->index); SetWindowDirty(WC_CB_TOWN, t->index); @@ -3383,8 +3435,87 @@ static void UpdateTownRating(Town *t) SetWindowDirty(WC_TOWN_AUTHORITY, t->index); } -static void UpdateTownGrowRate(Town *t) + +/** + * Updates town grow counter after growth rate change. + * Preserves relative house builting progress whenever it can. + * @param t The town to calculate grow counter for + * @param prev_growth_rate Town growth rate before it changed (one that was used with grow counter to be updated) + */ +static void UpdateTownGrowCounter(Town *t, uint16 prev_growth_rate) { + if (t->growth_rate == TOWN_GROWTH_RATE_NONE) return; + if (prev_growth_rate == TOWN_GROWTH_RATE_NONE) { + t->grow_counter = min(t->growth_rate, t->grow_counter); + return; + } + t->grow_counter = RoundDivSU((uint32)t->grow_counter * (t->growth_rate + 1), prev_growth_rate + 1); +} + +/** + * Calculates amount of active stations in the range of town (HZB_TOWN_EDGE). + * @param t The town to calculate stations for + * @returns Amount of active stations + */ +static int CountActiveStations(Town *t) +{ + int n = 0; + const Station *st; + FOR_ALL_STATIONS(st) { + if (DistanceSquare(st->xy, t->xy) <= t->cache.squared_town_zone_radius[0]) { + if (st->time_since_load <= 20 || st->time_since_unload <= 20) { + n++; + } + } + } + return n; +} + +/** + * Calculates town growth rate in normal conditions (custom growth rate not set). + * If town growth speed is set to None(0) returns the same rate as if it was Normal(2). + * @param t The town to calculate growth rate for + * @returns Calculated growth rate + */ +static uint GetNormalGrowthRate(Town *t) +{ + static const uint16 _grow_count_values[2][6] = { + { 120, 120, 120, 100, 80, 60 }, // Fund new buildings has been activated + { 320, 420, 300, 220, 160, 100 } // Normal values + }; + + int n = CountActiveStations(t); + uint16 m = _grow_count_values[t->fund_buildings_months != 0 ? 0 : 1][min(n, 5)]; + + uint growth_multiplier = _settings_game.economy.town_growth_rate != 0 ? _settings_game.economy.town_growth_rate - 1 : 1; + + m >>= growth_multiplier; + if (t->larger_town) m /= 2; + + return TownTicksToGameTicks(m / (t->cache.num_houses / 50 + 1)); +} + +/** + * Updates town growth rate. + * @param t The town to update growth rate for + */ +static void UpdateTownGrowthRate(Town *t) +{ + if (HasBit(t->flags, TOWN_CUSTOM_GROWTH)) return; + uint old_rate = t->growth_rate; + t->growth_rate = GetNormalGrowthRate(t); + UpdateTownGrowCounter(t, old_rate); + SetWindowDirty(WC_TOWN_VIEW, t->index); +} + +/** + * Updates town growth state (whether it is growing or not). + * @param t The town to update growth for + */ +static void UpdateTownGrowth(Town *t) +{ + UpdateTownGrowthRate(t); + ClrBit(t->flags, TOWN_IS_GROWING); t->growing_by_chance = false; SetWindowDirty(WC_TOWN_VIEW, t->index); @@ -3409,53 +3540,18 @@ static void UpdateTownGrowRate(Town *t) } } - if ((t->growth_rate & TOWN_GROW_RATE_CUSTOM) != 0) { - if (t->growth_rate != TOWN_GROW_RATE_CUSTOM_NONE) SetBit(t->flags, TOWN_IS_GROWING); + if (HasBit(t->flags, TOWN_CUSTOM_GROWTH)) { + if (t->growth_rate != TOWN_GROWTH_RATE_NONE) SetBit(t->flags, TOWN_IS_GROWING); SetWindowDirty(WC_TOWN_VIEW, t->index); SetWindowDirty(WC_CB_TOWN, t->index); return; } - /** - * Towns are processed every TOWN_GROWTH_TICKS ticks, and this is the - * number of times towns are processed before a new building is built. - */ - static const uint16 _grow_count_values[2][6] = { - { 120, 120, 120, 100, 80, 60 }, // Fund new buildings has been activated - { 320, 420, 300, 220, 160, 100 } // Normal values - }; - - int n = 0; - - const Station *st; - FOR_ALL_STATIONS(st) { - if (DistanceSquare(st->xy, t->xy) <= t->cache.squared_town_zone_radius[0]) { - if (st->time_since_load <= 20 || st->time_since_unload <= 20) { - n++; - } - } + if (t->fund_buildings_months == 0 && CountActiveStations(t) == 0) { + if(!Chance16(1, 12)) return; + t->growing_by_chance = true; } - uint16 m; - - if (t->fund_buildings_months != 0) { - m = _grow_count_values[0][min(n, 5)]; - } else { - m = _grow_count_values[1][min(n, 5)]; - if (n == 0 && !Chance16(1, 12)) return; - if (n == 0) t->growing_by_chance = true; - } - - /* Use the normal growth rate values if new buildings have been funded in - * this town and the growth rate is set to none. */ - uint growth_multiplier = _settings_game.economy.town_growth_rate != 0 ? _settings_game.economy.town_growth_rate - 1 : 1; - - m >>= growth_multiplier; - if (t->larger_town) m /= 2; - - t->growth_rate = m / (t->cache.num_houses / 50 + 1); - t->grow_counter = min(t->growth_rate, t->grow_counter); - SetBit(t->flags, TOWN_IS_GROWING); SetWindowDirty(WC_TOWN_VIEW, t->index); SetWindowDirty(WC_CB_TOWN, t->index); @@ -3541,7 +3637,7 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold) if (!HasTownOwnedRoad(tile)) { TownID tid = GetTownIndex(tile); - if (tid == (TownID)INVALID_TOWN) { + if (tid == INVALID_TOWN) { /* in the case we are generating "many random towns", this value may be INVALID_TOWN */ if (_generating_world) return CalcClosestTownFromTile(tile, threshold); assert(Town::GetNumItems() == 0); @@ -3696,8 +3792,8 @@ void TownsMonthlyLoop() if (CB_Enabled() && !t->larger_town) CB_UpdateTownStorage(t); //CB UpdateTownAmounts(t); + UpdateTownGrowth(t); UpdateTownRating(t); - UpdateTownGrowRate(t); UpdateTownUnwanted(t); UpdateTownCargoes(t); diff --git a/src/town_gui.cpp b/src/town_gui.cpp index ca1b474e6d..61ffa5b927 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: town_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -288,8 +288,8 @@ public: } /* When double-clicking, continue */ if (click_count == 1 || y < 0) break; + FALLTHROUGH; } - FALLTHROUGH; case WID_TA_EXECUTE: DoCommandP(this->town->xy, this->window_number, this->sel_index, CMD_DO_TOWN_ACTION | CMD_MSG(STR_ERROR_CAN_T_DO_THIS)); @@ -334,9 +334,9 @@ static void ShowTownAuthorityWindow(uint town) AllocateWindowDescFront(&_town_authority_desc, town); } -static int TownTicksToDays(int ticks) { - return (ticks * TOWN_GROWTH_TICKS + DAY_TICKS / 2) / DAY_TICKS; -} +// static int TownTicksToDays(int ticks) { +// return (ticks * TOWN_GROWTH_TICKS + DAY_TICKS / 2) / DAY_TICKS; +// } /* Town view window. */ struct TownViewWindow : Window { @@ -394,13 +394,15 @@ public: SetDParam(1, this->town->cache.num_houses); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y, STR_TOWN_VIEW_POPULATION_HOUSES); - SetDParam(0, this->town->supplied[CT_PASSENGERS].old_act); - SetDParam(1, this->town->supplied[CT_PASSENGERS].old_max); - DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX); + SetDParam(0, 1 << CT_PASSENGERS); + SetDParam(1, this->town->supplied[CT_PASSENGERS].old_act); + SetDParam(2, this->town->supplied[CT_PASSENGERS].old_max); + DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX); - SetDParam(0, this->town->supplied[CT_MAIL].old_act); - SetDParam(1, this->town->supplied[CT_MAIL].old_max); - DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX); + SetDParam(0, 1 << CT_MAIL); + SetDParam(1, this->town->supplied[CT_MAIL].old_act); + SetDParam(2, this->town->supplied[CT_MAIL].old_max); + DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX); DrawExtraTownInfo(r, y, this->town, FONT_HEIGHT_NORMAL, true); //CB @@ -451,7 +453,7 @@ public: } if (HasBit(this->town->flags, TOWN_IS_GROWING)) { - SetDParam(0, TownTicksToDays((this->town->growth_rate & ~TOWN_GROW_RATE_CUSTOM) + 1)); + SetDParam(0, RoundDivSU(this->town->growth_rate + 1, DAY_TICKS)); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, this->town->fund_buildings_months == 0 ? STR_TOWN_VIEW_TOWN_GROWS_EVERY : STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED); } else { DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_TOWN_GROW_STOPPED); @@ -866,6 +868,16 @@ public: } } + /** + * Get the string to draw the town name. + * @param t Town to draw. + * @return The string to use. + */ + static StringID GetTownString(const Town *t) + { + return t->larger_town ? STR_TOWN_DIRECTORY_CITY : STR_TOWN_DIRECTORY_TOWN; + } + virtual void DrawWidget(const Rect &r, int widget) const { switch (widget) { @@ -1335,14 +1347,14 @@ static void DrawExtraTownInfo (const Rect &r, uint &y, Town *town, uint line, bo SetDParam(1, town->ratings[_current_company]); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += line, STR_TOWN_VIEW_REALPOP_RATE); //town stats - int grow_rate = 0; - if(town->growth_rate == TOWN_GROW_RATE_CUSTOM_NONE) grow_rate = 0; - else grow_rate = TownTicksToDays((town->growth_rate & ~TOWN_GROW_RATE_CUSTOM) + 1); + // int grow_rate = 0; + // if(town->growth_rate == TOWN_GROW_RATE_CUSTOM_NONE) grow_rate = 0; + // else grow_rate = TownTicksToDays((town->growth_rate & ~TOWN_GROW_RATE_CUSTOM) + 1); - SetDParam(0, grow_rate); - SetDParam(1, town->growth_rate & TOWN_GROW_RATE_CUSTOM ? STR_TOWN_VIEW_GROWTH_RATE_CUSTOM : STR_EMPTY); + SetDParam(0, town->growth_rate); + SetDParam(1, HasBit(town->flags, TOWN_CUSTOM_GROWTH) ? STR_TOWN_VIEW_GROWTH_RATE_CUSTOM : STR_EMPTY); // SetDParam(2, town->grow_counter < 16000 ? TownTicksToDays(town->grow_counter + 1) : -1); - SetDParam(2, TownTicksToDays(town->grow_counter + 1)); + SetDParam(2, town->grow_counter); SetDParam(3, town->time_until_rebuild); SetDParam(4, HasBit(town->flags, TOWN_IS_GROWING) ? 1 : 0); SetDParam(5, town->fund_buildings_months); diff --git a/src/town_map.h b/src/town_map.h index 89173f1584..016ff9a6d2 100644 --- a/src/town_map.h +++ b/src/town_map.h @@ -1,4 +1,4 @@ -/* $Id: town_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/town_type.h b/src/town_type.h index 9951378b08..0c93c8df85 100644 --- a/src/town_type.h +++ b/src/town_type.h @@ -1,4 +1,4 @@ -/* $Id: town_type.h 23233 2011-11-15 20:47:53Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -54,7 +54,7 @@ enum Ratings { RATING_GROWTH_UP_STEP = 5, ///< when a town grows, all companies have rating increased a bit ... RATING_GROWTH_MAXIMUM = RATING_MEDIOCRE, ///< ... up to RATING_MEDIOCRE RATING_STATION_UP_STEP = 12, ///< when a town grows, company gains reputation for all well serviced stations ... - RATING_STATION_DOWN_STEP = -15, ///< ... but loses for bad serviced stations + RATING_STATION_DOWN_STEP = -15, ///< ... but loses for badly serviced stations RATING_TUNNEL_BRIDGE_DOWN_STEP = -250, ///< penalty for removing town owned tunnel or bridge RATING_TUNNEL_BRIDGE_MINIMUM = 0, ///< minimum rating after removing tunnel or bridge diff --git a/src/townname.cpp b/src/townname.cpp index 42f3f89787..b6d55f1ef4 100644 --- a/src/townname.cpp +++ b/src/townname.cpp @@ -1,4 +1,4 @@ -/* $Id: townname.cpp 27187 2015-03-15 12:19:58Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -121,17 +121,17 @@ bool VerifyTownName(uint32 r, const TownNameParams *par, TownNames *town_names) */ bool GenerateTownName(uint32 *townnameparts, TownNames *town_names) { - /* Do not set too low tries, since when we run out of names, we loop - * for #tries only one time anyway - then we stop generating more - * towns. Do not show it too high neither, since looping through all - * the other towns may take considerable amount of time (10000 is - * too much). */ TownNameParams par(_settings_game.game_creation.town_name); /* This function is called very often without entering the gameloop * inbetween. So reset layout cache to prevent it from growing too big. */ Layouter::ReduceLineCache(); + /* Do not set i too low, since when we run out of names, we loop + * for #tries only one time anyway - then we stop generating more + * towns. Do not set it too high either, since looping through all + * the other towns may take considerable amount of time (10000 is + * too much). */ for (int i = 1000; i != 0; i--) { uint32 r = _generating_world ? Random() : InteractiveRandom(); if (!VerifyTownName(r, &par, town_names)) continue; @@ -1045,7 +1045,7 @@ static const TownNameGeneratorParams _town_name_generators[] = { /** - * Generates town name from given seed. a language. + * Generates town name from given seed. * @param buf output buffer * @param last end of buffer * @param lang town name language diff --git a/src/townname_func.h b/src/townname_func.h index 809fc1e466..409993e42a 100644 --- a/src/townname_func.h +++ b/src/townname_func.h @@ -1,4 +1,4 @@ -/* $Id: townname_func.h 26313 2014-02-06 21:06:59Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/townname_type.h b/src/townname_type.h index ce2f6004d2..ba8f926861 100644 --- a/src/townname_type.h +++ b/src/townname_type.h @@ -1,4 +1,4 @@ -/* $Id: townname_type.h 26313 2014-02-06 21:06:59Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,7 +23,7 @@ typedef std::set TownNames; /** - * Struct holding a parameters used to generate town name. + * Struct holding parameters used to generate town name. * Speeds things up a bit because these values are computed only once per name generation. */ struct TownNameParams { diff --git a/src/track_func.h b/src/track_func.h index 43ba93f6bf..a55d6d8f20 100644 --- a/src/track_func.h +++ b/src/track_func.h @@ -1,4 +1,4 @@ -/* $Id: track_func.h 27808 2017-03-19 22:30:47Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -61,7 +61,7 @@ static inline bool IsValidTrackdirForRoadVehicle(Trackdir trackdir) */ static inline bool IsValidTrackdir(Trackdir trackdir) { - return (1 << trackdir & TRACKDIR_BIT_MASK) != 0; + return trackdir != INVALID_TRACKDIR && ((1 << trackdir & TRACKDIR_BIT_MASK) != TRACKDIR_BIT_NONE); } /** @@ -331,6 +331,28 @@ static inline TrackdirBits TrackBitsToTrackdirBits(TrackBits bits) return (TrackdirBits)(bits * 0x101); } +/** + * Checks whether a TrackBits has a given Track. + * @param tracks The track bits. + * @param track The track to check. + */ +static inline bool HasTrack(TrackBits tracks, Track track) +{ + assert(IsValidTrack(track)); + return HasBit(tracks, track); +} + +/** + * Checks whether a TrackdirBits has a given Trackdir. + * @param trackdirs The trackdir bits. + * @param trackdir The trackdir to check. + */ +static inline bool HasTrackdir(TrackdirBits trackdirs, Trackdir trackdir) +{ + assert(IsValidTrackdir(trackdir)); + return HasBit(trackdirs, trackdir); +} + /** * Returns the present-trackdir-information of a TrackStatus. * @@ -692,4 +714,25 @@ static inline bool IsUphillTrackdir(Slope slope, Trackdir dir) return HasBit(_uphill_trackdirs[RemoveHalftileSlope(slope)], dir); } +/** + * Determine the side in which the vehicle will leave the tile + * + * @param direction vehicle direction + * @param track vehicle track bits + * @return side of tile the vehicle will leave + */ +static inline DiagDirection VehicleExitDir(Direction direction, TrackBits track) +{ + static const TrackBits state_dir_table[DIAGDIR_END] = { TRACK_BIT_RIGHT, TRACK_BIT_LOWER, TRACK_BIT_LEFT, TRACK_BIT_UPPER }; + + DiagDirection diagdir = DirToDiagDir(direction); + + /* Determine the diagonal direction in which we will exit this tile */ + if (!HasBit(direction, 0) && track != state_dir_table[diagdir]) { + diagdir = ChangeDiagDir(diagdir, DIAGDIRDIFF_90LEFT); + } + + return diagdir; +} + #endif /* TRACK_FUNC_H */ diff --git a/src/track_type.h b/src/track_type.h index 0cb5fd1e2b..2982288bba 100644 --- a/src/track_type.h +++ b/src/track_type.h @@ -1,4 +1,4 @@ -/* $Id: track_type.h 27833 2017-03-28 21:44:40Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/train.h b/src/train.h index e2066fbd97..5958cde1a0 100644 --- a/src/train.h +++ b/src/train.h @@ -1,4 +1,4 @@ -/* $Id: train.h 27811 2017-03-20 17:49:44Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -110,7 +110,7 @@ struct Train FINAL : public GroundVehicle { friend struct GroundVehicle; // GroundVehicle needs to use the acceleration functions defined at Train. void MarkDirty(); - void UpdateDeltaXY(Direction direction); + void UpdateDeltaXY(); ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; } void PlayLeaveStationSound() const; bool IsPrimaryVehicle() const { return this->IsFrontEngine(); } diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index a3777eaacd..c4deedde80 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: train_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -35,6 +35,7 @@ #include "order_backup.h" #include "zoom_func.h" #include "newgrf_debug.h" +#include "framerate_type.h" #include "table/strings.h" #include "table/train_cmd.h" @@ -57,27 +58,6 @@ bool IsValidImageIndex(uint8 image_index) return image_index < lengthof(_engine_sprite_base); } -/** - * Determine the side in which the train will leave the tile - * - * @param direction vehicle direction - * @param track vehicle track bits - * @return side of tile the train will leave - */ -static inline DiagDirection TrainExitDir(Direction direction, TrackBits track) -{ - static const TrackBits state_dir_table[DIAGDIR_END] = { TRACK_BIT_RIGHT, TRACK_BIT_LOWER, TRACK_BIT_LEFT, TRACK_BIT_UPPER }; - - DiagDirection diagdir = DirToDiagDir(direction); - - /* Determine the diagonal direction in which we will exit this tile */ - if (!HasBit(direction, 0) && track != state_dir_table[diagdir]) { - diagdir = ChangeDiagDir(diagdir, DIAGDIRDIFF_90LEFT); - } - - return diagdir; -} - /** * Return the cargo weight multiplier to use for a rail vehicle @@ -601,7 +581,7 @@ void GetTrainSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, * @param tile tile of the depot where rail-vehicle is built. * @param flags type of operation. * @param e the engine to build. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const Engine *e, Vehicle **ret) @@ -733,7 +713,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v) * @param flags type of operation. * @param e the engine to build. * @param data bit 0 prevents any free cars from being added to the train. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) @@ -894,7 +874,7 @@ static void RemoveFromConsist(Train *part, bool chain = false) static void InsertInConsist(Train *dst, Train *chain) { /* We do not want to add something in the middle of an articulated part. */ - assert(dst->Next() == NULL || !dst->Next()->IsArticulatedPart()); + assert(dst != NULL && (dst->Next() == NULL || !dst->Next()->IsArticulatedPart())); chain->Last()->SetNext(dst->Next()); dst->SetNext(chain); @@ -955,8 +935,8 @@ static void NormaliseSubtypes(Train *chain) * @note All vehicles are/were 'heads' of their chains. * @param original_dst The original destination chain. * @param dst The destination chain after constructing the train. - * @param original_dst The original source chain. - * @param dst The source chain after constructing the train. + * @param original_src The original source chain. + * @param src The source chain after constructing the train. * @return possible error of this command. */ static CommandCost CheckNewTrain(Train *original_dst, Train *dst, Train *original_src, Train *src) @@ -1074,8 +1054,8 @@ static CommandCost CheckTrainAttachment(Train *t) * @note All vehicles are/were 'heads' of their chains. * @param original_dst The original destination chain. * @param dst The destination chain after constructing the train. - * @param original_dst The original source chain. - * @param dst The source chain after constructing the train. + * @param original_src The original source chain. + * @param src The source chain after constructing the train. * @param check_limit Whether to check the vehicle limit. * @return possible error of this command. */ @@ -1442,7 +1422,7 @@ CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, uint16 data, uint3 return cost; } -void Train::UpdateDeltaXY(Direction direction) +void Train::UpdateDeltaXY() { /* Set common defaults. */ this->x_offs = -1; @@ -1453,7 +1433,7 @@ void Train::UpdateDeltaXY(Direction direction) this->x_bb_offs = 0; this->y_bb_offs = 0; - if (!IsDiagonalDirection(direction)) { + if (!IsDiagonalDirection(this->direction)) { static const int _sign_table[] = { /* x, y */ @@ -1466,12 +1446,12 @@ void Train::UpdateDeltaXY(Direction direction) int half_shorten = (VEHICLE_LENGTH - this->gcache.cached_veh_length) / 2; /* For all straight directions, move the bound box to the centre of the vehicle, but keep the size. */ - this->x_offs -= half_shorten * _sign_table[direction]; - this->y_offs -= half_shorten * _sign_table[direction + 1]; + this->x_offs -= half_shorten * _sign_table[this->direction]; + this->y_offs -= half_shorten * _sign_table[this->direction + 1]; this->x_extent += this->x_bb_offs = half_shorten * _sign_table[direction]; this->y_extent += this->y_bb_offs = half_shorten * _sign_table[direction + 1]; } else { - switch (direction) { + switch (this->direction) { /* Shorten southern corner of the bounding box according the vehicle length * and center the bounding box on the vehicle. */ case DIR_NE: @@ -1531,8 +1511,8 @@ static void MarkTrainAsStuck(Train *v) * Swap the two up/down flags in two ways: * - Swap values of \a swap_flag1 and \a swap_flag2, and * - If going up previously (#GVF_GOINGUP_BIT set), the #GVF_GOINGDOWN_BIT is set, and vice versa. - * @param swap_flag1 [inout] First train flag. - * @param swap_flag2 [inout] Second train flag. + * @param[in,out] swap_flag1 First train flag. + * @param[in,out] swap_flag2 Second train flag. */ static void SwapTrainFlags(uint16 *swap_flag1, uint16 *swap_flag2) { @@ -1872,9 +1852,9 @@ void ReverseTrainDirection(Train *v) return; } - /* TrainExitDir does not always produce the desired dir for depots and + /* VehicleExitDir does not always produce the desired dir for depots and * tunnels/bridges that is needed for UpdateSignalsOnSegment. */ - DiagDirection dir = TrainExitDir(v->direction, v->track); + DiagDirection dir = VehicleExitDir(v->direction, v->track); if (IsRailDepotTile(v->tile) || IsTileType(v->tile, MP_TUNNELBRIDGE)) dir = INVALID_DIAGDIR; if (UpdateSignalsOnSegment(v->tile, dir, v->owner) == SIGSEG_PBS || _settings_game.pf.reserve_paths) { @@ -2034,9 +2014,9 @@ static FindDepotData FindClosestTrainDepot(Train *v, int max_distance) /** * Locate the closest depot for this consist, and return the information to the caller. - * @param location [out] If not \c NULL and a depot is found, store its location in the given address. - * @param destination [out] If not \c NULL and a depot is found, store its index in the given address. - * @param reverse [out] If not \c NULL and a depot is found, store reversal information in the given address. + * @param[out] location If not \c NULL and a depot is found, store its location in the given address. + * @param[out] destination If not \c NULL and a depot is found, store its index in the given address. + * @param[out] reverse If not \c NULL and a depot is found, store reversal information in the given address. * @return A depot has been found. */ bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse) @@ -2169,12 +2149,10 @@ static bool CheckTrainStayInDepot(Train *v) seg_state = _settings_game.pf.reserve_paths ? SIGSEG_PBS : UpdateSignalsOnSegment(v->tile, INVALID_DIAGDIR, v->owner); } - /* We are leaving a depot, but have to go to the exact same one; re-enter */ + /* We are leaving a depot, but have to go to the exact same one; re-enter. */ if (v->current_order.IsType(OT_GOTO_DEPOT) && v->tile == v->dest_tile) { - /* We need to have a reservation for this to work. */ - if (HasDepotReservation(v->tile)) return true; - SetDepotReservation(v->tile, true); - VehicleEnterDepot(v); + /* Service when depot has no reservation. */ + if (!HasDepotReservation(v->tile)) VehicleEnterDepot(v); return true; } @@ -2327,15 +2305,15 @@ static const byte _initial_tile_subcoord[6][4][3] = { * @param tile The tile the train is about to enter * @param enterdir Diagonal direction the train is coming from * @param tracks Usable tracks on the new tile - * @param path_found [out] Whether a path has been found or not. + * @param[out] path_found Whether a path has been found or not. * @param do_track_reservation Path reservation is requested - * @param dest [out] State and destination of the requested path + * @param[out] dest State and destination of the requested path * @return The best track the train should follow */ static Track DoTrainPathfind(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool do_track_reservation, PBSTileInfo *dest) { switch (_settings_game.pf.pathfinder_for_trains) { - case VPF_NPF: return NPFTrainChooseTrack(v, tile, enterdir, tracks, path_found, do_track_reservation, dest); + case VPF_NPF: return NPFTrainChooseTrack(v, path_found, do_track_reservation, dest); case VPF_YAPF: return YapfTrainChooseTrack(v, tile, enterdir, tracks, path_found, do_track_reservation, dest); default: NOT_REACHED(); @@ -2439,11 +2417,11 @@ static PBSTileInfo ExtendTrainReservation(const Train *v, TrackBits *new_tracks, * @param override_railtype Whether all physically compatible railtypes should be followed. * @return True if a path to a safe stopping tile could be reserved. */ -static bool TryReserveSafeTrack(const Train *v, TileIndex tile, Trackdir td, bool override_tailtype) +static bool TryReserveSafeTrack(const Train *v, TileIndex tile, Trackdir td, bool override_railtype) { switch (_settings_game.pf.pathfinder_for_trains) { - case VPF_NPF: return NPFTrainFindNearestSafeTile(v, tile, td, override_tailtype); - case VPF_YAPF: return YapfTrainFindNearestSafeTile(v, tile, td, override_tailtype); + case VPF_NPF: return NPFTrainFindNearestSafeTile(v, tile, td, override_railtype); + case VPF_YAPF: return YapfTrainFindNearestSafeTile(v, tile, td, override_railtype); default: NOT_REACHED(); } @@ -3098,7 +3076,7 @@ static Vehicle *CheckTrainAtSignal(Vehicle *v, void *data) /* not front engine of a train, inside wormhole or depot, crashed */ if (!t->IsFrontEngine() || !(t->track & TRACK_BIT_MASK)) return NULL; - if (t->cur_speed > 5 || TrainExitDir(t->direction, t->track) != exitdir) return NULL; + if (t->cur_speed > 5 || VehicleExitDir(t->direction, t->track) != exitdir) return NULL; return t; } @@ -3207,12 +3185,12 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse) if (!HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(i))) { v->cur_speed = 0; v->subspeed = 0; - v->progress = 255 - 100; + v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0. if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_oneway_signal * 20) return false; } else if (HasSignalOnTrackdir(gp.new_tile, i)) { v->cur_speed = 0; v->subspeed = 0; - v->progress = 255 - 10; + v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0. if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_twoway_signal * 73) { DiagDirection exitdir = TrackdirToExitdir(i); TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir); @@ -3361,7 +3339,7 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse) } /* update image of train, as well as delta XY */ - v->UpdateDeltaXY(v->direction); + v->UpdateDeltaXY(); v->x_pos = gp.x; v->y_pos = gp.y; @@ -3681,7 +3659,7 @@ static TileIndex TrainApproachingCrossingTile(const Train *v) if (!TrainCanLeaveTile(v)) return INVALID_TILE; - DiagDirection dir = TrainExitDir(v->direction, v->track); + DiagDirection dir = VehicleExitDir(v->direction, v->track); TileIndex tile = v->tile + TileOffsByDiagDir(dir); /* not a crossing || wrong axis || unusable rail (wrong type or owner) */ @@ -3718,7 +3696,7 @@ static bool TrainCheckIfLineEnds(Train *v, bool reverse) if (!TrainCanLeaveTile(v)) return true; /* Determine the non-diagonal direction in which we will exit this tile */ - DiagDirection dir = TrainExitDir(v->direction, v->track); + DiagDirection dir = VehicleExitDir(v->direction, v->track); /* Calculate next tile */ TileIndex tile = v->tile + TileOffsByDiagDir(dir); @@ -3786,7 +3764,7 @@ static bool TrainLocoHandler(Train *v, bool mode) /* Try to reserve a path when leaving the station as we * might not be marked as wanting a reservation, e.g. * when an overlength train gets turned around in a station. */ - DiagDirection dir = TrainExitDir(v->direction, v->track); + DiagDirection dir = VehicleExitDir(v->direction, v->track); if (IsRailDepotTile(v->tile) || IsTileType(v->tile, MP_TUNNELBRIDGE)) dir = INVALID_DIAGDIR; if (UpdateSignalsOnSegment(v->tile, dir, v->owner) == SIGSEG_PBS || _settings_game.pf.reserve_paths) { @@ -3923,6 +3901,8 @@ Money Train::GetRunningCost() const */ bool Train::Tick() { + PerformanceAccumulator framerate(PFE_GL_TRAINS); + this->tick_counter++; if (this->IsFrontEngine()) { diff --git a/src/train_gui.cpp b/src/train_gui.cpp index ce88bff086..51e772b520 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: train_gui.cpp 27936 2017-12-10 13:45:53Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/transparency.h b/src/transparency.h index 03f9fdf883..ab6f9a6f33 100644 --- a/src/transparency.h +++ b/src/transparency.h @@ -1,4 +1,4 @@ -/* $Id: transparency.h 22506 2011-05-28 09:46:37Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index 660bbb37d8..4bad2b0561 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: transparency_gui.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/transparency_gui.h b/src/transparency_gui.h index 5ef6d26795..bf9003b497 100644 --- a/src/transparency_gui.h +++ b/src/transparency_gui.h @@ -1,4 +1,4 @@ -/* $Id: transparency_gui.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/transport_type.h b/src/transport_type.h index 3ea22f3063..28a1c5cf8f 100644 --- a/src/transport_type.h +++ b/src/transport_type.h @@ -1,4 +1,4 @@ -/* $Id: transport_type.h 22405 2011-05-01 19:14:12Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 46e45c5291..7240cf86d3 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: tree_cmd.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp index 4eacfce66d..f21eeaef2e 100644 --- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: tree_gui.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tree_map.h b/src/tree_map.h index 4edc8957c5..e614099fc9 100644 --- a/src/tree_map.h +++ b/src/tree_map.h @@ -1,4 +1,4 @@ -/* $Id: tree_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index ba9fa3b554..4e6d5a7e13 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -1,4 +1,4 @@ -/* $Id: tunnel_map.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tunnel_map.h b/src/tunnel_map.h index 7e40941c96..d6f475d05c 100644 --- a/src/tunnel_map.h +++ b/src/tunnel_map.h @@ -1,4 +1,4 @@ -/* $Id: tunnel_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -58,6 +58,7 @@ static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadTyp _m[t].m5 = TRANSPORT_ROAD << 2 | d; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = 0; SetRoadOwner(t, ROADTYPE_ROAD, o); if (o != OWNER_TOWN) SetRoadOwner(t, ROADTYPE_TRAM, o); SetRoadTypes(t, r); @@ -75,11 +76,12 @@ static inline void MakeRailTunnel(TileIndex t, Owner o, DiagDirection d, RailTyp SetTileType(t, MP_TUNNELBRIDGE); SetTileOwner(t, o); _m[t].m2 = 0; - _m[t].m3 = r; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = TRANSPORT_RAIL << 2 | d; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = r; } #endif /* TUNNEL_MAP_H */ diff --git a/src/tunnelbridge.h b/src/tunnelbridge.h index 45431e5a92..0a2c2293d5 100644 --- a/src/tunnelbridge.h +++ b/src/tunnelbridge.h @@ -1,4 +1,4 @@ -/* $Id: tunnelbridge.h 27157 2015-02-22 14:01:24Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 4194d63793..06dc24e84f 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: tunnelbridge_cmd.cpp 27686 2016-12-09 21:27:22Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -159,40 +159,27 @@ static inline const PalSpriteID *GetBridgeSpriteTable(int index, BridgePieces ta /** - * Determines the foundation for the north bridge head, and tests if the resulting slope is valid. + * Determines the foundation for the bridge head, and tests if the resulting slope is valid. * + * @param bridge_piece Direction of the bridge head. * @param axis Axis of the bridge * @param tileh Slope of the tile under the north bridge head; returns slope on top of foundation * @param z TileZ corresponding to tileh, gets modified as well * @return Error or cost for bridge foundation */ -static CommandCost CheckBridgeSlopeNorth(Axis axis, Slope *tileh, int *z) +static CommandCost CheckBridgeSlope(BridgePieces bridge_piece, Axis axis, Slope *tileh, int *z) { + assert(bridge_piece == BRIDGE_PIECE_NORTH || bridge_piece == BRIDGE_PIECE_SOUTH); + Foundation f = GetBridgeFoundation(*tileh, axis); *z += ApplyFoundationToSlope(f, tileh); - Slope valid_inclined = (axis == AXIS_X ? SLOPE_NE : SLOPE_NW); - if ((*tileh != SLOPE_FLAT) && (*tileh != valid_inclined)) return CMD_ERROR; - - if (f == FOUNDATION_NONE) return CommandCost(); - - return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]); -} - -/** - * Determines the foundation for the south bridge head, and tests if the resulting slope is valid. - * - * @param axis Axis of the bridge - * @param tileh Slope of the tile under the south bridge head; returns slope on top of foundation - * @param z TileZ corresponding to tileh, gets modified as well - * @return Error or cost for bridge foundation - */ -static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope *tileh, int *z) -{ - Foundation f = GetBridgeFoundation(*tileh, axis); - *z += ApplyFoundationToSlope(f, tileh); - - Slope valid_inclined = (axis == AXIS_X ? SLOPE_SW : SLOPE_SE); + Slope valid_inclined; + if (bridge_piece == BRIDGE_PIECE_NORTH) { + valid_inclined = (axis == AXIS_X ? SLOPE_NE : SLOPE_NW); + } else { + valid_inclined = (axis == AXIS_X ? SLOPE_SW : SLOPE_SE); + } if ((*tileh != SLOPE_FLAT) && (*tileh != valid_inclined)) return CMD_ERROR; if (f == FOUNDATION_NONE) return CommandCost(); @@ -204,6 +191,7 @@ static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope *tileh, int *z) * Is a bridge of the specified type and length available? * @param bridge_type Wanted type of bridge. * @param bridge_len Wanted length of the bridge. + * @param flags Type of operation. * @return A succeeded (the requested bridge is available) or failed (it cannot be built) command. */ CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlag flags) @@ -232,7 +220,7 @@ CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoC * @param p1 packed start tile coords (~ dx) * @param p2 various bitstuffed elements * - p2 = (bit 0- 7) - bridge type (hi bh) - * - p2 = (bit 8-11) - rail type or road types. + * - p2 = (bit 8-13) - rail type or road types. * - p2 = (bit 15-16) - transport type. * @param text unused * @return the cost of this operation or an error @@ -259,7 +247,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u break; case TRANSPORT_RAIL: - railtype = Extract(p2); + railtype = Extract(p2); if (!ValParamRailtype(railtype)) return CMD_ERROR; break; @@ -315,8 +303,8 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u Slope tileh_end = GetTileSlope(tile_end, &z_end); bool pbs_reservation = false; - CommandCost terraform_cost_north = CheckBridgeSlopeNorth(direction, &tileh_start, &z_start); - CommandCost terraform_cost_south = CheckBridgeSlopeSouth(direction, &tileh_end, &z_end); + CommandCost terraform_cost_north = CheckBridgeSlope(BRIDGE_PIECE_NORTH, direction, &tileh_start, &z_start); + CommandCost terraform_cost_south = CheckBridgeSlope(BRIDGE_PIECE_SOUTH, direction, &tileh_end, &z_end); /* Aqueducts can't be built of flat land. */ if (transport_type == TRANSPORT_WATER && (tileh_start == SLOPE_FLAT || tileh_end == SLOPE_FLAT)) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); @@ -574,7 +562,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u * Build Tunnel. * @param start_tile start tile of tunnel * @param flags type of operation - * @param p1 bit 0-3 railtype or roadtypes + * @param p1 bit 0-5 railtype or roadtypes * bit 8-9 transport type * @param p2 unused * @param text unused @@ -591,7 +579,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, _build_tunnel_endtile = 0; switch (transport_type) { case TRANSPORT_RAIL: - railtype = Extract(p1); + railtype = Extract(p1); if (!ValParamRailtype(railtype)) return CMD_ERROR; break; @@ -701,8 +689,23 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, /* Hide the tile from the terraforming command */ TileIndex old_first_tile = coa->first_tile; coa->first_tile = INVALID_TILE; + + /* CMD_TERRAFORM_LAND may append further items to _cleared_object_areas, + * however it will never erase or re-order existing items. + * _cleared_object_areas is a value-type SmallVector, therefore appending items + * may result in a backing-store re-allocation, which would invalidate the coa pointer. + * The index of the coa pointer into the _cleared_object_areas vector remains valid, + * and can be used safely after the CMD_TERRAFORM_LAND operation. + * Deliberately clear the coa pointer to avoid leaving dangling pointers which could + * inadvertently be dereferenced. + */ + assert(coa >= _cleared_object_areas.Begin() && coa < _cleared_object_areas.End()); + size_t coa_index = coa - _cleared_object_areas.Begin(); + assert(coa_index < UINT_MAX); // more than 2**32 cleared areas would be a bug in itself + coa = NULL; + ret = DoCommand(end_tile, end_tileh & start_tileh, 0, flags, CMD_TERRAFORM_LAND); - coa->first_tile = old_first_tile; + _cleared_object_areas[(uint)coa_index].first_tile = old_first_tile; if (ret.Failed()) return_cmd_error(STR_ERROR_UNABLE_TO_EXCAVATE_LAND); cost.AddCost(ret); } @@ -1885,11 +1888,11 @@ static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlag flag /* Check if new slope is valid for bridges in general (so we can safely call GetBridgeFoundation()) */ if ((direction == DIAGDIR_NW) || (direction == DIAGDIR_NE)) { - CheckBridgeSlopeSouth(axis, &tileh_old, &z_old); - res = CheckBridgeSlopeSouth(axis, &tileh_new, &z_new); + CheckBridgeSlope(BRIDGE_PIECE_SOUTH, axis, &tileh_old, &z_old); + res = CheckBridgeSlope(BRIDGE_PIECE_SOUTH, axis, &tileh_new, &z_new); } else { - CheckBridgeSlopeNorth(axis, &tileh_old, &z_old); - res = CheckBridgeSlopeNorth(axis, &tileh_new, &z_new); + CheckBridgeSlope(BRIDGE_PIECE_NORTH, axis, &tileh_old, &z_old); + res = CheckBridgeSlope(BRIDGE_PIECE_NORTH, axis, &tileh_new, &z_new); } /* Surface slope is valid and remains unchanged? */ diff --git a/src/tunnelbridge_map.h b/src/tunnelbridge_map.h index 864e058309..0f7f17b3ac 100644 --- a/src/tunnelbridge_map.h +++ b/src/tunnelbridge_map.h @@ -1,4 +1,4 @@ -/* $Id: tunnelbridge_map.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 69684bb90b..f655bbafc5 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1,4 +1,4 @@ -/* $Id: vehicle.cpp 27986 2018-03-11 13:23:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -52,6 +52,7 @@ #include "gamelog.h" #include "linkgraph/linkgraph.h" #include "linkgraph/refresh.h" +#include "framerate_type.h" #include "table/strings.h" @@ -94,7 +95,7 @@ INSTANTIATE_POOL_METHODS(Vehicle) /** * Determine shared bounds of all sprites. - * @param [out] bounds Shared bounds. + * @param[out] bounds Shared bounds. */ void VehicleSpriteSeq::GetBounds(Rect *bounds) const { @@ -219,7 +220,7 @@ bool Vehicle::NeedsServicing() const if (replace_when_old && !v->NeedsAutorenewing(c, false)) continue; /* Check refittability */ - uint32 available_cargo_types, union_mask; + CargoTypes available_cargo_types, union_mask; GetArticulatedRefitMasks(new_engine, true, &union_mask, &available_cargo_types); /* Is there anything to refit? */ if (union_mask != 0) { @@ -722,7 +723,7 @@ bool Vehicle::IsEngineCountable() const /** * Check whether Vehicle::engine_type has any meaning. - * @return true if the vehicle has a useable engine type. + * @return true if the vehicle has a usable engine type. */ bool Vehicle::HasEngineType() const { @@ -945,8 +946,15 @@ void CallVehicleTicks() RunVehicleDayProc(); - Station *st; - FOR_ALL_STATIONS(st) LoadUnloadStation(st); + { + PerformanceMeasurer framerate(PFE_GL_ECONOMY); + Station *st; + FOR_ALL_STATIONS(st) LoadUnloadStation(st); + } + PerformanceAccumulator::Reset(PFE_GL_TRAINS); + PerformanceAccumulator::Reset(PFE_GL_ROADVEHS); + PerformanceAccumulator::Reset(PFE_GL_SHIPS); + PerformanceAccumulator::Reset(PFE_GL_AIRCRAFT); Vehicle *v; FOR_ALL_VEHICLES(v) { @@ -1749,7 +1757,10 @@ bool CanBuildVehicleInfrastructure(VehicleType type) UnitID max; switch (type) { - case VEH_TRAIN: max = _settings_game.vehicle.max_trains; break; + case VEH_TRAIN: + if (!HasAnyRailtypesAvail(_local_company)) return false; + max = _settings_game.vehicle.max_trains; + break; case VEH_ROAD: max = _settings_game.vehicle.max_roadveh; break; case VEH_SHIP: max = _settings_game.vehicle.max_ships; break; case VEH_AIRCRAFT: max = _settings_game.vehicle.max_aircraft; break; @@ -1805,11 +1816,12 @@ LiveryScheme GetEngineLiveryScheme(EngineID engine_type, EngineID parent_engine_ if (parent_engine_type == INVALID_ENGINE) { return LS_PASSENGER_WAGON_STEAM; } else { + bool is_mu = HasBit(EngInfo(parent_engine_type)->misc_flags, EF_RAIL_IS_MU); switch (RailVehInfo(parent_engine_type)->engclass) { default: NOT_REACHED(); case EC_STEAM: return LS_PASSENGER_WAGON_STEAM; - case EC_DIESEL: return LS_PASSENGER_WAGON_DIESEL; - case EC_ELECTRIC: return LS_PASSENGER_WAGON_ELECTRIC; + case EC_DIESEL: return is_mu ? LS_DMU : LS_PASSENGER_WAGON_DIESEL; + case EC_ELECTRIC: return is_mu ? LS_EMU : LS_PASSENGER_WAGON_ELECTRIC; case EC_MONORAIL: return LS_PASSENGER_WAGON_MONORAIL; case EC_MAGLEV: return LS_PASSENGER_WAGON_MAGLEV; } @@ -1878,14 +1890,24 @@ const Livery *GetEngineLivery(EngineID engine_type, CompanyID company, EngineID const Company *c = Company::Get(company); LiveryScheme scheme = LS_DEFAULT; - /* The default livery is always available for use, but its in_use flag determines - * whether any _other_ liveries are in use. */ - if (c->livery[LS_DEFAULT].in_use && (livery_setting == LIT_ALL || (livery_setting == LIT_COMPANY && company == _local_company))) { - /* Determine the livery scheme to use */ - scheme = GetEngineLiveryScheme(engine_type, parent_engine_type, v); + if (livery_setting == LIT_ALL || (livery_setting == LIT_COMPANY && company == _local_company)) { + if (v != NULL) { + const Group *g = Group::GetIfValid(v->First()->group_id); + if (g != NULL) { + /* Traverse parents until we find a livery or reach the top */ + while (g->livery.in_use == 0 && g->parent != INVALID_GROUP) { + g = Group::Get(g->parent); + } + if (g->livery.in_use != 0) return &g->livery; + } + } - /* Switch back to the default scheme if the resolved scheme is not in use */ - if (!c->livery[scheme].in_use) scheme = LS_DEFAULT; + /* The default livery is always available for use, but its in_use flag determines + * whether any _other_ liveries are in use. */ + if (c->livery[LS_DEFAULT].in_use != 0) { + /* Determine the livery scheme to use */ + scheme = GetEngineLiveryScheme(engine_type, parent_engine_type, v); + } } return &c->livery[scheme]; @@ -2329,13 +2351,15 @@ CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command) SetBit(gv_flags, GVF_SUPPRESS_IMPLICIT_ORDERS); } - this->dest_tile = location; + this->SetDestTile(location); this->current_order.MakeGoToDepot(destination, ODTF_MANUAL); if (!(command & DEPOT_SERVICE)) this->current_order.SetDepotActionType(ODATFB_HALT); SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, WID_VV_START_STOP); - /* If there is no depot in front, reverse automatically (trains only) */ - if (this->type == VEH_TRAIN && reverse) DoCommand(this->tile, this->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION); + /* If there is no depot in front and the train is not already reversing, reverse automatically (trains only) */ + if (this->type == VEH_TRAIN && (reverse ^ HasBit(Train::From(this)->flags, VRF_REVERSING))) { + DoCommand(this->tile, this->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION); + } if (this->type == VEH_AIRCRAFT) { Aircraft *a = Aircraft::From(this); @@ -2851,7 +2875,7 @@ const uint16 &Vehicle::GetGroundVehicleFlags() const /** * Calculates the set of vehicles that will be affected by a given selection. - * @param set [inout] Set of affected vehicles. + * @param[in,out] set Set of affected vehicles. * @param v First vehicle of the selection. * @param num_vehicles Number of vehicles in the selection (not counting articulated parts). * @pre \a set must be empty. diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 9ed6596442..d02d33e2cc 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -1,4 +1,4 @@ -/* $Id: vehicle_base.h 27822 2017-03-24 07:33:31Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -324,7 +324,7 @@ public: uint16 load_unload_ticks; ///< Ticks to wait before starting next cycle. GroupID group_id; ///< Index of group Pool array - byte subtype; ///< subtype (Filled with values from #EffectVehicles/#TrainSubTypes/#AircraftSubTypes) + byte subtype; ///< subtype (Filled with values from #AircraftSubType/#DisasterSubType/#EffectVehicleType/#GroundVehicleSubtypeFlags) NewGRFCache grf_cache; ///< Cache of often used calculated NewGRF values VehicleCache vcache; ///< Cache of often used vehicle values. @@ -366,9 +366,8 @@ public: /** * Updates the x and y offsets and the size of the sprite used * for this vehicle. - * @param direction the direction the vehicle is facing */ - virtual void UpdateDeltaXY(Direction direction) {} + virtual void UpdateDeltaXY() {} /** * Determines the effective direction-specific vehicle movement speed. @@ -438,7 +437,7 @@ public: /** * Gets the sprite to show for the given direction * @param direction the direction the vehicle is facing - * @param [out] result Vehicle sprite sequence. + * @param[out] result Vehicle sprite sequence. */ virtual void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const { result->Clear(); } @@ -750,6 +749,8 @@ public: */ virtual bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse) { return false; } + virtual void SetDestTile(TileIndex tile) { this->dest_tile = tile; } + CommandCost SendToDepot(DoCommandFlag flags, DepotCommand command); void UpdateVisualEffect(bool allow_power_change = true); @@ -1139,7 +1140,7 @@ struct SpecializedVehicle : public Vehicle { /* Explicitly choose method to call to prevent vtable dereference - * it gives ~3% runtime improvements in games with many vehicles */ - if (update_delta) ((T *)this)->T::UpdateDeltaXY(this->direction); + if (update_delta) ((T *)this)->T::UpdateDeltaXY(); VehicleSpriteSeq seq; ((T *)this)->T::GetImage(this->direction, EIT_ON_MAP, &seq); if (force_update || this->sprite_seq != seq) { diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index e4ddccc129..9f8e038877 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: vehicle_cmd.cpp 27677 2016-11-05 19:16:59Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -206,7 +206,7 @@ CommandCost CmdSellVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * @param engine_type Which engine to refit * @param new_cid Cargo type we are refitting to. * @param new_subtype New cargo subtype. - * @param [out] auto_refit_allowed The refit is allowed as an auto-refit. + * @param[out] auto_refit_allowed The refit is allowed as an auto-refit. * @return Price for refitting */ static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed) @@ -238,7 +238,7 @@ static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID ne * @param engine_type Which engine to refit * @param new_cid Cargo type we are refitting to. * @param new_subtype New cargo subtype. - * @param [out] auto_refit_allowed The refit is allowed as an auto-refit. + * @param[out] auto_refit_allowed The refit is allowed as an auto-refit. * @return Price for refitting */ static CommandCost GetRefitCost(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed) @@ -420,12 +420,12 @@ static CommandCost RefitVehicle(Vehicle *v, bool only_this, uint8 num_vehicles, * @param flags type of operation * @param p1 vehicle ID to refit * @param p2 various bitstuffed elements - * - p2 = (bit 0-4) - New cargo type to refit to. - * - p2 = (bit 6) - Automatic refitting. - * - p2 = (bit 7) - Refit only this vehicle. Used only for cloning vehicles. + * - p2 = (bit 0-7) - New cargo type to refit to. * - p2 = (bit 8-15) - New cargo subtype to refit to. 0xFF means to try keeping the same subtype according to GetBestFittingSubType(). * - p2 = (bit 16-23) - Number of vehicles to refit (not counting articulated parts). Zero means all vehicles. * Only used if "refit only this vehicle" is false. + * - p2 = (bit 24) - Automatic refitting. + * - p2 = (bit 25) - Refit only this vehicle. Used only for cloning vehicles. * @param text unused * @return the cost of this operation or an error */ @@ -443,7 +443,7 @@ CommandCost CmdRefitVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint CommandCost ret = CheckOwnership(front->owner); if (ret.Failed()) return ret; - bool auto_refit = HasBit(p2, 6); + bool auto_refit = HasBit(p2, 24); bool free_wagon = v->type == VEH_TRAIN && Train::From(front)->IsFreeWagon(); // used by autoreplace/renew /* Don't allow shadows and such to be refitted. */ @@ -460,12 +460,12 @@ CommandCost CmdRefitVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint if (front->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_VEHICLE_IS_DESTROYED); /* Check cargo */ - CargoID new_cid = GB(p2, 0, 5); + CargoID new_cid = GB(p2, 0, 8); byte new_subtype = GB(p2, 8, 8); if (new_cid >= NUM_CARGO) return CMD_ERROR; - /* For ships and aircrafts there is always only one. */ - bool only_this = HasBit(p2, 7) || front->type == VEH_SHIP || front->type == VEH_AIRCRAFT; + /* For ships and aircraft there is always only one. */ + bool only_this = HasBit(p2, 25) || front->type == VEH_SHIP || front->type == VEH_AIRCRAFT; uint8 num_vehicles = GB(p2, 16, 8); CommandCost cost = RefitVehicle(v, only_this, num_vehicles, new_cid, new_subtype, flags, auto_refit); @@ -542,7 +542,8 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, case VEH_AIRCRAFT: { Aircraft *a = Aircraft::From(v); /* cannot stop airplane when in flight, or when taking off / landing */ - if (!(v->vehstatus & VS_CRASHED) && a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT); + if (a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT); + if (HasBit(a->flags, VAF_HELI_DIRECT_DESCENT)) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT); break; } @@ -898,7 +899,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint /* Find out what's the best sub type */ byte subtype = GetBestFittingSubType(v, w, v->cargo_type); if (w->cargo_type != v->cargo_type || w->cargo_subtype != subtype) { - CommandCost cost = DoCommand(0, w->index, v->cargo_type | 1U << 7 | (subtype << 8), flags, GetCmdRefitVeh(v)); + CommandCost cost = DoCommand(0, w->index, v->cargo_type | 1U << 25 | (subtype << 8), flags, GetCmdRefitVeh(v)); if (cost.Succeeded()) total_cost.AddCost(cost); } diff --git a/src/vehicle_func.h b/src/vehicle_func.h index c5f79728bb..17ec9e28da 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -1,4 +1,4 @@ -/* $Id: vehicle_func.h 26863 2014-09-20 15:31:26Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -31,7 +31,7 @@ static const Money VEHICLE_PROFIT_THRESHOLD = 10000; ///< Threshold for a /** * Helper to check whether an image index is valid for a particular vehicle. - * @param The type of vehicle. + * @tparam T The type of vehicle. * @param image_index The image index to check. * @return True iff the image index is valid. */ diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 0ec0408662..68954bfb04 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: vehicle_gui.cpp 27895 2017-08-20 08:28:05Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -417,7 +417,7 @@ struct RefitWindow : public Window { do { if (v->type == VEH_TRAIN && !vehicles_to_refit.Contains(v->index)) continue; const Engine *e = v->GetEngine(); - uint32 cmask = e->info.refit_mask; + CargoTypes cmask = e->info.refit_mask; byte callback_mask = e->info.callback_mask; /* Skip this engine if it does not carry anything */ @@ -682,7 +682,7 @@ struct RefitWindow : public Window { /** * Gets the #StringID to use for displaying capacity. - * @param Cargo and cargo subtype to check for capacity. + * @param option Cargo and cargo subtype to check for capacity. * @return INVALID_STRING_ID if there is no capacity. StringID to use in any other case. * @post String parameters have been set. */ @@ -690,8 +690,8 @@ struct RefitWindow : public Window { { assert(_current_company == _local_company); Vehicle *v = Vehicle::Get(this->window_number); - CommandCost cost = DoCommand(v->tile, this->selected_vehicle, option->cargo | (int)this->auto_refit << 6 | option->subtype << 8 | - this->num_vehicles << 16, DC_QUERY_COST, GetCmdRefitVeh(v->type)); + CommandCost cost = DoCommand(v->tile, this->selected_vehicle, option->cargo | option->subtype << 8 | this->num_vehicles << 16 | + (int)this->auto_refit << 24, DC_QUERY_COST, GetCmdRefitVeh(v->type)); if (cost.Failed()) return INVALID_STRING_ID; @@ -818,8 +818,8 @@ struct RefitWindow : public Window { Vehicle *v = Vehicle::Get(this->window_number); this->selected_vehicle = v->index; this->num_vehicles = UINT8_MAX; + FALLTHROUGH; } - FALLTHROUGH; case 2: { // The vehicle selection has changed; rebuild the entire list. if (!gui_scope) break; @@ -844,8 +844,8 @@ struct RefitWindow : public Window { this->information_width = max_width; this->ReInit(); } + FALLTHROUGH; } - FALLTHROUGH; case 1: // A new cargo has been selected. if (!gui_scope) break; @@ -906,8 +906,8 @@ struct RefitWindow : public Window { if (_ctrl_pressed) this->num_vehicles = UINT8_MAX; break; } + FALLTHROUGH; } - FALLTHROUGH; default: /* Clear the selection. */ @@ -941,8 +941,8 @@ struct RefitWindow : public Window { this->InvalidateData(1); if (click_count == 1) break; + FALLTHROUGH; } - FALLTHROUGH; case WID_VR_REFIT: // refit button if (this->cargo != NULL) { @@ -1044,9 +1044,9 @@ void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *pare uint ShowRefitOptionsList(int left, int right, int y, EngineID engine) { /* List of cargo types of this engine */ - uint32 cmask = GetUnionOfArticulatedRefitMasks(engine, false); + CargoTypes cmask = GetUnionOfArticulatedRefitMasks(engine, false); /* List of cargo types available in this climate */ - uint32 lmask = _cargo_mask; + CargoTypes lmask = _cargo_mask; /* Draw nothing if the engine is not refittable */ if (HasAtMostOneBit(cmask)) return y; @@ -1677,9 +1677,8 @@ public: this->SetDirty(); } - virtual void OnTick() + virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (this->vehicles.NeedResort()) { StationID station = (this->vli.type == VL_STATION_LIST) ? this->vli.index : INVALID_STATION; @@ -2354,7 +2353,7 @@ static const uint32 _vehicle_command_translation_table[][4] = { CMD_REVERSE_TRAIN_DIRECTION | CMD_MSG(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN), CMD_TURN_ROADVEH | CMD_MSG(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN), 0xffffffff, // invalid for ships - 0xffffffff // invalid for aircrafts + 0xffffffff // invalid for aircraft }, }; @@ -2717,7 +2716,7 @@ public: } } - virtual void OnTick() + virtual void OnGameTick() { const Vehicle *v = Vehicle::Get(this->window_number); bool veh_stopped = v->IsStoppedInDepot(); diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h index 6e10f1e02d..92975425df 100644 --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -1,4 +1,4 @@ -/* $Id: vehicle_gui.h 27631 2016-08-15 18:34:09Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index 824d4f7d22..5755c7fa88 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -1,4 +1,4 @@ -/* $Id: vehicle_gui_base.h 27677 2016-11-05 19:16:59Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/vehicle_type.h b/src/vehicle_type.h index 69c88f1191..f3e7d535fd 100644 --- a/src/vehicle_type.h +++ b/src/vehicle_type.h @@ -1,4 +1,4 @@ -/* $Id: vehicle_type.h 23080 2011-11-01 16:51:47Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,6 +17,8 @@ /** The type all our vehicle IDs have. */ typedef uint32 VehicleID; +static const int GROUND_ACCELERATION = 9800; ///< Acceleration due to gravity, 9.8 m/s^2 + /** Available vehicle types. */ enum VehicleType { VEH_BEGIN, diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp index 11af523ba1..bfe4e5ffd1 100644 --- a/src/vehiclelist.cpp +++ b/src/vehiclelist.cpp @@ -1,4 +1,4 @@ -/* $Id: vehiclelist.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/vehiclelist.h b/src/vehiclelist.h index 7773699709..996c8c007f 100644 --- a/src/vehiclelist.h +++ b/src/vehiclelist.h @@ -1,4 +1,4 @@ -/* $Id: vehiclelist.h 27677 2016-11-05 19:16:59Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index 2b5e2dc4f7..960d7fb7c8 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -1,4 +1,4 @@ -/* $Id: allegro_v.cpp 27167 2015-02-22 23:06:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -24,6 +24,7 @@ #include "../network/network.h" #include "../core/random_func.hpp" #include "../core/math_func.hpp" +#include "../framerate_type.h" #include "allegro_v.h" #include @@ -56,6 +57,8 @@ void VideoDriver_Allegro::MakeDirty(int left, int top, int width, int height) static void DrawSurfaceToScreen() { + PerformanceMeasurer framerate(PFE_VIDEO); + int n = _num_dirty_rects; if (n == 0) return; @@ -458,7 +461,7 @@ void VideoDriver_Allegro::Stop() if (--_allegro_instance_count == 0) allegro_exit(); } -#if defined(UNIX) || defined(__OS2__) || defined(PSP) || defined(DOS) +#if defined(UNIX) || defined(__OS2__) || defined(DOS) # include /* gettimeofday */ static uint32 GetTime() diff --git a/src/video/allegro_v.h b/src/video/allegro_v.h index 17ee450a6f..a770635da0 100644 --- a/src/video/allegro_v.h +++ b/src/video/allegro_v.h @@ -1,4 +1,4 @@ -/* $Id: allegro_v.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/cocoa/cocoa_keys.h b/src/video/cocoa/cocoa_keys.h index 8a493e0ffe..426befd184 100644 --- a/src/video/cocoa/cocoa_keys.h +++ b/src/video/cocoa/cocoa_keys.h @@ -1,4 +1,4 @@ -/* $Id: cocoa_keys.h 17248 2009-08-21 20:21:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index 87222577f1..564daefe0f 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -1,4 +1,4 @@ -/* $Id: cocoa_v.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -259,7 +259,11 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i @end /** Delegate for our NSWindow to send ask for quit on close */ -@interface OTTD_CocoaWindowDelegate : NSObject { +@interface OTTD_CocoaWindowDelegate : NSObject +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + +#endif +{ CocoaSubdriver *driver; } diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 35cd3503c1..d165610245 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -1,4 +1,4 @@ -/* $Id: cocoa_v.mm 26818 2014-09-13 22:00:10Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -48,6 +48,9 @@ @interface OTTDMain : NSObject +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + +#endif @end @@ -211,9 +214,14 @@ static void setupApplication() } #endif + /* Disable the system-wide tab feature as we only have one window. */ + if ([ NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:) ]) { + /* We use nil instead of NO as withObject requires an id. */ + [ NSWindow performSelector:@selector(setAllowsAutomaticWindowTabbing:) withObject:nil]; + } + /* Become the front process, important when start from the command line. */ - OSErr err = SetFrontProcess(&psn); - if (err != 0) DEBUG(driver, 0, "Could not bring the application to front. Error %d", (int)err); + [ [ NSApplication sharedApplication ] activateIgnoringOtherApps:YES ]; /* Set up the menubar */ [ NSApp setMainMenu:[ [ NSMenu alloc ] init ] ]; @@ -235,22 +243,39 @@ static int CDECL ModeSorter(const OTTD_Point *p1, const OTTD_Point *p2) return 0; } -uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id, int device_depth) +static void QZ_GetDisplayModeInfo(CFArrayRef modes, CFIndex i, int &bpp, uint16 &width, uint16 &height) { - CFArrayRef mode_list = CGDisplayAvailableModes(display_id); - CFIndex num_modes = CFArrayGetCount(mode_list); + bpp = 0; + width = 0; + height = 0; - /* Build list of modes with the requested bpp */ - uint count = 0; - for (CFIndex i = 0; i < num_modes && count < max_modes; i++) { - int intvalue, bpp; - uint16 width, height; +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if (MacOSVersionIsAtLeast(10, 6, 0)) { + CGDisplayModeRef mode = (CGDisplayModeRef)CFArrayGetValueAtIndex(modes, i); - CFDictionaryRef onemode = (const __CFDictionary*)CFArrayGetValueAtIndex(mode_list, i); + width = (uint16)CGDisplayModeGetWidth(mode); + height = (uint16)CGDisplayModeGetHeight(mode); + +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11) + /* Extract bit depth from mode string. */ + CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode); + if (CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 32; + if (CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 16; + if (CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 8; + CFRelease(pixEnc); +#else + /* CGDisplayModeCopyPixelEncoding is deprecated on OSX 10.11+, but there are no 8 bpp modes anyway... */ + bpp = 32; +#endif + } else +#endif + { + int intvalue; + + CFDictionaryRef onemode = (const __CFDictionary*)CFArrayGetValueAtIndex(modes, i); CFNumberRef number = (const __CFNumber*)CFDictionaryGetValue(onemode, kCGDisplayBitsPerPixel); - CFNumberGetValue(number, kCFNumberSInt32Type, &bpp); - - if (bpp != device_depth) continue; + CFNumberGetValue(number, kCFNumberSInt32Type, &intvalue); + bpp = intvalue; number = (const __CFNumber*)CFDictionaryGetValue(onemode, kCGDisplayWidth); CFNumberGetValue(number, kCFNumberSInt32Type, &intvalue); @@ -259,6 +284,29 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i number = (const __CFNumber*)CFDictionaryGetValue(onemode, kCGDisplayHeight); CFNumberGetValue(number, kCFNumberSInt32Type, &intvalue); height = (uint16)intvalue; + } +} + +uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id, int device_depth) +{ +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) + CFArrayRef mode_list = MacOSVersionIsAtLeast(10, 6, 0) ? CGDisplayCopyAllDisplayModes(display_id, NULL) : CGDisplayAvailableModes(display_id); +#elif (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + CFArrayRef mode_list = CGDisplayCopyAllDisplayModes(display_id, NULL); +#else + CFArrayRef mode_list = CGDisplayAvailableModes(display_id); +#endif + CFIndex num_modes = CFArrayGetCount(mode_list); + + /* Build list of modes with the requested bpp */ + uint count = 0; + for (CFIndex i = 0; i < num_modes && count < max_modes; i++) { + int bpp; + uint16 width, height; + + QZ_GetDisplayModeInfo(mode_list, i, bpp, width, height); + + if (bpp != device_depth) continue; /* Check if mode is already in the list */ bool hasMode = false; @@ -280,6 +328,10 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i /* Sort list smallest to largest */ QSortT(modes, count, &ModeSorter); +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if (MacOSVersionIsAtLeast(10, 6, 0)) CFRelease(mode_list); +#endif + return count; } @@ -575,9 +627,12 @@ void VideoDriver_Cocoa::EditBoxLostFocus() if (_cocoa_subdriver != NULL) { if ([ _cocoa_subdriver->cocoaview respondsToSelector:@selector(inputContext) ] && [ [ _cocoa_subdriver->cocoaview performSelector:@selector(inputContext) ] respondsToSelector:@selector(discardMarkedText) ]) { [ [ _cocoa_subdriver->cocoaview performSelector:@selector(inputContext) ] performSelector:@selector(discardMarkedText) ]; - } else { + } +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) + else { [ [ NSInputManager currentInputManager ] markedTextAbandoned:_cocoa_subdriver->cocoaview ]; } +#endif } /* Clear any marked string from the current edit box. */ HandleTextInput(NULL, true); @@ -604,7 +659,22 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel return; } - NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil); +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) + if (MacOSVersionIsAtLeast(10, 3, 0)) { + NSAlert *alert = [ [ NSAlert alloc ] init ]; + [ alert setAlertStyle: NSCriticalAlertStyle ]; + [ alert setMessageText:[ NSString stringWithUTF8String:title ] ]; + [ alert setInformativeText:[ NSString stringWithUTF8String:message ] ]; + [ alert addButtonWithTitle: [ NSString stringWithUTF8String:buttonLabel ] ]; + [ alert runModal ]; + [ alert release ]; + } else +#endif + { +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3) + NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil); +#endif + } if (!wasstarted && VideoDriver::GetInstance() != NULL) VideoDriver::GetInstance()->Stop(); @@ -1032,7 +1102,17 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) { if (!EditBoxInGlobalFocus()) return NSNotFound; - NSPoint view_pt = [ self convertPoint:[ [ self window ] convertScreenToBase:thePoint ] fromView:nil ]; + NSPoint view_pt = NSZeroPoint; +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7) + if ([ [ self window ] respondsToSelector:@selector(convertRectFromScreen:) ]) { + view_pt = [ self convertRect:[ [ self window ] convertRectFromScreen:NSMakeRect(thePoint.x, thePoint.y, 0, 0) ] fromView:nil ].origin; + } else +#endif + { +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7) + view_pt = [ self convertPoint:[ [ self window ] convertScreenToBase:thePoint ] fromView:nil ]; +#endif + } Point pt = { (int)view_pt.x, (int)[ self frame ].size.height - (int)view_pt.y }; @@ -1061,9 +1141,13 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) } #endif +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 NSRect window_rect = [ self convertRect:view_rect toView:nil ]; NSPoint origin = [ [ self window ] convertBaseToScreen:window_rect.origin ]; return NSMakeRect(origin.x, origin.y, window_rect.size.width, window_rect.size.height); +#else + return NSMakeRect(0, 0, 0, 0);; +#endif } /** Get the bounding rect for the given range. */ @@ -1271,7 +1355,12 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) NSPoint loc = [ driver->cocoaview convertPoint:[ [ aNotification object ] mouseLocationOutsideOfEventStream ] fromView:nil ]; BOOL inside = ([ driver->cocoaview hitTest:loc ] == driver->cocoaview); - if (inside) [ driver->cocoaview mouseEntered:NULL ]; + if (inside) { + /* We don't care about the event, but the compiler does. */ + NSEvent *e = [ [ NSEvent alloc ] init ]; + [ driver->cocoaview mouseEntered:e ]; + [ e release ]; + } } @end diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index 3ff7f856c9..30b6563b68 100644 --- a/src/video/cocoa/event.mm +++ b/src/video/cocoa/event.mm @@ -1,4 +1,4 @@ -/* $Id: event.mm 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -100,10 +100,10 @@ static void QZ_WarpCursor(int x, int y) NSPoint p = NSMakePoint(x, y); CGPoint cgp = _cocoa_subdriver->PrivateLocalToCG(&p); - /* this is the magic call that fixes cursor "freezing" after warp */ - CGSetLocalEventsSuppressionInterval(0.0); /* Do the actual warp */ CGWarpMouseCursorPosition(cgp); + /* this is the magic call that fixes cursor "freezing" after warp */ + CGAssociateMouseAndMouseCursorPosition(true); } @@ -587,12 +587,12 @@ static bool QZ_PollEvent() while (_current_magnification >= 1.0f) { _current_magnification -= 1.0f; - _cursor.wheel++; + _cursor.wheel--; HandleMouseEvents(); } while (_current_magnification <= -1.0f) { _current_magnification += 1.0f; - _cursor.wheel--; + _cursor.wheel++; HandleMouseEvents(); } break; diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm index ed30a1c9b8..860866b336 100644 --- a/src/video/cocoa/fullscreen.mm +++ b/src/video/cocoa/fullscreen.mm @@ -1,4 +1,4 @@ -/* $Id: fullscreen.mm 26709 2014-07-30 20:19:29Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index 61073c771b..4245a3c183 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -1,4 +1,4 @@ -/* $Id: wnd_quartz.mm 27675 2016-10-31 19:29:01Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -33,6 +33,7 @@ #include "cocoa_v.h" #include "../../core/math_func.hpp" #include "../../gfx_func.h" +#include "../../framerate_type.h" /* On some old versions of MAC OS this may not be defined. * Those versions generally only produce code for PPC. So it should be safe to @@ -333,7 +334,9 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp) [ this->window setAcceptsMouseMovedEvents:YES ]; [ this->window setViewsNeedDisplay:NO ]; - [ this->window useOptimizedDrawing:YES ]; +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10 + if ([ this->window respondsToSelector:@selector(useOptimizedDrawing:) ]) [ this->window useOptimizedDrawing:YES ]; +#endif delegate = [ [ OTTD_CocoaWindowDelegate alloc ] init ]; [ delegate setDriver:this ]; @@ -429,6 +432,8 @@ WindowQuartzSubdriver::~WindowQuartzSubdriver() void WindowQuartzSubdriver::Draw(bool force_update) { + PerformanceMeasurer framerate(PFE_VIDEO); + /* Check if we need to do anything */ if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return; @@ -517,7 +522,16 @@ CGPoint WindowQuartzSubdriver::PrivateLocalToCG(NSPoint *p) p->y = this->window_height - p->y; *p = [ this->cocoaview convertPoint:*p toView:nil ]; - *p = [ this->window convertBaseToScreen:*p ]; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + if ([ this->window respondsToSelector:@selector(convertRectToScreen:) ]) { + *p = [ this->window convertRectToScreen:NSMakeRect(p->x, p->y, 0, 0) ].origin; + } else +#endif + { +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 + *p = [ this->window convertBaseToScreen:*p ]; +#endif + } p->y = this->device_height - p->y; CGPoint cgp; @@ -533,13 +547,15 @@ NSPoint WindowQuartzSubdriver::GetMouseLocation(NSEvent *event) if ( [ event window ] == nil) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - if ([ this->cocoaview respondsToSelector:@selector(convertRectFromScreen:) ]) { + if ([ [ this->cocoaview window ] respondsToSelector:@selector(convertRectFromScreen:) ]) { pt = [ this->cocoaview convertPoint:[ [ this->cocoaview window ] convertRectFromScreen:NSMakeRect([ event locationInWindow ].x, [ event locationInWindow ].y, 0, 0) ].origin fromView:nil ]; } else #endif { +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 pt = [ this->cocoaview convertPoint:[ [ this->cocoaview window ] convertScreenToBase:[ event locationInWindow ] ] fromView:nil ]; +#endif } } else { pt = [ event locationInWindow ]; diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm index a891182481..8475efb0fd 100644 --- a/src/video/cocoa/wnd_quickdraw.mm +++ b/src/video/cocoa/wnd_quickdraw.mm @@ -1,4 +1,4 @@ -/* $Id: wnd_quickdraw.mm 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -32,6 +32,7 @@ #include "cocoa_v.h" #include "../../core/math_func.hpp" #include "../../gfx_func.h" +#include "../../framerate_type.h" /** * Important notice regarding all modifications!!!!!!! @@ -361,6 +362,8 @@ WindowQuickdrawSubdriver::~WindowQuickdrawSubdriver() void WindowQuickdrawSubdriver::Draw(bool force_update) { + PerformanceMeasurer framerate(PFE_VIDEO); + /* Check if we need to do anything */ if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return; diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index 18c3c4f605..47fa64231a 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -1,4 +1,4 @@ -/* $Id: dedicated_v.cpp 27673 2016-10-30 18:22:55Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -57,16 +57,12 @@ static void OS2_SwitchToConsoleMode() } #endif -#if defined(UNIX) || defined(PSP) +#if defined(UNIX) # include /* gettimeofday */ # include # include # include # define STDIN 0 /* file descriptor for standard input */ -# if defined(PSP) -# include -# include -# endif /* PSP */ /* Signal handlers */ static void DedicatedSignalHandler(int sig) @@ -77,11 +73,9 @@ static void DedicatedSignalHandler(int sig) } #endif -#if defined(WIN32) +#if defined(_WIN32) # include /* GetTickCount */ -# if !defined(WINCE) -# include -# endif +# include # include # include # include "../os/windows/win32.h" @@ -92,10 +86,6 @@ static char _win_console_thread_buffer[200]; /* Windows Console thread. Just loop and signal when input has been received */ static void WINAPI CheckForConsoleInput() { -#if defined(WINCE) - /* WinCE doesn't support console stuff */ - return; -#else SetWin32ThreadName(-1, "ottd:win-console"); DWORD nb; @@ -110,7 +100,6 @@ static void WINAPI CheckForConsoleInput() SetEvent(_hInputReady); WaitForSingleObject(_hWaitForInputHandling, INFINITE); } -#endif } static void CreateWindowsConsoleThread() @@ -161,9 +150,7 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm) ScreenSizeChanged(); BlitterFactory::GetCurrentBlitter()->PostResize(); -#if defined(WINCE) - /* WinCE doesn't support console stuff */ -#elif defined(WIN32) +#if defined(_WIN32) /* For win32 we need to allocate a console (debug mode does the same) */ CreateConsole(); CreateWindowsConsoleThread(); @@ -186,7 +173,7 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm) void VideoDriver_Dedicated::Stop() { -#ifdef WIN32 +#ifdef _WIN32 CloseWindowsConsoleThread(); #endif free(_dedicated_video_mem); @@ -196,7 +183,7 @@ void VideoDriver_Dedicated::MakeDirty(int left, int top, int width, int height) bool VideoDriver_Dedicated::ChangeResolution(int w, int h) { return false; } bool VideoDriver_Dedicated::ToggleFullscreen(bool fs) { return false; } -#if defined(UNIX) || defined(__OS2__) || defined(PSP) +#if defined(UNIX) || defined(__OS2__) static bool InputWaiting() { struct timeval tv; @@ -242,7 +229,7 @@ static void DedicatedHandleKeyInput() if (_exit_game) return; -#if defined(UNIX) || defined(__OS2__) || defined(PSP) +#if defined(UNIX) || defined(__OS2__) if (fgets(input_line, lengthof(input_line), stdin) == NULL) return; #else /* Handle console input, and signal console thread, it can accept input again */ @@ -269,7 +256,7 @@ void VideoDriver_Dedicated::MainLoop() uint32 next_tick = cur_ticks + MILLISECONDS_PER_TICK; /* Signal handlers */ -#if defined(UNIX) || defined(PSP) +#if defined(UNIX) signal(SIGTERM, DedicatedSignalHandler); signal(SIGINT, DedicatedSignalHandler); signal(SIGQUIT, DedicatedSignalHandler); diff --git a/src/video/dedicated_v.h b/src/video/dedicated_v.h index a8db37fde9..0c1477d66d 100644 --- a/src/video/dedicated_v.h +++ b/src/video/dedicated_v.h @@ -1,4 +1,4 @@ -/* $Id: dedicated_v.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index f3995dc431..5037814e5b 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -1,4 +1,4 @@ -/* $Id: null_v.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/null_v.h b/src/video/null_v.h index cdf85280fe..9e04e177ef 100644 --- a/src/video/null_v.h +++ b/src/video/null_v.h @@ -1,4 +1,4 @@ -/* $Id: null_v.h 26108 2013-11-25 14:30:22Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 5c282ecd22..ef705b6059 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -1,4 +1,4 @@ -/* $Id: sdl_v.cpp 27775 2017-03-11 13:05:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,6 +23,7 @@ #include "../core/random_func.hpp" #include "../core/math_func.hpp" #include "../fileio_func.h" +#include "../framerate_type.h" #include "sdl_v.h" #include @@ -148,6 +149,8 @@ static void CheckPaletteAnim() static void DrawSurfaceToScreen() { + PerformanceMeasurer framerate(PFE_VIDEO); + int n = _num_dirty_rects; if (n == 0) return; @@ -261,7 +264,7 @@ static void GetAvailableVideoMode(uint *w, uint *h) *h = _resolutions[best].height; } -#ifdef WIN32 +#ifdef _WIN32 /* Let's redefine the LoadBMP macro with because we are dynamically * loading SDL and need to 'SDL_CALL' all functions */ #undef SDL_LoadBMP @@ -323,7 +326,7 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h) want_hwpalette = _use_hwpalette; } - if (want_hwpalette) DEBUG(driver, 1, "SDL: requesting hardware palete"); + if (want_hwpalette) DEBUG(driver, 1, "SDL: requesting hardware palette"); /* Free any previously allocated shadow surface */ if (_sdl_screen != NULL && _sdl_screen != _sdl_realscreen) SDL_CALL SDL_FreeSurface(_sdl_screen); @@ -505,7 +508,7 @@ static uint ConvertSdlKeyIntoMy(SDL_keysym *sym, WChar *character) } /* check scancode for BACKQUOTE key, because we want the key left of "1", not anything else (on non-US keyboards) */ -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) if (sym->scancode == 41) key = WKC_BACKQUOTE; #elif defined(__APPLE__) if (sym->scancode == 10) key = WKC_BACKQUOTE; diff --git a/src/video/sdl_v.h b/src/video/sdl_v.h index 0a38e35bb0..8855c3566e 100644 --- a/src/video/sdl_v.h +++ b/src/video/sdl_v.h @@ -1,4 +1,4 @@ -/* $Id: sdl_v.h 27775 2017-03-11 13:05:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index 3e6b328ce7..5cb3c6cc3f 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -1,4 +1,4 @@ -/* $Id: video_driver.hpp 27775 2017-03-11 13:05:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 5d75724911..0ffe2669d4 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -1,4 +1,4 @@ -/* $Id: win32_v.cpp 27935 2017-12-09 19:21:45Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -23,6 +23,7 @@ #include "../progress.h" #include "../window_gui.h" #include "../window_func.h" +#include "../framerate_type.h" #include "win32_v.h" #include #include @@ -38,6 +39,9 @@ #define PM_QS_INPUT 0x20000 #endif +typedef BOOL (WINAPI *PFNTRACKMOUSEEVENT)(LPTRACKMOUSEEVENT lpEventTrack); +static PFNTRACKMOUSEEVENT _pTrackMouseEvent = NULL; + static struct { HWND main_wnd; HBITMAP dib_sect; @@ -57,9 +61,7 @@ bool _force_full_redraw; bool _window_maximize; uint _display_hz; static Dimension _bck_resolution; -#if !defined(WINCE) || _WIN32_WCE >= 0x400 DWORD _imm_props; -#endif /** Whether the drawing is/may be done in a separate thread. */ static bool _draw_threaded; @@ -236,7 +238,7 @@ int RedrawScreenDebug() #define TID_POLLMOUSE 1 #define MOUSE_POLL_DELAY 75 -static void CALLBACK TrackMouseTimerProc(HWND hwnd, UINT msg, UINT event, DWORD time) +static void CALLBACK TrackMouseTimerProc(HWND hwnd, UINT msg, UINT_PTR event, DWORD time) { RECT rc; POINT pt; @@ -269,9 +271,6 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen) _wnd.main_wnd = 0; } -#if defined(WINCE) - /* WinCE is always fullscreen */ -#else if (full_screen) { DEVMODE settings; @@ -315,7 +314,6 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen) _wnd.width = _bck_resolution.width; _wnd.height = _bck_resolution.height; } -#endif { RECT r; @@ -334,22 +332,20 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen) SetRect(&r, 0, 0, _wnd.width, _wnd.height); } -#if !defined(WINCE) AdjustWindowRect(&r, style, FALSE); -#endif w = r.right - r.left; h = r.bottom - r.top; if (_wnd.main_wnd != NULL) { if (!_window_maximize) SetWindowPos(_wnd.main_wnd, 0, 0, 0, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOMOVE); } else { - TCHAR Windowtitle[50]; int x = (GetSystemMetrics(SM_CXSCREEN) - w) / 2; int y = (GetSystemMetrics(SM_CYSCREEN) - h) / 2; - _sntprintf(Windowtitle, lengthof(Windowtitle), _T("OpenTTD %s"), MB_TO_WIDE(_openttd_revision)); + char window_title[64]; + seprintf(window_title, lastof(window_title), "OpenTTD %s", _openttd_revision); - _wnd.main_wnd = CreateWindow(_T("OTTD"), Windowtitle, style, x, y, w, h, 0, 0, GetModuleHandle(NULL), 0); + _wnd.main_wnd = CreateWindow(_T("OTTD"), MB_TO_WIDE(window_title), style, x, y, w, h, 0, 0, GetModuleHandle(NULL), 0); if (_wnd.main_wnd == NULL) usererror("CreateWindow failed"); ShowWindow(_wnd.main_wnd, showstyle); } @@ -364,6 +360,8 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen) /** Do palette animation and blit to the window. */ static void PaintWindow(HDC dc) { + PerformanceMeasurer framerate(PFE_VIDEO); + HDC dc2 = CreateCompatibleDC(dc); HBITMAP old_bmp = (HBITMAP)SelectObject(dc2, _wnd.dib_sect); HPALETTE old_palette = SelectPalette(dc, _wnd.gdi_palette, FALSE); @@ -494,7 +492,6 @@ static LRESULT HandleCharMsg(uint keycode, WChar charcode) return 0; } -#if !defined(WINCE) || _WIN32_WCE >= 0x400 /** Should we draw the composition string ourself, i.e is this a normal IME? */ static bool DrawIMECompositionString() { @@ -631,15 +628,6 @@ static void CancelIMEComposition(HWND hwnd) HandleTextInput(NULL, true); } -#else - -static bool DrawIMECompositionString() { return false; } -static void SetCompositionPos(HWND hwnd) {} -static void SetCandidatePos(HWND hwnd) {} -static void CancelIMEComposition(HWND hwnd) {} - -#endif /* !defined(WINCE) || _WIN32_WCE >= 0x400 */ - static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static uint32 keycode = 0; @@ -648,11 +636,9 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP switch (msg) { case WM_CREATE: - SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, (TIMERPROC)TrackMouseTimerProc); + SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, TrackMouseTimerProc); SetCompositionPos(hwnd); -#if !defined(WINCE) || _WIN32_WCE >= 0x400 _imm_props = ImmGetProperty(GetKeyboardLayout(0), IGP_PROPERTY); -#endif break; case WM_ENTERSIZEMOVE: @@ -747,7 +733,16 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP * tracking the mouse for exiting the window */ if (!_cursor.in_window) { _cursor.in_window = true; - SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, (TIMERPROC)TrackMouseTimerProc); + if (_pTrackMouseEvent != NULL) { + TRACKMOUSEEVENT tme; + tme.cbSize = sizeof(tme); + tme.dwFlags = TME_LEAVE; + tme.hwndTrack = hwnd; + + _pTrackMouseEvent(&tme); + } else { + SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, TrackMouseTimerProc); + } } if (_cursor.fix_at) { @@ -772,7 +767,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return 0; } -#if !defined(WINCE) || _WIN32_WCE >= 0x400 case WM_INPUTLANGCHANGE: _imm_props = ImmGetProperty(GetKeyboardLayout(0), IGP_PROPERTY); break; @@ -808,7 +802,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP } HandleCharMsg(0, GB(wParam, 0, 8)); return 0; -#endif #endif case WM_DEADCHAR: @@ -902,7 +895,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP } return 0; -#if !defined(WINCE) case WM_SIZING: { RECT *r = (RECT*)lParam; RECT r2; @@ -960,7 +952,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP } return TRUE; } -#endif /* needed for wheel */ #if !defined(WM_MOUSEWHEEL) @@ -991,7 +982,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP _wnd.has_focus = false; break; -#if !defined(WINCE) case WM_ACTIVATE: { /* Don't do anything if we are closing openttd */ if (_exit_game) break; @@ -1011,7 +1001,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP } break; } -#endif } return DefWindowProc(hwnd, msg, wParam, lParam); @@ -1038,6 +1027,9 @@ static void RegisterWndClass() registered = true; if (!RegisterClass(&wnd)) usererror("RegisterClass failed"); + + /* Dynamically load mouse tracking, as it doesn't exist on Windows 95. */ + _pTrackMouseEvent = (PFNTRACKMOUSEEVENT)GetProcAddress(GetModuleHandle(_T("User32")), "TrackMouseEvent"); } } @@ -1097,10 +1089,6 @@ static const Dimension default_resolutions[] = { static void FindResolutions() { uint n = 0; -#if defined(WINCE) - /* EnumDisplaySettingsW is only supported in CE 4.2+ - * XXX -- One might argue that we assume 4.2+ on every system. Then we can use this function safely */ -#else uint i; DEVMODEA dm; @@ -1130,7 +1118,6 @@ static void FindResolutions() } } } -#endif /* We have found no resolutions, show the default list */ if (n == 0) { @@ -1176,9 +1163,7 @@ void VideoDriver_Win32::Stop() DeleteObject(_wnd.dib_sect); DestroyWindow(_wnd.main_wnd); -#if !defined(WINCE) if (_wnd.fullscreen) ChangeDisplaySettings(NULL, 0); -#endif MyShowCursor(true); } @@ -1281,10 +1266,8 @@ void VideoDriver_Win32::MainLoop() if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged(); -#if !defined(WINCE) /* Flush GDI buffer to ensure we don't conflict with the drawing thread. */ GdiFlush(); -#endif /* The game loop is the part that can run asynchronously. * The rest except sleeping can't. */ @@ -1297,10 +1280,8 @@ void VideoDriver_Win32::MainLoop() UpdateWindows(); CheckPaletteAnim(); } else { -#if !defined(WINCE) /* Flush GDI buffer to ensure we don't conflict with the drawing thread. */ GdiFlush(); -#endif /* Release the thread while sleeping */ if (_draw_threaded) _draw_mutex->EndCritical(); diff --git a/src/video/win32_v.h b/src/video/win32_v.h index 001e8cffb1..7609d0422d 100644 --- a/src/video/win32_v.h +++ b/src/video/win32_v.h @@ -1,4 +1,4 @@ -/* $Id: win32_v.h 27775 2017-03-11 13:05:54Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/viewport.cpp b/src/viewport.cpp index 202082c69d..4b77b421e0 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1,4 +1,4 @@ -/* $Id: viewport.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -58,7 +58,7 @@ * * * Rows are horizontal sections of the viewport, also half a tile wide. - * This time the nothern most tile on the map defines 0 and + * This time the northern most tile on the map defines 0 and * everything south of that has a positive number. */ @@ -87,6 +87,10 @@ #include "linkgraph/linkgraph_gui.h" #include "viewport_sprite_sorter.h" #include "tunnelbridge_map.h" +#include "company_base.h" +#include "command_func.h" +#include "network/network_func.h" +#include "framerate_type.h" #include @@ -432,65 +436,27 @@ ViewPort *IsPtInWindowViewport(const Window *w, int x, int y) } /** - * Translate screen coordinate in a viewport to a tile coordinate + * Translate screen coordinate in a viewport to underlying tile coordinate. + * + * Returns exact point of the map that is visible in the given place + * of the viewport (3D perspective), height of tiles and foundations matter. + * * @param vp Viewport that contains the (\a x, \a y) screen coordinate - * @param x Screen x coordinate - * @param y Screen y coordinate - * @param clamp_to_map Clamp the coordinate outside of the map to the closest tile within the map. - * @return Tile coordinate + * @param x Screen x coordinate, distance in pixels from the left edge of viewport frame + * @param y Screen y coordinate, distance in pixels from the top edge of viewport frame + * @param clamp_to_map Clamp the coordinate outside of the map to the closest, non-void tile within the map + * @return Tile coordinate or (-1, -1) if given x or y is not within viewport frame */ Point TranslateXYToTileCoord(const ViewPort *vp, int x, int y, bool clamp_to_map) { - Point pt; - int a, b; - int z; - - if ( (uint)(x -= vp->left) >= (uint)vp->width || - (uint)(y -= vp->top) >= (uint)vp->height) { - Point pt = {-1, -1}; - return pt; + if (!IsInsideBS(x, vp->left, vp->width) || !IsInsideBS(y, vp->top, vp->height)) { + Point pt = { -1, -1 }; + return pt; } - x = (ScaleByZoom(x, vp->zoom) + vp->virtual_left) >> (2 + ZOOM_LVL_SHIFT); - y = (ScaleByZoom(y, vp->zoom) + vp->virtual_top) >> (1 + ZOOM_LVL_SHIFT); - - a = y - x; - b = y + x; - - if (clamp_to_map) { - /* Bring the coordinates near to a valid range. This is mostly due to the - * tiles on the north side of the map possibly being drawn too high due to - * the extra height levels. So at the top we allow a number of extra tiles. - * This number is based on the tile height and pixels. */ - int extra_tiles = CeilDiv(_settings_game.construction.max_heightlevel * TILE_HEIGHT, TILE_PIXELS); - a = Clamp(a, -extra_tiles * TILE_SIZE, MapMaxX() * TILE_SIZE - 1); - b = Clamp(b, -extra_tiles * TILE_SIZE, MapMaxY() * TILE_SIZE - 1); - } - - /* (a, b) is the X/Y-world coordinate that belongs to (x,y) if the landscape would be completely flat on height 0. - * Now find the Z-world coordinate by fix point iteration. - * This is a bit tricky because the tile height is non-continuous at foundations. - * The clicked point should be approached from the back, otherwise there are regions that are not clickable. - * (FOUNDATION_HALFTILE_LOWER on SLOPE_STEEP_S hides north halftile completely) - * So give it a z-malus of 4 in the first iterations. - */ - z = 0; - - int min_coord = _settings_game.construction.freeform_edges ? TILE_SIZE : 0; - - for (int i = 0; i < 5; i++) z = GetSlopePixelZ(Clamp(a + max(z, 4) - 4, min_coord, MapMaxX() * TILE_SIZE - 1), Clamp(b + max(z, 4) - 4, min_coord, MapMaxY() * TILE_SIZE - 1)) / 2; - for (int malus = 3; malus > 0; malus--) z = GetSlopePixelZ(Clamp(a + max(z, malus) - malus, min_coord, MapMaxX() * TILE_SIZE - 1), Clamp(b + max(z, malus) - malus, min_coord, MapMaxY() * TILE_SIZE - 1)) / 2; - for (int i = 0; i < 5; i++) z = GetSlopePixelZ(Clamp(a + z, min_coord, MapMaxX() * TILE_SIZE - 1), Clamp(b + z, min_coord, MapMaxY() * TILE_SIZE - 1)) / 2; - - if (clamp_to_map) { - pt.x = Clamp(a + z, min_coord, MapMaxX() * TILE_SIZE - 1); - pt.y = Clamp(b + z, min_coord, MapMaxY() * TILE_SIZE - 1); - } else { - pt.x = a + z; - pt.y = b + z; - } - - return pt; + return InverseRemapCoords2( + ScaleByZoom(x - vp->left, vp->zoom) + vp->virtual_left, + ScaleByZoom(y - vp->top, vp->zoom) + vp->virtual_top, clamp_to_map); } /* When used for zooming, check area below current coordinates (x,y) @@ -1699,6 +1665,8 @@ static inline void ViewportDraw(const ViewPort *vp, int left, int top, int right */ void Window::DrawViewport() const { + PerformanceAccumulator framerate(PFE_DRAWWORLD); + DrawPixelInfo *dpi = _cur_dpi; dpi->left += this->left; @@ -1711,121 +1679,33 @@ void Window::DrawViewport() const } /** - * Continue criteria for the SearchMapEdge function. - * @param iter Value to check. - * @param iter_limit Maximum value for the iter - * @param sy Screen y coordinate calculated for the tile at hand - * @param sy_limit Limit to the screen y coordinate - * @return True when we should continue searching. + * Ensure that a given viewport has a valid scroll position. + * + * There must be a visible piece of the map in the center of the viewport. + * If there isn't, the viewport will be scrolled to nearest such location. + * + * @param vp The viewport. + * @param[in,out] scroll_x Viewport X scroll. + * @param[in,out] scroll_y Viewport Y scroll. */ -typedef bool ContinueMapEdgeSearch(int iter, int iter_limit, int sy, int sy_limit); - -/** Continue criteria for searching a no-longer-visible tile in negative direction, starting at some tile. */ -static inline bool ContinueLowerMapEdgeSearch(int iter, int iter_limit, int sy, int sy_limit) { return iter > 0 && sy > sy_limit; } -/** Continue criteria for searching a no-longer-visible tile in positive direction, starting at some tile. */ -static inline bool ContinueUpperMapEdgeSearch(int iter, int iter_limit, int sy, int sy_limit) { return iter < iter_limit && sy < sy_limit; } - -/** - * Searches, starting at the given tile, by applying the given offset to iter, for a no longer visible tile. - * The whole sense of this function is keeping the to-be-written code small, thus it is a little bit abstracted - * so the same function can be used for both the X and Y locations. As such a reference to one of the elements - * in curr_tile was needed. - * @param curr_tile A tile - * @param iter Reference to either the X or Y of curr_tile. - * @param iter_limit Upper search limit for the iter value. - * @param offset Search in steps of this size - * @param sy_limit Search limit to be passed to the criteria - * @param continue_criteria Search as long as this criteria is true - * @return The final value of iter. - */ -static int SearchMapEdge(Point &curr_tile, int &iter, int iter_limit, int offset, int sy_limit, ContinueMapEdgeSearch continue_criteria) +static inline void ClampViewportToMap(const ViewPort *vp, int *scroll_x, int *scroll_y) { - int sy; - do { - iter = Clamp(iter + offset, 0, iter_limit); - sy = GetViewportY(curr_tile); - } while (continue_criteria(iter, iter_limit, sy, sy_limit)); + /* Centre of the viewport is hot spot. */ + Point pt = { + *scroll_x + vp->virtual_width / 2, + *scroll_y + vp->virtual_height / 2 + }; - return iter; -} + /* Find nearest tile that is within borders of the map. */ + bool clamped; + pt = InverseRemapCoords2(pt.x, pt.y, true, &clamped); -/** - * Determine the clamping of either the X or Y coordinate to the map. - * @param curr_tile A tile - * @param iter Reference to either the X or Y of curr_tile. - * @param iter_limit Upper search limit for the iter value. - * @param start Start value for the iteration. - * @param other_ref Reference to the opposite axis in curr_tile than of iter. - * @param other_value Start value for of the opposite axis - * @param vp_value Value of the viewport location in the opposite axis as for iter. - * @param other_limit Limit for the other value, so if iter is X, then other_limit is for Y. - * @param vp_top Top of the viewport. - * @param vp_bottom Bottom of the viewport. - * @return Clamped version of vp_value. - */ -static inline int ClampXYToMap(Point &curr_tile, int &iter, int iter_limit, int start, int &other_ref, int other_value, int vp_value, int other_limit, int vp_top, int vp_bottom) -{ - bool upper_edge = other_value < _settings_game.construction.max_heightlevel / 4; - - /* - * First get an estimate of the tiles relevant for us at that edge. Relevant in the sense - * "at least close to the visible area". Thus, we don't look at exactly each tile, inspecting - * e.g. every tenth should be enough. After all, the desired screen limit is set such that - * the bordermost tiles are painted in the middle of the screen when one hits the limit, - * i.e. it is no harm if there is some small error in that calculation - */ - - other_ref = upper_edge ? 0 : other_limit; - iter = start; - int min_iter = SearchMapEdge(curr_tile, iter, iter_limit, upper_edge ? -10 : +10, vp_top, upper_edge ? ContinueLowerMapEdgeSearch : ContinueUpperMapEdgeSearch); - iter = start; - int max_iter = SearchMapEdge(curr_tile, iter, iter_limit, upper_edge ? +10 : -10, vp_bottom, upper_edge ? ContinueUpperMapEdgeSearch : ContinueLowerMapEdgeSearch); - - max_iter = min(max_iter + _settings_game.construction.max_heightlevel / 4, iter_limit); - min_iter = min(min_iter, max_iter); - - /* Now, calculate the highest heightlevel of these tiles. Again just as an estimate. */ - int max_heightlevel_at_edge = 0; - for (iter = min_iter; iter <= max_iter; iter += 10) { - max_heightlevel_at_edge = max(max_heightlevel_at_edge, (int)TileHeight(TileXY(curr_tile.x, curr_tile.y))); + if (clamped) { + /* Convert back to viewport coordinates and remove centering. */ + pt = RemapCoords2(pt.x, pt.y); + *scroll_x = pt.x - vp->virtual_width / 2; + *scroll_y = pt.y - vp->virtual_height / 2; } - - /* Based on that heightlevel, calculate the limit. For the upper edge a tile with height zero would - * get a limit of zero, on the other side it depends on the number of tiles along the axis. */ - return upper_edge ? - max(vp_value, -max_heightlevel_at_edge * (int)(TILE_HEIGHT * 2 * ZOOM_LVL_BASE)) : - min(vp_value, (other_limit * TILE_SIZE * 4 - max_heightlevel_at_edge * TILE_HEIGHT * 2) * ZOOM_LVL_BASE); -} - -static inline void ClampViewportToMap(const ViewPort *vp, int &x, int &y) -{ - int original_y = y; - - /* Centre of the viewport is hot spot */ - x += vp->virtual_width / 2; - y += vp->virtual_height / 2; - - /* Convert viewport coordinates to map coordinates - * Calculation is scaled by 4 to avoid rounding errors */ - int vx = -x + y * 2; - int vy = x + y * 2; - - /* Find out which tile corresponds to (vx,vy) if one assumes height zero. The cast is necessary to prevent C++ from - * converting the result to an uint, which gives an overflow instead of a negative result... */ - int tx = vx / (int)(TILE_SIZE * 4 * ZOOM_LVL_BASE); - int ty = vy / (int)(TILE_SIZE * 4 * ZOOM_LVL_BASE); - - Point curr_tile; - vx = ClampXYToMap(curr_tile, curr_tile.y, MapMaxY(), ty, curr_tile.x, tx, vx, MapMaxX(), original_y, original_y + vp->virtual_height); - vy = ClampXYToMap(curr_tile, curr_tile.x, MapMaxX(), tx, curr_tile.y, ty, vy, MapMaxY(), original_y, original_y + vp->virtual_height); - - /* Convert map coordinates to viewport coordinates */ - x = (-vx + vy) / 2; - y = ( vx + vy) / 4; - - /* Remove centering */ - x -= vp->virtual_width / 2; - y -= vp->virtual_height / 2; } /** @@ -1845,7 +1725,7 @@ void UpdateViewportPosition(Window *w) SetViewportPosition(w, pt.x, pt.y); } else { /* Ensure the destination location is within the map */ - ClampViewportToMap(vp, w->viewport->dest_scrollpos_x, w->viewport->dest_scrollpos_y); + ClampViewportToMap(vp, &w->viewport->dest_scrollpos_x, &w->viewport->dest_scrollpos_y); int delta_x = w->viewport->dest_scrollpos_x - w->viewport->scrollpos_x; int delta_y = w->viewport->dest_scrollpos_y - w->viewport->scrollpos_y; @@ -1855,8 +1735,8 @@ void UpdateViewportPosition(Window *w) if (_settings_client.gui.smooth_scroll) { int max_scroll = ScaleByMapSize1D(512 * ZOOM_LVL_BASE); /* Not at our desired position yet... */ - w->viewport->scrollpos_x += Clamp(delta_x / 4, -max_scroll, max_scroll); - w->viewport->scrollpos_y += Clamp(delta_y / 4, -max_scroll, max_scroll); + w->viewport->scrollpos_x += Clamp(DivAwayFromZero(delta_x, 4), -max_scroll, max_scroll); + w->viewport->scrollpos_y += Clamp(DivAwayFromZero(delta_y, 4), -max_scroll, max_scroll); } else { w->viewport->scrollpos_x = w->viewport->dest_scrollpos_x; w->viewport->scrollpos_y = w->viewport->dest_scrollpos_y; @@ -1865,7 +1745,7 @@ void UpdateViewportPosition(Window *w) w->viewport->scrollpos_y == w->viewport->dest_scrollpos_y); } - ClampViewportToMap(vp, w->viewport->scrollpos_x, w->viewport->scrollpos_y); + ClampViewportToMap(vp, &w->viewport->scrollpos_x, &w->viewport->scrollpos_y); SetViewportPosition(w, w->viewport->scrollpos_x, w->viewport->scrollpos_y); if (update_overlay) RebuildViewportOverlay(w); @@ -1947,11 +1827,12 @@ void ConstrainAllViewportsZoom() * Mark a tile given by its index dirty for repaint. * @param tile The tile to mark dirty. * @param bridge_level_offset Height of bridge on tile to also mark dirty. (Height level relative to north corner.) + * @param tile_height_override Height of the tile (#TileHeight). * @ingroup dirty */ -void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset) +void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset, int tile_height_override) { - Point pt = RemapCoords(TileX(tile) * TILE_SIZE, TileY(tile) * TILE_SIZE, TilePixelHeight(tile)); + Point pt = RemapCoords(TileX(tile) * TILE_SIZE, TileY(tile) * TILE_SIZE, tile_height_override * TILE_HEIGHT); MarkAllViewportsDirty( pt.x - MAX_TILE_EXTENT_LEFT, pt.y - MAX_TILE_EXTENT_TOP - ZOOM_LVL_BASE * TILE_HEIGHT * bridge_level_offset, @@ -1959,22 +1840,6 @@ void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset) pt.y + MAX_TILE_EXTENT_BOTTOM); } -/** - * Mark a (virtual) tile outside the map dirty for repaint. - * @param x Tile X position. - * @param y Tile Y position. - * @ingroup dirty - */ -void MarkTileDirtyByTileOutsideMap(int x, int y) -{ - Point pt = RemapCoords(x * TILE_SIZE, y * TILE_SIZE, TilePixelHeightOutsideMap(x, y)); - MarkAllViewportsDirty( - pt.x - MAX_TILE_EXTENT_LEFT, - pt.y, // no buildings outside of map - pt.x + MAX_TILE_EXTENT_RIGHT, - pt.y + MAX_TILE_EXTENT_BOTTOM); -} - /** * Marks the selected tiles as dirty. * @@ -2552,7 +2417,6 @@ void UpdateTileSelection() break; default: NOT_REACHED(); - break; } _thd.new_pos.x = x1 & ~TILE_UNIT_MASK; _thd.new_pos.y = y1 & ~TILE_UNIT_MASK; @@ -2769,8 +2633,8 @@ static int CalcHeightdiff(HighLightStyle style, uint distance, TileIndex start_t byte style_t = (byte)(TileX(end_tile) > TileX(start_tile)); start_tile = TILE_ADD(start_tile, ToTileIndexDiff(heightdiff_area_by_dir[style_t])); end_tile = TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_area_by_dir[2 + style_t])); + FALLTHROUGH; } - FALLTHROUGH; case HT_POINT: h0 = TileHeight(start_tile); @@ -3670,6 +3534,43 @@ void InitializeSpriteSorter() assert(_vp_sprite_sorter != NULL); } +/** + * Scroll players main viewport. + * @param tile tile to center viewport on + * @param flags type of operation + * @param p1 ViewportScrollTarget of scroll target + * @param p2 company or client id depending on the target + * @param text unused + * @return the cost of this operation or an error + */ +CommandCost CmdScrollViewport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) +{ + if (_current_company != OWNER_DEITY) return CMD_ERROR; + ViewportScrollTarget target = (ViewportScrollTarget)p1; + switch (target) { + case VST_EVERYONE: + break; + case VST_COMPANY: + if (_local_company != (CompanyID)p2) return CommandCost(); + break; + case VST_CLIENT: +#ifdef ENABLE_NETWORK + if (_network_own_client_id != (ClientID)p2) return CommandCost(); + break; +#else + return CommandCost(); +#endif + default: + return CMD_ERROR; + } + + if (flags & DC_EXEC) { + ResetObjectToPlace(); + ScrollMainWindowToTile(tile); + } + return CommandCost(); +} + /** * Construct a rail snapping point based on a spot where a rail tracks segment * has been placed. diff --git a/src/viewport_func.h b/src/viewport_func.h index adf37d2b8e..37653129a2 100644 --- a/src/viewport_func.h +++ b/src/viewport_func.h @@ -1,4 +1,4 @@ -/* $Id: viewport_func.h 27161 2015-02-22 14:42:34Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -15,7 +15,7 @@ #include "gfx_type.h" #include "viewport_type.h" #include "window_type.h" -#include "tile_type.h" +#include "tile_map.h" #include "station_type.h" static const int TILE_HEIGHT_STEP = 50; ///< One Z unit tile height difference is displayed as 50m. @@ -78,9 +78,18 @@ void UpdateAllVirtCoords(); extern Point _tile_fract_coords; -void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset = 0); +void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset, int tile_height_override); -void MarkTileDirtyByTileOutsideMap(int x, int y); +/** + * Mark a tile given by its index dirty for repaint. + * @param tile The tile to mark dirty. + * @param bridge_level_offset Height of bridge on tile to also mark dirty. (Height level relative to north corner.) + * @ingroup dirty + */ +static inline void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset = 0) +{ + MarkTileDirtyByTile(tile, bridge_level_offset, TileHeight(tile)); +} Point GetViewportStationMiddle(const ViewPort *vp, const Station *st); diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index 3015f1f70b..aecddd1ab2 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: viewport_gui.cpp 27743 2017-02-05 17:54:46Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -138,7 +138,7 @@ public: virtual void OnMouseWheel(int wheel) { - if (_settings_client.gui.scrollwheel_scrolling == 0) { + if (_settings_client.gui.scrollwheel_scrolling != 2) { ZoomInOrOutToCursorWindow(wheel < 0, this); } } diff --git a/src/viewport_sprite_sorter.h b/src/viewport_sprite_sorter.h index a430f868cf..324ece3020 100644 --- a/src/viewport_sprite_sorter.h +++ b/src/viewport_sprite_sorter.h @@ -1,4 +1,4 @@ -/* $Id: viewport_sprite_sorter.h 27916 2017-09-24 13:35:27Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/viewport_sprite_sorter_sse4.cpp b/src/viewport_sprite_sorter_sse4.cpp index 18615dcea7..fb78c51c86 100644 --- a/src/viewport_sprite_sorter_sse4.cpp +++ b/src/viewport_sprite_sorter_sse4.cpp @@ -1,4 +1,4 @@ -/* $Id: viewport_sprite_sorter_sse4.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/** @file viewport_sprite_sorter_sse.cpp Sprite sorter that uses SSE4.1. */ +/** @file viewport_sprite_sorter_sse4.cpp Sprite sorter that uses SSE4.1. */ #ifdef WITH_SSE diff --git a/src/viewport_type.h b/src/viewport_type.h index 273dc629ec..f2942298ad 100644 --- a/src/viewport_type.h +++ b/src/viewport_type.h @@ -1,4 +1,4 @@ -/* $Id: viewport_type.h 27248 2015-04-25 11:58:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -125,4 +125,14 @@ enum ViewportDragDropSelectionProcess { DDSP_REMOVE_TRUCKSTOP, ///< Road stop removal (trucks) }; + +/** + * Target of the viewport scrolling GS method + */ +enum ViewportScrollTarget { + VST_EVERYONE, ///< All players + VST_COMPANY, ///< All players in specific company + VST_CLIENT, ///< Single player +}; + #endif /* VIEWPORT_TYPE_H */ diff --git a/src/void_cmd.cpp b/src/void_cmd.cpp index 12e9cc653c..a2a45e7227 100644 --- a/src/void_cmd.cpp +++ b/src/void_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: void_cmd.cpp 26870 2014-09-21 08:19:32Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -10,7 +10,7 @@ /** @file void_cmd.cpp Handling of void tiles. */ #include "stdafx.h" -#include "tile_cmd.h" +#include "landscape.h" #include "command_func.h" #include "viewport_func.h" #include "slope_func.h" @@ -28,7 +28,12 @@ static void DrawTile_Void(TileInfo *ti) static int GetSlopePixelZ_Void(TileIndex tile, uint x, uint y) { - return TilePixelHeight(tile); + /* This function may be called on tiles outside the map, don't asssume + * that 'tile' is a valid tile index. See GetSlopePixelZOutsideMap. */ + int z; + Slope tileh = GetTilePixelSlopeOutsideMap(x >> 4, y >> 4, &z); + + return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh); } static Foundation GetFoundation_Void(TileIndex tile, Slope tileh) diff --git a/src/void_map.h b/src/void_map.h index 55bbf6936d..5ccc4e9d7d 100644 --- a/src/void_map.h +++ b/src/void_map.h @@ -1,4 +1,4 @@ -/* $Id: void_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/water.h b/src/water.h index d89cb717e2..cb7237fc7c 100644 --- a/src/water.h +++ b/src/water.h @@ -1,4 +1,4 @@ -/* $Id: water.h 25229 2013-05-06 20:48:18Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 3c6a601f28..31dafe57fa 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: water_cmd.cpp 27973 2018-03-05 22:57:49Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -895,7 +895,7 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td) case WATER_CLASS_SEA: td->str = STR_LAI_WATER_DESCRIPTION_WATER; break; case WATER_CLASS_CANAL: td->str = STR_LAI_WATER_DESCRIPTION_CANAL; break; case WATER_CLASS_RIVER: td->str = STR_LAI_WATER_DESCRIPTION_RIVER; break; - default: NOT_REACHED(); break; + default: NOT_REACHED(); } break; case WATER_TILE_COAST: td->str = STR_LAI_WATER_DESCRIPTION_COAST_OR_RIVERBANK; break; @@ -904,7 +904,7 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td) td->str = STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT; td->build_date = Depot::GetByTile(tile)->build_date; break; - default: NOT_REACHED(); break; + default: NOT_REACHED(); } td->owner[0] = GetTileOwner(tile); @@ -1218,7 +1218,7 @@ void ConvertGroundTilesIntoWaterTiles() default: uint dir; FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope & ~SLOPE_STEEP]) { - TileIndex dest = TILE_ADD(tile, TileOffsByDir((Direction)dir)); + TileIndex dest = TileAddByDir(tile, (Direction)dir); Slope slope_dest = GetTileSlope(dest) & ~SLOPE_STEEP; if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest)) { MakeShore(tile); @@ -1233,7 +1233,8 @@ void ConvertGroundTilesIntoWaterTiles() static TrackStatus GetTileTrackStatus_Water(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side) { - static const byte coast_tracks[] = {0, 32, 4, 0, 16, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0}; + static const TrackBits coast_tracks[] = {TRACK_BIT_NONE, TRACK_BIT_RIGHT, TRACK_BIT_UPPER, TRACK_BIT_NONE, TRACK_BIT_LEFT, TRACK_BIT_NONE, TRACK_BIT_NONE, + TRACK_BIT_NONE, TRACK_BIT_LOWER, TRACK_BIT_NONE, TRACK_BIT_NONE, TRACK_BIT_NONE, TRACK_BIT_NONE, TRACK_BIT_NONE, TRACK_BIT_NONE, TRACK_BIT_NONE}; TrackBits ts; @@ -1241,7 +1242,7 @@ static TrackStatus GetTileTrackStatus_Water(TileIndex tile, TransportType mode, switch (GetWaterTileType(tile)) { case WATER_TILE_CLEAR: ts = IsTileFlat(tile) ? TRACK_BIT_ALL : TRACK_BIT_NONE; break; - case WATER_TILE_COAST: ts = (TrackBits)coast_tracks[GetTileSlope(tile) & 0xF]; break; + case WATER_TILE_COAST: ts = coast_tracks[GetTileSlope(tile) & 0xF]; break; case WATER_TILE_LOCK: ts = DiagDirToDiagTrackBits(GetLockDirection(tile)); break; case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break; default: return 0; diff --git a/src/water_map.h b/src/water_map.h index 829110cf64..ab249a8279 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -1,4 +1,4 @@ -/* $Id: water_map.h 26878 2014-09-21 11:23:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/waypoint.cpp b/src/waypoint.cpp index f248fab629..857f8ba874 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -1,4 +1,4 @@ -/* $Id: waypoint.cpp 26482 2014-04-23 20:13:33Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/waypoint_base.h b/src/waypoint_base.h index 5c13c80a74..8d544a3b99 100644 --- a/src/waypoint_base.h +++ b/src/waypoint_base.h @@ -1,4 +1,4 @@ -/* $Id: waypoint_base.h 26085 2013-11-24 14:41:19Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 93ab44ab24..639dce13bc 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -1,4 +1,4 @@ -/* $Id: waypoint_cmd.cpp 27785 2017-03-12 15:32:40Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -148,7 +148,8 @@ extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta, * @param start_tile northern most tile where waypoint will be built * @param flags type of operation * @param p1 various bitstuffed elements - * - p1 = (bit 4) - orientation (Axis) + * - p1 = (bit 0- 5) - railtype (not used) + * - p1 = (bit 6) - orientation (Axis) * - p1 = (bit 8-15) - width of waypoint * - p1 = (bit 16-23) - height of waypoint * - p1 = (bit 24) - allow waypoints directly adjacent to other waypoints. @@ -161,7 +162,7 @@ extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta, CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { /* Unpack parameters */ - Axis axis = Extract(p1); + Axis axis = Extract(p1); byte width = GB(p1, 8, 8); byte height = GB(p1, 16, 8); bool adjacent = HasBit(p1, 24); diff --git a/src/waypoint_func.h b/src/waypoint_func.h index 7972173776..b44264dc13 100644 --- a/src/waypoint_func.h +++ b/src/waypoint_func.h @@ -1,4 +1,4 @@ -/* $Id: waypoint_func.h 21890 2011-01-22 14:52:20Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index b8b12c15dd..fa4deaac68 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -1,4 +1,4 @@ -/* $Id: waypoint_gui.cpp 27030 2014-10-21 19:16:47Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widget.cpp b/src/widget.cpp index 9fa0a6c3b8..ae19a99942 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1,4 +1,4 @@ -/* $Id: widget.cpp 27893 2017-08-13 18:38:42Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -756,7 +756,7 @@ NWidgetBase::NWidgetBase(WidgetType tp) : ZeroedMemoryAllocator() */ /** - * @fn void FillNestedArray(NWidgetBase **array, uint length) + * @fn void NWidgetBase::FillNestedArray(NWidgetBase **array, uint length) * Fill the Window::nested_array array with pointers to nested widgets in the tree. * @param array Base pointer of the array. * @param length Length of the array. @@ -1674,10 +1674,10 @@ NWidgetCore *NWidgetMatrix::GetWidgetFromPos(int x, int y) /** * Get the different offsets that are influenced by scrolling. - * @param [out] start_x The start position in columns (index of the left-most column, swapped in RTL). - * @param [out] start_y The start position in rows. - * @param [out] base_offs_x The base horizontal offset in pixels (X position of the column \a start_x). - * @param [out] base_offs_y The base vertical offset in pixels (Y position of the column \a start_y). + * @param[out] start_x The start position in columns (index of the left-most column, swapped in RTL). + * @param[out] start_y The start position in rows. + * @param[out] base_offs_x The base horizontal offset in pixels (X position of the column \a start_x). + * @param[out] base_offs_y The base vertical offset in pixels (Y position of the column \a start_y). */ void NWidgetMatrix::GetScrollOffsets(int &start_x, int &start_y, int &base_offs_x, int &base_offs_y) { @@ -2806,7 +2806,7 @@ NWidgetContainer *MakeNWidgets(const NWidgetPart *parts, int count, int *biggest * @param parts Array with parts of the widgets. * @param count Length of the \a parts array. * @param biggest_index Pointer to biggest nested widget index collected in the tree. - * @param [out] shade_select Pointer to the inserted shade selection widget (\c NULL if not unserted). + * @param[out] shade_select Pointer to the inserted shade selection widget (\c NULL if not unserted). * @return Root of the nested widget tree, a vertical container containing the entire GUI. * @ingroup NestedWidgetParts * @pre \c biggest_index != NULL diff --git a/src/widget_type.h b/src/widget_type.h index b0b3d8c85f..33fb8bce08 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -1,4 +1,4 @@ -/* $Id: widget_type.h 27900 2017-08-27 11:48:38Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -257,7 +257,7 @@ enum NWidgetDisplay { NDB_SHADE_GREY = 3, ///< Shade viewport to grey-scale. NDB_SHADE_DIMMED = 4, ///< Display dimmed colours in the viewport. /* Button dropdown widget. */ - NDB_DROPDOWN_ACTIVE = 5, ///< Dropdown menu of the button dropdown widget is active. @see #NWID_BUTTON_DRPDOWN + NDB_DROPDOWN_ACTIVE = 5, ///< Dropdown menu of the button dropdown widget is active. @see #NWID_BUTTON_DROPDOWN /* Scrollbar widget. */ NDB_SCROLLBAR_UP = 6, ///< Up-button is lowered bit. NDB_SCROLLBAR_DOWN = 7, ///< Down-button is lowered bit. @@ -400,7 +400,7 @@ enum StackedZeroSizePlanes { * There are also a number of special planes (defined in #StackedZeroSizePlanes) that have zero size in one direction (and are stretchable in * the other direction) or have zero size in both directions. They are used to make all child planes of the widget disappear. * Unlike switching between the regular display planes (that all have the same size), switching from or to one of the zero-sized planes means that - * a #Windows::ReInit() is needed to re-initialize the window since its size changes. + * a #Window::ReInit() is needed to re-initialize the window since its size changes. */ class NWidgetStacked : public NWidgetContainer { public: @@ -567,7 +567,7 @@ private: * Nested widget to display a viewport in a window. * After initializing the nested widget tree, call #InitializeViewport(). After changing the window size, * call #UpdateViewportCoordinates() eg from Window::OnResize(). - * If the #display_flags field contains the #ND_NO_TRANSPARENCY bit, the viewport will disable transparency. + * If the #disp_flags field contains the #ND_NO_TRANSPARENCY bit, the viewport will disable transparency. * Shading to grey-scale is controlled with the #ND_SHADE_GREY bit (used for B&W news papers), the #ND_SHADE_DIMMED gives dimmed colours (for colour news papers). * @todo Class derives from #NWidgetCore, but does not use #colour, #widget_data, or #tool_tip. * @ingroup NestedWidgets @@ -1124,8 +1124,8 @@ static inline NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx = -1) /** * Widget part function for starting a new horizontal container, vertical container, or spacer widget. - * @param tp Type of the new nested widget, #NWID_HORIZONTAL(_LTR), #NWID_VERTICAL, #NWID_SPACER, #NWID_SELECTION, and #NWID_MATRIX. - * @param cont_flags Flags for the containers (#NWID_HORIZONTAL(_LTR) and #NWID_VERTICAL). + * @param tp Type of the new nested widget, #NWID_HORIZONTAL, #NWID_VERTICAL, #NWID_SPACER, #NWID_SELECTION, and #NWID_MATRIX. + * @param cont_flags Flags for the containers (#NWID_HORIZONTAL and #NWID_VERTICAL). * @ingroup NestedWidgetParts */ static inline NWidgetPart NWidget(WidgetType tp, NWidContainerFlags cont_flags = NC_NONE) diff --git a/src/widgets/ai_widget.h b/src/widgets/ai_widget.h index 91f464c515..b6ef02fa55 100644 --- a/src/widgets/ai_widget.h +++ b/src/widgets/ai_widget.h @@ -1,4 +1,4 @@ -/* $Id: ai_widget.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/airport_widget.h b/src/widgets/airport_widget.h index 94d156a5bb..f0d2113328 100644 --- a/src/widgets/airport_widget.h +++ b/src/widgets/airport_widget.h @@ -1,4 +1,4 @@ -/* $Id: airport_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/autoreplace_widget.h b/src/widgets/autoreplace_widget.h index 13163ef461..4b761ca45d 100644 --- a/src/widgets/autoreplace_widget.h +++ b/src/widgets/autoreplace_widget.h @@ -1,4 +1,4 @@ -/* $Id: autoreplace_widget.h 27683 2016-12-08 20:21:39Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/bootstrap_widget.h b/src/widgets/bootstrap_widget.h index 96568c289c..a371a3bdb0 100644 --- a/src/widgets/bootstrap_widget.h +++ b/src/widgets/bootstrap_widget.h @@ -1,4 +1,4 @@ -/* $Id: bootstrap_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/bridge_widget.h b/src/widgets/bridge_widget.h index 863249afbb..942b230758 100644 --- a/src/widgets/bridge_widget.h +++ b/src/widgets/bridge_widget.h @@ -1,4 +1,4 @@ -/* $Id: bridge_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/build_vehicle_widget.h b/src/widgets/build_vehicle_widget.h index e00e756a7f..ae548587e2 100644 --- a/src/widgets/build_vehicle_widget.h +++ b/src/widgets/build_vehicle_widget.h @@ -1,4 +1,4 @@ -/* $Id: build_vehicle_widget.h 26811 2014-09-11 17:10:38Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/cheat_widget.h b/src/widgets/cheat_widget.h index 411fa3b045..3209cae239 100644 --- a/src/widgets/cheat_widget.h +++ b/src/widgets/cheat_widget.h @@ -1,4 +1,4 @@ -/* $Id: cheat_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -12,7 +12,7 @@ #ifndef WIDGETS_CHEAT_WIDGET_H #define WIDGETS_CHEAT_WIDGET_H -/** Widgets of the #CheatWindow class.. */ +/** Widgets of the #CheatWindow class. */ enum CheatWidgets { WID_C_PANEL, ///< Panel where all cheats are shown in. }; diff --git a/src/widgets/company_widget.h b/src/widgets/company_widget.h index 6df974ccb0..becd87f400 100644 --- a/src/widgets/company_widget.h +++ b/src/widgets/company_widget.h @@ -1,4 +1,4 @@ -/* $Id: company_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -92,10 +92,15 @@ enum SelectCompanyLiveryWidgets { WID_SCL_CLASS_ROAD, ///< Class road. WID_SCL_CLASS_SHIP, ///< Class ship. WID_SCL_CLASS_AIRCRAFT, ///< Class aircraft. + WID_SCL_GROUPS_RAIL, ///< Rail groups. + WID_SCL_GROUPS_ROAD, ///< Road groups. + WID_SCL_GROUPS_SHIP, ///< Ship groups. + WID_SCL_GROUPS_AIRCRAFT, ///< Aircraft groups. WID_SCL_SPACER_DROPDOWN, ///< Spacer for dropdown. WID_SCL_PRI_COL_DROPDOWN, ///< Dropdown for primary colour. WID_SCL_SEC_COL_DROPDOWN, ///< Dropdown for secondary colour. WID_SCL_MATRIX, ///< Matrix. + WID_SCL_MATRIX_SCROLLBAR, ///< Matrix scrollbar. }; diff --git a/src/widgets/console_widget.h b/src/widgets/console_widget.h index de4a291678..13fa2395cf 100644 --- a/src/widgets/console_widget.h +++ b/src/widgets/console_widget.h @@ -1,4 +1,4 @@ -/* $Id: console_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/date_widget.h b/src/widgets/date_widget.h index f7be076fa6..79476606df 100644 --- a/src/widgets/date_widget.h +++ b/src/widgets/date_widget.h @@ -1,4 +1,4 @@ -/* $Id: date_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/depot_widget.h b/src/widgets/depot_widget.h index 86592dc55a..5864564ceb 100644 --- a/src/widgets/depot_widget.h +++ b/src/widgets/depot_widget.h @@ -1,4 +1,4 @@ -/* $Id: depot_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/dock_widget.h b/src/widgets/dock_widget.h index 3bc17763ff..080282bd30 100644 --- a/src/widgets/dock_widget.h +++ b/src/widgets/dock_widget.h @@ -1,4 +1,4 @@ -/* $Id: dock_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 519bb971fe..33aed644bd 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -1,4 +1,4 @@ -/* $Id: dropdown.cpp 27820 2017-03-23 20:07:59Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,6 +14,7 @@ #include "../string_func.h" #include "../strings_func.h" #include "../window_func.h" +#include "../guitimer_func.h" #include "dropdown_type.h" #include "dropdown_widget.h" @@ -102,6 +103,7 @@ struct DropdownWindow : Window { bool drag_mode; bool instant_close; ///< Close the window when the mouse button is raised. int scrolling; ///< If non-zero, auto-scroll the item list (one time). + GUITimer scrolling_timer; ///< Timer for auto-scroll of the item list. Point position; ///< Position of the topleft corner of the window. Scrollbar *vscroll; @@ -116,7 +118,6 @@ struct DropdownWindow : Window { * @param size Size of the dropdown menu window. * @param wi_colour Colour of the parent widget. * @param scroll Dropdown menu has a scrollbar. - * @param widget Widgets of the dropdown menu window. */ DropdownWindow(Window *parent, const DropDownList *list, int selected, int button, bool instant_close, const Point &position, const Dimension &size, Colours wi_colour, bool scroll) : Window(&_dropdown_desc) @@ -161,6 +162,7 @@ struct DropdownWindow : Window { this->click_delay = 0; this->drag_mode = true; this->instant_close = instant_close; + this->scrolling_timer = GUITimer(MILLISECONDS_PER_TICK); } ~DropdownWindow() @@ -187,7 +189,7 @@ struct DropdownWindow : Window { /** * Find the dropdown item under the cursor. - * @param value [out] Selected item, if function returns \c true. + * @param[out] value Selected item, if function returns \c true. * @return Cursor points to a dropdown item. */ bool GetDropDownItem(int &value) @@ -260,8 +262,11 @@ struct DropdownWindow : Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!this->scrolling_timer.Elapsed(delta_ms)) return; + this->scrolling_timer.SetInterval(MILLISECONDS_PER_TICK); + if (this->scrolling != 0) { int pos = this->vscroll->GetPosition(); @@ -352,8 +357,8 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b /* Longest item in the list, if auto_width is enabled */ uint max_item_width = 0; - /* Total length of list */ - int height = 0; + /* Total height of list */ + uint height = 0; for (const DropDownListItem * const *it = list->Begin(); it != list->End(); ++it) { const DropDownListItem *item = *it; @@ -361,53 +366,58 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b if (auto_width) max_item_width = max(max_item_width, item->Width() + 5); } - /* Check if the status bar is visible, as we don't want to draw over it */ - int screen_bottom = GetMainViewBottom(); + /* Scrollbar needed? */ bool scroll = false; - /* Check if the dropdown will fully fit below the widget */ - if (top + height + 4 >= screen_bottom) { - /* If not, check if it will fit above the widget */ - int screen_top = GetMainViewTop(); - if (w->top + wi_rect.top > screen_top + height) { - top = w->top + wi_rect.top - height - 4; - } else { - /* If it doesn't fit above the widget, we need to enable a scrollbar... */ - int avg_height = height / (int)list->Length(); - scroll = true; + /* Is it better to place the dropdown above the widget? */ + bool above = false; - /* ... and choose whether to put the list above or below the widget. */ - bool put_above = false; - int available_height = screen_bottom - w->top - wi_rect.bottom; - if (w->top + wi_rect.top - screen_top > available_height) { - // Put it above. - available_height = w->top + wi_rect.top - screen_top; - put_above = true; - } + /* Available height below (or above, if the dropdown is placed above the widget). */ + uint available_height = (uint)max(GetMainViewBottom() - top - 4, 0); + + /* If the dropdown doesn't fully fit below the widget... */ + if (height > available_height) { + + uint available_height_above = (uint)max(w->top + wi_rect.top - GetMainViewTop() - 4, 0); + + /* Put the dropdown above if there is more available space. */ + if (available_height_above > available_height) { + above = true; + available_height = available_height_above; + } + + /* If the dropdown doesn't fully fit, we need a dropdown. */ + if (height > available_height) { + scroll = true; + uint avg_height = height / list->Length(); /* Check at least there is space for one item. */ assert(available_height >= avg_height); - /* And lastly, fit the list... */ - int rows = available_height / avg_height; + /* Fit the list. */ + uint rows = available_height / avg_height; height = rows * avg_height; - /* Add space for the scroll bar if we automatically determined - * the width of the list. */ + /* Add space for the scrollbar. */ max_item_width += NWidgetScrollbar::GetVerticalDimension().width; + } - /* ... and set the top position if needed. */ - if (put_above) { - top = w->top + wi_rect.top - height - 4; - } + /* Set the top position if needed. */ + if (above) { + top = w->top + wi_rect.top - height - 4; } } if (auto_width) width = max(width, max_item_width); Point dw_pos = { w->left + (_current_text_dir == TD_RTL ? wi_rect.right + 1 - (int)width : wi_rect.left), top}; - Dimension dw_size = {width, (uint)height}; - new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll); + Dimension dw_size = {width, height}; + DropdownWindow *dropdown = new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll); + + /* The dropdown starts scrolling downwards when opening it towards + * the top and holding down the mouse button. It can be fooled by + * opening the dropdown scrolled to the very bottom. */ + if (above && scroll) dropdown->vscroll->UpdatePosition(INT_MAX); } /** diff --git a/src/widgets/dropdown_func.h b/src/widgets/dropdown_func.h index 78de09eeba..4c7e134562 100644 --- a/src/widgets/dropdown_func.h +++ b/src/widgets/dropdown_func.h @@ -1,4 +1,4 @@ -/* $Id: dropdown_func.h 18809 2010-01-15 16:41:15Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h index 44e00f306d..5678468ae0 100644 --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -1,4 +1,4 @@ -/* $Id: dropdown_type.h 26088 2013-11-24 15:17:53Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/dropdown_widget.h b/src/widgets/dropdown_widget.h index d626eb1937..0390a950ac 100644 --- a/src/widgets/dropdown_widget.h +++ b/src/widgets/dropdown_widget.h @@ -1,4 +1,4 @@ -/* $Id: dropdown_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/engine_widget.h b/src/widgets/engine_widget.h index 8026b45bb5..b131a1dd4b 100644 --- a/src/widgets/engine_widget.h +++ b/src/widgets/engine_widget.h @@ -1,4 +1,4 @@ -/* $Id: engine_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/error_widget.h b/src/widgets/error_widget.h index d200c36cb8..8693575a75 100644 --- a/src/widgets/error_widget.h +++ b/src/widgets/error_widget.h @@ -1,4 +1,4 @@ -/* $Id: error_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/fios_widget.h b/src/widgets/fios_widget.h index d1a9ec467f..2351f8035e 100644 --- a/src/widgets/fios_widget.h +++ b/src/widgets/fios_widget.h @@ -1,4 +1,4 @@ -/* $Id: fios_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -17,6 +17,7 @@ enum SaveLoadWidgets { WID_SL_CAPTION, ///< Caption of the window. WID_SL_SORT_BYNAME, ///< Sort by name button. WID_SL_SORT_BYDATE, ///< Sort by date button. + WID_SL_FILTER, ///< Filter list of files WID_SL_BACKGROUND, ///< Background of window. WID_SL_FILE_BACKGROUND, ///< Background of file selection. WID_SL_HOME_BUTTON, ///< Home button. diff --git a/src/widgets/framerate_widget.h b/src/widgets/framerate_widget.h new file mode 100644 index 0000000000..388599537c --- /dev/null +++ b/src/widgets/framerate_widget.h @@ -0,0 +1,33 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file framerate_widget.h Types related to the framerate windows widgets. */ + +#ifndef WIDGETS_FRAMERATE_WIDGET_H +#define WIDGETS_FRAMERATE_WIDGET_H + +/** Widgets of the #FramerateWindow class. */ +enum FramerateWindowWidgets { + WID_FRW_CAPTION, + WID_FRW_RATE_GAMELOOP, + WID_FRW_RATE_DRAWING, + WID_FRW_RATE_FACTOR, + WID_FRW_INFO_DATA_POINTS, + WID_FRW_TIMES_NAMES, + WID_FRW_TIMES_CURRENT, + WID_FRW_TIMES_AVERAGE, +}; + +/** Widgets of the #FrametimeGraphWindow class. */ +enum FrametimeGraphWindowWidgets { + WID_FGW_CAPTION, + WID_FGW_GRAPH, +}; + +#endif /* WIDGETS_FRAMERATE_WIDGET_H */ diff --git a/src/widgets/genworld_widget.h b/src/widgets/genworld_widget.h index d3bc06ef61..877efbb921 100644 --- a/src/widgets/genworld_widget.h +++ b/src/widgets/genworld_widget.h @@ -1,4 +1,4 @@ -/* $Id: genworld_widget.h 26885 2014-09-21 12:25:04Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/goal_widget.h b/src/widgets/goal_widget.h index 5b83a6f124..388930a102 100644 --- a/src/widgets/goal_widget.h +++ b/src/widgets/goal_widget.h @@ -1,5 +1,5 @@ -/* $Id: goal_widget.h 25623 2013-07-21 15:59:07Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/graph_widget.h b/src/widgets/graph_widget.h index 8cbd90446c..2fdf4aa4af 100644 --- a/src/widgets/graph_widget.h +++ b/src/widgets/graph_widget.h @@ -1,4 +1,4 @@ -/* $Id: graph_widget.h 23735 2012-01-03 20:26:05Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/group_widget.h b/src/widgets/group_widget.h index 272616bb2e..fe5ae81174 100644 --- a/src/widgets/group_widget.h +++ b/src/widgets/group_widget.h @@ -1,4 +1,4 @@ -/* $Id: group_widget.h 27822 2017-03-24 07:33:31Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -31,6 +31,7 @@ enum GroupListWidgets { WID_GL_CREATE_GROUP, ///< Create group button. WID_GL_DELETE_GROUP, ///< Delete group button. WID_GL_RENAME_GROUP, ///< Rename group button. + WID_GL_LIVERY_GROUP, ///< Group livery button. WID_GL_REPLACE_PROTECTION, ///< Replace protection button. WID_GL_INFO, ///< Group info. }; diff --git a/src/widgets/highscore_widget.h b/src/widgets/highscore_widget.h index 3b7eb7a105..3a2a1bfbb7 100644 --- a/src/widgets/highscore_widget.h +++ b/src/widgets/highscore_widget.h @@ -1,4 +1,4 @@ -/* $Id: highscore_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/industry_widget.h b/src/widgets/industry_widget.h index ba31c619e6..eed40c55ba 100644 --- a/src/widgets/industry_widget.h +++ b/src/widgets/industry_widget.h @@ -1,4 +1,4 @@ -/* $Id: industry_widget.h 24763 2012-11-25 15:24:02Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/intro_widget.h b/src/widgets/intro_widget.h index 07e8b33b26..ae48827ed1 100644 --- a/src/widgets/intro_widget.h +++ b/src/widgets/intro_widget.h @@ -1,4 +1,4 @@ -/* $Id: intro_widget.h 27732 2017-01-14 18:30:26Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/link_graph_legend_widget.h b/src/widgets/link_graph_legend_widget.h index 6e6e2ca742..9537b896df 100644 --- a/src/widgets/link_graph_legend_widget.h +++ b/src/widgets/link_graph_legend_widget.h @@ -1,4 +1,4 @@ -/* $Id: link_graph_legend_widget.h 25331 2013-06-08 12:37:36Z zuu $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/main_widget.h b/src/widgets/main_widget.h index 0d020b6a94..3ffc1214b8 100644 --- a/src/widgets/main_widget.h +++ b/src/widgets/main_widget.h @@ -1,4 +1,4 @@ -/* $Id: main_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/misc_widget.h b/src/widgets/misc_widget.h index 357f1f30c0..a6dd081a9d 100644 --- a/src/widgets/misc_widget.h +++ b/src/widgets/misc_widget.h @@ -1,4 +1,4 @@ -/* $Id: misc_widget.h 25816 2013-10-06 11:29:14Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/music_widget.h b/src/widgets/music_widget.h index 81f380d8b4..c8e6a98186 100644 --- a/src/widgets/music_widget.h +++ b/src/widgets/music_widget.h @@ -1,4 +1,4 @@ -/* $Id: music_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -14,9 +14,11 @@ /** Widgets of the #MusicTrackSelectionWindow class. */ enum MusicTrackSelectionWidgets { + WID_MTS_CAPTION, ///< Window caption. WID_MTS_LIST_LEFT, ///< Left button. WID_MTS_PLAYLIST, ///< Playlist. WID_MTS_LIST_RIGHT, ///< Right button. + WID_MTS_MUSICSET, ///< Music set selection. WID_MTS_ALL, ///< All button. WID_MTS_OLD, ///< Old button. WID_MTS_NEW, ///< New button. diff --git a/src/widgets/network_chat_widget.h b/src/widgets/network_chat_widget.h index 417a642eb1..cd13cf6a96 100644 --- a/src/widgets/network_chat_widget.h +++ b/src/widgets/network_chat_widget.h @@ -1,4 +1,4 @@ -/* $Id: network_chat_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/network_content_widget.h b/src/widgets/network_content_widget.h index eeed8e9033..e659743d4f 100644 --- a/src/widgets/network_content_widget.h +++ b/src/widgets/network_content_widget.h @@ -1,4 +1,4 @@ -/* $Id: network_content_widget.h 25024 2013-02-18 19:30:24Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/network_widget.h b/src/widgets/network_widget.h index 348f90441b..ef4a7fc4ce 100644 --- a/src/widgets/network_widget.h +++ b/src/widgets/network_widget.h @@ -1,4 +1,4 @@ -/* $Id: network_widget.h 24769 2012-11-27 21:35:52Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/newgrf_debug_widget.h b/src/widgets/newgrf_debug_widget.h index c241ee2cb0..22a5cda40e 100644 --- a/src/widgets/newgrf_debug_widget.h +++ b/src/widgets/newgrf_debug_widget.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_debug_widget.h 27174 2015-03-01 08:17:14Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/newgrf_widget.h b/src/widgets/newgrf_widget.h index c73463b077..271b6669ad 100644 --- a/src/widgets/newgrf_widget.h +++ b/src/widgets/newgrf_widget.h @@ -1,4 +1,4 @@ -/* $Id: newgrf_widget.h 26613 2014-05-24 19:15:57Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/news_widget.h b/src/widgets/news_widget.h index 7829b25bcc..f12786640f 100644 --- a/src/widgets/news_widget.h +++ b/src/widgets/news_widget.h @@ -1,4 +1,4 @@ -/* $Id: news_widget.h 24842 2012-12-23 21:06:37Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/object_widget.h b/src/widgets/object_widget.h index 8a72a467a0..45533ae98e 100644 --- a/src/widgets/object_widget.h +++ b/src/widgets/object_widget.h @@ -1,4 +1,4 @@ -/* $Id: object_widget.h 24178 2012-04-24 20:01:34Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/order_widget.h b/src/widgets/order_widget.h index e33c2d9423..825f791ea8 100644 --- a/src/widgets/order_widget.h +++ b/src/widgets/order_widget.h @@ -1,4 +1,4 @@ -/* $Id: order_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/osk_widget.h b/src/widgets/osk_widget.h index 20c63d1803..25cd928a86 100644 --- a/src/widgets/osk_widget.h +++ b/src/widgets/osk_widget.h @@ -1,4 +1,4 @@ -/* $Id: osk_widget.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/rail_widget.h b/src/widgets/rail_widget.h index 2895e0adf7..8da2455942 100644 --- a/src/widgets/rail_widget.h +++ b/src/widgets/rail_widget.h @@ -1,4 +1,4 @@ -/* $Id: rail_widget.h 25464 2013-06-25 20:22:08Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/road_widget.h b/src/widgets/road_widget.h index d370fb6c52..9a8359d7be 100644 --- a/src/widgets/road_widget.h +++ b/src/widgets/road_widget.h @@ -1,4 +1,4 @@ -/* $Id: road_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/settings_widget.h b/src/widgets/settings_widget.h index 78b19938d2..661f788cd7 100644 --- a/src/widgets/settings_widget.h +++ b/src/widgets/settings_widget.h @@ -1,4 +1,4 @@ -/* $Id: settings_widget.h 26990 2014-10-11 13:22:37Z peter1138 $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/sign_widget.h b/src/widgets/sign_widget.h index fc752f6df3..f390793ceb 100644 --- a/src/widgets/sign_widget.h +++ b/src/widgets/sign_widget.h @@ -1,4 +1,4 @@ -/* $Id: sign_widget.h 27020 2014-10-15 18:31:37Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/smallmap_widget.h b/src/widgets/smallmap_widget.h index a5a8955ef1..0b1daea03f 100644 --- a/src/widgets/smallmap_widget.h +++ b/src/widgets/smallmap_widget.h @@ -1,4 +1,4 @@ -/* $Id: smallmap_widget.h 25262 2013-05-19 14:36:35Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/station_widget.h b/src/widgets/station_widget.h index 1af63435d8..82fe392e33 100644 --- a/src/widgets/station_widget.h +++ b/src/widgets/station_widget.h @@ -1,4 +1,4 @@ -/* $Id: station_widget.h 25365 2013-06-09 13:08:52Z fonsinchen $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/statusbar_widget.h b/src/widgets/statusbar_widget.h index 7d21b149b8..1cfbe7ff29 100644 --- a/src/widgets/statusbar_widget.h +++ b/src/widgets/statusbar_widget.h @@ -1,4 +1,4 @@ -/* $Id: statusbar_widget.h 24663 2012-11-05 19:45:45Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/story_widget.h b/src/widgets/story_widget.h index 5e2df99c66..139b6d2d6b 100644 --- a/src/widgets/story_widget.h +++ b/src/widgets/story_widget.h @@ -1,5 +1,5 @@ -/* $Id: story_widget.h 26442 2014-04-03 10:54:37Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/subsidy_widget.h b/src/widgets/subsidy_widget.h index 26056a27bd..07d0f6cfbb 100644 --- a/src/widgets/subsidy_widget.h +++ b/src/widgets/subsidy_widget.h @@ -1,4 +1,4 @@ -/* $Id: subsidy_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/terraform_widget.h b/src/widgets/terraform_widget.h index 74f168d82b..7f8a4c4d1b 100644 --- a/src/widgets/terraform_widget.h +++ b/src/widgets/terraform_widget.h @@ -1,4 +1,4 @@ -/* $Id: terraform_widget.h 24900 2013-01-08 22:46:42Z planetmaker $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/timetable_widget.h b/src/widgets/timetable_widget.h index 5cd75a7900..09beb61672 100644 --- a/src/widgets/timetable_widget.h +++ b/src/widgets/timetable_widget.h @@ -1,4 +1,4 @@ -/* $Id: timetable_widget.h 23947 2012-02-14 17:04:06Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/toolbar_widget.h b/src/widgets/toolbar_widget.h index 86b397fa19..e5a5b80faf 100644 --- a/src/widgets/toolbar_widget.h +++ b/src/widgets/toolbar_widget.h @@ -1,4 +1,4 @@ -/* $Id: toolbar_widget.h 27671 2016-10-30 17:36:57Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -35,7 +35,7 @@ enum ToolbarNormalWidgets { WID_TN_TRAINS = WID_TN_VEHICLE_START, ///< Train menu. WID_TN_ROADVEHS, ///< Road vehicle menu. WID_TN_SHIPS, ///< Ship menu. - WID_TN_AIRCRAFTS, ///< Aircraft menu. + WID_TN_AIRCRAFT, ///< Aircraft menu. WID_TN_ZOOM_IN, ///< Zoom in the main viewport. WID_TN_ZOOM_OUT, ///< Zoom out the main viewport. WID_TN_BUILDING_TOOLS_START, ///< Helper for the offset of the building tools diff --git a/src/widgets/town_widget.h b/src/widgets/town_widget.h index 3831051942..eefc4ec278 100644 --- a/src/widgets/town_widget.h +++ b/src/widgets/town_widget.h @@ -1,4 +1,4 @@ -/* $Id: town_widget.h 25094 2013-03-17 15:41:40Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/transparency_widget.h b/src/widgets/transparency_widget.h index e4ff0e5fa4..87618fcb6e 100644 --- a/src/widgets/transparency_widget.h +++ b/src/widgets/transparency_widget.h @@ -1,4 +1,4 @@ -/* $Id: transparency_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/tree_widget.h b/src/widgets/tree_widget.h index 149afd358d..cd0b85c9d1 100644 --- a/src/widgets/tree_widget.h +++ b/src/widgets/tree_widget.h @@ -1,4 +1,4 @@ -/* $Id: tree_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/vehicle_widget.h b/src/widgets/vehicle_widget.h index fd9e7ce045..a0902dab44 100644 --- a/src/widgets/vehicle_widget.h +++ b/src/widgets/vehicle_widget.h @@ -1,4 +1,4 @@ -/* $Id: vehicle_widget.h 24997 2013-02-14 17:11:42Z rubidium $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/viewport_widget.h b/src/widgets/viewport_widget.h index eec0b846a8..187659f362 100644 --- a/src/widgets/viewport_widget.h +++ b/src/widgets/viewport_widget.h @@ -1,4 +1,4 @@ -/* $Id: viewport_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/widgets/waypoint_widget.h b/src/widgets/waypoint_widget.h index 133061c6f9..8fceddaa70 100644 --- a/src/widgets/waypoint_widget.h +++ b/src/widgets/waypoint_widget.h @@ -1,4 +1,4 @@ -/* $Id: waypoint_widget.h 23600 2011-12-19 20:46:17Z truebrain $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/window.cpp b/src/window.cpp index 47cc51a95f..0dbe8cf518 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1,4 +1,4 @@ -/* $Id: window.cpp 27934 2017-12-09 19:21:41Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -38,6 +38,9 @@ #include "error.h" #include "game/game.hpp" #include "video/video_driver.hpp" +#include "framerate_type.h" +#include "network/network_func.h" +#include "guitimer_func.h" #include "safeguards.h" @@ -50,7 +53,7 @@ enum ViewportAutoscrolling { }; static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window -static Window *_mouseover_last_w = NULL; ///< Window of the last #MOUSEOVER event. +static Window *_mouseover_last_w = NULL; ///< Window of the last OnMouseOver event. static Window *_last_scroll_window = NULL; ///< Window of the last scroll event. /** List of windows opened at the screen sorted from the front. */ @@ -654,7 +657,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count) /* Clicked on a widget that is not disabled. * So unless the clicked widget is the caption bar, change focus to this widget. - * Exception: In the OSK we always want the editbox to stay focussed. */ + * Exception: In the OSK we always want the editbox to stay focused. */ if (widget_type != WWT_CAPTION && w->window_class != WC_OSK) { /* focused_widget_changed is 'now' only true if the window this widget * is in gained focus. In that case it must remain true, also if the @@ -939,6 +942,8 @@ static void DrawOverlappedWindow(Window *w, int left, int top, int right, int bo void DrawOverlappedWindowForAll(int left, int top, int right, int bottom) { Window *w; + + DrawPixelInfo *old_dpi = _cur_dpi; DrawPixelInfo bk; _cur_dpi = &bk; @@ -952,6 +957,7 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom) DrawOverlappedWindow(w, max(left, w->left), max(top, w->top), min(right, w->left + w->width), min(bottom, w->top + w->height)); } } + _cur_dpi = old_dpi; } /** @@ -1116,7 +1122,7 @@ Window *FindWindowById(WindowClass cls, WindowNumber number) /** * Find any window by its class. Useful when searching for a window that uses - * the window number as a #WindowType, like #WC_SEND_NETWORK_MSG. + * the window number as a #WindowClass, like #WC_SEND_NETWORK_MSG. * @param cls Window class * @return Pointer to the found window, or \c NULL if not available */ @@ -1432,7 +1438,6 @@ static void BringWindowToFront(Window *w) /** * Initializes the data (except the position and initial size) of a new Window. - * @param desc Window description. * @param window_number Number being assigned to the new window * @return Window pointer of the newly created window * @pre If nested widgets are used (\a widget is \c NULL), #nested_root and #nested_array_size must be initialized. @@ -1741,7 +1746,7 @@ static Point LocalGetWindowPlacement(const WindowDesc *desc, int16 sm_width, int int16 default_width = max(desc->GetDefaultWidth(), sm_width); int16 default_height = max(desc->GetDefaultHeight(), sm_height); - if (desc->parent_cls != 0 /* WC_MAIN_WINDOW */ && (w = FindWindowById(desc->parent_cls, window_number)) != NULL) { + if (desc->parent_cls != WC_NONE && (w = FindWindowById(desc->parent_cls, window_number)) != NULL) { bool rtl = _current_text_dir == TD_RTL; if (desc->parent_cls == WC_BUILD_TOOLBAR || desc->parent_cls == WC_SCEN_LAND_GEN) { pt.x = w->left + (rtl ? w->width - default_width : 0); @@ -1921,6 +1926,8 @@ void ResetWindowSystem() static void DecreaseWindowCounters() { + if (_scroller_click_timeout != 0) _scroller_click_timeout--; + Window *w; FOR_ALL_WINDOWS_FROM_FRONT(w) { if (_scroller_click_timeout == 0) { @@ -2004,7 +2011,7 @@ static void HandleMouseOver() { Window *w = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y); - /* We changed window, put a MOUSEOVER event to the last window */ + /* We changed window, put an OnMouseOver event to the last window */ if (_mouseover_last_w != NULL && _mouseover_last_w != w) { /* Reset mouse-over coordinates of previous window */ Point pt = { -1, -1 }; @@ -2447,7 +2454,7 @@ static EventState HandleViewportScroll() * outside of the window and should not left-mouse scroll anymore. */ if (_last_scroll_window == NULL) _last_scroll_window = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y); - if (_last_scroll_window == NULL || !(_right_button_down || scrollwheel_scrolling || (_settings_client.gui.left_mouse_btn_scrolling && _left_button_down))) { + if (_last_scroll_window == NULL || !((_settings_client.gui.scroll_mode != VSM_MAP_LMB && _right_button_down) || scrollwheel_scrolling || (_settings_client.gui.scroll_mode == VSM_MAP_LMB && _left_button_down))) { _cursor.fix_at = false; _scrolling_viewport = false; _last_scroll_window = NULL; @@ -2462,20 +2469,20 @@ static EventState HandleViewportScroll() } Point delta; - if (_settings_client.gui.reverse_scroll || (_settings_client.gui.left_mouse_btn_scrolling && _left_button_down)) { - delta.x = -_cursor.delta.x; - delta.y = -_cursor.delta.y; - } else { - delta.x = _cursor.delta.x; - delta.y = _cursor.delta.y; - } - if (scrollwheel_scrolling) { /* We are using scrollwheels for scrolling */ delta.x = _cursor.h_wheel; delta.y = _cursor.v_wheel; _cursor.v_wheel = 0; _cursor.h_wheel = 0; + } else { + if (_settings_client.gui.scroll_mode != VSM_VIEWPORT_RMB_FIXED) { + delta.x = -_cursor.delta.x; + delta.y = -_cursor.delta.y; + } else { + delta.x = _cursor.delta.x; + delta.y = _cursor.delta.y; + } } /* Create a scroll-event and send it to the window */ @@ -2753,18 +2760,17 @@ static void HandleAutoscroll() y -= vp->top; /* here allows scrolling in both x and y axis */ -#define scrollspeed 3 + static const int SCROLLSPEED = 3; if (x - 15 < 0) { - w->viewport->dest_scrollpos_x += ScaleByZoom((x - 15) * scrollspeed, vp->zoom); + w->viewport->dest_scrollpos_x += ScaleByZoom((x - 15) * SCROLLSPEED, vp->zoom); } else if (15 - (vp->width - x) > 0) { - w->viewport->dest_scrollpos_x += ScaleByZoom((15 - (vp->width - x)) * scrollspeed, vp->zoom); + w->viewport->dest_scrollpos_x += ScaleByZoom((15 - (vp->width - x)) * SCROLLSPEED, vp->zoom); } if (y - 15 < 0) { - w->viewport->dest_scrollpos_y += ScaleByZoom((y - 15) * scrollspeed, vp->zoom); + w->viewport->dest_scrollpos_y += ScaleByZoom((y - 15) * SCROLLSPEED, vp->zoom); } else if (15 - (vp->height - y) > 0) { - w->viewport->dest_scrollpos_y += ScaleByZoom((15 - (vp->height - y)) * scrollspeed, vp->zoom); + w->viewport->dest_scrollpos_y += ScaleByZoom((15 - (vp->height - y)) * SCROLLSPEED, vp->zoom); } -#undef scrollspeed } enum MouseClick { @@ -2863,21 +2869,26 @@ static void MouseLoop(MouseClick click, int mousewheel) if (vp != NULL && (_game_mode == GM_MENU || HasModalProgress())) return; if (mousewheel != 0) { - /* Send mousewheel event to window */ - w->OnMouseWheel(mousewheel); + /* Send mousewheel event to window, unless we're scrolling a viewport or the map */ + if (!scrollwheel_scrolling || (vp == NULL && w->window_class != WC_SMALLMAP)) w->OnMouseWheel(mousewheel); /* Dispatch a MouseWheelEvent for widgets if it is not a viewport */ if (vp == NULL) DispatchMouseWheelEvent(w, w->nested_root->GetWidgetFromPos(x - w->left, y - w->top), mousewheel); } if (vp != NULL) { - if (scrollwheel_scrolling) click = MC_RIGHT; // we are using the scrollwheel in a viewport, so we emulate right mouse button + if (scrollwheel_scrolling && !(w->flags & WF_DISABLE_VP_SCROLL)) { + _scrolling_viewport = true; + _cursor.fix_at = true; + return; + } + switch (click) { case MC_DOUBLE_LEFT: case MC_LEFT: if (HandleViewportClicked(vp, x, y, click == MC_DOUBLE_LEFT)) return; if (!(w->flags & WF_DISABLE_VP_SCROLL) && - _settings_client.gui.left_mouse_btn_scrolling) { + _settings_client.gui.scroll_mode == VSM_MAP_LMB) { _scrolling_viewport = true; _cursor.fix_at = false; return; @@ -2885,13 +2896,11 @@ static void MouseLoop(MouseClick click, int mousewheel) break; case MC_RIGHT: - if (!(w->flags & WF_DISABLE_VP_SCROLL)) { + if (!(w->flags & WF_DISABLE_VP_SCROLL) && + _settings_client.gui.scroll_mode != VSM_MAP_LMB) { _scrolling_viewport = true; - _cursor.fix_at = true; - - /* clear 2D scrolling caches before we start a 2D scroll */ - _cursor.h_wheel = 0; - _cursor.v_wheel = 0; + _cursor.fix_at = (_settings_client.gui.scroll_mode == VSM_VIEWPORT_RMB_FIXED || + _settings_client.gui.scroll_mode == VSM_MAP_RMB_FIXED); return; } break; @@ -2906,7 +2915,7 @@ static void MouseLoop(MouseClick click, int mousewheel) case MC_LEFT: case MC_DOUBLE_LEFT: DispatchLeftClickEvent(w, x - w->left, y - w->top, click == MC_DOUBLE_LEFT ? 2 : 1); - break; + return; default: if (!scrollwheel_scrolling || w == NULL || w->window_class != WC_SMALLMAP) break; @@ -2914,11 +2923,19 @@ static void MouseLoop(MouseClick click, int mousewheel) * Simulate a right button click so we can get started. */ FALLTHROUGH; - case MC_RIGHT: DispatchRightClickEvent(w, x - w->left, y - w->top); break; + case MC_RIGHT: + DispatchRightClickEvent(w, x - w->left, y - w->top); + return; - case MC_HOVER: DispatchHoverEvent(w, x - w->left, y - w->top); break; + case MC_HOVER: + DispatchHoverEvent(w, x - w->left, y - w->top); + break; } } + + /* We're not doing anything with 2D scrolling, so reset the value. */ + _cursor.h_wheel = 0; + _cursor.v_wheel = 0; } /** @@ -3038,7 +3055,6 @@ void InputLoop() assert(HasModalProgress() || IsLocalCompany()); CheckSoftLimit(); - HandleKeyScrolling(); /* Do the actual free of the deleted windows. */ for (Window *v = _z_front_window; v != NULL; /* nothing */) { @@ -3051,9 +3067,6 @@ void InputLoop() free(w); } - if (_scroller_click_timeout != 0) _scroller_click_timeout--; - DecreaseWindowCounters(); - if (_input_events_this_tick != 0) { /* The input loop is called only once per GameLoop() - so we can clear the counter here */ _input_events_this_tick = 0; @@ -3063,7 +3076,17 @@ void InputLoop() /* HandleMouseEvents was already called for this tick */ HandleMouseEvents(); - HandleAutoscroll(); +} + +/** + * Dispatch OnRealtimeTick event over all windows + */ +void CallWindowRealtimeTickEvent(uint delta_ms) +{ + Window *w; + FOR_ALL_WINDOWS_FROM_FRONT(w) { + w->OnRealtimeTick(delta_ms); + } } /** @@ -3071,14 +3094,48 @@ void InputLoop() */ void UpdateWindows() { + static uint32 last_realtime_tick = _realtime_tick; + uint delta_ms = _realtime_tick - last_realtime_tick; + last_realtime_tick = _realtime_tick; + + if (delta_ms == 0) return; + + PerformanceMeasurer framerate(PFE_DRAWING); + PerformanceAccumulator::Reset(PFE_DRAWWORLD); + + CallWindowRealtimeTickEvent(delta_ms); + +#ifdef ENABLE_NETWORK + static GUITimer network_message_timer = GUITimer(1); + if (network_message_timer.Elapsed(delta_ms)) { + network_message_timer.SetInterval(1000); + NetworkChatMessageLoop(); + } +#endif + Window *w; - static int highlight_timer = 1; - if (--highlight_timer == 0) { - highlight_timer = 15; + static GUITimer window_timer = GUITimer(1); + if (window_timer.Elapsed(delta_ms)) { + if (_network_dedicated) window_timer.SetInterval(MILLISECONDS_PER_TICK); + + extern int _caret_timer; + _caret_timer += 3; + CursorTick(); + + HandleKeyScrolling(); + HandleAutoscroll(); + DecreaseWindowCounters(); + } + + static GUITimer highlight_timer = GUITimer(1); + if (highlight_timer.Elapsed(delta_ms)) { + highlight_timer.SetInterval(450); _window_highlight_colour = !_window_highlight_colour; } + if (!_pause_mode || _game_mode == GM_EDITOR || _settings_game.construction.command_pause_level > CMDPL_NO_CONSTRUCTION) MoveAllTextEffects(delta_ms); + FOR_ALL_WINDOWS_FROM_FRONT(w) { w->ProcessScheduledInvalidations(); w->ProcessHighlightedInvalidations(); @@ -3088,21 +3145,23 @@ void UpdateWindows() * But still empty the invalidation queues above. */ if (_network_dedicated) return; - static int we4_timer = 0; - int t = we4_timer + 1; + static GUITimer hundredth_timer = GUITimer(1); + if (hundredth_timer.Elapsed(delta_ms)) { + hundredth_timer.SetInterval(3000); // Historical reason: 100 * MILLISECONDS_PER_TICK - if (t >= 100) { FOR_ALL_WINDOWS_FROM_FRONT(w) { w->OnHundredthTick(); } - t = 0; } - we4_timer = t; - FOR_ALL_WINDOWS_FROM_FRONT(w) { - if ((w->flags & WF_WHITE_BORDER) && --w->white_border_timer == 0) { - CLRBITS(w->flags, WF_WHITE_BORDER); - w->SetDirty(); + if (window_timer.HasElapsed()) { + window_timer.SetInterval(MILLISECONDS_PER_TICK); + + FOR_ALL_WINDOWS_FROM_FRONT(w) { + if ((w->flags & WF_WHITE_BORDER) && --w->white_border_timer == 0) { + CLRBITS(w->flags, WF_WHITE_BORDER); + w->SetDirty(); + } } } @@ -3252,13 +3311,13 @@ void InvalidateWindowClassesData(WindowClass cls, int data, bool gui_scope) } /** - * Dispatch WE_TICK event over all windows + * Dispatch OnGameTick event over all windows */ -void CallWindowTickEvent() +void CallWindowGameTickEvent() { Window *w; FOR_ALL_WINDOWS_FROM_FRONT(w) { - w->OnTick(); + w->OnGameTick(); } } @@ -3462,8 +3521,9 @@ void ChangeVehicleViewports(VehicleID from_index, VehicleID to_index) */ void RelocateAllWindows(int neww, int newh) { - Window *w; + DeleteWindowById(WC_DROPDOWN_MENU, 0); + Window *w; FOR_ALL_WINDOWS_FROM_BACK(w) { int left, top; /* XXX - this probably needs something more sane. For example specifying diff --git a/src/window_func.h b/src/window_func.h index 064fbdf0bd..453b889789 100644 --- a/src/window_func.h +++ b/src/window_func.h @@ -1,4 +1,4 @@ -/* $Id: window_func.h 25681 2013-08-05 20:37:14Z michi_cc $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/window_gui.h b/src/window_gui.h index fa08b58997..c32ad25d28 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -1,4 +1,4 @@ -/* $Id: window_gui.h 27147 2015-02-13 21:25:48Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -679,13 +679,18 @@ public: /** * Called once per (game) tick. */ - virtual void OnTick() {} + virtual void OnGameTick() {} /** * Called once every 100 (game) ticks. */ virtual void OnHundredthTick() {} + /** + * Called periodically. + */ + virtual void OnRealtimeTick(uint delta_ms) {} + /** * Called when this window's timeout has been reached. */ diff --git a/src/window_type.h b/src/window_type.h index 227a781eba..14411bb650 100644 --- a/src/window_type.h +++ b/src/window_type.h @@ -1,4 +1,4 @@ -/* $Id: window_type.h 27286 2015-05-16 12:08:06Z alberth $ */ +/* $Id$ */ /* * This file is part of OpenTTD. @@ -690,6 +690,17 @@ enum WindowClass { */ WC_SAVE_PRESET, + /** + * Framerate display; %Window numbers: + * - 0 = #FramerateDisplayWidgets + */ + WC_FRAMERATE_DISPLAY, + + /** + * Frame time graph; %Window numbers: + * - 0 = #FrametimeGraphWindowWidgets + */ + WC_FRAMETIME_GRAPH, WC_ZONING_TOOLBAR, WC_COMMAND_TOOLBAR, WC_LOGIN_WINDOW, diff --git a/src/zoning_cmd.cpp b/src/zoning_cmd.cpp index b15c7de697..91ce8216e1 100644 --- a/src/zoning_cmd.cpp +++ b/src/zoning_cmd.cpp @@ -15,7 +15,8 @@ static const SpriteID INVALID_SPRITE_ID = UINT_MAX; TileIndex _closest_cache_ref = INVALID_TILE; const uint CLOSEST_CACHE_THRESHOLD = 128; -std::vector> _closest_cache; +typedef std::pairClosestTownRecord; +std::vector _closest_cache; void RebuildClosestHash(TileIndex tile) { @@ -28,7 +29,7 @@ void RebuildClosestHash(TileIndex tile) { } std::sort( _closest_cache.begin(), _closest_cache.end(), - [](auto &a, auto &b) -> bool { + [](ClosestTownRecord &a, ClosestTownRecord &b) -> bool { return a.first < b.first; } ); diff --git a/src/zoom_func.h b/src/zoom_func.h index 43c32429e9..da266e35c6 100644 --- a/src/zoom_func.h +++ b/src/zoom_func.h @@ -1,4 +1,4 @@ -/* $Id: zoom_func.h 27417 2015-10-29 19:23:21Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD. diff --git a/src/zoom_type.h b/src/zoom_type.h index 117291ee0a..c29f136cf3 100644 --- a/src/zoom_type.h +++ b/src/zoom_type.h @@ -1,4 +1,4 @@ -/* $Id: zoom_type.h 27134 2015-02-01 20:54:24Z frosch $ */ +/* $Id$ */ /* * This file is part of OpenTTD.