Merge branch 'master' into crashlog_improvements

# Conflicts:
#	src/console_cmds.cpp
#	src/openttd.cpp
#	src/vehicle.cpp
This commit is contained in:
Jonathan G Rennison
2018-07-26 20:01:08 +01:00
315 changed files with 9395 additions and 2892 deletions

View File

@@ -107,7 +107,7 @@ git clone https://github.com/OpenTTD/OpenTTD-git-hooks.git openttd_hooks
cd openttd cd openttd
git remote add upstream https://github.com/OpenTTD/OpenTTD.git git remote add upstream https://github.com/OpenTTD/OpenTTD.git
cd .git/hooks cd .git/hooks
ln -s -t . ../../../openttd_hooks/hooks/* ln -s ../../../openttd_hooks/hooks/* .
``` ```
2. If you cloned a while ago, get the latest changes from upstream: 2. If you cloned a while ago, get the latest changes from upstream:
@@ -149,6 +149,16 @@ git push
**IMPORTANT**: By submitting a patch, you agree to the [License](#license). **IMPORTANT**: By submitting a patch, you agree to the [License](#license).
### Privacy Notice
We would like to make you aware that contributing to OpenTTD via git will permanently store the name and email address you provide as well as the actual changes and the time and date you made it inside git's version history.
This is inevitable, because it is a main feature of git. If you are concerned about your privacy, we strongly recommend to use "Anonymous <anonymous@openttd.org>" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made. As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
Please also note that your commit is public and as such will potentially be processed by many third-parties. Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed. If you would not like to accept this risk, please do either commit anonymously or refrain from contributing to the OpenTTD project.
### Pull request validation ### Pull request validation
Continuous integration (CI) tools monitor pull requests, and help us identify build and code quality issues. Continuous integration (CI) tools monitor pull requests, and help us identify build and code quality issues.
@@ -168,3 +178,4 @@ By contributing your code, you agree to license your contribution under the [GPL
### Attribution of this Contributing Guide ### Attribution of this Contributing Guide
This contributing guide is adapted from [Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) under the [Creative Commons Attribution 3.0 Unported License](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE) terms for Bootstrap documentation. This contributing guide is adapted from [Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) under the [Creative Commons Attribution 3.0 Unported License](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE) terms for Bootstrap documentation.
The GDPR notice is adapted from [rsyslog](https://github.com/rsyslog/rsyslog/blob/master/CONTRIBUTING.md) under the [GNU General Public License](https://github.com/rsyslog/rsyslog/blob/master/COPYING).

View File

@@ -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 <http://www.gnu.org/licenses/>. # See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
STRGEN = !!STRGEN!! STRGEN = !!STRGEN!!
ENDIAN_CHECK = !!ENDIAN_CHECK!!
SRC_DIR = !!SRC_DIR!! SRC_DIR = !!SRC_DIR!!
LANG_DIR = !!LANG_DIR!! LANG_DIR = !!LANG_DIR!!
BIN_DIR = !!BIN_DIR!! BIN_DIR = !!BIN_DIR!!
@@ -25,11 +24,6 @@ ifeq ($(LANG_SUPPRESS), yes)
LANG_ERRORS = >/dev/null 2>&1 LANG_ERRORS = >/dev/null 2>&1
endif 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 # Check if we want to show what we are doing
ifdef VERBOSE ifdef VERBOSE
Q = Q =
@@ -43,19 +37,19 @@ RES := $(shell mkdir -p $(BIN_DIR)/lang )
all: table/strings.h $(LANGS) 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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< $(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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< $(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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< $(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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< $(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)' $(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 $(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: depend:
clean: clean:
$(E) '$(STAGE) Cleaning up language files' $(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.o string.o alloc_func.o getoptdata.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.*
mrproper: clean mrproper: clean
$(Q)rm -rf $(BIN_DIR)/lang $(Q)rm -rf $(BIN_DIR)/lang

View File

@@ -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 <http://www.gnu.org/licenses/>. # See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
SETTINGSGEN = !!SETTINGSGEN!! SETTINGSGEN = !!SETTINGSGEN!!
ENDIAN_CHECK = !!ENDIAN_CHECK!!
SRC_DIR = !!SRC_DIR!! SRC_DIR = !!SRC_DIR!!
CXX_BUILD = !!CXX_BUILD!! CXX_BUILD = !!CXX_BUILD!!
CFLAGS_BUILD = !!CFLAGS_BUILD!! CFLAGS_BUILD = !!CFLAGS_BUILD!!
@@ -15,8 +14,6 @@ LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
STAGE = !!STAGE!! STAGE = !!STAGE!!
SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!! 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 # Check if we want to show what we are doing
ifdef VERBOSE ifdef VERBOSE
Q = Q =
@@ -32,7 +29,7 @@ settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< $(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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< $(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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< $(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)' $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< $(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 @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 $(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: depend:
clean: clean:
$(E) '$(STAGE) Cleaning up settings files' $(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 ini_load.o $(SETTINGSGEN) table/settings.h
mrproper: clean mrproper: clean

View File

@@ -29,9 +29,7 @@ SCRIPT_SRC_DIR = !!SCRIPT_SRC_DIR!!
MEDIA_DIR = !!MEDIA_DIR!! MEDIA_DIR = !!MEDIA_DIR!!
TTD = !!TTD!! TTD = !!TTD!!
STRGEN = !!STRGEN!! STRGEN = !!STRGEN!!
ENDIAN_CHECK = !!ENDIAN_CHECK!!
DEPEND = !!DEPEND!! DEPEND = !!DEPEND!!
ENDIAN_FORCE = !!ENDIAN_FORCE!!
OS = !!OS!! OS = !!OS!!
STAGE = !!STAGE!! STAGE = !!STAGE!!
MAKEDEPEND = !!MAKEDEPEND!! MAKEDEPEND = !!MAKEDEPEND!!
@@ -41,7 +39,6 @@ AWK = !!AWK!!
CONFIGURE_INVOCATION = !!CONFIGURE_INVOCATION!! CONFIGURE_INVOCATION = !!CONFIGURE_INVOCATION!!
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!! CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!!
CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!! 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_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!!
CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!! CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!!
CONFIG_CACHE_INVOCATION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_INVOCATION!! CONFIG_CACHE_INVOCATION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_INVOCATION!!
@@ -54,19 +51,16 @@ OBJS := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC)
SRCS := !!SRCS!! SRCS := !!SRCS!!
# All C-files depend on those 3 files # 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 # Create all dirs and subdirs
RES := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS)))) 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 += -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) CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR)
ifdef SCRIPT_SRC_DIR ifdef SCRIPT_SRC_DIR
CFLAGS_MAKEDEP += -I $(SCRIPT_SRC_DIR) CFLAGS_MAKEDEP += -I $(SCRIPT_SRC_DIR)
endif endif
ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK)
# Check if we want to show what we are doing # Check if we want to show what we are doing
ifdef VERBOSE ifdef VERBOSE
Q = Q =
@@ -110,7 +104,6 @@ endif
# This helps to recompile if flags change # 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_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_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 # 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 ) RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi )
@@ -125,7 +118,7 @@ DEP_MASK := %.d
DEPS := $(OBJS:%.o=%.d) DEPS := $(OBJS:%.o=%.d)
# Only include the deps if we are compiling everything # 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) -include $(DEPS)
else else
# In case we want to compile a single target, include the .d file for it # In case we want to compile a single target, include the .d file for it
@@ -159,7 +152,7 @@ DEP_MASK :=
DEPS := Makefile.dep DEPS := Makefile.dep
# Only include the deps if we are not cleaning # 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 -include Makefile.dep
endif endif
@@ -268,14 +261,7 @@ endif
$(TTD): $(OBJS) $(CONFIG_CACHE_LINKER) $(TTD): $(OBJS) $(CONFIG_CACHE_LINKER)
$(E) '$(STAGE) Linking $@' $(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 $@ $(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
endif
ifdef STRIP ifdef STRIP
$(Q)$(STRIP) $@ $(Q)$(STRIP) $@
endif endif
@@ -284,16 +270,6 @@ ifeq ($(OS), DOS)
$(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@ $(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@
endif 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 # Revision files
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(CONFIG_CACHE_INVOCATION) $(SRC_DIR)/rev.cpp.in $(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(CONFIG_CACHE_INVOCATION) $(SRC_DIR)/rev.cpp.in
@@ -308,7 +284,7 @@ depend: $(DEPS)
clean: clean:
$(E) '$(STAGE) Cleaning up object files' $(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 mrproper: clean
$(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc $(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc

206
README.md
View File

@@ -14,6 +14,7 @@
- 4.4) [Files in tar (archives)](#44-files-in-tar-archives) - 4.4) [Files in tar (archives)](#44-files-in-tar-archives)
- 5.0) [OpenTTD features](#50-openttd-features) - 5.0) [OpenTTD features](#50-openttd-features)
- 5.1) [Logging of potentially dangerous actions](#51-logging-of-potentially-dangerous-actions) - 5.1) [Logging of potentially dangerous actions](#51-logging-of-potentially-dangerous-actions)
- 5.2) [Frame rate and performance metrics](#52-frame-rate-and-performance-metrics)
- 6.0) [Configuration file](#60-configuration-file) - 6.0) [Configuration file](#60-configuration-file)
- 7.0) [Compiling](#70-compiling) - 7.0) [Compiling](#70-compiling)
- 7.1) [Required/optional libraries](#71-requiredoptional-libraries) - 7.1) [Required/optional libraries](#71-requiredoptional-libraries)
@@ -42,9 +43,10 @@ The easiest way to contact the OpenTTD team is by submitting bug reports or
posting comments in our forums. You can also chat with us on IRC (#openttd posting comments in our forums. You can also chat with us on IRC (#openttd
on irc.oftc.net). on irc.oftc.net).
The OpenTTD homepage is [http://www.openttd.org/](http://www.openttd.org/). The OpenTTD homepage is https://www.openttd.org.
You can also find the OpenTTD forums at [http://forum.openttd.org/](http://forum.openttd.org/). You can also find the OpenTTD forums at
[https://www.tt-forums.net](https://www.tt-forums.net/viewforum.php?f=55).
### 2.1) Reporting bugs ### 2.1) Reporting bugs
@@ -52,12 +54,12 @@ First of all, check whether the bug is not already known. Do this by looking
through the file called 'known-bugs.txt' which is distributed with OpenTTD through the file called 'known-bugs.txt' which is distributed with OpenTTD
like this readme. like this readme.
For tracking our bugs we are using Githubs issue tracker. You can find For tracking our bugs we are using GitHub's issue tracker. You can find
the tracker at [https://github.com/OpenTTD/OpenTTD/issues](https://github.com/OpenTTD/OpenTTD/issues). Before actually reporting take a look the tracker at https://github.com/OpenTTD/OpenTTD/issues. Before actually
through the already reported bugs there to see if the bug is already known. reporting take a look through the already reported bugs there to see if
The 'known-bugs.txt' file might be a bit outdated at the moment you are the bug is already known. The 'known-bugs.txt' file might be a bit outdated
reading it as only bugs known before the release are documented there. Also at the moment you are reading it as only bugs known before the release
look through the recently closed bugs. are documented there. Also look through the recently closed bugs.
When you are sure it is not already reported you should: When you are sure it is not already reported you should:
@@ -80,8 +82,8 @@ following information in your bug report:
- Bug details, including instructions how to reproduce it - Bug details, including instructions how to reproduce it
- Platform (Windows, Linux, FreeBSD, …) and compiler (including version) if - Platform (Windows, Linux, FreeBSD, …) and compiler (including version) if
you compiled OpenTTD yourself. you compiled OpenTTD yourself.
- The processor architecture of your OS (32 bits Windows, 64 bits Windows, - The processor architecture of your OS (32-bit Windows, 64-bit Windows,
Linux on an ARM, Mac OS X on a PowerPC, ) Linux on an ARM, Mac OS X on a PowerPC, etc.)
- Attach a saved game **and** a screenshot if possible - Attach a saved game **and** a screenshot if possible
- If this bug only occurred recently please note the last version without - If this bug only occurred recently please note the last version without
the bug and the first version including the bug. That way we can fix it the bug and the first version including the bug. That way we can fix it
@@ -154,7 +156,7 @@ platforms are:
- DOS (Allegro) - DOS (Allegro)
- FreeBSD (SDL) - FreeBSD (SDL)
- Linux (SDL or Allegro) - Linux (SDL or Allegro)
- MacOS X (universal) (Cocoa video and sound drivers) - macOS (universal) (Cocoa video and sound drivers)
- MorphOS (SDL) - MorphOS (SDL)
- OpenBSD (SDL) - OpenBSD (SDL)
- OS/2 (SDL) - OS/2 (SDL)
@@ -210,9 +212,9 @@ when using other versions of the game.
The free data files, split into OpenGFX for graphics, OpenSFX for sounds and The free data files, split into OpenGFX for graphics, OpenSFX for sounds and
OpenMSX for music can be found at: OpenMSX for music can be found at:
- [http://www.openttd.org/download-opengfx](http://www.openttd.org/download-opengfx) for OpenGFX - https://www.openttd.org/download-opengfx for OpenGFX
- [http://www.openttd.org/download-opensfx](http://www.openttd.org/download-opensfx) for OpenSFX - https://www.openttd.org/download-opensfx for OpenSFX
- [http://www.openttd.org/download-openmsx](http://www.openttd.org/download-openmsx) for OpenMSX - https://www.openttd.org/download-openmsx for OpenMSX
Please follow the readme of these packages about the installation procedure. Please follow the readme of these packages about the installation procedure.
The Windows installer can optionally download and install these packages. The Windows installer can optionally download and install these packages.
@@ -224,7 +226,6 @@ have to copy the data files from the CD-ROM into the baseset/ directory. It
does not matter whether you copy them from the DOS or Windows version of does not matter whether you copy them from the DOS or Windows version of
Transport Tycoon Deluxe. The Windows install can optionally copy these files. Transport Tycoon Deluxe. The Windows install can optionally copy these files.
You need to copy the following files: You need to copy the following files:
- sample.cat - sample.cat
- trg1r.grf or TRG1.GRF - trg1r.grf or TRG1.GRF
- trgcr.grf or TRGC.GRF - trgcr.grf or TRGC.GRF
@@ -234,11 +235,11 @@ You need to copy the following files:
#### 4.1.3) Original Transport Tycoon Deluxe music #### 4.1.3) Original Transport Tycoon Deluxe music
If you want the Transport Tycoon Deluxe music, copy the files from the gm/ If you want the Transport Tycoon Deluxe music, copy the appropriate files from
folder from the Windows version of Transport Tycoon Deluxe to the baseset the original game into the baseset folder.
folder in your OpenTTD folder (also explained in the following sections). - TTD for Windows: All files in the gm/ folder (gm_tt00.gm up to gm_tt21.gm)
The music from the DOS version as well as the original Transport Tycoon does - TTD for DOS: The GM.CAT file
not work. - Transport Tycoon Original: The GM.CAT file, but rename it to GM-TTO.CAT
#### 4.1.4) AIs #### 4.1.4) AIs
@@ -247,10 +248,9 @@ not possible or you want to use an AI that has not been uploaded to the content
download system download the tar file and place it in the ai/ directory. If the download system download the tar file and place it in the ai/ directory. If the
AI needs libraries you will have to download those too and put them in the AI needs libraries you will have to download those too and put them in the
ai/library/ directory. All AIs and AI Libraries that have been uploaded to ai/library/ directory. All AIs and AI Libraries that have been uploaded to
the content download system can be found at http://noai.openttd.org/downloads/ the content download system can be found at https://noai.openttd.org/downloads.
The AIs and libraries can be found their in the form of .tar.gz packages. The AIs and libraries can be found their in the form of .tar.gz packages.
OpenTTD can read inside tar files but it does not extract .tar.gz files by OpenTTD can read inside tar files but it does not extract .tar.gz files by itself.
itself.
To figure out which libraries you need for an AI you have to start the AI and To figure out which libraries you need for an AI you have to start the AI and
wait for an error message to pop up. The error message will tell you wait for an error message to pop up. The error message will tell you
@@ -278,29 +278,32 @@ The main OpenTTD directories can be found in various locations, depending on
your operating system: your operating system:
1. The current working directory (from where you started OpenTTD) 1. The current working directory (from where you started OpenTTD)
For non-Windows operating systems OpenTTD will not scan for files in this For non-Windows operating systems OpenTTD will not scan for files in this
directory if it is your personal directory, i.e. '~/', or when it is the directory if it is your personal directory, i.e. '~/', or when it is the
root directory, i.e. '/'. root directory, i.e. '/'.
2. Your personal directory 2. Your personal directory
- Windows: - Windows:
- `C:\My Documents\OpenTTD` (95, 98, ME) - `C:\My Documents\OpenTTD` (95, 98, ME)
- `C:\Documents and Settings\<username>\My Documents\OpenTTD` (2000, XP) - `C:\Documents and Settings\<username>\My Documents\OpenTTD` (2000, XP)
- `C:\Users\<username>\Documents\OpenTTD` (Vista, 7) - `C:\Users\<username>\Documents\OpenTTD` (Vista, 7, 8.1, 10)
- Mac OSX: `~/Documents/OpenTTD` - macOS: `~/Documents/OpenTTD`
- Linux: `$XDG_DATA_HOME/openttd` which is usually `~/.local/share/openttd` - Linux: `$XDG_DATA_HOME/openttd` which is usually `~/.local/share/openttd`
when built with XDG base directory support, otherwise `~/.openttd` when built with XDG base directory support, otherwise `~/.openttd`
3. The shared directory 3. The shared directory
- Windows: - Windows:
- `C:\Documents and Settings\All Users\Shared Documents\OpenTTD` (2000, XP) - `C:\Documents and Settings\All Users\Shared Documents\OpenTTD` (2000, XP)
- `C:\Users\Public\Documents\OpenTTD` (Vista, 7) - `C:\Users\Public\Documents\OpenTTD` (Vista, 7, 8.1, 10)
- Mac OSX: `/Library/Application Support/OpenTTD` - macOS: `/Library/Application Support/OpenTTD`
- Linux: not available - Linux: not available
4. The binary directory (where the OpenTTD executable is) 4. The binary directory (where the OpenTTD executable is)
- Windows: `C:\Program Files\OpenTTD` - Windows: `C:\Program Files\OpenTTD`
- Linux: `/usr/games` - Linux: `/usr/games`
5. The installation directory (Linux only) 5. The installation directory (Linux only)
- Linux: `/usr/share/games/openttd` - Linux: `/usr/share/games/openttd`
6. The application bundle (Mac OSX only) 6. The application bundle (macOS only)
It includes the OpenTTD files (grf+lng) and it will work as long as they It includes the OpenTTD files (grf+lng) and it will work as long as they
are not touched are not touched
@@ -311,14 +314,14 @@ chosen main OpenTTD directory:
| --- | --- | --- | | --- | --- | --- |
| Config File | (no subdirectory) | | | Config File | (no subdirectory) | |
| Screenshots | screenshot | | | Screenshots | screenshot | |
| Base Graphics | baseset| (or a subdirectory thereof) | | Base Graphics | baseset | (or a subdirectory thereof) |
| Sound Sets | baseset| (or a subdirectory thereof) | | Sound Sets | baseset | (or a subdirectory thereof) |
| NewGRFs | newgrf| (or a subdirectory thereof) | | NewGRFs | newgrf | (or a subdirectory thereof) |
| 32bpp Sets | newgrf| (or a subdirectory thereof) | | 32bpp Sets | newgrf | (or a subdirectory thereof) |
| Music Sets | baseset| (or a subdirectory thereof) | | Music Sets | baseset | (or a subdirectory thereof) |
| AIs | ai| (or a subdirectory thereof) | | AIs | ai | (or a subdirectory thereof) |
| AI Libraries | ai/library| (or a subdirectory thereof) | | AI Libraries | ai/library | (or a subdirectory thereof) |
| Game Scripts (GS) | game| (or a subdirectory thereof) | | Game Scripts (GS) | game | (or a subdirectory thereof) |
| GS Libraries | game/library | (or a subdirectory thereof) | | GS Libraries | game/library | (or a subdirectory thereof) |
| Savegames | save | | | Savegames | save | |
| Automatic Savegames | save/autosave | | | Automatic Savegames | save/autosave | |
@@ -389,17 +392,16 @@ OpenTTD has a lot of features going beyond the original Transport Tycoon Deluxe
emulation. Unfortunately, there is currently no comprehensive list of features, emulation. Unfortunately, there is currently no comprehensive list of features,
but there is a basic features list on the web, and some optional features can be but there is a basic features list on the web, and some optional features can be
controlled through the Advanced Settings dialog. We also implement some controlled through the Advanced Settings dialog. We also implement some
features known from [TTDPatch](http://www.ttdpatch.net/). features known from [TTDPatch](https://www.ttdpatch.net).
Several important non-standard controls: Several important non-standard controls:
- Ctrl modifies many commands and makes them more powerful. For example Ctrl - Ctrl modifies many commands and makes them more powerful. For example Ctrl
clicking on signals with the build signal tool changes their behaviour, holding clicking on signals with the build signal tool changes their behaviour,
Ctrl while the track build tool is activated changes it to the track removal holding Ctrl while the track build tool is activated changes it to the track
tool, and so on. See [http://wiki.openttd.org/Hidden_features](http://wiki.openttd.org/Hidden_features) removal tool, and so on. See https://wiki.openttd.org/Hidden_features
for a non-comprehensive list or look at the tooltips. for a non-comprehensive list or look at the tooltips.
- Ingame console. More information at - Ingame console. More information at https://wiki.openttd.org/Console
[http://wiki.openttd.org/index.php/Console](http://wiki.openttd.org/index.php/Console)
- Hovering over a GUI element shows tooltips. This can be changed to right click - Hovering over a GUI element shows tooltips. This can be changed to right click
via the advanced settings. via the advanced settings.
@@ -432,6 +434,70 @@ No personal information is stored.
You can show the game log by typing 'gamelog' in the console or by running You can show the game log by typing 'gamelog' in the console or by running
OpenTTD in debug mode. OpenTTD in debug mode.
### 5.2) Frame rate and performance metrics
The Help menu in-game has a function to open the Frame rate window. This
window shows various real-time performance statistics, measuring what parts
of the game require the most processing power currently.
A summary of the statistics can also be retrieved from the console with the
`fps` command. This is especially useful on dedicated servers, where the
administrator might want to determine what's limiting performance in a slow
game.
The frame rate is given as two figures, the simulation rate and the graphics
frame rate. Usually these are identical, as the screen is rendered exactly
once per simulated tick, but in the future there might be support for graphics
and simulation running at different rates. When the game is paused, the
simulation rate drops to zero.
In addition to the simulation rate, a game speed factor is also calculated.
This is based on the target simulation speed, which is 30 milliseconds per
game tick. At that speed, the expected frame rate is 33.33 frames/second, and
the game speed factor is how close to that target the actual rate is. When
the game is in fast forward mode, the game speed factor shows how much
speed up is achieved.
The lower part of the window shows timing statistics for individual parts of
the game. The times shown are short-term and long-term averages of how long
it takes to process one tick of game time, all figures are in milliseconds.
Clicking a line in the lower part of the window opens a graph window, giving
detailed readings on each tick simulated by the game.
The following is an explanation of the different statistics:
- *Game loop* - Total processing time used per simulated "tick" in the game.
This includes all pathfinding, world updates, and economy handling.
- *Cargo handling* - Time spent loading/unloading cargo at stations, and
industries and towns sending/retrieving cargo from stations.
- *Train ticks*, *Road vehicle ticks*, *Ship ticks*, *Aircraft ticks* -
Time spent on pathfinding and other processing for each player vehicle type.
- *World ticks* - Time spent on other world/landscape processing. This
includes towns growing, building animations, updates of farmland and trees,
and station rating updates.
- *Link graph delay* - Time overruns of the cargo distribution link graph
update thread. Usually the link graph is updated in a background thread,
but these updates need to synchronise with the main game loop occasionally,
if the time spent on link graph updates is longer than the time taken to
otherwise simulate the game while it was updating, these delays are counted
in this figure.
- *Graphics rendering* - Total time spent rendering all graphics, including
both GUI and world viewports. This typically spikes when panning the view
around, and when more things are happening on screen at once.
- *World viewport rendering* - Isolated time spent rendering just world
viewports. If this figure is significantly lower than the total graphics
rendering time, most time is spent rendering GUI than rendering world.
- *Video output* - Speed of copying the rendered graphics to the display
adapter. Usually this should be very fast (in the range of 0-3 ms), large
values for this can indicate a graphics driver problem.
- *Sound mixing* - Speed of mixing active audio samples together. Usually
this should be very fast (in the range of 0-3 ms), if it is slow, consider
switching to the NoSound set.
If the frame rate window is shaded, the title bar will instead show just the
current simulation rate and the game speed factor.
## 6.0) Configuration file ## 6.0) Configuration file
The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like
@@ -451,7 +517,7 @@ you need to add WITH_SDL to the project settings.
PNG (WITH_PNG) and ZLIB (WITH_ZLIB) support is enabled by default. For these PNG (WITH_PNG) and ZLIB (WITH_ZLIB) support is enabled by default. For these
to work you need their development files. For best results, download the to work you need their development files. For best results, download the
openttd-useful.zip file from [http://www.openttd.org/download-openttd-useful](http://www.openttd.org/download-openttd-useful) openttd-useful.zip file from https://www.openttd.org/download-openttd-useful.
Put the header files into your compiler's include/ directory and the Put the header files into your compiler's include/ directory and the
library (.lib) files into the lib/ directory. library (.lib) files into the lib/ directory.
For more help with VS see docs/Readme_Windows_MSVC.txt. For more help with VS see docs/Readme_Windows_MSVC.txt.
@@ -468,7 +534,7 @@ Use '`gmake`', but do a '`./configure`' before the first build.
OpenTTD can be built with GNU '`make`'. On non-GNU systems it is called '`gmake`'. OpenTTD can be built with GNU '`make`'. On non-GNU systems it is called '`gmake`'.
However, for the first build one has to do a '`./configure`' first. However, for the first build one has to do a '`./configure`' first.
### MacOS X: ### macOS:
Use '`make`' or Xcode (which will then call make for you) Use '`make`' or Xcode (which will then call make for you)
This will give you a binary for your CPU type (PPC/Intel) This will give you a binary for your CPU type (PPC/Intel)
@@ -521,7 +587,7 @@ The following libraries are used by OpenTTD for:
OpenTTD does not require any of the libraries to be present, but without OpenTTD does not require any of the libraries to be present, but without
liblzma you cannot open most recent savegames and without zlib you cannot liblzma you cannot open most recent savegames and without zlib you cannot
open most older savegames or use the content downloading system. open most older savegames or use the content downloading system.
Without libSDL/liballegro on non-Windows and non-MacOS X machines you have Without libSDL/liballegro on non-Windows and non-macOS machines you have
no graphical user interface; you would be building a dedicated server. no graphical user interface; you would be building a dedicated server.
### 7.2) Supported compilers ### 7.2) Supported compilers
@@ -544,7 +610,7 @@ The following compilers are known not to compile OpenTTD:
- GNU Compiler Collection (GCC) 3.2 and earlier. - GNU Compiler Collection (GCC) 3.2 and earlier.
These old versions fail due to OpenTTD's template usage. These old versions fail due to OpenTTD's template usage.
- GNU Compiler Collection (GCC) 4.5. It optimizes enums too aggressively. - GNU Compiler Collection (GCC) 4.5. It optimizes enums too aggressively.
See http://bugs.openttd.org/task/5513 and references therein. See https://github.com/OpenTTD/OpenTTD/issues/5513 and references therein.
- Intel C++ Compiler (ICC) 11.1 and earlier. - Intel C++ Compiler (ICC) 11.1 and earlier.
- Version 10.0 and earlier fail a configure check and fail with recent - Version 10.0 and earlier fail a configure check and fail with recent
system headers. system headers.
@@ -560,7 +626,7 @@ Patches to support more compilers are welcome.
To recompile the extra graphics needed to play with the original Transport To recompile the extra graphics needed to play with the original Transport
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well. Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
GRFCodec can be found at: [http://www.openttd.org/download-grfcodec](http://www.openttd.org/download-grfcodec) GRFCodec can be found at https://www.openttd.org/download-grfcodec.
The compilation of these extra graphics does generally not happen, unless The compilation of these extra graphics does generally not happen, unless
you remove the graphics file using '`make maintainer-clean`'. you remove the graphics file using '`make maintainer-clean`'.
@@ -573,17 +639,16 @@ modification of the base set files by the build process.
## 8.0) Translating ## 8.0) Translating
See [http://www.openttd.org/development](http://www.openttd.org/development) for up-to-date information. See https://www.openttd.org/development for up-to-date information.
The use of the online Translator service, located at The use of the online Translator service, located at
[http://translator.openttd.org/](http://translator.openttd.org/), is highly https://translator.openttd.org, is highly encouraged. For getting an account
encouraged. For getting an account simply follow the guidelines in the FAQ of simply follow the guidelines in the FAQ of the translator website.
the translator website.
If for some reason the website is down for a longer period of time, the If for some reason the website is down for a longer period of time, the
information below might be of help. information below might be of help.
Please contact the translations manager ([http://www.openttd.org/contact](http://www.openttd.org/contact)) Please contact the translations manager (https://www.openttd.org/contact)
before beginning the translation process! This avoids double work, as before beginning the translation process! This avoids double work, as
someone else may have already started translating to the same language. someone else may have already started translating to the same language.
@@ -602,8 +667,8 @@ Note: Do not alter the following parts of the file:
- String identifiers (the first word on each line) - String identifiers (the first word on each line)
- Parts of the strings which are in curly braces (such as {STRING}) - Parts of the strings which are in curly braces (such as {STRING})
- Lines beginning with ## (such as ##id), other than the first two lines of - Lines beginning with ## (such as ##id), other than the first two lines
the file of the file
### 8.2) Previewing ### 8.2) Previewing
@@ -635,7 +700,7 @@ If the game is acting strange and you feel adventurous you can try the
debugging output. The 'name' variable can help you to display only some type of debugging output. The 'name' variable can help you to display only some type of
debugging messages. This is mostly undocumented so best is to look in the debugging messages. This is mostly undocumented so best is to look in the
source code file debug.c for the various debugging types. For more information source code file debug.c for the various debugging types. For more information
look at [http://wiki.openttd.org/index.php/Command_line](http://wiki.openttd.org/index.php/Command_line). look at https://wiki.openttd.org/Command_line.
The most frequent problem is missing data files. Please install OpenGFX and The most frequent problem is missing data files. Please install OpenGFX and
possibly OpenSFX and OpenMSX. See section 4.1.1 for more information. possibly OpenSFX and OpenMSX. See section 4.1.1 for more information.
@@ -659,16 +724,16 @@ and add a suitable font for the small, medium and / or large font, e.g.:
You should use a font name like 'Tahoma' or a path to the desired font. You should use a font name like 'Tahoma' or a path to the desired font.
Any NewGRF file used in a game is stored inside the savegame and will refuse Any NewGRF file used in a game is stored inside the savegame and will refuse to
to load if you do not have that NewGRF file available. A list of missing files load if you do not have that NewGRF file available. A list of missing files can
can be viewed in the NewGRF window accessible from the file load dialogue window. be viewed in the NewGRF window accessible from the file load dialogue window.
You can try to obtain the missing files from that NewGRF dialogue or if they You can try to obtain the missing files from that NewGRF dialogue or if they
are not available online you can search manually through our [forum's graphics are not available online you can search manually through our
development section](http://www.tt-forums.net/viewforum.php?f=66) or GrfCrawler [forum's graphics development section](https://www.tt-forums.net/viewforum.php?f=66)
(http://grfcrawler.tt-forums.net/). Put the NewGRF files in OpenTTD's newgrf folder or [GRFCrawler](https://grfcrawler.tt-forums.net). Put the NewGRF files in
(see section 4.2 'OpenTTD directories') and rescan the list of available NewGRFs. OpenTTD's newgrf folder (see section 4.2 'OpenTTD directories') and rescan the
Once you have all missing files, you are set to go. list of available NewGRFs. Once you have all missing files, you are set to go.
## 10.0) Licensing ## 10.0) Licensing
@@ -697,8 +762,14 @@ os/dos/exe2coff/copying.dj for the exact licensing terms.
The CWSDPMI implementation in os/dos/cwsdpmi is distributed under a The CWSDPMI implementation in os/dos/cwsdpmi is distributed under a
custom binary-only license that prohibits modification. The exact custom binary-only license that prohibits modification. The exact
licensing terms can be found in os/dos/cwsdpmi/cwsdpmi.txt. The sources licensing terms can be found in os/dos/cwsdpmi/cwsdpmi.txt. The sources
for these files can be downloaded at its author site, at: for these files can be downloaded at its author site, at
[http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip](http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip) http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip.
CONTRIBUTING.md is adapted from
[Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
under the [Creative Commons Attribution 3.0 Unported
License](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE)
terms for Bootstrap documentation.
## X.X) Credits ## X.X) Credits
@@ -721,7 +792,7 @@ for these files can be downloaded at its author site, at:
### Inactive Developers: ### Inactive Developers:
- Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0) - Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0)
- Bjarni Corfitzen (Bjarni) - MacOSX port, coder and vehicles (0.3 - 0.7) - Bjarni Corfitzen (Bjarni) - macOS port, coder and vehicles (0.3 - 0.7)
- Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6) - Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6)
- Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6) - Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6)
- Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6) - Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6)
@@ -735,7 +806,7 @@ for these files can be downloaded at its author site, at:
- Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5) - Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5)
- Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3) - Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3)
- Emil Djupfeld (egladil) - MacOSX port (0.4 - 0.6) - Emil Djupfeld (egladil) - macOS port (0.4 - 0.6)
- Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5) - Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5)
- Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3) - Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3)
- Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3) - Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3)
@@ -760,4 +831,3 @@ for these files can be downloaded at its author site, at:
- All Translators - For their support to make OpenTTD a truly international game - All Translators - For their support to make OpenTTD a truly international game
- Bug Reporters - Thanks for all bug reports - Bug Reporters - Thanks for all bug reports
- Chris Sawyer - For an amazing game! - Chris Sawyer - For an amazing game!

76
bin/baseset/orig_dos.obm Normal file
View File

@@ -0,0 +1,76 @@
; $Id$
;
; This represents the original music as on the Transport
; Tycoon Deluxe for DOS CD.
;
[metadata]
name = original_dos
shortname = TTDD
version = 1
description = Original Transport Tycoon Deluxe DOS edition music.
[files]
theme = gm.cat
old_0 = gm.cat
old_1 = gm.cat
old_2 = gm.cat
old_3 = gm.cat
old_4 = gm.cat
old_5 = gm.cat
old_6 = gm.cat
old_7 = gm.cat
old_8 =
old_9 =
new_0 = gm.cat
new_1 = gm.cat
new_2 = gm.cat
new_3 = gm.cat
new_4 = gm.cat
new_5 = gm.cat
new_6 = gm.cat
new_7 =
new_8 =
new_9 =
ezy_0 = gm.cat
ezy_1 = gm.cat
ezy_2 = gm.cat
ezy_3 = gm.cat
ezy_4 = gm.cat
ezy_5 = gm.cat
ezy_6 =
ezy_7 =
ezy_8 =
ezy_9 =
[md5s]
gm.cat = 7a29d2d0c4f7d2e03091ffa9b2bdfffb
[catindex]
theme = 0
old_0 = 1
old_1 = 8
old_2 = 2
old_3 = 9
old_4 = 14
old_5 = 15
old_6 = 19
old_7 = 13
new_0 = 6
new_1 = 11
new_2 = 10
new_3 = 17
new_4 = 21
new_5 = 18
new_6 = 5
ezy_0 = 12
ezy_1 = 7
ezy_2 = 16
ezy_3 = 3
ezy_4 = 20
ezy_5 = 4
[names]
; Names get read from the CAT file
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

71
bin/baseset/orig_tto.obm Normal file
View File

@@ -0,0 +1,71 @@
; $Id$
;
; This represents the original music as on the Transport
; Tycoon (with World Editor) for DOS CD.
;
[metadata]
name = original_tto
shortname = TTOD
version = 1
description = Original Transport Tycoon (Original/World Editor) music.
[files]
theme = gm-tto.cat
old_0 = gm-tto.cat
old_1 = gm-tto.cat
old_2 = gm-tto.cat
old_3 = gm-tto.cat
old_4 = gm-tto.cat
old_5 = gm-tto.cat
old_6 = gm-tto.cat
old_7 = gm-tto.cat
old_8 =
old_9 =
new_0 = gm-tto.cat
new_1 = gm-tto.cat
new_2 = gm-tto.cat
new_3 = gm-tto.cat
new_4 = gm-tto.cat
new_5 = gm-tto.cat
new_6 = gm-tto.cat
new_7 = gm-tto.cat
new_8 =
new_9 =
ezy_0 =
ezy_1 =
ezy_2 =
ezy_3 =
ezy_4 =
ezy_5 =
ezy_6 =
ezy_7 =
ezy_8 =
ezy_9 =
[catindex]
theme = 0
old_0 = 1
old_1 = 6
old_2 = 2
old_3 = 7
old_4 = 11
old_5 = 12
old_6 = 15
old_7 = 10
new_0 = 4
new_1 = 5
new_2 = 9
new_3 = 8
new_4 = 13
new_5 = 16
new_6 = 14
new_7 = 3
[md5s]
gm-tto.cat = 26e85ff84b0063aa5da05dd4698fc76e
[names]
; Names get read from the CAT file
[origin]
default = You can find it on your Transport Tycoon CD-ROM.

View File

@@ -142,5 +142,17 @@ GM_TT19.GM = Funk Central
GM_TT20.GM = Jammit GM_TT20.GM = Jammit
GM_TT21.GM = Movin' On 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] [origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM. default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -1,3 +1,44 @@
1.8.0 (2018-04-01)
------------------------------------------------------------------------
(None)
1.8.0-RC1 (2018-03-21)
------------------------------------------------------------------------
- Feature: [GFX] Climate-specific Action5 extra airport sprites [FS#6664] (r27976)
- Feature: Draw vertical separators at tile distance in the train depot GUI (r27938, r27899)
- Feature: [Build] MSVC 2017 project file generator. Most noticeable, std:c++latest is enabled (r27920, r27919, r27918, r27917)
- Feature: [Build] Project file generator for kdevelop 4/5 [FS#6577] (r27897)
- Feature: Add option to close windows with right click [FS#4950] (r27826, r27825)
- Feature: Vehicle Group Info: Add profits and occupancy display to group vehicle list (r27822)
- Feature: Display aircraft type in vehicle preview/purchase/detail windows (r27802, r27799, r27797)
- Change: [NewGRF] Various performance improvements to resolving VA2 (r27989, r27985, r27984, r27983, r27982)
- Change: [NewGRF] Increase maximum allowed vehicle sprite size to reduce clipping of ships (r27987)
- Change: Check companies for bankruptcy before subtracting reoccuring monthly costs [FS#6679] (r27981)
- Change: [GFX] Replace the office building sprite on various toyland airports with a better fitting sprite [FS#6664] (r27977)
- Change: [GFX] The switch-toolbar icon contained pixels from the fire cycle. Replace the whole icon with a new version [FS#6654] (r27961)
- Change: Reword texts in industry view, when stockpiling is used (r27952)
- Change: Remove the gap between windows when positioning them after opening [FS#6568] (r27934, r27900)
- Change: [Build] Enable usage of static_assert for MSVC (r27916)
- Change: [Build] Preserve PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR environment variables in config.cache file [FS#6614] (r27902)
- Change: Do not cancel headquarter construction and engine-preview-query when shift-clicking (r27889)
- Change: Parse extmidi command string for parameters to pass on (r27834)
- Change: Draw images in centre of buttons (r27829, r27821)
- Fix: Store the map variety setting in the savegame like the other mapgen settings, so restarting maps considers it [FS#6673] (r27978)
- Fix: Hair selection was missing one option [FS#6642] (r27975)
- Fix: Avoid tile operations outside map border when building lock [FS#6662] (r27973)
- Fix: Catenary sprites got mixed up for depots [FS#6670] (r27972)
- Fix: Make automatic window-positioning RTL-aware (r27934, r27900)
- Fix: Automatic window-positioning now uses GUI-scale/style dependent sizes/distances instead of fixed pixel values (r27934, r27900)
- Fix: [NewGRF] While executing random triggers, var 5F should include the new triggers (r27928)
- Fix: [NewGRF] Reset used random triggers only after all A123 chains have been resolved, so that all RA2 in all chains can test the shared triggers (r27928)
- Fix: [NewGRF] Industry random triggers are stored per tile, even when randomising the shared random bits of the parent industry (r27928)
- Fix: [NPF] Reserved track bits were not accounted for when trying to find any safe position (r27912)
- Fix: Do not modify argv[0] [FS#6575] (r27886)
- Fix: Do not search directories when opening ini files as we already have their full path [FS#6421] (r27816)
- Fix: Road tunnel/bridge heads have no trackbits wrt. catenary drawing (r27812)
1.7.2 (2017-12-24) 1.7.2 (2017-12-24)
------------------------------------------------------------------------ ------------------------------------------------------------------------
(None) (None)

View File

@@ -31,7 +31,6 @@ set_default() {
awk="awk" awk="awk"
pkg_config="pkg-config" pkg_config="pkg-config"
os="DETECT" os="DETECT"
endian="AUTO"
cpu_type="DETECT" cpu_type="DETECT"
config_log="config.log" config_log="config.log"
prefix_dir="/usr/local" prefix_dir="/usr/local"
@@ -78,6 +77,7 @@ set_default() {
enable_builtin_depend="1" enable_builtin_depend="1"
with_makedepend="0" with_makedepend="0"
with_direct_music="1" with_direct_music="1"
with_xaudio2="1"
with_sort="1" with_sort="1"
with_iconv="1" with_iconv="1"
with_midi="" with_midi=""
@@ -88,7 +88,7 @@ set_default() {
with_icu_layout="1" with_icu_layout="1"
with_icu_sort="1" with_icu_sort="1"
static_icu="0" static_icu="0"
with_psp_config="1" with_uniscribe="1"
with_threads="1" with_threads="1"
with_distcc="1" with_distcc="1"
with_ccache="1" with_ccache="1"
@@ -112,7 +112,6 @@ set_default() {
awk awk
pkg_config pkg_config
os os
endian
cpu_type cpu_type
config_log config_log
prefix_dir prefix_dir
@@ -158,6 +157,7 @@ set_default() {
enable_builtin_depend enable_builtin_depend
with_makedepend with_makedepend
with_direct_music with_direct_music
with_xaudio2
with_sort with_sort
with_iconv with_iconv
with_midi with_midi
@@ -168,7 +168,7 @@ set_default() {
with_icu_layout with_icu_layout
with_icu_sort with_icu_sort
static_icu static_icu
with_psp_config with_uniscribe
with_threads with_threads
with_distcc with_distcc
with_ccache with_ccache
@@ -230,9 +230,6 @@ detect_params() {
--lipo) prev_p="lipo";; --lipo) prev_p="lipo";;
--lipo=*) lipo="$optarg";; --lipo=*) lipo="$optarg";;
--endian) prev_p="endian";;
--endian=*) endian="$optarg";;
# Alias --prefix with --prefix-dir, for compatibility with GNU autotools # Alias --prefix with --prefix-dir, for compatibility with GNU autotools
@@ -412,9 +409,9 @@ detect_params() {
--static-libicu) static_icu="1";; --static-libicu) static_icu="1";;
--static-libicu=*) static_icu="$optarg";; --static-libicu=*) static_icu="$optarg";;
--with-psp-config) with_psp_config="2";; --with-uniscribe) with_uniscribe="2";;
--without-psp-config) with_psp_config="0";; --without-uniscribe) with_uniscribe="0";;
--with-psp-config=*) with_psp_config="$optarg";; --with-uniscribe=*) with_uniscribe="$optarg";;
--disable-builtin-depend) enable_builtin_depend="0";; --disable-builtin-depend) enable_builtin_depend="0";;
--enable-builtin-depend) enable_builtin_depend="2";; --enable-builtin-depend) enable_builtin_depend="2";;
@@ -428,6 +425,10 @@ detect_params() {
--without-direct-music) with_direct_music="0";; --without-direct-music) with_direct_music="0";;
--with-direct-music=*) with_direct_music="$optarg";; --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";; --with-sort) with_sort="2";;
--without-sort) with_sort="0";; --without-sort) with_sort="0";;
--with-sort=*) with_sort="$optarg";; --with-sort=*) with_sort="$optarg";;
@@ -561,7 +562,6 @@ check_params() {
# Some params want to be in full uppercase, else they might not work as # Some params want to be in full uppercase, else they might not work as
# expected.. fix that here # expected.. fix that here
endian=`echo $endian | tr '[a-z]' '[A-Z]'`
os=`echo $os | tr '[a-z]' '[A-Z]'` os=`echo $os | tr '[a-z]' '[A-Z]'`
cpu_type=`echo $cpu_type | tr '[a-z]' '[A-Z]'` cpu_type=`echo $cpu_type | tr '[a-z]' '[A-Z]'`
@@ -577,21 +577,10 @@ check_params() {
# Check if all params have valid values # Check if all params have valid values
# Endian only allows AUTO, LE and, BE # OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS
if [ -z "`echo $endian | egrep '^(AUTO|LE|BE|PREPROCESSOR)$'`" ]; then 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 --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
log 1 "configure: error: invalid option --os=$os" log 1 "configure: error: invalid option --os=$os"
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]" log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS]"
exit 1 exit 1
fi fi
# cpu_type can be either 32 or 64 # cpu_type can be either 32 or 64
@@ -790,13 +779,13 @@ check_params() {
exit 1 exit 1
fi fi
else else
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
log 1 "checking GDI video driver... found" log 1 "checking GDI video driver... found"
else else
log 1 "checking GDI video driver... not Windows, skipping" log 1 "checking GDI video driver... not Windows, skipping"
fi 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 "configure: error: no video driver development files found"
log 1 " If you want a dedicated server use --enable-dedicated as parameter" log 1 " If you want a dedicated server use --enable-dedicated as parameter"
exit 1 exit 1
@@ -896,13 +885,34 @@ check_params() {
fi fi
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_xdg_basedir
detect_png detect_png
detect_freetype detect_freetype
detect_fontconfig detect_fontconfig
detect_icu_layout detect_icu_layout
detect_icu_sort detect_icu_sort
detect_pspconfig
detect_libtimidity detect_libtimidity
if [ "$with_direct_music" != "0" ]; then if [ "$with_direct_music" != "0" ]; then
@@ -919,13 +929,21 @@ check_params() {
fi fi
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 log 1 "checking xaudio2... not Windows, skipping"
endian="PREPROCESSOR" else
check_xaudio2
fi
fi fi
log 1 "checking endianness... $endian" detect_sort
# Suppress language errors when there is a version defined, indicating a release # 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. # It just isn't pretty if any release produces warnings in the languages.
@@ -1137,7 +1155,7 @@ check_params() {
fi fi
if [ "$personal_dir" = "1" ]; then 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" personal_dir="OpenTTD"
elif [ "$os" = "OSX" ]; then elif [ "$os" = "OSX" ]; then
personal_dir="Documents/OpenTTD" personal_dir="Documents/OpenTTD"
@@ -1235,14 +1253,14 @@ make_compiler_cflags() {
# $5 - name of the features variable # $5 - name of the features variable
# Get the compiler to tell us who it is # Get the compiler to tell us who it is
compiler="`$1 --version | head -n1 | cut -d' ' -f1`" version_line="`$1 --version | head -n1`"
eval eval "flags=\\\$$2" eval eval "flags=\\\$$2"
eval eval "cxxflags=\\\$$3" eval eval "cxxflags=\\\$$3"
eval eval "ldflags=\\\$$4" eval eval "ldflags=\\\$$4"
eval eval "features=\\\$$5" eval eval "features=\\\$$5"
if [ "$compiler" = "icc" ]; then if [ `echo "$version_line" | cut -d' ' -f1` = "icc" ]; then
# Enable some things only for certain ICC versions # Enable some things only for certain ICC versions
cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g` cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g`
@@ -1334,7 +1352,7 @@ make_compiler_cflags() {
features="$features lto" features="$features lto"
fi fi
fi fi
elif [ "$compiler" = "clang" ]; then elif echo "$version_line" | grep -q "clang"; then
# Enable some things only for certain clang versions # 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`" cc_version="`$1 -v 2>&1 | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`"
@@ -1591,9 +1609,6 @@ make_cflags_and_ldflags() {
# Each debug level reduces the optimization by a bit # Each debug level reduces the optimization by a bit
if [ $enable_debug -ge 1 ]; then if [ $enable_debug -ge 1 ]; then
CFLAGS="$CFLAGS -g -D_DEBUG" CFLAGS="$CFLAGS -g -D_DEBUG"
if [ "$os" = "PSP" ]; then
CFLAGS="$CFLAGS -G0"
fi
fi fi
if [ $enable_debug -ge 2 ]; then if [ $enable_debug -ge 2 ]; then
CFLAGS="$CFLAGS -fno-inline" CFLAGS="$CFLAGS -fno-inline"
@@ -1670,7 +1685,7 @@ make_cflags_and_ldflags() {
fi fi
fi fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ]; then
LIBS="$LIBS -lpthread" LIBS="$LIBS -lpthread"
fi fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
@@ -1881,19 +1896,9 @@ EOL
fi fi
fi 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" LIBS="$LIBS -lc"
fi 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 if [ "$os" = "MORPHOS" ]; then
# -Wstrict-prototypes generates much noise because of system headers # -Wstrict-prototypes generates much noise because of system headers
@@ -1932,14 +1937,14 @@ EOL
CFLAGS="$CFLAGS -DUNIX" CFLAGS="$CFLAGS -DUNIX"
fi fi
# And others like Windows # And others like Windows
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
CFLAGS="$CFLAGS -DWIN" CFLAGS="$CFLAGS -DWIN"
fi fi
if [ -n "$allegro_config" ]; then if [ -n "$allegro_config" ]; then
CFLAGS="$CFLAGS -DWITH_ALLEGRO" CFLAGS="$CFLAGS -DWITH_ALLEGRO"
CFLAGS="$CFLAGS `$allegro_config --cflags`" CFLAGS="$CFLAGS `$allegro_config --cflags`"
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$allegro_config --static --libs`" LIBS="$LIBS `$allegro_config --static --libs`"
else else
@@ -1952,7 +1957,7 @@ EOL
CFLAGS="$CFLAGS -DWITH_SDL" CFLAGS="$CFLAGS -DWITH_SDL"
# SDL must not add _GNU_SOURCE as it breaks many platforms # SDL must not add _GNU_SOURCE as it breaks many platforms
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" 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 if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$sdl_config --static-libs`" LIBS="$LIBS `$sdl_config --static-libs`"
else else
@@ -2049,7 +2054,7 @@ EOL
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '`" LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '` -lfreetype"
else else
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi fi
@@ -2077,6 +2082,10 @@ EOL
fi fi
fi fi
if [ "$with_uniscribe" != "0" ]; then
CFLAGS="$CFLAGS -DWITH_UNISCRIBE"
LIBS="$LIBS -lusp10"
fi
if [ "$with_direct_music" != "0" ]; then if [ "$with_direct_music" != "0" ]; then
CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT" CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT"
@@ -2088,6 +2097,10 @@ EOL
fi fi
fi fi
if [ "$with_xaudio2" != "0" ]; then
CFLAGS="$CFLAGS -DWITH_XAUDIO2"
fi
if [ -n "$libtimidity_config" ]; then if [ -n "$libtimidity_config" ]; then
CFLAGS="$CFLAGS -DLIBTIMIDITY" CFLAGS="$CFLAGS -DLIBTIMIDITY"
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
@@ -2388,7 +2401,7 @@ check_cxx_host() {
} }
check_windres() { 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" check_compiler "host windres" "windres" "$host" "$windres" "$WINDRES" "windres" "windres" "2" "-V"
fi fi
} }
@@ -2455,9 +2468,7 @@ check_direct_music() {
echo " echo "
#include <windows.h> #include <windows.h>
#include <dmksctrl.h> #include <dmksctrl.h>
#include <dmusici.h>
#include <dmusicc.h> #include <dmusicc.h>
#include <dmusicf.h>
int main(int argc, char *argv[]) { }" > direct_music.test.c int main(int argc, char *argv[]) { }" > direct_music.test.c
$cxx_host $CFLAGS direct_music.test.c -o direct_music.test 2> /dev/null $cxx_host $CFLAGS direct_music.test.c -o direct_music.test 2> /dev/null
res=$? res=$?
@@ -2476,6 +2487,35 @@ check_direct_music() {
fi fi
} }
check_xaudio2() {
echo "
#include <windows.h>
#undef NTDDI_VERSION
#undef _WIN32_WINNT
#define NTDDI_VERSION NTDDI_WIN8
#define _WIN32_WINNT _WIN32_WINNT_WIN8
#include <xaudio2.h>
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() { check_makedepend() {
if [ "$enable_builtin_depend" != "0" ]; then if [ "$enable_builtin_depend" != "0" ]; then
with_makedepend="0" with_makedepend="0"
@@ -2594,7 +2634,7 @@ detect_awk() {
detect_os() { detect_os() {
if [ "$os" = "DETECT" ]; then if [ "$os" = "DETECT" ]; then
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP # Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, and DOS
# Try first via dumpmachine, then via uname # Try first via dumpmachine, then via uname
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk ' os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
@@ -2614,8 +2654,6 @@ detect_os() {
/mingw/ { print "MINGW"; exit} /mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit} /os2/ { print "OS2"; exit}
/dos/ { print "DOS"; exit} /dos/ { print "DOS"; exit}
/wince/ { print "WINCE"; exit}
/psp/ { print "PSP"; exit}
'` '`
if [ -z "$os" ]; then if [ -z "$os" ]; then
@@ -2641,7 +2679,7 @@ detect_os() {
if [ -z "$os" ]; then if [ -z "$os" ]; then
log 1 "detecting OS... none detected" log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --os=OS to force one" log 1 "I couldn't detect your OS. Please use --os=OS to force one"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP" log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS"
exit 1 exit 1
fi fi
@@ -2900,6 +2938,11 @@ detect_library() {
eval "res=\$$2" eval "res=\$$2"
if [ -z "$res" ]; then if [ -z "$res" ]; then
log 2 " trying /mingw/include/$4$5... no" 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\$\"`" eval "$2=`ls -1 /opt/local/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
fi fi
eval "res=\$$2" eval "res=\$$2"
@@ -2948,6 +2991,11 @@ detect_library() {
eval "res=\$$2" eval "res=\$$2"
if [ -z "$res" ]; then if [ -z "$res" ]; then
log 2 " trying /mingw/lib/$3... no" 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: $2 couldn't be found"
log 1 "configure: error: you requested a static link, but I can't find $3" log 1 "configure: error: you requested a static link, but I can't find $3"
@@ -3084,7 +3132,7 @@ detect_fontconfig() {
fontconfig_config="" fontconfig_config=""
return 0 return 0
fi fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
log 1 "checking libfontconfig... WIN32, skipping" log 1 "checking libfontconfig... WIN32, skipping"
fontconfig_config="" fontconfig_config=""
return 0 return 0
@@ -3107,55 +3155,6 @@ detect_icu_sort() {
detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1" 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() { detect_iconv() {
# 0 means no, 1 is auto-detect, 2 is force # 0 means no, 1 is auto-detect, 2 is force
if [ "$with_iconv" = "0" ]; then if [ "$with_iconv" = "0" ]; then
@@ -3521,17 +3520,14 @@ make_sed() {
s@!!INSTALL_DIR!!@$install_dir@g; s@!!INSTALL_DIR!!@$install_dir@g;
s@!!BINARY_NAME!!@$binary_name@g; s@!!BINARY_NAME!!@$binary_name@g;
s@!!STRGEN!!@$STRGEN@g; s@!!STRGEN!!@$STRGEN@g;
s@!!ENDIAN_CHECK!!@$ENDIAN_CHECK@g;
s@!!DEPEND!!@$DEPEND@g; s@!!DEPEND!!@$DEPEND@g;
s@!!SETTINGSGEN!!@$SETTINGSGEN@g; s@!!SETTINGSGEN!!@$SETTINGSGEN@g;
s@!!ENDIAN_FORCE!!@$endian@g;
s@!!STAGE!!@$STAGE@g; s@!!STAGE!!@$STAGE@g;
s@!!MAKEDEPEND!!@$makedepend@g; s@!!MAKEDEPEND!!@$makedepend@g;
s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g; s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g;
s@!!SORT!!@$sort@g; s@!!SORT!!@$sort@g;
s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g; s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g;
s@!!CONFIG_CACHE_LINKER!!@config.cache.linker@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_SOURCE!!@config.cache.source@g;
s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g; s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g;
s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g; s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g;
@@ -3767,8 +3763,7 @@ showhelp() {
echo " --os=OS the OS we are compiling for [DETECT]" echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/" echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/" echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
echo " MINGW/OS2/DOS/WINCE/PSP/HAIKU" echo " MINGW/OS2/DOS/HAIKU"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo "" echo ""
echo "Paths:" echo "Paths:"
echo " --prefix-dir=dir specifies the prefix for all installed" echo " --prefix-dir=dir specifies the prefix for all installed"
@@ -3864,7 +3859,6 @@ showhelp() {
echo " --static-icu try to link statically (libsicu instead of" echo " --static-icu try to link statically (libsicu instead of"
echo " libicu; can fail as the new name is guessed)" echo " libicu; can fail as the new name is guessed)"
echo " --with-iconv[=iconv-path] enables iconv support" echo " --with-iconv[=iconv-path] enables iconv support"
echo " --with-psp-config[=psp-config] enables psp-config support (PSP ONLY)"
echo " --disable-builtin-depend disable use of builtin deps finder" echo " --disable-builtin-depend disable use of builtin deps finder"
echo " --with-makedepend[=makedepend] enables makedepend support" echo " --with-makedepend[=makedepend] enables makedepend support"
echo " --with-ccache enables ccache support" echo " --with-ccache enables ccache support"

5
configure vendored
View File

@@ -75,13 +75,12 @@ save_params
make_cflags_and_ldflags make_cflags_and_ldflags
EXE="" 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" EXE=".exe"
fi fi
TTD="openttd$EXE" TTD="openttd$EXE"
STRGEN="strgen$EXE" STRGEN="strgen$EXE"
ENDIAN_CHECK="endian_check$EXE"
DEPEND="depend$EXE" DEPEND="depend$EXE"
SETTINGSGEN="settings_gen$EXE" SETTINGSGEN="settings_gen$EXE"
@@ -114,7 +113,6 @@ AWKCOMMAND='
if ($0 == "PNG" && "'$png_config'" == "") { next; } if ($0 == "PNG" && "'$png_config'" == "") { next; }
if ($0 == "OSX" && "'$os'" != "OSX") { next; } if ($0 == "OSX" && "'$os'" != "OSX") { next; }
if ($0 == "OS2" && "'$os'" != "OS2") { next; } if ($0 == "OS2" && "'$os'" != "OS2") { next; }
if ($0 == "PSP" && "'$os'" != "PSP") { next; }
if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; } if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
if ($0 == "AI" && "'$enable_ai'" == "0") { next; } if ($0 == "AI" && "'$enable_ai'" == "0") { next; }
if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; } if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; }
@@ -124,7 +122,6 @@ AWKCOMMAND='
if ($0 == "WIN32" && "'$os'" != "MINGW" && if ($0 == "WIN32" && "'$os'" != "MINGW" &&
"'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; } "'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; }
if ($0 == "MORPHOS" && "'$os'" != "MORPHOS") { next; } if ($0 == "MORPHOS" && "'$os'" != "MORPHOS") { next; }
if ($0 == "WINCE" && "'$os'" != "WINCE") { next; }
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; } if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; } if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }

View File

@@ -1,27 +1,24 @@
Compiling OpenTTD using Microsoft Visual C++ Compiling OpenTTD using Microsoft Visual C++
Last updated: 2010-01-03 Last updated: 2018-03-21
-------------------------------------------- --------------------------------------------
PLEASE READ THE ENTIRE DOCUMENT BEFORE DOING ANY ACTUAL CHANGES!! PLEASE READ THE ENTIRE DOCUMENT BEFORE DOING ANY ACTUAL CHANGES!!
SUPPORTED MSVC COMPILERS SUPPORTED MSVC COMPILERS
------------------------ ------------------------
OpenTTD includes projects for MSVC 2005.NET and MSVC 2008.NET. Both will OpenTTD includes projects for Microsoft Visual Studio 2005 and later.
compile out of the box, providing you have the required libraries/headers; This is the earliest compiler supported, Visual C++ 2003, Visual C++ 6.0,
which ones, see below. There is no support for VS6 or MSVC 2002, or or earlier, will not compile OpenTTD.
MSVC 2003.NET. You are therefore strongly encouraged to either upgrade to You can download the free Visual Studio Community Edition from Microsoft.
MSVC 2008 Express (free) or use GCC.
1) REQUIRED FILES 1) REQUIRED FILES
----------------- -----------------
You might already have some of the files already installed, so check before You might already have some of the files already installed, so check before
downloading; mostly because the DirectX SDK and Platform SDK are about downloading; mostly because the Platform SDK is about 500MB.
500MB each.
Download the following files: Download the following files:
* openttd-useful.zip (http://binaries.openttd.org/extra/openttd-useful/) * openttd-useful.zip (http://binaries.openttd.org/extra/openttd-useful/)
* DirectX 8.1 SDK (http://neuron.tuke.sk/~mizanin/eng/Dx81sdk-include-lib.rar) (or alternatively the latest DirectX SDK from Microsoft)
* MS Windows Platform SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en) * MS Windows Platform SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en)
* afxres.h (http://www-d0.fnal.gov/d0dist/dist/packages/d0ve/devel/windows/AFXRES.H) * afxres.h (http://www-d0.fnal.gov/d0dist/dist/packages/d0ve/devel/windows/AFXRES.H)
@@ -81,12 +78,16 @@ See section 4.1 of README.md for the required 3rdparty files and how to install
4) COMPILING 4) COMPILING
------------ ------------
Open trunk/openttd_vs[89]0.sln Open the appropriate "sln" (Solution) file for your version of Visual Studio:
- VS 2005: projects/openttd_vs80.sln
- VS 2008: projects/openttd_vs90.sln
- VS 2010: projects/openttd_vs100.sln
- VS 2015: projects/openttd_vs140.sln
Set the build mode to 'Release' in Set the build mode to 'Release' in
Build > Configuration manager > Active solution configuration > select "Release" Build > Configuration manager > Active solution configuration > select "Release"
Compile... Compile...
If everything works well the binary should be in trunk/objs/Win[32|64]/Release/openttd.exe If everything works well the binary should be in objs/Win[32|64]/Release/openttd.exe
5) EDITING, CHANGING SOURCE CODE 5) EDITING, CHANGING SOURCE CODE

View File

@@ -226,7 +226,7 @@
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the tile</li> <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the tile</li>
<li>m2: see signals</li> <li>m2: see signals</li>
<li>m3 bits 7..4: see signals</li> <li>m3 bits 7..4: see signals</li>
<li>m3 bits 3..0 = <a name="TrackType">track type</a>: <li>m8 bits 5..0 = <a name="TrackType">track type</a>:
<table> <table>
<tr> <tr>
<td><tt>0</tt>&nbsp; </td> <td><tt>0</tt>&nbsp; </td>
@@ -626,7 +626,8 @@
<li>m5 bit 6 set: level crossing <li>m5 bit 6 set: level crossing
<ul> <ul>
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the railway track</li> <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the railway track</li>
<li>m3 bits 3..0: <a href="#TrackType">railway track type</a></li> <li>m5 bit 5: set if crossing lights are on</li>
<li>m5 bit 4: pbs reservation state</li>
<li>m5 bit 0: direction <li>m5 bit 0: direction
<table> <table>
<tr> <tr>
@@ -639,9 +640,8 @@
</tr> </tr>
</table> </table>
</li> </li>
<li>m5 bit 5: set if crossing lights are on</li>
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li> <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
<li>m5 bit 4: pbs reservation state</li> <li>m8 bits 5..0: <a href="#TrackType">railway track type</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@@ -860,7 +860,6 @@
<li>m2: index into the array of stations</li> <li>m2: index into the array of stations</li>
<li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li> <li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li> <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
<li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
<li>m4: custom station id; 0 means standard graphics</li> <li>m4: custom station id; 0 means standard graphics</li>
<li>m5: graphics index (range from 0..255 for each station type): <li>m5: graphics index (range from 0..255 for each station type):
<table> <table>
@@ -979,6 +978,7 @@
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li> <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
<li>m7 bits 7..6: present road types (road stops)</li> <li>m7 bits 7..6: present road types (road stops)</li>
<li>m7: animation frame (railway stations/waypoints, airports)</li> <li>m7: animation frame (railway stations/waypoints, airports)</li>
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
</ul> </ul>
</td> </td>
</tr> </tr>
@@ -1444,7 +1444,6 @@
<ul> <ul>
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a></li> <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a></li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram</li> <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram</li>
<li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway</li>
<li>m5 bit 4: pbs reservation state for railway</li> <li>m5 bit 4: pbs reservation state for railway</li>
<li>m5 bits 7 clear: tunnel entrance/exit</li> <li>m5 bits 7 clear: tunnel entrance/exit</li>
<li>m5 bit 7 set: bridge ramp <li>m5 bit 7 set: bridge ramp
@@ -1582,6 +1581,7 @@
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road</li> <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road</li>
<li>m7 bit 5 set = on snow or desert</li> <li>m7 bit 5 set = on snow or desert</li>
<li>m7 bits 7..6: present road types for road</li> <li>m7 bits 7..6: present road types for road</li>
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway</li>
</ul> </ul>
</td> </td>
</tr> </tr>

View File

@@ -37,6 +37,7 @@ the array so you can quickly see what is used and what is not.
<li><span style="font-weight: bold;">m5</span> - 8 bits in size, is used for general storage</li> <li><span style="font-weight: bold;">m5</span> - 8 bits in size, is used for general storage</li>
<li><span style="font-weight: bold;">m6</span> - 8 bits in size, is used for general storage</li> <li><span style="font-weight: bold;">m6</span> - 8 bits in size, is used for general storage</li>
<li><span style="font-weight: bold;">m7</span> - 8 bits in size, is used for general storage</li> <li><span style="font-weight: bold;">m7</span> - 8 bits in size, is used for general storage</li>
<li><span style="font-weight: bold;">m8</span> - 16 bits in size, is used for general storage</li>
</ul> </ul>
<table align=center border="1" cellpadding="2" cellspacing="2"> <table align=center border="1" cellpadding="2" cellspacing="2">
@@ -52,6 +53,7 @@ the array so you can quickly see what is used and what is not.
<th>m5 (8)</th> <th>m5 (8)</th>
<th>m6 (8)</th> <th>m6 (8)</th>
<th>m7 (8)</th> <th>m7 (8)</th>
<th>m8 (16)</th>
</tr> </tr>
<tr> <tr>
<td colspan=2 class="caption">bits</td> <td colspan=2 class="caption">bits</td>
@@ -64,6 +66,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">7654 3210</td> <td class="bits">7654 3210</td>
<td class="bits">7654 3210</td> <td class="bits">7654 3210</td>
<td class="bits">7654 3210</td> <td class="bits">7654 3210</td>
<td class="bits">FEDC BA98 7654 3210</td>
</tr> </tr>
<tr> <tr>
<td rowspan="2">0</td> <td rowspan="2">0</td>
@@ -77,6 +80,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOO</span>X XX<span class="free">OO</span></td> <td class="bits"><span class="free">OOO</span>X XX<span class="free">OO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
<tr> <tr>
<td class="caption">farmland</td> <td class="caption">farmland</td>
@@ -89,6 +93,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOO</span>X XX<span class="free">OO</span></td> <td class="bits"><span class="free">OOO</span>X XX<span class="free">OO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td rowspan=3>1</td> <td rowspan=3>1</td>
@@ -97,11 +102,12 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOO</span>X XXXX</td> <td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX <span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO</span> XXXX <span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO</span> XXXX</td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO</span> XXXX</td> <td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO OO</span>XX XXXX</td>
</tr> </tr>
<tr> <tr>
<td class="caption">rail with signals</td> <td class="caption">rail with signals</td>
@@ -109,11 +115,12 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO</span> XXXX XXXX XXXX</td> <td class="bits"><span class="free">OOOO</span> XXXX XXXX XXXX</td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">depot</td> <td class="caption">depot</td>
@@ -121,11 +128,12 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">XXXX XXXX XXXX XXXX</td> <td class="bits">XXXX XXXX XXXX XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO</span> XXXX</td> <td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">XX<span class="free">O</span>X <span class="free">OO</span>XX</td> <td class="bits">XX<span class="free">O</span>X <span class="free">OO</span>XX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td rowspan=3>2</td> <td rowspan=3>2</td>
@@ -139,6 +147,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits">XXX<span class="free">O</span> XXXX</td> <td class="bits">XXX<span class="free">O</span> XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
<tr> <tr>
<td class="caption">level crossing</td> <td class="caption">level crossing</td>
@@ -146,11 +155,12 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">XXXX<span class="free"> OOO</span>X</td> <td class="bits">XXXX <span class="free">OOO</span>X</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OO</span>XX XXXX</td>
</tr> </tr>
<tr> <tr>
<td class="caption">road depot</td> <td class="caption">road depot</td>
@@ -163,6 +173,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XX<span class="free">OO OO</span>XX</td> <td class="bits">XX<span class="free">OO OO</span>XX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXX<span class="free">O</span> XXXX</td> <td class="bits">XXX<span class="free">O</span> XXXX</td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td>3</td> <td>3</td>
@@ -176,6 +187,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXX<span class="abuse">X XXXX</span></td> <td class="bits">XXX<span class="abuse">X XXXX</span></td>
<td class="bits"><span class="abuse">XXXX XX</span><span class="free">OO</span></td> <td class="bits"><span class="abuse">XXXX XX</span><span class="free">OO</span></td>
<td class="bits">XXXX <span class="abuse">XXXX</span></td> <td class="bits">XXXX <span class="abuse">XXXX</span></td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
<tr> <tr>
<td>4</td> <td>4</td>
@@ -189,6 +201,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XX<span class="free">OO O</span>XXX</td> <td class="bits">XX<span class="free">OO O</span>XXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
<tr> <tr>
<td rowspan=7>5</td> <td rowspan=7>5</td>
@@ -197,11 +210,12 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">O</span>XXX XXXX</td> <td class="bits"><span class="free">O</span>XXX XXXX</td>
<td class="bits">XXXX XXXX XXXX XXXX</td> <td class="bits">XXXX XXXX XXXX XXXX</td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td> <td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OO</span>XX XXXX</td>
</tr> </tr>
<tr> <tr>
<td class="caption">rail waypoint</td> <td class="caption">rail waypoint</td>
@@ -214,6 +228,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">road stop</td> <td class="caption">road stop</td>
@@ -226,6 +241,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="option">~~~~ ~</span>XXX</td> <td class="bits"><span class="option">~~~~ ~</span>XXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits">XX<span class="free">O</span>X XXXX</td> <td class="bits">XX<span class="free">O</span>X XXXX</td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">dock</td> <td class="caption">dock</td>
@@ -238,6 +254,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="option">~~~~ ~</span>XXX</td> <td class="bits"><span class="option">~~~~ ~</span>XXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">airport</td> <td class="caption">airport</td>
@@ -250,6 +267,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">buoy</td> <td class="caption">buoy</td>
@@ -262,6 +280,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="option">~~~~ ~~~~</span></td> <td class="bits"><span class="option">~~~~ ~~~~</span></td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">oilrig</td> <td class="caption">oilrig</td>
@@ -274,6 +293,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="option">~~~~ ~~~~</span></td> <td class="bits"><span class="option">~~~~ ~~~~</span></td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td> <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td rowspan=3>6</td> <td rowspan=3>6</td>
@@ -287,6 +307,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">X<span class="option">~~</span>X XXXX</td> <td class="bits">X<span class="option">~~</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
<tr> <tr>
<td class="caption">canal, river</td> <td class="caption">canal, river</td>
@@ -299,6 +320,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td class="caption">shipdepot</td> <td class="caption">shipdepot</td>
@@ -311,6 +333,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td>8</td> <td>8</td>
@@ -324,6 +347,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td> <td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
<tr> <tr>
<td rowspan=2>9</td> <td rowspan=2>9</td>
@@ -332,11 +356,12 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOO</span>X XXXX</td> <td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">X<span class="free">OO</span>X XXXX</td> <td class="bits">X<span class="free">OO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OO</span>XX XXXX</td>
</tr> </tr>
<tr> <tr>
<td>bridge ramp</td> <td>bridge ramp</td>
@@ -349,6 +374,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td> <td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td>
<td class="bits">-inherit-</td> <td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
</tr> </tr>
<tr> <tr>
<td rowspan=2>A</td> <td rowspan=2>A</td>
@@ -362,6 +388,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td> <td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td> <td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -45,12 +45,15 @@ description.en_US = howdie
; The file names are case sensitive. ; The file names are case sensitive.
; You can have empty file names; in that case no song will be loaded ; You can have empty file names; in that case no song will be loaded
; for that 'entry'. ; 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] [files]
; The theme song for OpenTTD ; The theme song for OpenTTD
theme = THEME_SONG.GM theme = THEME_SONG.GM
; The songs in the 'old style' category ; The songs in the 'old style' category
old_0 = old_0 = GM.CAT
old_1 = old_1 = GM.CAT
old_2 = old_2 =
old_3 = old_3 =
old_4 = old_4 =
@@ -86,9 +89,17 @@ ezy_9 =
; Note that the list of files is case sensitive. Each file listed in the ; 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 ; files section must be listed here with it's song name, otherwise you
; will get a lot of warnings when starting OpenTTD. ; 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] [names]
THEME_SONG.GM = Tycoon DELUXE Theme 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. ; 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 ; 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 ; files section must be listed here with it's MD5 checksum, otherwise you
@@ -96,6 +107,13 @@ THEME_SONG.GM = Tycoon DELUXE Theme
[md5s] [md5s]
THEME_SONG.GM = 45cfec1b9d8c7a0ad45e755833cbf221 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 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 ; 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 ; them where to find it. It works on the filename specified in the

View File

@@ -17,7 +17,7 @@ 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 The current list of known bugs that we intend to fix can be found in our
bug tracking system at: http://bugs.openttd.org bug tracking system at: https://github.com/OpenTTD/OpenTTD/issues
Also check the closed bugs when searching for your bug in this system as Also check the closed bugs when searching for your bug in this system as
we might have fixed the bug in the mean time. we might have fixed the bug in the mean time.

View File

@@ -0,0 +1,76 @@
; $Id$
;
; This represents the original music as on the Transport
; Tycoon Deluxe for DOS CD.
;
[metadata]
name = original_dos
shortname = TTDD
version = 1
!! description STR_BASEMUSIC_DOS_DESCRIPTION
[files]
theme = gm.cat
old_0 = gm.cat
old_1 = gm.cat
old_2 = gm.cat
old_3 = gm.cat
old_4 = gm.cat
old_5 = gm.cat
old_6 = gm.cat
old_7 = gm.cat
old_8 =
old_9 =
new_0 = gm.cat
new_1 = gm.cat
new_2 = gm.cat
new_3 = gm.cat
new_4 = gm.cat
new_5 = gm.cat
new_6 = gm.cat
new_7 =
new_8 =
new_9 =
ezy_0 = gm.cat
ezy_1 = gm.cat
ezy_2 = gm.cat
ezy_3 = gm.cat
ezy_4 = gm.cat
ezy_5 = gm.cat
ezy_6 =
ezy_7 =
ezy_8 =
ezy_9 =
[md5s]
gm.cat = 7a29d2d0c4f7d2e03091ffa9b2bdfffb
[catindex]
theme = 0
old_0 = 1
old_1 = 8
old_2 = 2
old_3 = 9
old_4 = 14
old_5 = 15
old_6 = 19
old_7 = 13
new_0 = 6
new_1 = 11
new_2 = 10
new_3 = 17
new_4 = 21
new_5 = 18
new_6 = 5
ezy_0 = 12
ezy_1 = 7
ezy_2 = 16
ezy_3 = 3
ezy_4 = 20
ezy_5 = 4
[names]
; Names get read from the CAT file
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -0,0 +1,71 @@
; $Id$
;
; This represents the original music as on the Transport
; Tycoon (with World Editor) for DOS CD.
;
[metadata]
name = original_tto
shortname = TTOD
version = 1
!! description STR_BASEMUSIC_TTO_DESCRIPTION
[files]
theme = gm-tto.cat
old_0 = gm-tto.cat
old_1 = gm-tto.cat
old_2 = gm-tto.cat
old_3 = gm-tto.cat
old_4 = gm-tto.cat
old_5 = gm-tto.cat
old_6 = gm-tto.cat
old_7 = gm-tto.cat
old_8 =
old_9 =
new_0 = gm-tto.cat
new_1 = gm-tto.cat
new_2 = gm-tto.cat
new_3 = gm-tto.cat
new_4 = gm-tto.cat
new_5 = gm-tto.cat
new_6 = gm-tto.cat
new_7 = gm-tto.cat
new_8 =
new_9 =
ezy_0 =
ezy_1 =
ezy_2 =
ezy_3 =
ezy_4 =
ezy_5 =
ezy_6 =
ezy_7 =
ezy_8 =
ezy_9 =
[catindex]
theme = 0
old_0 = 1
old_1 = 6
old_2 = 2
old_3 = 7
old_4 = 11
old_5 = 12
old_6 = 15
old_7 = 10
new_0 = 4
new_1 = 5
new_2 = 9
new_3 = 8
new_4 = 13
new_5 = 16
new_6 = 14
new_7 = 3
[md5s]
gm-tto.cat = 26e85ff84b0063aa5da05dd4698fc76e
[names]
; Names get read from the CAT file
[origin]
default = You can find it on your Transport Tycoon CD-ROM.

View File

@@ -90,5 +90,17 @@ GM_TT19.GM = Funk Central
GM_TT20.GM = Jammit GM_TT20.GM = Jammit
GM_TT21.GM = Movin' On 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] [origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM. default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -304,6 +304,7 @@ Section /o "Copy data from Transport Tycoon Deluxe CD-ROM" Section2
; Let's copy the files with size approximation ; Let's copy the files with size approximation
SetOutPath "$INSTDIR\baseset" SetOutPath "$INSTDIR\baseset"
CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\baseset\" 1028 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 CopyFiles "$CDDRIVE\sample.cat" "$INSTDIR\baseset\sample.cat" 1566
; Copy Windows files ; Copy Windows files
CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\baseset\trg1r.grf" 2365 CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\baseset\trg1r.grf" 2365
@@ -426,6 +427,8 @@ Section "Uninstall"
Delete "$INSTDIR\baseset\trgt.grf" Delete "$INSTDIR\baseset\trgt.grf"
Delete "$INSTDIR\baseset\trgc.grf" Delete "$INSTDIR\baseset\trgc.grf"
Delete "$INSTDIR\baseset\trgi.grf" Delete "$INSTDIR\baseset\trgi.grf"
Delete "$INSTDIR\baseset\gm.cat"
Delete "$INSTDIR\baseset\gm-tto.cat"
Delete "$INSTDIR\baseset\*.gm" Delete "$INSTDIR\baseset\*.gm"
Delete "$INSTDIR\data\sample.cat" Delete "$INSTDIR\data\sample.cat"
@@ -467,8 +470,10 @@ Section "Uninstall"
; Base sets for music ; Base sets for music
Delete "$INSTDIR\gm\orig_win.obm" Delete "$INSTDIR\gm\orig_win.obm"
Delete "$INSTDIR\gm\orig_dos.obm"
Delete "$INSTDIR\gm\no_music.obm" Delete "$INSTDIR\gm\no_music.obm"
Delete "$INSTDIR\baseset\orig_win.obm" Delete "$INSTDIR\baseset\orig_win.obm"
Delete "$INSTDIR\baseset\orig_dos.obm"
Delete "$INSTDIR\baseset\no_music.obm" Delete "$INSTDIR\baseset\no_music.obm"
; Remove remaining directories ; Remove remaining directories

View File

@@ -123,7 +123,6 @@ load_main_data() {
if ($0 == "PNG" && "'$png_config'" == "") { next; } if ($0 == "PNG" && "'$png_config'" == "") { next; }
if ($0 == "OSX" && "'$os'" != "OSX") { next; } if ($0 == "OSX" && "'$os'" != "OSX") { next; }
if ($0 == "OS2" && "'$os'" != "OS2") { next; } if ($0 == "OS2" && "'$os'" != "OS2") { next; }
if ($0 == "PSP" && "'$os'" != "PSP") { next; }
if ($0 == "DOS" && "'$os'" != "DOS") { next; } if ($0 == "DOS" && "'$os'" != "DOS") { next; }
if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; } if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
if ($0 == "AI" && "'$enable_ai'" == "0") { next; } if ($0 == "AI" && "'$enable_ai'" == "0") { next; }
@@ -131,7 +130,6 @@ load_main_data() {
if ($0 == "BEOS" && "'$os'" != "BEOS") { next; } if ($0 == "BEOS" && "'$os'" != "BEOS") { next; }
if ($0 == "WIN32" && "'$os'" != "MINGW" && if ($0 == "WIN32" && "'$os'" != "MINGW" &&
"'$os'" != "CYGWIN" && "'$os'" != "MSVC" ) { next; } "'$os'" != "CYGWIN" && "'$os'" != "MSVC" ) { next; }
if ($0 == "WINCE" && "'$os'" != "WINCE") { next; }
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; } if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; } if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
@@ -192,9 +190,11 @@ load_main_data() {
load_lang_data() { load_lang_data() {
RES="" 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 do
i=`basename $i | sed s~.txt$~~g` i=`basename $i`
if [ "$i" == "english" ] if [ "$i" == "english" ]
then then
continue continue

View File

@@ -317,18 +317,18 @@
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish_MX.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt"> <CustomBuild Include="..\src\lang\spanish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish_MX.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt"> <CustomBuild Include="..\src\lang\swedish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>

View File

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

View File

@@ -317,18 +317,18 @@
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish_MX.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt"> <CustomBuild Include="..\src\lang\spanish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish_MX.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt"> <CustomBuild Include="..\src\lang\swedish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>

View File

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

View File

@@ -317,18 +317,18 @@
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish_MX.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt"> <CustomBuild Include="..\src\lang\spanish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish_MX.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt"> <CustomBuild Include="..\src\lang\swedish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>

View File

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

View File

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

View File

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

View File

@@ -102,7 +102,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -131,7 +131,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -162,7 +162,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -182,7 +182,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -216,7 +216,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -245,7 +245,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -274,7 +274,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -298,7 +298,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -481,6 +481,7 @@
<ClInclude Include="..\src\fios.h" /> <ClInclude Include="..\src\fios.h" />
<ClInclude Include="..\src\fontcache.h" /> <ClInclude Include="..\src\fontcache.h" />
<ClInclude Include="..\src\fontdetection.h" /> <ClInclude Include="..\src\fontdetection.h" />
<ClInclude Include="..\src\framerate_type.h" />
<ClInclude Include="..\src\base_consist.h" /> <ClInclude Include="..\src\base_consist.h" />
<ClInclude Include="..\src\gamelog.h" /> <ClInclude Include="..\src\gamelog.h" />
<ClInclude Include="..\src\gamelog_internal.h" /> <ClInclude Include="..\src\gamelog_internal.h" />
@@ -569,6 +570,8 @@
<ClInclude Include="..\src\news_func.h" /> <ClInclude Include="..\src\news_func.h" />
<ClInclude Include="..\src\news_gui.h" /> <ClInclude Include="..\src\news_gui.h" />
<ClInclude Include="..\src\news_type.h" /> <ClInclude Include="..\src\news_type.h" />
<ClInclude Include="..\src\music\midi.h" />
<ClInclude Include="..\src\music\midifile.hpp" />
<ClInclude Include="..\src\music\null_m.h" /> <ClInclude Include="..\src\music\null_m.h" />
<ClInclude Include="..\src\sound\null_s.h" /> <ClInclude Include="..\src\sound\null_s.h" />
<ClInclude Include="..\src\video\null_v.h" /> <ClInclude Include="..\src\video\null_v.h" />
@@ -630,6 +633,7 @@
<ClInclude Include="..\src\string_base.h" /> <ClInclude Include="..\src\string_base.h" />
<ClInclude Include="..\src\string_func.h" /> <ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\string_type.h" /> <ClInclude Include="..\src\string_type.h" />
<ClInclude Include="..\src\os\windows\string_uniscribe.h" />
<ClInclude Include="..\src\stringfilter_type.h" /> <ClInclude Include="..\src\stringfilter_type.h" />
<ClInclude Include="..\src\strings_func.h" /> <ClInclude Include="..\src\strings_func.h" />
<ClInclude Include="..\src\strings_type.h" /> <ClInclude Include="..\src\strings_type.h" />
@@ -683,6 +687,7 @@
<ClInclude Include="..\src\window_func.h" /> <ClInclude Include="..\src\window_func.h" />
<ClInclude Include="..\src\window_gui.h" /> <ClInclude Include="..\src\window_gui.h" />
<ClInclude Include="..\src\window_type.h" /> <ClInclude Include="..\src\window_type.h" />
<ClInclude Include="..\src\sound\xaudio2_s.h" />
<ClInclude Include="..\src\zoom_func.h" /> <ClInclude Include="..\src\zoom_func.h" />
<ClInclude Include="..\src\zoom_type.h" /> <ClInclude Include="..\src\zoom_type.h" />
<ClCompile Include="..\src\core\alloc_func.cpp" /> <ClCompile Include="..\src\core\alloc_func.cpp" />
@@ -730,6 +735,7 @@
<ClCompile Include="..\src\engine_gui.cpp" /> <ClCompile Include="..\src\engine_gui.cpp" />
<ClCompile Include="..\src\error_gui.cpp" /> <ClCompile Include="..\src\error_gui.cpp" />
<ClCompile Include="..\src\fios_gui.cpp" /> <ClCompile Include="..\src\fios_gui.cpp" />
<ClCompile Include="..\src\framerate_gui.cpp" />
<ClCompile Include="..\src\genworld_gui.cpp" /> <ClCompile Include="..\src\genworld_gui.cpp" />
<ClCompile Include="..\src\goal_gui.cpp" /> <ClCompile Include="..\src\goal_gui.cpp" />
<ClCompile Include="..\src\graph_gui.cpp" /> <ClCompile Include="..\src\graph_gui.cpp" />
@@ -791,6 +797,7 @@
<ClInclude Include="..\src\widgets\engine_widget.h" /> <ClInclude Include="..\src\widgets\engine_widget.h" />
<ClInclude Include="..\src\widgets\error_widget.h" /> <ClInclude Include="..\src\widgets\error_widget.h" />
<ClInclude Include="..\src\widgets\fios_widget.h" /> <ClInclude Include="..\src\widgets\fios_widget.h" />
<ClInclude Include="..\src\widgets\framerate_widget.h" />
<ClInclude Include="..\src\widgets\genworld_widget.h" /> <ClInclude Include="..\src\widgets\genworld_widget.h" />
<ClInclude Include="..\src\widgets\goal_widget.h" /> <ClInclude Include="..\src\widgets\goal_widget.h" />
<ClInclude Include="..\src\widgets\graph_widget.h" /> <ClInclude Include="..\src\widgets\graph_widget.h" />
@@ -1149,6 +1156,8 @@
<ClCompile Include="..\src\script\api\script_window.cpp" /> <ClCompile Include="..\src\script\api\script_window.cpp" />
<ClCompile Include="..\src\blitter\32bpp_anim.cpp" /> <ClCompile Include="..\src\blitter\32bpp_anim.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim.hpp" /> <ClInclude Include="..\src\blitter\32bpp_anim.hpp" />
<ClCompile Include="..\src\blitter\32bpp_anim_sse2.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim_sse2.hpp" />
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" /> <ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" /> <ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" />
<ClCompile Include="..\src\blitter\32bpp_base.cpp" /> <ClCompile Include="..\src\blitter\32bpp_base.cpp" />
@@ -1293,12 +1302,15 @@
<ClCompile Include="..\src\video\win32_v.cpp" /> <ClCompile Include="..\src\video\win32_v.cpp" />
<ClCompile Include="..\src\music\dmusic.cpp" /> <ClCompile Include="..\src\music\dmusic.cpp" />
<ClCompile Include="..\src\music\null_m.cpp" /> <ClCompile Include="..\src\music\null_m.cpp" />
<ClCompile Include="..\src\music\midifile.cpp" />
<ClCompile Include="..\src\music\win32_m.cpp" /> <ClCompile Include="..\src\music\win32_m.cpp" />
<ClCompile Include="..\src\sound\null_s.cpp" /> <ClCompile Include="..\src\sound\null_s.cpp" />
<ClCompile Include="..\src\sound\sdl_s.cpp" /> <ClCompile Include="..\src\sound\sdl_s.cpp" />
<ClCompile Include="..\src\sound\win32_s.cpp" /> <ClCompile Include="..\src\sound\win32_s.cpp" />
<ClCompile Include="..\src\sound\xaudio2_s.cpp" />
<ClCompile Include="..\src\os\windows\crashlog_win.cpp" /> <ClCompile Include="..\src\os\windows\crashlog_win.cpp" />
<ResourceCompile Include="..\src\os\windows\ottdres.rc" /> <ResourceCompile Include="..\src\os\windows\ottdres.rc" />
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp" />
<ClCompile Include="..\src\os\windows\win32.cpp" /> <ClCompile Include="..\src\os\windows\win32.cpp" />
<ClInclude Include="..\src\thread\thread.h" /> <ClInclude Include="..\src\thread\thread.h" />
<ClCompile Include="..\src\thread\thread_win32.cpp" /> <ClCompile Include="..\src\thread\thread_win32.cpp" />

View File

@@ -600,6 +600,9 @@
<ClInclude Include="..\src\fontdetection.h"> <ClInclude Include="..\src\fontdetection.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\framerate_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\base_consist.h"> <ClInclude Include="..\src\base_consist.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -864,6 +867,12 @@
<ClInclude Include="..\src\news_type.h"> <ClInclude Include="..\src\news_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\music\midi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\music\midifile.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\music\null_m.h"> <ClInclude Include="..\src\music\null_m.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1047,6 +1056,9 @@
<ClInclude Include="..\src\string_type.h"> <ClInclude Include="..\src\string_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\os\windows\string_uniscribe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\stringfilter_type.h"> <ClInclude Include="..\src\stringfilter_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1206,6 +1218,9 @@
<ClInclude Include="..\src\window_type.h"> <ClInclude Include="..\src\window_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\sound\xaudio2_s.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\zoom_func.h"> <ClInclude Include="..\src\zoom_func.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1347,6 +1362,9 @@
<ClCompile Include="..\src\fios_gui.cpp"> <ClCompile Include="..\src\fios_gui.cpp">
<Filter>GUI Source Code</Filter> <Filter>GUI Source Code</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\framerate_gui.cpp">
<Filter>GUI Source Code</Filter>
</ClCompile>
<ClCompile Include="..\src\genworld_gui.cpp"> <ClCompile Include="..\src\genworld_gui.cpp">
<Filter>GUI Source Code</Filter> <Filter>GUI Source Code</Filter>
</ClCompile> </ClCompile>
@@ -1530,6 +1548,9 @@
<ClInclude Include="..\src\widgets\fios_widget.h"> <ClInclude Include="..\src\widgets\fios_widget.h">
<Filter>Widgets</Filter> <Filter>Widgets</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\widgets\framerate_widget.h">
<Filter>Widgets</Filter>
</ClInclude>
<ClInclude Include="..\src\widgets\genworld_widget.h"> <ClInclude Include="..\src\widgets\genworld_widget.h">
<Filter>Widgets</Filter> <Filter>Widgets</Filter>
</ClInclude> </ClInclude>
@@ -2604,6 +2625,12 @@
<ClInclude Include="..\src\blitter\32bpp_anim.hpp"> <ClInclude Include="..\src\blitter\32bpp_anim.hpp">
<Filter>Blitters</Filter> <Filter>Blitters</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\src\blitter\32bpp_anim_sse2.cpp">
<Filter>Blitters</Filter>
</ClCompile>
<ClInclude Include="..\src\blitter\32bpp_anim_sse2.hpp">
<Filter>Blitters</Filter>
</ClInclude>
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp"> <ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp">
<Filter>Blitters</Filter> <Filter>Blitters</Filter>
</ClCompile> </ClCompile>
@@ -3036,6 +3063,9 @@
<ClCompile Include="..\src\music\null_m.cpp"> <ClCompile Include="..\src\music\null_m.cpp">
<Filter>Music</Filter> <Filter>Music</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\music\midifile.cpp">
<Filter>Music</Filter>
</ClCompile>
<ClCompile Include="..\src\music\win32_m.cpp"> <ClCompile Include="..\src\music\win32_m.cpp">
<Filter>Music</Filter> <Filter>Music</Filter>
</ClCompile> </ClCompile>
@@ -3048,12 +3078,18 @@
<ClCompile Include="..\src\sound\win32_s.cpp"> <ClCompile Include="..\src\sound\win32_s.cpp">
<Filter>Sound</Filter> <Filter>Sound</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\sound\xaudio2_s.cpp">
<Filter>Sound</Filter>
</ClCompile>
<ClCompile Include="..\src\os\windows\crashlog_win.cpp"> <ClCompile Include="..\src\os\windows\crashlog_win.cpp">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ClCompile> </ClCompile>
<ResourceCompile Include="..\src\os\windows\ottdres.rc"> <ResourceCompile Include="..\src\os\windows\ottdres.rc">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ResourceCompile> </ResourceCompile>
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp">
<Filter>Windows files</Filter>
</ClCompile>
<ClCompile Include="..\src\os\windows\win32.cpp"> <ClCompile Include="..\src\os\windows\win32.cpp">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ClCompile> </ClCompile>

View File

@@ -102,7 +102,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -131,7 +131,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -162,7 +162,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -182,7 +182,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -216,7 +216,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -245,7 +245,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -274,7 +274,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -298,7 +298,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>

View File

@@ -105,7 +105,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -136,7 +136,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -170,7 +170,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -192,7 +192,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -228,7 +228,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -259,7 +259,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -291,7 +291,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -317,7 +317,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -502,6 +502,7 @@
<ClInclude Include="..\src\fios.h" /> <ClInclude Include="..\src\fios.h" />
<ClInclude Include="..\src\fontcache.h" /> <ClInclude Include="..\src\fontcache.h" />
<ClInclude Include="..\src\fontdetection.h" /> <ClInclude Include="..\src\fontdetection.h" />
<ClInclude Include="..\src\framerate_type.h" />
<ClInclude Include="..\src\base_consist.h" /> <ClInclude Include="..\src\base_consist.h" />
<ClInclude Include="..\src\gamelog.h" /> <ClInclude Include="..\src\gamelog.h" />
<ClInclude Include="..\src\gamelog_internal.h" /> <ClInclude Include="..\src\gamelog_internal.h" />
@@ -590,6 +591,8 @@
<ClInclude Include="..\src\news_func.h" /> <ClInclude Include="..\src\news_func.h" />
<ClInclude Include="..\src\news_gui.h" /> <ClInclude Include="..\src\news_gui.h" />
<ClInclude Include="..\src\news_type.h" /> <ClInclude Include="..\src\news_type.h" />
<ClInclude Include="..\src\music\midi.h" />
<ClInclude Include="..\src\music\midifile.hpp" />
<ClInclude Include="..\src\music\null_m.h" /> <ClInclude Include="..\src\music\null_m.h" />
<ClInclude Include="..\src\sound\null_s.h" /> <ClInclude Include="..\src\sound\null_s.h" />
<ClInclude Include="..\src\video\null_v.h" /> <ClInclude Include="..\src\video\null_v.h" />
@@ -651,6 +654,7 @@
<ClInclude Include="..\src\string_base.h" /> <ClInclude Include="..\src\string_base.h" />
<ClInclude Include="..\src\string_func.h" /> <ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\string_type.h" /> <ClInclude Include="..\src\string_type.h" />
<ClInclude Include="..\src\os\windows\string_uniscribe.h" />
<ClInclude Include="..\src\stringfilter_type.h" /> <ClInclude Include="..\src\stringfilter_type.h" />
<ClInclude Include="..\src\strings_func.h" /> <ClInclude Include="..\src\strings_func.h" />
<ClInclude Include="..\src\strings_type.h" /> <ClInclude Include="..\src\strings_type.h" />
@@ -704,6 +708,7 @@
<ClInclude Include="..\src\window_func.h" /> <ClInclude Include="..\src\window_func.h" />
<ClInclude Include="..\src\window_gui.h" /> <ClInclude Include="..\src\window_gui.h" />
<ClInclude Include="..\src\window_type.h" /> <ClInclude Include="..\src\window_type.h" />
<ClInclude Include="..\src\sound\xaudio2_s.h" />
<ClInclude Include="..\src\zoom_func.h" /> <ClInclude Include="..\src\zoom_func.h" />
<ClInclude Include="..\src\zoom_type.h" /> <ClInclude Include="..\src\zoom_type.h" />
<ClCompile Include="..\src\core\alloc_func.cpp" /> <ClCompile Include="..\src\core\alloc_func.cpp" />
@@ -751,6 +756,7 @@
<ClCompile Include="..\src\engine_gui.cpp" /> <ClCompile Include="..\src\engine_gui.cpp" />
<ClCompile Include="..\src\error_gui.cpp" /> <ClCompile Include="..\src\error_gui.cpp" />
<ClCompile Include="..\src\fios_gui.cpp" /> <ClCompile Include="..\src\fios_gui.cpp" />
<ClCompile Include="..\src\framerate_gui.cpp" />
<ClCompile Include="..\src\genworld_gui.cpp" /> <ClCompile Include="..\src\genworld_gui.cpp" />
<ClCompile Include="..\src\goal_gui.cpp" /> <ClCompile Include="..\src\goal_gui.cpp" />
<ClCompile Include="..\src\graph_gui.cpp" /> <ClCompile Include="..\src\graph_gui.cpp" />
@@ -812,6 +818,7 @@
<ClInclude Include="..\src\widgets\engine_widget.h" /> <ClInclude Include="..\src\widgets\engine_widget.h" />
<ClInclude Include="..\src\widgets\error_widget.h" /> <ClInclude Include="..\src\widgets\error_widget.h" />
<ClInclude Include="..\src\widgets\fios_widget.h" /> <ClInclude Include="..\src\widgets\fios_widget.h" />
<ClInclude Include="..\src\widgets\framerate_widget.h" />
<ClInclude Include="..\src\widgets\genworld_widget.h" /> <ClInclude Include="..\src\widgets\genworld_widget.h" />
<ClInclude Include="..\src\widgets\goal_widget.h" /> <ClInclude Include="..\src\widgets\goal_widget.h" />
<ClInclude Include="..\src\widgets\graph_widget.h" /> <ClInclude Include="..\src\widgets\graph_widget.h" />
@@ -1170,6 +1177,8 @@
<ClCompile Include="..\src\script\api\script_window.cpp" /> <ClCompile Include="..\src\script\api\script_window.cpp" />
<ClCompile Include="..\src\blitter\32bpp_anim.cpp" /> <ClCompile Include="..\src\blitter\32bpp_anim.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim.hpp" /> <ClInclude Include="..\src\blitter\32bpp_anim.hpp" />
<ClCompile Include="..\src\blitter\32bpp_anim_sse2.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim_sse2.hpp" />
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" /> <ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" /> <ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" />
<ClCompile Include="..\src\blitter\32bpp_base.cpp" /> <ClCompile Include="..\src\blitter\32bpp_base.cpp" />
@@ -1314,12 +1323,15 @@
<ClCompile Include="..\src\video\win32_v.cpp" /> <ClCompile Include="..\src\video\win32_v.cpp" />
<ClCompile Include="..\src\music\dmusic.cpp" /> <ClCompile Include="..\src\music\dmusic.cpp" />
<ClCompile Include="..\src\music\null_m.cpp" /> <ClCompile Include="..\src\music\null_m.cpp" />
<ClCompile Include="..\src\music\midifile.cpp" />
<ClCompile Include="..\src\music\win32_m.cpp" /> <ClCompile Include="..\src\music\win32_m.cpp" />
<ClCompile Include="..\src\sound\null_s.cpp" /> <ClCompile Include="..\src\sound\null_s.cpp" />
<ClCompile Include="..\src\sound\sdl_s.cpp" /> <ClCompile Include="..\src\sound\sdl_s.cpp" />
<ClCompile Include="..\src\sound\win32_s.cpp" /> <ClCompile Include="..\src\sound\win32_s.cpp" />
<ClCompile Include="..\src\sound\xaudio2_s.cpp" />
<ClCompile Include="..\src\os\windows\crashlog_win.cpp" /> <ClCompile Include="..\src\os\windows\crashlog_win.cpp" />
<ResourceCompile Include="..\src\os\windows\ottdres.rc" /> <ResourceCompile Include="..\src\os\windows\ottdres.rc" />
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp" />
<ClCompile Include="..\src\os\windows\win32.cpp" /> <ClCompile Include="..\src\os\windows\win32.cpp" />
<ClInclude Include="..\src\thread\thread.h" /> <ClInclude Include="..\src\thread\thread.h" />
<ClCompile Include="..\src\thread\thread_win32.cpp" /> <ClCompile Include="..\src\thread\thread_win32.cpp" />

View File

@@ -600,6 +600,9 @@
<ClInclude Include="..\src\fontdetection.h"> <ClInclude Include="..\src\fontdetection.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\framerate_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\base_consist.h"> <ClInclude Include="..\src\base_consist.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -864,6 +867,12 @@
<ClInclude Include="..\src\news_type.h"> <ClInclude Include="..\src\news_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\music\midi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\music\midifile.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\music\null_m.h"> <ClInclude Include="..\src\music\null_m.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1047,6 +1056,9 @@
<ClInclude Include="..\src\string_type.h"> <ClInclude Include="..\src\string_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\os\windows\string_uniscribe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\stringfilter_type.h"> <ClInclude Include="..\src\stringfilter_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1206,6 +1218,9 @@
<ClInclude Include="..\src\window_type.h"> <ClInclude Include="..\src\window_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\sound\xaudio2_s.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\zoom_func.h"> <ClInclude Include="..\src\zoom_func.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1347,6 +1362,9 @@
<ClCompile Include="..\src\fios_gui.cpp"> <ClCompile Include="..\src\fios_gui.cpp">
<Filter>GUI Source Code</Filter> <Filter>GUI Source Code</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\framerate_gui.cpp">
<Filter>GUI Source Code</Filter>
</ClCompile>
<ClCompile Include="..\src\genworld_gui.cpp"> <ClCompile Include="..\src\genworld_gui.cpp">
<Filter>GUI Source Code</Filter> <Filter>GUI Source Code</Filter>
</ClCompile> </ClCompile>
@@ -1530,6 +1548,9 @@
<ClInclude Include="..\src\widgets\fios_widget.h"> <ClInclude Include="..\src\widgets\fios_widget.h">
<Filter>Widgets</Filter> <Filter>Widgets</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\widgets\framerate_widget.h">
<Filter>Widgets</Filter>
</ClInclude>
<ClInclude Include="..\src\widgets\genworld_widget.h"> <ClInclude Include="..\src\widgets\genworld_widget.h">
<Filter>Widgets</Filter> <Filter>Widgets</Filter>
</ClInclude> </ClInclude>
@@ -2604,6 +2625,12 @@
<ClInclude Include="..\src\blitter\32bpp_anim.hpp"> <ClInclude Include="..\src\blitter\32bpp_anim.hpp">
<Filter>Blitters</Filter> <Filter>Blitters</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\src\blitter\32bpp_anim_sse2.cpp">
<Filter>Blitters</Filter>
</ClCompile>
<ClInclude Include="..\src\blitter\32bpp_anim_sse2.hpp">
<Filter>Blitters</Filter>
</ClInclude>
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp"> <ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp">
<Filter>Blitters</Filter> <Filter>Blitters</Filter>
</ClCompile> </ClCompile>
@@ -3036,6 +3063,9 @@
<ClCompile Include="..\src\music\null_m.cpp"> <ClCompile Include="..\src\music\null_m.cpp">
<Filter>Music</Filter> <Filter>Music</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\music\midifile.cpp">
<Filter>Music</Filter>
</ClCompile>
<ClCompile Include="..\src\music\win32_m.cpp"> <ClCompile Include="..\src\music\win32_m.cpp">
<Filter>Music</Filter> <Filter>Music</Filter>
</ClCompile> </ClCompile>
@@ -3048,12 +3078,18 @@
<ClCompile Include="..\src\sound\win32_s.cpp"> <ClCompile Include="..\src\sound\win32_s.cpp">
<Filter>Sound</Filter> <Filter>Sound</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\sound\xaudio2_s.cpp">
<Filter>Sound</Filter>
</ClCompile>
<ClCompile Include="..\src\os\windows\crashlog_win.cpp"> <ClCompile Include="..\src\os\windows\crashlog_win.cpp">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ClCompile> </ClCompile>
<ResourceCompile Include="..\src\os\windows\ottdres.rc"> <ResourceCompile Include="..\src\os\windows\ottdres.rc">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ResourceCompile> </ResourceCompile>
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp">
<Filter>Windows files</Filter>
</ClCompile>
<ClCompile Include="..\src\os\windows\win32.cpp"> <ClCompile Include="..\src\os\windows\win32.cpp">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ClCompile> </ClCompile>

View File

@@ -105,7 +105,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -136,7 +136,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -170,7 +170,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -192,7 +192,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -228,7 +228,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -259,7 +259,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -291,7 +291,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -317,7 +317,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>

View File

@@ -105,7 +105,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -136,7 +136,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -170,7 +170,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -192,7 +192,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -228,7 +228,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -259,7 +259,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -291,7 +291,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -317,7 +317,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -502,6 +502,7 @@
<ClInclude Include="..\src\fios.h" /> <ClInclude Include="..\src\fios.h" />
<ClInclude Include="..\src\fontcache.h" /> <ClInclude Include="..\src\fontcache.h" />
<ClInclude Include="..\src\fontdetection.h" /> <ClInclude Include="..\src\fontdetection.h" />
<ClInclude Include="..\src\framerate_type.h" />
<ClInclude Include="..\src\base_consist.h" /> <ClInclude Include="..\src\base_consist.h" />
<ClInclude Include="..\src\gamelog.h" /> <ClInclude Include="..\src\gamelog.h" />
<ClInclude Include="..\src\gamelog_internal.h" /> <ClInclude Include="..\src\gamelog_internal.h" />
@@ -590,6 +591,8 @@
<ClInclude Include="..\src\news_func.h" /> <ClInclude Include="..\src\news_func.h" />
<ClInclude Include="..\src\news_gui.h" /> <ClInclude Include="..\src\news_gui.h" />
<ClInclude Include="..\src\news_type.h" /> <ClInclude Include="..\src\news_type.h" />
<ClInclude Include="..\src\music\midi.h" />
<ClInclude Include="..\src\music\midifile.hpp" />
<ClInclude Include="..\src\music\null_m.h" /> <ClInclude Include="..\src\music\null_m.h" />
<ClInclude Include="..\src\sound\null_s.h" /> <ClInclude Include="..\src\sound\null_s.h" />
<ClInclude Include="..\src\video\null_v.h" /> <ClInclude Include="..\src\video\null_v.h" />
@@ -650,6 +653,7 @@
<ClInclude Include="..\src\string_base.h" /> <ClInclude Include="..\src\string_base.h" />
<ClInclude Include="..\src\string_func.h" /> <ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\string_type.h" /> <ClInclude Include="..\src\string_type.h" />
<ClInclude Include="..\src\os\windows\string_uniscribe.h" />
<ClInclude Include="..\src\stringfilter_type.h" /> <ClInclude Include="..\src\stringfilter_type.h" />
<ClInclude Include="..\src\strings_func.h" /> <ClInclude Include="..\src\strings_func.h" />
<ClInclude Include="..\src\strings_type.h" /> <ClInclude Include="..\src\strings_type.h" />
@@ -703,6 +707,7 @@
<ClInclude Include="..\src\window_func.h" /> <ClInclude Include="..\src\window_func.h" />
<ClInclude Include="..\src\window_gui.h" /> <ClInclude Include="..\src\window_gui.h" />
<ClInclude Include="..\src\window_type.h" /> <ClInclude Include="..\src\window_type.h" />
<ClInclude Include="..\src\sound\xaudio2_s.h" />
<ClInclude Include="..\src\zoom_func.h" /> <ClInclude Include="..\src\zoom_func.h" />
<ClInclude Include="..\src\zoom_type.h" /> <ClInclude Include="..\src\zoom_type.h" />
<ClCompile Include="..\src\core\alloc_func.cpp" /> <ClCompile Include="..\src\core\alloc_func.cpp" />
@@ -748,6 +753,7 @@
<ClCompile Include="..\src\engine_gui.cpp" /> <ClCompile Include="..\src\engine_gui.cpp" />
<ClCompile Include="..\src\error_gui.cpp" /> <ClCompile Include="..\src\error_gui.cpp" />
<ClCompile Include="..\src\fios_gui.cpp" /> <ClCompile Include="..\src\fios_gui.cpp" />
<ClCompile Include="..\src\framerate_gui.cpp" />
<ClCompile Include="..\src\genworld_gui.cpp" /> <ClCompile Include="..\src\genworld_gui.cpp" />
<ClCompile Include="..\src\goal_gui.cpp" /> <ClCompile Include="..\src\goal_gui.cpp" />
<ClCompile Include="..\src\graph_gui.cpp" /> <ClCompile Include="..\src\graph_gui.cpp" />
@@ -809,6 +815,7 @@
<ClInclude Include="..\src\widgets\engine_widget.h" /> <ClInclude Include="..\src\widgets\engine_widget.h" />
<ClInclude Include="..\src\widgets\error_widget.h" /> <ClInclude Include="..\src\widgets\error_widget.h" />
<ClInclude Include="..\src\widgets\fios_widget.h" /> <ClInclude Include="..\src\widgets\fios_widget.h" />
<ClInclude Include="..\src\widgets\framerate_widget.h" />
<ClInclude Include="..\src\widgets\genworld_widget.h" /> <ClInclude Include="..\src\widgets\genworld_widget.h" />
<ClInclude Include="..\src\widgets\goal_widget.h" /> <ClInclude Include="..\src\widgets\goal_widget.h" />
<ClInclude Include="..\src\widgets\graph_widget.h" /> <ClInclude Include="..\src\widgets\graph_widget.h" />
@@ -1167,6 +1174,8 @@
<ClCompile Include="..\src\script\api\script_window.cpp" /> <ClCompile Include="..\src\script\api\script_window.cpp" />
<ClCompile Include="..\src\blitter\32bpp_anim.cpp" /> <ClCompile Include="..\src\blitter\32bpp_anim.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim.hpp" /> <ClInclude Include="..\src\blitter\32bpp_anim.hpp" />
<ClCompile Include="..\src\blitter\32bpp_anim_sse2.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim_sse2.hpp" />
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" /> <ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" />
<ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" /> <ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" />
<ClCompile Include="..\src\blitter\32bpp_base.cpp" /> <ClCompile Include="..\src\blitter\32bpp_base.cpp" />
@@ -1311,12 +1320,15 @@
<ClCompile Include="..\src\video\win32_v.cpp" /> <ClCompile Include="..\src\video\win32_v.cpp" />
<ClCompile Include="..\src\music\dmusic.cpp" /> <ClCompile Include="..\src\music\dmusic.cpp" />
<ClCompile Include="..\src\music\null_m.cpp" /> <ClCompile Include="..\src\music\null_m.cpp" />
<ClCompile Include="..\src\music\midifile.cpp" />
<ClCompile Include="..\src\music\win32_m.cpp" /> <ClCompile Include="..\src\music\win32_m.cpp" />
<ClCompile Include="..\src\sound\null_s.cpp" /> <ClCompile Include="..\src\sound\null_s.cpp" />
<ClCompile Include="..\src\sound\sdl_s.cpp" /> <ClCompile Include="..\src\sound\sdl_s.cpp" />
<ClCompile Include="..\src\sound\win32_s.cpp" /> <ClCompile Include="..\src\sound\win32_s.cpp" />
<ClCompile Include="..\src\sound\xaudio2_s.cpp" />
<ClCompile Include="..\src\os\windows\crashlog_win.cpp" /> <ClCompile Include="..\src\os\windows\crashlog_win.cpp" />
<ResourceCompile Include="..\src\os\windows\ottdres.rc" /> <ResourceCompile Include="..\src\os\windows\ottdres.rc" />
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp" />
<ClCompile Include="..\src\os\windows\win32.cpp" /> <ClCompile Include="..\src\os\windows\win32.cpp" />
<ClInclude Include="..\src\thread\thread.h" /> <ClInclude Include="..\src\thread\thread.h" />
<ClCompile Include="..\src\thread\thread_win32.cpp" /> <ClCompile Include="..\src\thread\thread_win32.cpp" />

View File

@@ -600,6 +600,9 @@
<ClInclude Include="..\src\fontdetection.h"> <ClInclude Include="..\src\fontdetection.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\framerate_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\base_consist.h"> <ClInclude Include="..\src\base_consist.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -864,6 +867,12 @@
<ClInclude Include="..\src\news_type.h"> <ClInclude Include="..\src\news_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\music\midi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\music\midifile.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\music\null_m.h"> <ClInclude Include="..\src\music\null_m.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1044,6 +1053,9 @@
<ClInclude Include="..\src\string_type.h"> <ClInclude Include="..\src\string_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\os\windows\string_uniscribe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\stringfilter_type.h"> <ClInclude Include="..\src\stringfilter_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1203,6 +1215,9 @@
<ClInclude Include="..\src\window_type.h"> <ClInclude Include="..\src\window_type.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\sound\xaudio2_s.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\zoom_func.h"> <ClInclude Include="..\src\zoom_func.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1338,6 +1353,9 @@
<ClCompile Include="..\src\fios_gui.cpp"> <ClCompile Include="..\src\fios_gui.cpp">
<Filter>GUI Source Code</Filter> <Filter>GUI Source Code</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\framerate_gui.cpp">
<Filter>GUI Source Code</Filter>
</ClCompile>
<ClCompile Include="..\src\genworld_gui.cpp"> <ClCompile Include="..\src\genworld_gui.cpp">
<Filter>GUI Source Code</Filter> <Filter>GUI Source Code</Filter>
</ClCompile> </ClCompile>
@@ -1521,6 +1539,9 @@
<ClInclude Include="..\src\widgets\fios_widget.h"> <ClInclude Include="..\src\widgets\fios_widget.h">
<Filter>Widgets</Filter> <Filter>Widgets</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\widgets\framerate_widget.h">
<Filter>Widgets</Filter>
</ClInclude>
<ClInclude Include="..\src\widgets\genworld_widget.h"> <ClInclude Include="..\src\widgets\genworld_widget.h">
<Filter>Widgets</Filter> <Filter>Widgets</Filter>
</ClInclude> </ClInclude>
@@ -2595,6 +2616,12 @@
<ClInclude Include="..\src\blitter\32bpp_anim.hpp"> <ClInclude Include="..\src\blitter\32bpp_anim.hpp">
<Filter>Blitters</Filter> <Filter>Blitters</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\src\blitter\32bpp_anim_sse2.cpp">
<Filter>Blitters</Filter>
</ClCompile>
<ClInclude Include="..\src\blitter\32bpp_anim_sse2.hpp">
<Filter>Blitters</Filter>
</ClInclude>
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp"> <ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp">
<Filter>Blitters</Filter> <Filter>Blitters</Filter>
</ClCompile> </ClCompile>
@@ -3027,6 +3054,9 @@
<ClCompile Include="..\src\music\null_m.cpp"> <ClCompile Include="..\src\music\null_m.cpp">
<Filter>Music</Filter> <Filter>Music</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\music\midifile.cpp">
<Filter>Music</Filter>
</ClCompile>
<ClCompile Include="..\src\music\win32_m.cpp"> <ClCompile Include="..\src\music\win32_m.cpp">
<Filter>Music</Filter> <Filter>Music</Filter>
</ClCompile> </ClCompile>
@@ -3039,12 +3069,18 @@
<ClCompile Include="..\src\sound\win32_s.cpp"> <ClCompile Include="..\src\sound\win32_s.cpp">
<Filter>Sound</Filter> <Filter>Sound</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\sound\xaudio2_s.cpp">
<Filter>Sound</Filter>
</ClCompile>
<ClCompile Include="..\src\os\windows\crashlog_win.cpp"> <ClCompile Include="..\src\os\windows\crashlog_win.cpp">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ClCompile> </ClCompile>
<ResourceCompile Include="..\src\os\windows\ottdres.rc"> <ResourceCompile Include="..\src\os\windows\ottdres.rc">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ResourceCompile> </ResourceCompile>
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp">
<Filter>Windows files</Filter>
</ClCompile>
<ClCompile Include="..\src\os\windows\win32.cpp"> <ClCompile Include="..\src\os\windows\win32.cpp">
<Filter>Windows files</Filter> <Filter>Windows files</Filter>
</ClCompile> </ClCompile>

View File

@@ -105,7 +105,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -136,7 +136,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -170,7 +170,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -192,7 +192,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -228,7 +228,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -259,7 +259,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -291,7 +291,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@@ -317,7 +317,7 @@
<Culture>0x0809</Culture> <Culture>0x0809</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>

View File

@@ -52,7 +52,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -87,7 +87,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -158,7 +158,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -186,7 +186,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"
@@ -261,7 +261,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -296,7 +296,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -368,7 +368,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -398,7 +398,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"
@@ -1110,6 +1110,10 @@
RelativePath=".\..\src\fontdetection.h" RelativePath=".\..\src\fontdetection.h"
> >
</File> </File>
<File
RelativePath=".\..\src\framerate_type.h"
>
</File>
<File <File
RelativePath=".\..\src\base_consist.h" RelativePath=".\..\src\base_consist.h"
> >
@@ -1462,6 +1466,14 @@
RelativePath=".\..\src\news_type.h" RelativePath=".\..\src\news_type.h"
> >
</File> </File>
<File
RelativePath=".\..\src\music\midi.h"
>
</File>
<File
RelativePath=".\..\src\music\midifile.hpp"
>
</File>
<File <File
RelativePath=".\..\src\music\null_m.h" RelativePath=".\..\src\music\null_m.h"
> >
@@ -1706,6 +1718,10 @@
RelativePath=".\..\src\string_type.h" RelativePath=".\..\src\string_type.h"
> >
</File> </File>
<File
RelativePath=".\..\src\os\windows\string_uniscribe.h"
>
</File>
<File <File
RelativePath=".\..\src\stringfilter_type.h" RelativePath=".\..\src\stringfilter_type.h"
> >
@@ -1918,6 +1934,10 @@
RelativePath=".\..\src\window_type.h" RelativePath=".\..\src\window_type.h"
> >
</File> </File>
<File
RelativePath=".\..\src\sound\xaudio2_s.h"
>
</File>
<File <File
RelativePath=".\..\src\zoom_func.h" RelativePath=".\..\src\zoom_func.h"
> >
@@ -2114,6 +2134,10 @@
RelativePath=".\..\src\fios_gui.cpp" RelativePath=".\..\src\fios_gui.cpp"
> >
</File> </File>
<File
RelativePath=".\..\src\framerate_gui.cpp"
>
</File>
<File <File
RelativePath=".\..\src\genworld_gui.cpp" RelativePath=".\..\src\genworld_gui.cpp"
> >
@@ -2362,6 +2386,10 @@
RelativePath=".\..\src\widgets\fios_widget.h" RelativePath=".\..\src\widgets\fios_widget.h"
> >
</File> </File>
<File
RelativePath=".\..\src\widgets\framerate_widget.h"
>
</File>
<File <File
RelativePath=".\..\src\widgets\genworld_widget.h" RelativePath=".\..\src\widgets\genworld_widget.h"
> >
@@ -3850,6 +3878,14 @@
RelativePath=".\..\src\blitter\32bpp_anim.hpp" RelativePath=".\..\src\blitter\32bpp_anim.hpp"
> >
</File> </File>
<File
RelativePath=".\..\src\blitter\32bpp_anim_sse2.cpp"
>
</File>
<File
RelativePath=".\..\src\blitter\32bpp_anim_sse2.hpp"
>
</File>
<File <File
RelativePath=".\..\src\blitter\32bpp_anim_sse4.cpp" RelativePath=".\..\src\blitter\32bpp_anim_sse4.cpp"
> >
@@ -4470,6 +4506,10 @@
RelativePath=".\..\src\music\null_m.cpp" RelativePath=".\..\src\music\null_m.cpp"
> >
</File> </File>
<File
RelativePath=".\..\src\music\midifile.cpp"
>
</File>
<File <File
RelativePath=".\..\src\music\win32_m.cpp" RelativePath=".\..\src\music\win32_m.cpp"
> >
@@ -4490,6 +4530,10 @@
RelativePath=".\..\src\sound\win32_s.cpp" RelativePath=".\..\src\sound\win32_s.cpp"
> >
</File> </File>
<File
RelativePath=".\..\src\sound\xaudio2_s.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Windows files" Name="Windows files"
@@ -4502,6 +4546,10 @@
RelativePath=".\..\src\os\windows\ottdres.rc" RelativePath=".\..\src\os\windows\ottdres.rc"
> >
</File> </File>
<File
RelativePath=".\..\src\os\windows\string_uniscribe.cpp"
>
</File>
<File <File
RelativePath=".\..\src\os\windows\win32.cpp" RelativePath=".\..\src\os\windows\win32.cpp"
> >

View File

@@ -52,7 +52,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -87,7 +87,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -158,7 +158,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -186,7 +186,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"
@@ -261,7 +261,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -296,7 +296,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -368,7 +368,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -398,7 +398,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"

View File

@@ -53,7 +53,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -88,7 +88,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -157,7 +157,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -185,7 +185,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"
@@ -259,7 +259,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -294,7 +294,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -365,7 +365,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -395,7 +395,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"
@@ -1107,6 +1107,10 @@
RelativePath=".\..\src\fontdetection.h" RelativePath=".\..\src\fontdetection.h"
> >
</File> </File>
<File
RelativePath=".\..\src\framerate_type.h"
>
</File>
<File <File
RelativePath=".\..\src\base_consist.h" RelativePath=".\..\src\base_consist.h"
> >
@@ -1459,6 +1463,14 @@
RelativePath=".\..\src\news_type.h" RelativePath=".\..\src\news_type.h"
> >
</File> </File>
<File
RelativePath=".\..\src\music\midi.h"
>
</File>
<File
RelativePath=".\..\src\music\midifile.hpp"
>
</File>
<File <File
RelativePath=".\..\src\music\null_m.h" RelativePath=".\..\src\music\null_m.h"
> >
@@ -1703,6 +1715,10 @@
RelativePath=".\..\src\string_type.h" RelativePath=".\..\src\string_type.h"
> >
</File> </File>
<File
RelativePath=".\..\src\os\windows\string_uniscribe.h"
>
</File>
<File <File
RelativePath=".\..\src\stringfilter_type.h" RelativePath=".\..\src\stringfilter_type.h"
> >
@@ -1915,6 +1931,10 @@
RelativePath=".\..\src\window_type.h" RelativePath=".\..\src\window_type.h"
> >
</File> </File>
<File
RelativePath=".\..\src\sound\xaudio2_s.h"
>
</File>
<File <File
RelativePath=".\..\src\zoom_func.h" RelativePath=".\..\src\zoom_func.h"
> >
@@ -2111,6 +2131,10 @@
RelativePath=".\..\src\fios_gui.cpp" RelativePath=".\..\src\fios_gui.cpp"
> >
</File> </File>
<File
RelativePath=".\..\src\framerate_gui.cpp"
>
</File>
<File <File
RelativePath=".\..\src\genworld_gui.cpp" RelativePath=".\..\src\genworld_gui.cpp"
> >
@@ -2359,6 +2383,10 @@
RelativePath=".\..\src\widgets\fios_widget.h" RelativePath=".\..\src\widgets\fios_widget.h"
> >
</File> </File>
<File
RelativePath=".\..\src\widgets\framerate_widget.h"
>
</File>
<File <File
RelativePath=".\..\src\widgets\genworld_widget.h" RelativePath=".\..\src\widgets\genworld_widget.h"
> >
@@ -3847,6 +3875,14 @@
RelativePath=".\..\src\blitter\32bpp_anim.hpp" RelativePath=".\..\src\blitter\32bpp_anim.hpp"
> >
</File> </File>
<File
RelativePath=".\..\src\blitter\32bpp_anim_sse2.cpp"
>
</File>
<File
RelativePath=".\..\src\blitter\32bpp_anim_sse2.hpp"
>
</File>
<File <File
RelativePath=".\..\src\blitter\32bpp_anim_sse4.cpp" RelativePath=".\..\src\blitter\32bpp_anim_sse4.cpp"
> >
@@ -4467,6 +4503,10 @@
RelativePath=".\..\src\music\null_m.cpp" RelativePath=".\..\src\music\null_m.cpp"
> >
</File> </File>
<File
RelativePath=".\..\src\music\midifile.cpp"
>
</File>
<File <File
RelativePath=".\..\src\music\win32_m.cpp" RelativePath=".\..\src\music\win32_m.cpp"
> >
@@ -4487,6 +4527,10 @@
RelativePath=".\..\src\sound\win32_s.cpp" RelativePath=".\..\src\sound\win32_s.cpp"
> >
</File> </File>
<File
RelativePath=".\..\src\sound\xaudio2_s.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Windows files" Name="Windows files"
@@ -4499,6 +4543,10 @@
RelativePath=".\..\src\os\windows\ottdres.rc" RelativePath=".\..\src\os\windows\ottdres.rc"
> >
</File> </File>
<File
RelativePath=".\..\src\os\windows\string_uniscribe.cpp"
>
</File>
<File <File
RelativePath=".\..\src\os\windows\win32.cpp" RelativePath=".\..\src\os\windows\win32.cpp"
> >

View File

@@ -53,7 +53,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -88,7 +88,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -157,7 +157,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -185,7 +185,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"
@@ -259,7 +259,7 @@
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -294,7 +294,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -365,7 +365,7 @@
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include" AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -395,7 +395,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib icuuc.lib icuin.lib icudt.lib icule.lib iculx.lib" AdditionalDependencies="winmm.lib ws2_32.lib imm32.lib libpng.lib zlibstat.lib lzo2.lib liblzma.lib libfreetype2.lib"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="LIBCMT.lib" IgnoreDefaultLibraryNames="LIBCMT.lib"

View File

@@ -95,8 +95,6 @@ tilearea.cpp
townname.cpp townname.cpp
#if WIN32 #if WIN32
#else #else
#if WINCE
#else
#if OS2 #if OS2
os/os2/os2.cpp os/os2/os2.cpp
3rdparty/os2/getaddrinfo.c 3rdparty/os2/getaddrinfo.c
@@ -111,7 +109,6 @@ townname.cpp
#end #end
os/unix/unix.cpp os/unix/unix.cpp
#end #end
#end
#end #end
vehicle.cpp vehicle.cpp
vehiclelist.cpp vehiclelist.cpp
@@ -197,6 +194,7 @@ fileio_type.h
fios.h fios.h
fontcache.h fontcache.h
fontdetection.h fontdetection.h
framerate_type.h
base_consist.h base_consist.h
gamelog.h gamelog.h
gamelog_internal.h gamelog_internal.h
@@ -285,6 +283,8 @@ newgrf_townname.h
news_func.h news_func.h
news_gui.h news_gui.h
news_type.h news_type.h
music/midi.h
music/midifile.hpp
music/null_m.h music/null_m.h
sound/null_s.h sound/null_s.h
video/null_v.h video/null_v.h
@@ -346,6 +346,7 @@ strgen/strgen.h
string_base.h string_base.h
string_func.h string_func.h
string_type.h string_type.h
os/windows/string_uniscribe.h
stringfilter_type.h stringfilter_type.h
strings_func.h strings_func.h
strings_type.h strings_type.h
@@ -399,6 +400,7 @@ video/win32_v.h
window_func.h window_func.h
window_gui.h window_gui.h
window_type.h window_type.h
sound/xaudio2_s.h
zoom_func.h zoom_func.h
zoom_type.h zoom_type.h
#if WIN32 #if WIN32
@@ -465,6 +467,7 @@ dock_gui.cpp
engine_gui.cpp engine_gui.cpp
error_gui.cpp error_gui.cpp
fios_gui.cpp fios_gui.cpp
framerate_gui.cpp
genworld_gui.cpp genworld_gui.cpp
goal_gui.cpp goal_gui.cpp
graph_gui.cpp graph_gui.cpp
@@ -528,6 +531,7 @@ widgets/dropdown_widget.h
widgets/engine_widget.h widgets/engine_widget.h
widgets/error_widget.h widgets/error_widget.h
widgets/fios_widget.h widgets/fios_widget.h
widgets/framerate_widget.h
widgets/genworld_widget.h widgets/genworld_widget.h
widgets/goal_widget.h widgets/goal_widget.h
widgets/graph_widget.h widgets/graph_widget.h
@@ -917,6 +921,8 @@ script/api/script_window.cpp
blitter/32bpp_anim.cpp blitter/32bpp_anim.cpp
blitter/32bpp_anim.hpp blitter/32bpp_anim.hpp
#if SSE #if SSE
blitter/32bpp_anim_sse2.cpp
blitter/32bpp_anim_sse2.hpp
blitter/32bpp_anim_sse4.cpp blitter/32bpp_anim_sse4.cpp
blitter/32bpp_anim_sse4.hpp blitter/32bpp_anim_sse4.hpp
#end #end
@@ -1092,9 +1098,6 @@ video/null_v.cpp
#if WIN32 #if WIN32
video/win32_v.cpp video/win32_v.cpp
#end #end
#if WINCE
video/win32_v.cpp
#end
#end #end
# Music # Music
@@ -1108,15 +1111,12 @@ video/null_v.cpp
#end #end
#end #end
music/null_m.cpp music/null_m.cpp
music/midifile.cpp
#if DEDICATED #if DEDICATED
#else #else
#if WIN32 #if WIN32
music/win32_m.cpp music/win32_m.cpp
#else #else
#if WINCE
#else
#if PSP
#else
#if DOS #if DOS
#else #else
#if MORPHOS #if MORPHOS
@@ -1124,8 +1124,6 @@ music/null_m.cpp
music/extmidi.cpp music/extmidi.cpp
#end #end
#end #end
#end
#end
#end #end
#if BEOS #if BEOS
music/bemidi.cpp music/bemidi.cpp
@@ -1147,6 +1145,7 @@ sound/null_s.cpp
#end #end
#if WIN32 #if WIN32
sound/win32_s.cpp sound/win32_s.cpp
sound/xaudio2_s.cpp
#end #end
#end #end
@@ -1175,10 +1174,7 @@ sound/null_s.cpp
#if WIN32 #if WIN32
os/windows/crashlog_win.cpp os/windows/crashlog_win.cpp
os/windows/ottdres.rc os/windows/ottdres.rc
os/windows/win32.cpp os/windows/string_uniscribe.cpp
#end
#if WINCE
os/windows/ottdres.rc
os/windows/win32.cpp os/windows/win32.cpp
#end #end

View File

@@ -115,7 +115,7 @@ void SQVM::Raise_ParamTypeError(SQInteger nparam,SQInteger typemask,SQInteger ty
SQInteger found = 0; SQInteger found = 0;
for(SQInteger i=0; i<16; i++) for(SQInteger i=0; i<16; i++)
{ {
SQInteger mask = 0x00000001 << i; SQInteger mask = 0x00000001LL << i;
if(typemask & (mask)) { if(typemask & (mask)) {
if(found>0) StringCat(exptypes,SQString::Create(_ss(this), "|", -1), exptypes); if(found>0) StringCat(exptypes,SQString::Create(_ss(this), "|", -1), exptypes);
found ++; found ++;

View File

@@ -90,7 +90,7 @@ public:
{ {
_vals[idx].~T(); _vals[idx].~T();
if(idx < (_size - 1)) { if(idx < (_size - 1)) {
memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - (size_t)idx - 1)); memmove(static_cast<void *>(&_vals[idx]), &_vals[idx+1], sizeof(T) * (_size - (size_t)idx - 1));
} }
_size--; _size--;
} }

View File

@@ -378,8 +378,7 @@ bool SQVM::StartCall(SQClosure *closure,SQInteger target,SQInteger args,SQIntege
} }
if (!tailcall) { if (!tailcall) {
CallInfo lc; CallInfo lc = {};
memset(&lc, 0, sizeof(lc));
lc._generator = NULL; lc._generator = NULL;
lc._etraps = 0; lc._etraps = 0;
lc._prevstkbase = (SQInt32) ( stackbase - _stackbase ); lc._prevstkbase = (SQInt32) ( stackbase - _stackbase );
@@ -1159,8 +1158,7 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
SQInteger oldtop = _top; SQInteger oldtop = _top;
SQInteger oldstackbase = _stackbase; SQInteger oldstackbase = _stackbase;
_top = stackbase + nargs; _top = stackbase + nargs;
CallInfo lci; CallInfo lci = {};
memset(&lci, 0, sizeof(lci));
lci._closure = nclosure; lci._closure = nclosure;
lci._generator = NULL; lci._generator = NULL;
lci._etraps = 0; lci._etraps = 0;

View File

@@ -90,7 +90,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
virtual ~Aircraft() { this->PreDestructor(); } virtual ~Aircraft() { this->PreDestructor(); }
void MarkDirty(); void MarkDirty();
void UpdateDeltaXY(Direction direction); void UpdateDeltaXY();
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; } ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; }
bool IsPrimaryVehicle() const { return this->IsNormalAircraft(); } bool IsPrimaryVehicle() const { return this->IsNormalAircraft(); }
void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const; void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const;
@@ -137,7 +137,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
}; };
/** /**
* Macro for iterating over all aircrafts. * Macro for iterating over all aircraft.
*/ */
#define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var) #define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var)

View File

@@ -37,12 +37,13 @@
#include "core/backup_type.hpp" #include "core/backup_type.hpp"
#include "zoom_func.h" #include "zoom_func.h"
#include "disaster_vehicle.h" #include "disaster_vehicle.h"
#include "framerate_type.h"
#include "table/strings.h" #include "table/strings.h"
#include "safeguards.h" #include "safeguards.h"
void Aircraft::UpdateDeltaXY(Direction direction) void Aircraft::UpdateDeltaXY()
{ {
this->x_offs = -1; this->x_offs = -1;
this->y_offs = -1; this->y_offs = -1;
@@ -303,10 +304,10 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
u->engine_type = e->index; u->engine_type = e->index;
v->subtype = (avi->subtype & AIR_CTOL ? AIR_AIRCRAFT : AIR_HELICOPTER); v->subtype = (avi->subtype & AIR_CTOL ? AIR_AIRCRAFT : AIR_HELICOPTER);
v->UpdateDeltaXY(INVALID_DIR); v->UpdateDeltaXY();
u->subtype = AIR_SHADOW; u->subtype = AIR_SHADOW;
u->UpdateDeltaXY(INVALID_DIR); u->UpdateDeltaXY();
v->reliability = e->reliability; v->reliability = e->reliability;
v->reliability_spd_dec = e->reliability_spd_dec; v->reliability_spd_dec = e->reliability_spd_dec;
@@ -363,7 +364,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
w->random_bits = VehicleRandomBits(); w->random_bits = VehicleRandomBits();
/* Use rotor's air.state to store the rotor animation frame */ /* Use rotor's air.state to store the rotor animation frame */
w->state = HRS_ROTOR_STOPPED; w->state = HRS_ROTOR_STOPPED;
w->UpdateDeltaXY(INVALID_DIR); w->UpdateDeltaXY();
u->SetNext(w); u->SetNext(w);
w->UpdatePosition(); w->UpdatePosition();
@@ -749,7 +750,7 @@ int GetAircraftFlightLevel(T *v, bool takeoff)
GetAircraftFlightLevelBounds(v, &aircraft_min_altitude, &aircraft_max_altitude); GetAircraftFlightLevelBounds(v, &aircraft_min_altitude, &aircraft_max_altitude);
int aircraft_middle_altitude = (aircraft_min_altitude + aircraft_max_altitude) / 2; 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_min_altitude < aircraft_middle_altitude);
assert(aircraft_middle_altitude < aircraft_max_altitude); assert(aircraft_middle_altitude < aircraft_max_altitude);
@@ -1361,7 +1362,7 @@ static void AircraftEntersTerminal(Aircraft *v)
*/ */
static void AircraftLandAirplane(Aircraft *v) static void AircraftLandAirplane(Aircraft *v)
{ {
v->UpdateDeltaXY(INVALID_DIR); v->UpdateDeltaXY();
if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) { if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) {
SndPlayVehicleFx(SND_17_SKID_PLANE, v); SndPlayVehicleFx(SND_17_SKID_PLANE, v);
@@ -1553,7 +1554,7 @@ static void AircraftEventHandler_TakeOff(Aircraft *v, const AirportFTAClass *apc
static void AircraftEventHandler_StartTakeOff(Aircraft *v, const AirportFTAClass *apc) static void AircraftEventHandler_StartTakeOff(Aircraft *v, const AirportFTAClass *apc)
{ {
v->state = ENDTAKEOFF; v->state = ENDTAKEOFF;
v->UpdateDeltaXY(INVALID_DIR); v->UpdateDeltaXY();
} }
static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass *apc) static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass *apc)
@@ -1566,7 +1567,7 @@ static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass *
static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass *apc) static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass *apc)
{ {
v->state = FLYING; v->state = FLYING;
v->UpdateDeltaXY(INVALID_DIR); v->UpdateDeltaXY();
/* get the next position to go to, differs per airport */ /* get the next position to go to, differs per airport */
AircraftNextAirportPos_and_Order(v); AircraftNextAirportPos_and_Order(v);
@@ -1632,7 +1633,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *apc
static void AircraftEventHandler_HeliLanding(Aircraft *v, const AirportFTAClass *apc) static void AircraftEventHandler_HeliLanding(Aircraft *v, const AirportFTAClass *apc)
{ {
v->state = HELIENDLANDING; v->state = HELIENDLANDING;
v->UpdateDeltaXY(INVALID_DIR); v->UpdateDeltaXY();
} }
static void AircraftEventHandler_EndLanding(Aircraft *v, const AirportFTAClass *apc) static void AircraftEventHandler_EndLanding(Aircraft *v, const AirportFTAClass *apc)
@@ -2038,6 +2039,8 @@ bool Aircraft::Tick()
{ {
if (!this->IsNormalAircraft()) return true; if (!this->IsNormalAircraft()) return true;
PerformanceAccumulator framerate(PFE_GL_AIRCRAFT);
this->tick_counter++; this->tick_counter++;
if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++; if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++;

View File

@@ -14,6 +14,7 @@
#include "core/smallvec_type.hpp" #include "core/smallvec_type.hpp"
#include "tile_cmd.h" #include "tile_cmd.h"
#include "viewport_func.h" #include "viewport_func.h"
#include "framerate_type.h"
#include "safeguards.h" #include "safeguards.h"
@@ -50,6 +51,8 @@ void AddAnimatedTile(TileIndex tile)
*/ */
void AnimateAnimatedTiles() void AnimateAnimatedTiles()
{ {
PerformanceAccumulator framerate(PFE_GL_LANDSCAPE);
const TileIndex *ti = _animated_tiles.Begin(); const TileIndex *ti = _animated_tiles.Begin();
while (ti < _animated_tiles.End()) { while (ti < _animated_tiles.End()) {
const TileIndex curr = *ti; const TileIndex curr = *ti;

View File

@@ -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 * @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 * @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); const Engine *e = Engine::Get(engine);
if (!e->CanCarryCargo()) return 0; if (!e->CanCarryCargo()) return 0;
uint32 cargoes = e->info.refit_mask; CargoTypes cargoes = e->info.refit_mask;
if (include_initial_cargo_type) { if (include_initial_cargo_type) {
SetBit(cargoes, e->GetDefaultCargoType()); 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] 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. * @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(); cargoes->Clear();
*refits = 0; *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 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) * @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); 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; *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 (!e->IsGroundVehicle()) return;
if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) 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 * @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 * @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); GetArticulatedRefitMasks(engine, include_initial_cargo_type, &union_mask, &intersection_mask);
return union_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 * @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) * @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); GetArticulatedRefitMasks(engine, include_initial_cargo_type, &union_mask, &intersection_mask);
return intersection_mask; return intersection_mask;
} }
@@ -314,16 +314,16 @@ void CheckConsistencyOfArticulatedVehicle(const Vehicle *v)
{ {
const Engine *engine = v->GetEngine(); 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); GetArticulatedRefitMasks(v->engine_type, true, &purchase_refit_union, &purchase_refit_intersection);
CargoArray purchase_default_capacity = GetCapacityOfArticulatedParts(v->engine_type); CargoArray purchase_default_capacity = GetCapacityOfArticulatedParts(v->engine_type);
uint32 real_refit_union = 0; CargoTypes real_refit_union = 0;
uint32 real_refit_intersection = UINT_MAX; CargoTypes real_refit_intersection = ALL_CARGOTYPES;
CargoArray real_default_capacity; CargoArray real_default_capacity;
do { do {
uint32 refit_mask = GetAvailableVehicleCargoTypes(v->engine_type, true); CargoTypes refit_mask = GetAvailableVehicleCargoTypes(v->engine_type, true);
real_refit_union |= refit_mask; real_refit_union |= refit_mask;
if (refit_mask != 0) real_refit_intersection &= refit_mask; if (refit_mask != 0) real_refit_intersection &= refit_mask;

View File

@@ -18,9 +18,9 @@
uint CountArticulatedParts(EngineID engine_type, bool purchase_window); uint CountArticulatedParts(EngineID engine_type, bool purchase_window);
CargoArray GetCapacityOfArticulatedParts(EngineID engine); CargoArray GetCapacityOfArticulatedParts(EngineID engine);
void AddArticulatedParts(Vehicle *first); void AddArticulatedParts(Vehicle *first);
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);
uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type); CargoTypes GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
uint32 GetIntersectionOfArticulatedRefitMasks(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 IsArticulatedVehicleCarryingDifferentCargoes(const Vehicle *v, CargoID *cargo_type);
bool IsArticulatedVehicleRefittable(EngineID engine); bool IsArticulatedVehicleRefittable(EngineID engine);
bool IsArticulatedEngine(EngineID engine_type); bool IsArticulatedEngine(EngineID engine_type);

View File

@@ -37,8 +37,8 @@ extern void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index);
*/ */
static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b) static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b)
{ {
uint32 available_cargoes_a = GetUnionOfArticulatedRefitMasks(engine_a, true); CargoTypes available_cargoes_a = GetUnionOfArticulatedRefitMasks(engine_a, true);
uint32 available_cargoes_b = GetUnionOfArticulatedRefitMasks(engine_b, 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); 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) static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, EngineID engine_type)
{ {
CargoTypes union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, false);
uint32 union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, false); CargoTypes union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, false);
uint32 union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, false);
const Order *o; const Order *o;
const Vehicle *u = (v->type == VEH_TRAIN) ? v->First() : v; 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) 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); 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 if (union_mask == 0) return CT_NO_REFIT; // Don't try to refit an engine with no cargo capacity

View File

@@ -26,6 +26,7 @@ struct ContentInfo;
struct MD5File { struct MD5File {
/** The result of a checksum check */ /** The result of a checksum check */
enum ChecksumResult { enum ChecksumResult {
CR_UNKNOWN, ///< The file has not been checked yet
CR_MATCH, ///< The file did exist and the md5 checksum did match 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_MISMATCH, ///< The file did exist, just the md5 checksum did not match
CR_NO_FILE, ///< The file did not exist CR_NO_FILE, ///< The file did not exist
@@ -34,6 +35,7 @@ struct MD5File {
const char *filename; ///< filename const char *filename; ///< filename
uint8 hash[16]; ///< md5 sum of the file uint8 hash[16]; ///< md5 sum of the file
const char *missing_warning; ///< warning when this file is missing 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; ChecksumResult CheckMD5(Subdirectory subdir, size_t max_size) const;
}; };
@@ -285,11 +287,32 @@ static const uint NUM_SONGS_AVAILABLE = 1 + NUM_SONG_CLASSES * NUM_SONGS_CLASS;
/** Maximum number of songs in the (custom) playlist */ /** Maximum number of songs in the (custom) playlist */
static const uint NUM_SONGS_PLAYLIST = 32; 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. */ /** All data of a music set. */
struct MusicSet : BaseSet<MusicSet, NUM_SONGS_AVAILABLE, false> { struct MusicSet : BaseSet<MusicSet, NUM_SONGS_AVAILABLE, false> {
/** The name of the different songs. */ /** Data about individual songs in set. */
char song_name[NUM_SONGS_AVAILABLE][32]; MusicSongInfo songinfo[NUM_SONGS_AVAILABLE];
byte track_nr[NUM_SONGS_AVAILABLE]; /** Number of valid songs in set. */
byte num_available; byte num_available;
bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename); bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename);

View File

@@ -40,8 +40,6 @@
template <class T, size_t Tnum_files, bool Tsearch_in_tars> template <class T, size_t Tnum_files, bool Tsearch_in_tars>
bool BaseSet<T, Tnum_files, Tsearch_in_tars>::FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename) bool BaseSet<T, Tnum_files, Tsearch_in_tars>::FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename)
{ {
memset(this, 0, sizeof(*this));
IniGroup *metadata = ini->GetGroup("metadata"); IniGroup *metadata = ini->GetGroup("metadata");
IniItem *item; IniItem *item;
@@ -129,7 +127,11 @@ bool BaseSet<T, Tnum_files, Tsearch_in_tars>::FillSetDetails(IniFile *ini, const
file->missing_warning = stredup(item->value); 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: case MD5File::CR_MATCH:
this->valid_files++; this->valid_files++;
this->found_files++; this->found_files++;

View File

@@ -71,7 +71,7 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> {
uint16 random_bits; ///< Random bits assigned to this station uint16 random_bits; ///< Random bits assigned to this station
byte waiting_triggers; ///< Waiting triggers (NewGRF) for 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. 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 TileArea train_station; ///< Tile area the train 'station' part covers
StationRect rect; ///< NOSAVE: Station spread out rectangle maintained by StationRect::xxx() functions StationRect rect; ///< NOSAVE: Station spread out rectangle maintained by StationRect::xxx() functions

View File

@@ -22,7 +22,7 @@ static FBlitter_32bppAnim iFBlitter_32bppAnim;
Blitter_32bppAnim::~Blitter_32bppAnim() Blitter_32bppAnim::~Blitter_32bppAnim()
{ {
free(this->anim_buf); free(this->anim_alloc);
} }
template <BlitterMode mode> template <BlitterMode mode>
@@ -39,8 +39,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
} }
Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left; 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 + this->ScreenToAnimOffset((uint32 *)bp->dst) + bp->top * this->anim_buf_pitch + bp->left;
uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left;
const byte *remap = bp->remap; // store so we don't have to access it via bp everytime const byte *remap = bp->remap; // store so we don't have to access it via bp everytime
@@ -280,8 +279,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
} }
Colour *udst = (Colour *)dst; 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 + this->ScreenToAnimOffset((uint32 *)dst);
uint16 *anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
if (pal == PALETTE_TO_TRANSPARENT) { if (pal == PALETTE_TO_TRANSPARENT) {
do { do {
@@ -319,8 +317,8 @@ 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 */ /* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return; 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::DrawRect(void *video, int width, int height, uint8 colour) void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
@@ -332,8 +330,7 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
} }
Colour colour32 = LookupColourInPalette(colour); Colour colour32 = LookupColourInPalette(colour);
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below. uint16 *anim_line = this->ScreenToAnimOffset((uint32 *)video) + this->anim_buf;
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
do { do {
Colour *dst = (Colour *)video; Colour *dst = (Colour *)video;
@@ -357,15 +354,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); assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
Colour *dst = (Colour *)video; Colour *dst = (Colour *)video;
const uint32 *usrc = (const uint32 *)src; 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 = this->ScreenToAnimOffset((uint32 *)video) + this->anim_buf;
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) { for (; height > 0; height--) {
/* We need to keep those for palette animation. */ /* We need to keep those for palette animation. */
Colour *dst_pal = dst; Colour *dst_pal = dst;
uint16 *anim_pal = anim_line; uint16 *anim_pal = anim_line;
memcpy(dst, usrc, width * sizeof(uint32)); memcpy(static_cast<void *>(dst), usrc, width * sizeof(uint32));
usrc += width; usrc += width;
dst += _screen.pitch; dst += _screen.pitch;
/* Copy back the anim-buffer */ /* Copy back the anim-buffer */
@@ -401,8 +397,7 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
if (this->anim_buf == NULL) return; 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 = this->ScreenToAnimOffset((const uint32 *)video) + this->anim_buf;
const uint16 *anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) { for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint32)); memcpy(udst, src, width * sizeof(uint32));
@@ -485,18 +480,22 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette)
Colour *dst = (Colour *)_screen.dst_ptr; Colour *dst = (Colour *)_screen.dst_ptr;
/* Let's walk the anim buffer and try to find the pixels */ /* 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 y = this->anim_buf_height; y != 0 ; y--) {
for (int x = this->anim_buf_width; x != 0 ; x--) { for (int x = width; x != 0 ; x--) {
uint colour = GB(*anim, 0, 8); uint16 value = *anim;
uint8 colour = GB(value, 0, 8);
if (colour >= PALETTE_ANIM_START) { if (colour >= PALETTE_ANIM_START) {
/* Update this pixel */ /* Update this pixel */
*dst = this->AdjustBrightness(LookupColourInPalette(colour), GB(*anim, 8, 8)); *dst = this->AdjustBrightness(LookupColourInPalette(colour), GB(value, 8, 8));
} }
dst++; dst++;
anim++; anim++;
} }
dst += _screen.pitch - this->anim_buf_width; dst += pitch_offset;
anim += this->anim_buf_pitch - this->anim_buf_width; anim += anim_pitch_offset;
} }
/* Make sure the backend redraws the whole screen */ /* Make sure the backend redraws the whole screen */
@@ -513,10 +512,13 @@ void Blitter_32bppAnim::PostResize()
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height || if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height ||
_screen.pitch != this->anim_buf_pitch) { _screen.pitch != this->anim_buf_pitch) {
/* The size of the screen changed; we can assume we can wipe all data from our buffer */ /* 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_width = _screen.width;
this->anim_buf_height = _screen.height; this->anim_buf_height = _screen.height;
this->anim_buf_pitch = _screen.pitch; this->anim_buf_pitch = (_screen.width + 7) & ~7;
this->anim_buf = CallocT<uint16>(this->anim_buf_height * this->anim_buf_pitch); this->anim_alloc = CallocT<uint16>(this->anim_buf_pitch * this->anim_buf_height + 8);
/* align buffer to next 16 byte boundary */
this->anim_buf = reinterpret_cast<uint16 *>((reinterpret_cast<uintptr_t>(this->anim_alloc) + 0xF) & (~0xF));
} }
} }

View File

@@ -18,14 +18,16 @@
class Blitter_32bppAnim : public Blitter_32bppOptimized { class Blitter_32bppAnim : public Blitter_32bppOptimized {
protected: protected:
uint16 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation 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_width; ///< The width of the animation buffer.
int anim_buf_height; ///< The height 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. Palette palette; ///< The current palette.
public: public:
Blitter_32bppAnim() : Blitter_32bppAnim() :
anim_buf(NULL), anim_buf(NULL),
anim_alloc(NULL),
anim_buf_width(0), anim_buf_width(0),
anim_buf_height(0), anim_buf_height(0),
anim_buf_pitch(0) anim_buf_pitch(0)
@@ -58,6 +60,15 @@ public:
return this->palette.palette[index]; 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 <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom); template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
}; };

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
/** @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<int>(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 */

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
/** @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 */

View File

@@ -35,8 +35,7 @@ inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomL
{ {
const byte * const remap = bp->remap; const byte * const remap = bp->remap;
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left; 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 + this->ScreenToAnimOffset((uint32 *)bp->dst) + bp->top * this->anim_buf_pitch + bp->left;
uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left;
int effective_width = bp->width; int effective_width = bp->width;
/* Find where to start reading in the source sprite. */ /* Find where to start reading in the source sprite. */

View File

@@ -23,13 +23,14 @@
#endif #endif
#include "32bpp_anim.hpp" #include "32bpp_anim.hpp"
#include "32bpp_anim_sse2.hpp"
#include "32bpp_sse4.hpp" #include "32bpp_sse4.hpp"
#undef MARGIN_NORMAL_THRESHOLD #undef MARGIN_NORMAL_THRESHOLD
#define MARGIN_NORMAL_THRESHOLD 4 #define MARGIN_NORMAL_THRESHOLD 4
/** The SSE4 32 bpp blitter with palette animation. */ /** 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: private:
public: public:

View File

@@ -143,6 +143,36 @@ void Blitter_32bppBase::PaletteAnimate(const Palette &palette)
/* By default, 32bpp doesn't have palette animation */ /* 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() Blitter::PaletteAnimation Blitter_32bppBase::UsePaletteAnimation()
{ {
return Blitter::PALETTE_ANIMATION_NONE; return Blitter::PALETTE_ANIMATION_NONE;

View File

@@ -146,30 +146,14 @@ public:
static const int DEFAULT_BRIGHTNESS = 128; static const int DEFAULT_BRIGHTNESS = 128;
static Colour ReallyAdjustBrightness(Colour colour, uint8 brightness);
static inline Colour AdjustBrightness(Colour colour, uint8 brightness) static inline Colour AdjustBrightness(Colour colour, uint8 brightness)
{ {
/* Shortcut for normal brightness */ /* Shortcut for normal brightness */
if (brightness == DEFAULT_BRIGHTNESS) return colour; if (brightness == DEFAULT_BRIGHTNESS) return colour;
uint16 ob = 0; return ReallyAdjustBrightness(colour, brightness);
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);
} }
}; };

View File

@@ -55,7 +55,7 @@ typedef GUIList<BuildBridgeData> GUIBridgeList; ///< List of bridges, used in #B
* @param p1 packed start tile coords (~ dx) * @param p1 packed start tile coords (~ dx)
* @param p2 various bitstuffed elements * @param p2 various bitstuffed elements
* - p2 = (bit 0- 7) - bridge type (hi bh) * - 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. * - p2 = (bit 15-16) - transport type.
*/ */
void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2) void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2)

View File

@@ -131,11 +131,12 @@ static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, D
SetTileType(t, MP_TUNNELBRIDGE); SetTileType(t, MP_TUNNELBRIDGE);
SetTileOwner(t, o); SetTileOwner(t, o);
_m[t].m2 = 0; _m[t].m2 = 0;
_m[t].m3 = rt; _m[t].m3 = 0;
_m[t].m4 = 0; _m[t].m4 = 0;
_m[t].m5 = 1 << 7 | tt << 2 | d; _m[t].m5 = 1 << 7 | tt << 2 | d;
SB(_me[t].m6, 2, 4, bridgetype); SB(_me[t].m6, 2, 4, bridgetype);
_me[t].m7 = 0; _me[t].m7 = 0;
_me[t].m8 = rt;
} }
/** /**

View File

@@ -524,7 +524,7 @@ const StringID _engine_sort_listing[][12] = {{
static bool CDECL CargoFilter(const EngineID *eid, const CargoID cid) static bool CDECL CargoFilter(const EngineID *eid, const CargoID cid)
{ {
if (cid == CF_ANY) return true; 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)); 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) static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine)
{ {
CargoArray cap; CargoArray cap;
uint32 refits; CargoTypes refits;
GetArticulatedVehicleCargoesAndRefits(engine, &cap, &refits); GetArticulatedVehicleCargoesAndRefits(engine, &cap, &refits);
for (CargoID c = 0; c < NUM_CARGO; c++) { for (CargoID c = 0; c < NUM_CARGO; c++) {

View File

@@ -22,7 +22,7 @@
typedef byte CargoID; typedef byte CargoID;
/** Available types of cargo */ /** Available types of cargo */
enum CargoTypes { enum CargoType {
/* Temperate */ /* Temperate */
CT_PASSENGERS = 0, CT_PASSENGERS = 0,
CT_COAL = 1, CT_COAL = 1,
@@ -63,13 +63,17 @@ enum CargoTypes {
CT_PLASTIC = 10, CT_PLASTIC = 10,
CT_FIZZY_DRINKS = 11, 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_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_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. CT_INVALID = 0xFF, ///< Invalid cargo type.
}; };
typedef uint64 CargoTypes;
static const CargoTypes ALL_CARGOTYPES = (CargoTypes)UINT64_MAX;
/** Class for storing amounts of cargo */ /** Class for storing amounts of cargo */
struct CargoArray { struct CargoArray {
private: private:

View File

@@ -28,12 +28,12 @@ CargoSpec CargoSpec::array[NUM_CARGO];
* Bitmask of cargo types available. This includes phony cargoes like regearing cargoes. * Bitmask of cargo types available. This includes phony cargoes like regearing cargoes.
* Initialized during a call to #SetupCargoForClimate. * Initialized during a call to #SetupCargoForClimate.
*/ */
uint32 _cargo_mask; CargoTypes _cargo_mask;
/** /**
* Bitmask of real cargo types available. Phony cargoes like regearing cargoes are excluded. * Bitmask of real cargo types available. Phony cargoes like regearing cargoes are excluded.
*/ */
uint32 _standard_cargo_mask; CargoTypes _standard_cargo_mask;
/** /**
* Set up the default cargo types for the given landscape type. * Set up the default cargo types for the given landscape type.

View File

@@ -129,8 +129,8 @@ private:
friend void SetupCargoForClimate(LandscapeID l); friend void SetupCargoForClimate(LandscapeID l);
}; };
extern uint32 _cargo_mask; extern CargoTypes _cargo_mask;
extern uint32 _standard_cargo_mask; extern CargoTypes _standard_cargo_mask;
void SetupCargoForClimate(LandscapeID l); void SetupCargoForClimate(LandscapeID l);
CargoID GetCargoIDByLabel(CargoLabel cl); CargoID GetCargoIDByLabel(CargoLabel cl);
@@ -156,7 +156,7 @@ static inline bool IsCargoInClass(CargoID c, CargoClass cc)
if ((var = CargoSpec::Get(cargospec_index))->IsValid()) if ((var = CargoSpec::Get(cargospec_index))->IsValid())
#define FOR_ALL_CARGOSPECS(var) FOR_ALL_CARGOSPECS_FROM(var, 0) #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. * Loop header for iterating over cargoes, sorted by name. This includes phony cargoes like regearing cargoes.

View File

@@ -67,8 +67,6 @@ struct CompanyProperties {
byte colour; ///< Company colour. 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). 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. TileIndex location_of_HQ; ///< Northern tile of HQ; #INVALID_TILE when there is none.
@@ -98,7 +96,13 @@ struct CompanyProperties {
CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters. 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. 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() ~CompanyProperties()
{ {
@@ -112,6 +116,7 @@ struct Company : CompanyPool::PoolItem<&_company_pool>, CompanyProperties {
~Company(); ~Company();
Livery livery[LS_END]; Livery livery[LS_END];
RailTypes avail_railtypes; ///< Rail types available to this company.
RoadTypes avail_roadtypes; ///< Road types available to this company. RoadTypes avail_roadtypes; ///< Road types available to this company.
class AIInstance *ai_instance; class AIInstance *ai_instance;

View File

@@ -1908,6 +1908,37 @@ static void IConsoleDebugLibRegister()
} }
#endif #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 * console command registration
*******************************/ *******************************/
@@ -2038,6 +2069,9 @@ void IConsoleStdLibRegister()
#ifdef _DEBUG #ifdef _DEBUG
IConsoleDebugLibRegister(); IConsoleDebugLibRegister();
#endif #endif
IConsoleCmdRegister("fps", ConFramerate);
IConsoleCmdRegister("fps_wnd", ConFramerateWindow);
IConsoleCmdRegister("dump_command_log", ConDumpCommandLog, nullptr, true); IConsoleCmdRegister("dump_command_log", ConDumpCommandLog, nullptr, true);
/* NewGRF development stuff */ /* NewGRF development stuff */

View File

@@ -125,7 +125,7 @@ static inline T *ReallocT(T *t_ptr, size_t num_elements)
/* Ensure the size does not overflow. */ /* Ensure the size does not overflow. */
CheckAllocationConstraints<T>(num_elements); CheckAllocationConstraints<T>(num_elements);
t_ptr = (T*)realloc(t_ptr, num_elements * sizeof(T)); t_ptr = (T*)realloc(static_cast<void *>(t_ptr), num_elements * sizeof(T));
if (t_ptr == NULL) ReallocError(num_elements * sizeof(T)); if (t_ptr == NULL) ReallocError(num_elements * sizeof(T));
return t_ptr; return t_ptr;
} }

View File

@@ -53,7 +53,7 @@ struct Backup {
{ {
/* We cannot assert here, as missing restoration is 'normal' when exceptions are thrown. /* We cannot assert here, as missing restoration is 'normal' when exceptions are thrown.
* Exceptions are especially used to abort world generation. */ * 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(); this->Restore();
} }
} }

View File

@@ -27,14 +27,21 @@
/* Windows has always LITTLE_ENDIAN */ /* Windows has always LITTLE_ENDIAN */
#if defined(WIN32) || defined(__OS2__) || defined(WIN64) #if defined(WIN32) || defined(__OS2__) || defined(WIN64)
#define TTD_ENDIAN TTD_LITTLE_ENDIAN # define TTD_ENDIAN TTD_LITTLE_ENDIAN
#elif defined(OSX)
# include <sys/types.h>
# if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
# else
# define TTD_ENDIAN TTD_BIG_ENDIAN
# endif
#elif !defined(TESTING) #elif !defined(TESTING)
/* Else include endian[target/host].h, which has the endian-type, autodetected by the Makefile */ # include <sys/param.h>
#if defined(STRGEN) || defined(SETTINGSGEN) # if __BYTE_ORDER == __LITTLE_ENDIAN
#include "endian_host.h" # define TTD_ENDIAN TTD_LITTLE_ENDIAN
#else # else
#include "endian_target.h" # define TTD_ENDIAN TTD_BIG_ENDIAN
#endif # endif
#endif /* WIN32 || __OS2__ || WIN64 */ #endif /* WIN32 || __OS2__ || WIN64 */
#endif /* ENDIAN_TYPE_HPP */ #endif /* ENDIAN_TYPE_HPP */

View File

@@ -18,7 +18,7 @@
/* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc /* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
* from external win64.asm because VS2005 does not support inline assembly */ * 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 <intrin.h> #include <intrin.h>
uint64 ottd_rdtsc() uint64 ottd_rdtsc()
{ {
@@ -71,10 +71,7 @@ uint64 ottd_rdtsc()
/* In all other cases we have no support for rdtsc. No major issue, /* 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() */ * you just won't be able to profile your code with TIC()/TOC() */
#if !defined(RDTSC_AVAILABLE) #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" #warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC"
# endif
uint64 ottd_rdtsc() {return 0;} uint64 ottd_rdtsc() {return 0;}
#endif #endif

View File

@@ -17,6 +17,10 @@
#include "fileio_func.h" #include "fileio_func.h"
#include "settings_type.h" #include "settings_type.h"
#if defined(WIN32) || defined(WIN64)
#include "os/windows/win32.h"
#endif
#include <time.h> #include <time.h>
#if defined(ENABLE_NETWORK) #if defined(ENABLE_NETWORK)
@@ -135,10 +139,10 @@ static void debug_print(const char *dbg, const char *buf)
} else { } else {
char buffer[512]; char buffer[512];
seprintf(buffer, lastof(buffer), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf); seprintf(buffer, lastof(buffer), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf);
#if defined(WINCE) #if defined(WIN32) || defined(WIN64)
NKDbgPrintfW(OTTD2FS(buffer)); TCHAR system_buf[512];
#elif defined(WIN32) || defined(WIN64) convert_to_fs(buffer, system_buf, lengthof(system_buf), true);
_fputts(OTTD2FS(buffer, true), stderr); _fputts(system_buf, stderr);
#else #else
fputs(buffer, stderr); fputs(buffer, stderr);
#endif #endif

View File

@@ -164,7 +164,7 @@ DisasterVehicle::DisasterVehicle(int x, int y, Direction direction, DisasterSubT
this->direction = direction; this->direction = direction;
this->tile = TileVirtXY(x, y); this->tile = TileVirtXY(x, y);
this->subtype = subtype; this->subtype = subtype;
this->UpdateDeltaXY(INVALID_DIR); this->UpdateDeltaXY();
this->owner = OWNER_NONE; this->owner = OWNER_NONE;
this->image_override = 0; this->image_override = 0;
this->current_order.Free(); 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->x_offs = -1;
this->y_offs = -1; this->y_offs = -1;

View File

@@ -48,7 +48,7 @@ struct DisasterVehicle FINAL : public SpecializedVehicle<DisasterVehicle, VEH_DI
virtual ~DisasterVehicle() {} virtual ~DisasterVehicle() {}
void UpdatePosition(int x, int y, int z); void UpdatePosition(int x, int y, int z);
void UpdateDeltaXY(Direction direction); void UpdateDeltaXY();
void UpdateImage(); void UpdateImage();
bool Tick(); bool Tick();
}; };

View File

@@ -696,9 +696,10 @@ static void CompaniesGenStatistics()
if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, _cur_month)) return; if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, _cur_month)) return;
FOR_ALL_COMPANIES(c) { 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; 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++; if (c->num_valid_stat_ent != MAX_HISTORY_QUARTERS) c->num_valid_stat_ent++;
@@ -1366,14 +1367,14 @@ struct IsEmptyAction
struct PrepareRefitAction struct PrepareRefitAction
{ {
CargoArray &consist_capleft; ///< Capacities left in the consist. 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. * Create a refit preparation action.
* @param consist_capleft Capacities left in consist, to be updated here. * @param consist_capleft Capacities left in consist, to be updated here.
* @param refit_mask Refit mask to be constructed from refit information of vehicles. * @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) {} consist_capleft(consist_capleft), refit_mask(refit_mask) {}
/** /**
@@ -1469,7 +1470,7 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE); Backup<CompanyByte> 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. */ /* Remove old capacity from consist capacity and collect refit mask. */
IterateVehicleParts(v_start, PrepareRefitAction(consist_capleft, refit_mask)); IterateVehicleParts(v_start, PrepareRefitAction(consist_capleft, refit_mask));
@@ -1627,10 +1628,10 @@ static void LoadUnloadVehicle(Vehicle *front)
bool completely_emptied = true; bool completely_emptied = true;
bool anything_unloaded = false; bool anything_unloaded = false;
bool anything_loaded = false; bool anything_loaded = false;
uint32 full_load_amount = 0; CargoTypes full_load_amount = 0;
uint32 cargo_not_full = 0; CargoTypes cargo_not_full = 0;
uint32 cargo_full = 0; CargoTypes cargo_full = 0;
uint32 reservation_left = 0; CargoTypes reservation_left = 0;
front->cur_speed = 0; front->cur_speed = 0;
@@ -1838,7 +1839,7 @@ static void LoadUnloadVehicle(Vehicle *front)
/* if the aircraft carries passengers and is NOT full, then /* if the aircraft carries passengers and is NOT full, then
* continue loading, no matter how much mail is in */ * 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()) || 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; finished_loading = false;
} }
} else if (cargo_not_full != 0) { } else if (cargo_not_full != 0) {

View File

@@ -152,12 +152,12 @@ enum ExpensesType {
EXPENSES_NEW_VEHICLES, ///< New vehicles. EXPENSES_NEW_VEHICLES, ///< New vehicles.
EXPENSES_TRAIN_RUN, ///< Running costs trains. EXPENSES_TRAIN_RUN, ///< Running costs trains.
EXPENSES_ROADVEH_RUN, ///< Running costs road vehicles. 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_SHIP_RUN, ///< Running costs ships.
EXPENSES_PROPERTY, ///< Property costs. EXPENSES_PROPERTY, ///< Property costs.
EXPENSES_TRAIN_INC, ///< Income from trains. EXPENSES_TRAIN_INC, ///< Income from trains.
EXPENSES_ROADVEH_INC, ///< Income from road vehicles. 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_SHIP_INC, ///< Income from ships.
EXPENSES_LOAN_INT, ///< Interest payments over the loan. EXPENSES_LOAN_INT, ///< Interest payments over the loan.
EXPENSES_OTHER, ///< Other expenses. EXPENSES_OTHER, ///< Other expenses.

View File

@@ -603,7 +603,7 @@ EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type)
v->y_pos = y; v->y_pos = y;
v->z_pos = z; v->z_pos = z;
v->tile = 0; v->tile = 0;
v->UpdateDeltaXY(INVALID_DIR); v->UpdateDeltaXY();
v->vehstatus = VS_UNCLICKABLE; v->vehstatus = VS_UNCLICKABLE;
_effect_init_procs[type](v); _effect_init_procs[type](v);
@@ -647,7 +647,7 @@ bool EffectVehicle::Tick()
return _effect_tick_procs[this->subtype](this); return _effect_tick_procs[this->subtype](this);
} }
void EffectVehicle::UpdateDeltaXY(Direction direction) void EffectVehicle::UpdateDeltaXY()
{ {
this->x_offs = 0; this->x_offs = 0;
this->y_offs = 0; this->y_offs = 0;

View File

@@ -32,7 +32,7 @@ struct EffectVehicle FINAL : public SpecializedVehicle<EffectVehicle, VEH_EFFECT
/** We want to 'destruct' the right class. */ /** We want to 'destruct' the right class. */
virtual ~EffectVehicle() {} virtual ~EffectVehicle() {}
void UpdateDeltaXY(Direction direction); void UpdateDeltaXY();
bool Tick(); bool Tick();
TransparencyOption GetTransparencyOption() const; TransparencyOption GetTransparencyOption() const;
}; };

View File

@@ -1,78 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file endian_check.cpp
* This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN
* it does that by putting a 1 and a 0 in an array, and read it out as one
* number. If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN
*
* After that it outputs the contents of an include files (endian.h)
* that says or TTD_LITTLE_ENDIAN, or TTD_BIG_ENDIAN. Makefile takes
* care of the real writing to the file.
*/
#include <stdio.h>
#include <string.h>
/** Supported endian types */
enum Endian {
ENDIAN_LITTLE, ///< little endian
ENDIAN_BIG, ///< big endian
};
/**
* Shortcut to printf("#define TTD_ENDIAN TTD_*_ENDIAN")
* @param endian endian type to define
*/
static inline void printf_endian(Endian endian)
{
printf("#define TTD_ENDIAN %s\n", endian == ENDIAN_LITTLE ? "TTD_LITTLE_ENDIAN" : "TTD_BIG_ENDIAN");
}
/**
* Main call of the endian_check program
* @param argc argument count
* @param argv arguments themselves
* @return exit code
*/
int main (int argc, char *argv[])
{
unsigned char endian_test[2] = { 1, 0 };
int force_BE = 0, force_LE = 0, force_PREPROCESSOR = 0;
if (argc > 1 && strcmp(argv[1], "BE") == 0) force_BE = 1;
if (argc > 1 && strcmp(argv[1], "LE") == 0) force_LE = 1;
if (argc > 1 && strcmp(argv[1], "PREPROCESSOR") == 0) force_PREPROCESSOR = 1;
printf("#ifndef ENDIAN_H\n#define ENDIAN_H\n");
if (force_LE == 1) {
printf_endian(ENDIAN_LITTLE);
} else if (force_BE == 1) {
printf_endian(ENDIAN_BIG);
} else if (force_PREPROCESSOR == 1) {
/* Support for universal binaries on OSX
* Universal binaries supports both PPC and x86
* If a compiler for OSX gets this setting, it will always pick the correct endian and no test is needed
*/
printf("#ifdef __BIG_ENDIAN__\n");
printf_endian(ENDIAN_BIG);
printf("#else\n");
printf_endian(ENDIAN_LITTLE);
printf("#endif\n");
} else if (*(short*)endian_test == 1 ) {
printf_endian(ENDIAN_LITTLE);
} else {
printf_endian(ENDIAN_BIG);
}
printf("#endif\n");
return 0;
}

View File

@@ -752,7 +752,7 @@ static CompanyID GetPreviewCompany(Engine *e)
CompanyID best_company = INVALID_COMPANY; CompanyID best_company = INVALID_COMPANY;
/* For trains the cargomask has no useful meaning, since you can attach other wagons */ /* 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; int32 best_hist = -1;
const Company *c; const Company *c;
@@ -1117,7 +1117,9 @@ bool IsEngineRefittable(EngineID engine)
/* Is there any cargo except the default cargo? */ /* Is there any cargo except the default cargo? */
CargoID default_cargo = e->GetDefaultCargoType(); 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;
} }
/** /**

View File

@@ -26,7 +26,7 @@ extern const uint8 _engine_offsets[4];
bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company); bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company);
bool IsEngineRefittable(EngineID engine); bool IsEngineRefittable(EngineID engine);
void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, uint32 *refits); void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits);
void SetYearEngineAgingStops(); void SetYearEngineAgingStops();
void StartupOneEngine(Engine *e, Date aging_date); void StartupOneEngine(Engine *e, Date aging_date);

View File

@@ -137,7 +137,7 @@ struct EngineInfo {
byte load_amount; byte load_amount;
byte climates; ///< Climates supported by the engine. byte climates; ///< Climates supported by the engine.
CargoID cargo_type; CargoID cargo_type;
uint32 refit_mask; CargoTypes refit_mask;
byte refit_cost; byte refit_cost;
byte misc_flags; ///< Miscellaneous flags. @see EngineMiscFlags byte misc_flags; ///< Miscellaneous flags. @see EngineMiscFlags
byte callback_mask; ///< Bitmask of vehicle callbacks that have to be called byte callback_mask; ///< Bitmask of vehicle callbacks that have to be called

View File

@@ -325,15 +325,7 @@ bool FioCheckFileExists(const char *filename, Subdirectory subdir)
*/ */
bool FileExists(const char *filename) 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; return access(OTTD2FS(filename), 0) == 0;
#endif
} }
/** /**
@@ -540,11 +532,11 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir,
* Create a directory with the given name * Create a directory with the given name
* @param name the new name of the directory * @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 /* Ignore directory creation errors; they'll surface later on, and most
* of the time they are 'directory already exists' errors anyhow. */ * of the time they are 'directory already exists' errors anyhow. */
#if defined(WIN32) || defined(WINCE) #if defined(WIN32)
CreateDirectory(OTTD2FS(name), NULL); CreateDirectory(OTTD2FS(name), NULL);
#elif defined(OS2) && !defined(__INNOTEK_LIBC__) #elif defined(OS2) && !defined(__INNOTEK_LIBC__)
mkdir(OTTD2FS(name)); mkdir(OTTD2FS(name));
@@ -988,14 +980,14 @@ bool ExtractTar(const char *tar_filename, Subdirectory subdir)
return true; return true;
} }
#if defined(WIN32) || defined(WINCE) #if defined(WIN32)
/** /**
* Determine the base (personal dir and game data dir) paths * Determine the base (personal dir and game data dir) paths
* @param exe the path from the current path to the executable * @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) * @note defined in the OS related files (os2.cpp, win32.cpp, unix.cpp etc)
*/ */
extern void DetermineBasePaths(const char *exe); 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. * Changes the working directory to the path of the give executable.
@@ -1158,7 +1150,7 @@ extern void cocoaSetApplicationBundleDir();
_searchpaths[SP_APPLICATION_BUNDLE_DIR] = NULL; _searchpaths[SP_APPLICATION_BUNDLE_DIR] = NULL;
#endif #endif
} }
#endif /* defined(WIN32) || defined(WINCE) */ #endif /* defined(WIN32) */
const char *_personal_dir; const char *_personal_dir;

View File

@@ -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 *FioFindFullPath(char *buf, const char *last, Subdirectory subdir, const char *filename);
char *FioAppendDirectory(char *buf, const char *last, Searchpath sp, Subdirectory subdir); char *FioAppendDirectory(char *buf, const char *last, Searchpath sp, Subdirectory subdir);
char *FioGetDirectory(char *buf, const char *last, Subdirectory subdir); char *FioGetDirectory(char *buf, const char *last, Subdirectory subdir);
void FioCreateDirectory(const char *name);
const char *FiosGetScreenshotDir(); const char *FiosGetScreenshotDir();
@@ -149,4 +150,17 @@ static inline DIR *ttd_opendir(const char *path)
return opendir(OTTD2FS(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 */ #endif /* FILEIO_FUNC_H */

View File

@@ -153,9 +153,7 @@ const char *FiosBrowseTo(const FiosItem *item)
{ {
switch (item->type) { switch (item->type) {
case FIOS_TYPE_DRIVE: case FIOS_TYPE_DRIVE:
#if defined(WINCE) #if defined(WIN32) || defined(__OS2__)
seprintf(_fios_path, _fios_path_last, PATHSEP "");
#elif defined(WIN32) || defined(__OS2__)
seprintf(_fios_path, _fios_path_last, "%c:" PATHSEP, item->title[0]); seprintf(_fios_path, _fios_path_last, "%c:" PATHSEP, item->title[0]);
#endif #endif
break; break;

View File

@@ -86,6 +86,7 @@ public:
virtual GlyphID MapCharToGlyph(WChar key) { assert(IsPrintable(key)); return SPRITE_GLYPH | key; } 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 void *GetFontTable(uint32 tag, size_t &length) { length = 0; return NULL; }
virtual const char *GetFontName() { return "sprite"; } virtual const char *GetFontName() { return "sprite"; }
virtual bool IsBuiltInFont() { return true; }
}; };
/** /**
@@ -208,6 +209,7 @@ bool SpriteFontCache::GetDrawGlyphShadow()
class FreeTypeFontCache : public FontCache { class FreeTypeFontCache : public FontCache {
private: private:
FT_Face face; ///< The font face associated with this font. FT_Face face; ///< The font face associated with this font.
int req_size; ///< Requested font size.
typedef SmallMap<uint32, SmallPair<size_t, const void*> > FontTable; ///< Table with font table cache typedef SmallMap<uint32, SmallPair<size_t, const void*> > FontTable; ///< Table with font table cache
FontTable font_tables; ///< Cached font tables. FontTable font_tables; ///< Cached font tables.
@@ -236,6 +238,7 @@ private:
GlyphEntry *GetGlyphPtr(GlyphID key); GlyphEntry *GetGlyphPtr(GlyphID key);
void SetGlyphPtr(GlyphID key, const GlyphEntry *glyph, bool duplicate = false); void SetGlyphPtr(GlyphID key, const GlyphEntry *glyph, bool duplicate = false);
void SetFontSize(FontSize fs, FT_Face face, int pixels);
public: public:
FreeTypeFontCache(FontSize fs, FT_Face face, int pixels); FreeTypeFontCache(FontSize fs, FT_Face face, int pixels);
@@ -250,6 +253,7 @@ public:
virtual GlyphID MapCharToGlyph(WChar key); virtual GlyphID MapCharToGlyph(WChar key);
virtual const void *GetFontTable(uint32 tag, size_t &length); virtual const void *GetFontTable(uint32 tag, size_t &length);
virtual const char *GetFontName() { return face->family_name; } virtual const char *GetFontName() { return face->family_name; }
virtual bool IsBuiltInFont() { return false; }
}; };
FT_Library _library = NULL; FT_Library _library = NULL;
@@ -265,20 +269,26 @@ static const byte SHADOW_COLOUR = 2;
* @param face The font that has to be loaded. * @param face The font that has to be loaded.
* @param pixels The number of pixels this font should be high. * @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); assert(face != NULL);
this->SetFontSize(fs, face, pixels);
}
void FreeTypeFontCache::SetFontSize(FontSize fs, FT_Face face, int pixels)
{
if (pixels == 0) { if (pixels == 0) {
/* Try to determine a good height based on the minimal height recommended by the font. */ /* 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); TT_Header *head = (TT_Header *)FT_Get_Sfnt_Table(this->face, ft_sfnt_head);
if (head != NULL) { if (head != NULL) {
/* Font height is minimum height plus the difference between the default /* Font height is minimum height plus the difference between the default
* height for this font size and the small size. */ * height for this font size and the small size. */
int diff = _default_font_height[this->fs] - _default_font_height[FS_SMALL]; int diff = scaled_height - ScaleGUITrad(_default_font_height[FS_SMALL]);
pixels = Clamp(min(head->Lowest_Rec_PPEM, 20) + diff, _default_font_height[this->fs], MAX_FONT_SIZE); pixels = Clamp(min(head->Lowest_Rec_PPEM, 20) + diff, scaled_height, MAX_FONT_SIZE);
} }
} }
@@ -393,6 +403,7 @@ found_face:
FreeTypeFontCache::~FreeTypeFontCache() FreeTypeFontCache::~FreeTypeFontCache()
{ {
FT_Done_Face(this->face); FT_Done_Face(this->face);
this->face = NULL;
this->ClearFontCache(); this->ClearFontCache();
for (FontTable::iterator iter = this->font_tables.Begin(); iter != this->font_tables.End(); iter++) { for (FontTable::iterator iter = this->font_tables.Begin(); iter != this->font_tables.End(); iter++) {
@@ -422,6 +433,9 @@ void FreeTypeFontCache::ClearFontCache()
this->glyph_to_sprite = NULL; this->glyph_to_sprite = NULL;
Layouter::ResetFontCache(this->fs); 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) FreeTypeFontCache::GlyphEntry *FreeTypeFontCache::GetGlyphPtr(GlyphID key)

View File

@@ -143,6 +143,11 @@ public:
{ {
return this->parent != NULL; 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 */ /** Get the SpriteID mapped to the given font size and key */

823
src/framerate_gui.cpp Normal file
View File

@@ -0,0 +1,823 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file framerate_gui.cpp GUI for displaying framerate/game speed information. */
#include "framerate_type.h"
#include <chrono>
#include "gfx_func.h"
#include "window_gui.h"
#include "table/sprites.h"
#include "strings_func.h"
#include "debug.h"
#include "console_func.h"
#include "console_type.h"
#include "widgets/framerate_widget.h"
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;
explicit PerformanceData(double expected_rate) : expected_rate(expected_rate), next_index(0), prev_index(0), num_valid(0) { }
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);
}
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;
}
void AddAccumulate(TimingMeasurement duration)
{
this->acc_duration += duration;
}
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;
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<microseconds>(high_resolution_clock::now()).time_since_epoch().count();
}
/** Begin a cycle of a measured element. */
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. */
void PerformanceMeasurer::Paused(PerformanceElement elem)
{
_pf_data[elem].AddPause(GetPerformanceTimer());
}
/** Begin measuring one block of the accumulating value. */
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. */
void PerformanceAccumulator::Reset(PerformanceElement elem)
{
_pf_data[elem].BeginAccumulate(GetPerformanceTimer());
}
void ShowFrametimeGraphWindow(PerformanceElement elem);
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;
uint32 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();
}
virtual void OnTick()
{
/* Check if the shaded state has changed, switch caption text if it has */
if (this->small != this->IsShaded()) {
this->small = this->IsShaded();
this->GetWidget<NWidgetLeaf>(WID_FRW_CAPTION)->SetDataTip(this->small ? STR_FRAMERATE_CAPTION_SMALL : STR_FRAMERATE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
this->next_update = 0;
}
if (_realtime_tick >= this->next_update) {
this->UpdateData();
this->SetDirty();
this->next_update = _realtime_tick + 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);
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)
);
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
uint32 next_scale_update; ///< realtime tick 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 = 0;
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<uint>(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 OnTick()
{
this->SetDirty();
if (this->next_scale_update < _realtime_tick) {
this->next_scale_update = _realtime_tick + 500;
this->UpdateScale();
}
}
/** Scale and interpolate a value from a source range into a destination range */
template<typename T>
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<int64>(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<int64>(x_zero, x_max, 0, (int64)draw_horz_scale, (int64)draw_horz_scale - (int64)time_sum),
(int)Scinterlate<int64>(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)
);
void ShowFramerateWindow()
{
AllocateWindowDescFront<FramerateWindow>(&_framerate_display_desc, 0);
}
void ShowFrametimeGraphWindow(PerformanceElement elem)
{
if (elem < PFE_FIRST || elem >= PFE_MAX) return; // maybe warn?
AllocateWindowDescFront<FrametimeGraphWindow>(&_frametime_graph_window_desc, elem, true);
}
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");
}
}

67
src/framerate_type.h Normal file
View File

@@ -0,0 +1,67 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FRAMERATE_GUI_H
#define FRAMERATE_GUI_H
#include "stdafx.h"
#include "core/enum_type.hpp"
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)
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.
*/
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.
*/
class PerformanceAccumulator {
PerformanceElement elem;
TimingMeasurement start_time;
public:
PerformanceAccumulator(PerformanceElement elem);
~PerformanceAccumulator();
static void Reset(PerformanceElement elem);
};
void ShowFramerateWindow();
#endif /* FRAMERATE_GUI_H */

View File

@@ -38,7 +38,7 @@ void GamelogReset();
* @param s The string to print. * @param s The string to print.
*/ */
typedef void GamelogPrintProc(const char *s); 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 GamelogPrintDebug(int level);
void GamelogPrintConsole(); void GamelogPrintConsole();

View File

@@ -288,7 +288,7 @@ static DropDownList *BuildMapsizeDropDown()
for (uint i = MIN_MAP_SIZE_BITS; i <= MAX_MAP_SIZE_BITS; i++) { for (uint i = MIN_MAP_SIZE_BITS; i <= MAX_MAP_SIZE_BITS; i++) {
DropDownListParamStringItem *item = new DropDownListParamStringItem(STR_JUST_INT, i, false); DropDownListParamStringItem *item = new DropDownListParamStringItem(STR_JUST_INT, i, false);
item->SetParam(0, 1 << i); item->SetParam(0, 1LL << i);
*list->Append() = item; *list->Append() = item;
} }
@@ -336,8 +336,8 @@ struct GenerateLandscapeWindow : public Window {
{ {
switch (widget) { switch (widget) {
case WID_GL_START_DATE_TEXT: SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1)); break; 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_X_PULLDOWN: SetDParam(0, 1LL << _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_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_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; case WID_GL_SNOW_LEVEL_TEXT: SetDParam(0, _settings_newgame.game_creation.snow_line_height); break;
@@ -896,11 +896,11 @@ struct CreateScenarioWindow : public Window
break; break;
case WID_CS_MAPSIZE_X_PULLDOWN: 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; break;
case WID_CS_MAPSIZE_Y_PULLDOWN: 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; break;
case WID_CS_FLAT_LAND_HEIGHT_TEXT: case WID_CS_FLAT_LAND_HEIGHT_TEXT:

View File

@@ -1111,16 +1111,17 @@ void DoPaletteAnimations()
/** /**
* Determine a contrasty text colour for a coloured background. * Determine a contrasty text colour for a coloured background.
* @param background Background colour. * @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. * @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]; Colour c = _cur_palette.palette[background];
/* Compute brightness according to http://www.w3.org/TR/AERT#color-contrast. /* 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. */ * 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; uint sq1000_brightness = c.r * c.r * 299 + c.g * c.g * 587 + c.b * c.b * 114;
/* Compare with threshold brightness 128 (50%) */ /* Compare with threshold brightness which defaults to 128 (50%) */
return sq1000_brightness < 128 * 128 * 1000 ? TC_WHITE : TC_BLACK; return sq1000_brightness < ((uint) threshold) * ((uint) threshold) * 1000 ? TC_WHITE : TC_BLACK;
} }
/** /**
@@ -1214,11 +1215,6 @@ void UndrawMouseCursor()
void DrawMouseCursor() void DrawMouseCursor()
{ {
#if defined(WINCE)
/* Don't ever draw the mouse for WinCE, as we work with a stylus */
return;
#endif
/* Don't draw the mouse cursor if the screen is not ready */ /* Don't draw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == NULL) return; if (_screen.dst_ptr == NULL) return;

View File

@@ -187,7 +187,7 @@ int GetCharacterHeight(FontSize size);
extern DrawPixelInfo *_cur_dpi; extern DrawPixelInfo *_cur_dpi;
TextColour GetContrastColour(uint8 background); TextColour GetContrastColour(uint8 background, uint8 threshold = 128);
/** /**
* All 16 colour gradients * All 16 colour gradients

View File

@@ -21,6 +21,10 @@
#include <unicode/ustring.h> #include <unicode/ustring.h>
#endif /* WITH_ICU_LAYOUT */ #endif /* WITH_ICU_LAYOUT */
#ifdef WITH_UNISCRIBE
#include "os/windows/string_uniscribe.h"
#endif /* WITH_UNISCRIBE */
#include "safeguards.h" #include "safeguards.h"
@@ -113,26 +117,12 @@ le_bool Font::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &poin
return FALSE; 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. * Wrapper for doing layouts with ICU.
*/ */
class ICUParagraphLayout : public AutoDeleteSmallVector<ParagraphLayouter::Line *, 4>, public ParagraphLayouter { class ICUParagraphLayout : public AutoDeleteSmallVector<ParagraphLayouter::Line *, 4>, public ParagraphLayouter {
ParagraphLayout *p; ///< The actual ICU paragraph layout. ParagraphLayout *p; ///< The actual ICU paragraph layout.
public: 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. */ /** Visual run contains data about the bit of text with the same font. */
class ICUVisualRun : public ParagraphLayouter::VisualRun { class ICUVisualRun : public ParagraphLayouter::VisualRun {
const ParagraphLayout::VisualRun *vr; ///< The actual ICU vr. const ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
@@ -184,8 +174,18 @@ public:
} }
}; };
static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontMap &fontMapping) /**
{ * 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;
static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontMap &fontMapping)
{
int32 length = buff_end - buff; int32 length = buff_end - buff;
if (length == 0) { if (length == 0) {
@@ -211,8 +211,17 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
} }
return new ICUParagraphLayout(p); return new ICUParagraphLayout(p);
} }
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;
}
};
#endif /* WITH_ICU_LAYOUT */ #endif /* WITH_ICU_LAYOUT */
/*** Paragraph layout ***/ /*** Paragraph layout ***/
@@ -236,11 +245,6 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
*/ */
class FallbackParagraphLayout : public ParagraphLayouter { class FallbackParagraphLayout : public ParagraphLayouter {
public: 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. */ /** Visual run contains data about the bit of text with the same font. */
class FallbackVisualRun : public ParagraphLayouter::VisualRun { class FallbackVisualRun : public ParagraphLayouter::VisualRun {
Font *font; ///< The font used to layout these. Font *font; ///< The font used to layout these.
@@ -280,6 +284,42 @@ public:
const ParagraphLayouter::Line *NextLine(int max_width); 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. * Create the visual run.
* @param font The font to use for this run. * @param font The font to use for this run.
@@ -536,31 +576,6 @@ const ParagraphLayouter::Line *FallbackParagraphLayout::NextLine(int max_width)
return l; 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. * Helper for getting a ParagraphLayouter of the given type.
* *
@@ -582,6 +597,7 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str,
Font *f = Layouter::GetFont(state.fontsize, state.cur_colour); Font *f = Layouter::GetFont(state.fontsize, state.cur_colour);
line.buffer = buff_begin; line.buffer = buff_begin;
fontMapping.Clear();
/* /*
* Go through the whole string while adding Font instances to the font map * Go through the whole string while adding Font instances to the font map
@@ -605,7 +621,7 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str,
* will not be handled in the fallback non ICU case because they are * will not be handled in the fallback non ICU case because they are
* mostly needed for RTL languages which need more ICU support. */ * mostly needed for RTL languages which need more ICU support. */
if (!T::SUPPORTS_RTL && IsTextDirectionChar(c)) continue; if (!T::SUPPORTS_RTL && IsTextDirectionChar(c)) continue;
buff += AppendToBuffer(buff, buffer_last, c); buff += T::AppendToBuffer(buff, buffer_last, c);
continue; continue;
} }
@@ -621,7 +637,7 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str,
if (!fontMapping.Contains(buff - buff_begin)) { if (!fontMapping.Contains(buff - buff_begin)) {
fontMapping.Insert(buff - buff_begin, f); 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; line.state_after = state;
} }
@@ -654,11 +670,13 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
line.layout->Reflow(); line.layout->Reflow();
} else { } else {
/* Line is new, layout it */ /* Line is new, layout it */
#ifdef WITH_ICU_LAYOUT
FontState old_state = state; FontState old_state = state;
#if defined(WITH_ICU_LAYOUT) || defined(WITH_UNISCRIBE)
const char *old_str = str; const char *old_str = str;
#endif
GetLayouter<ICUParagraphLayout>(line, str, state); #ifdef WITH_ICU_LAYOUT
GetLayouter<ICUParagraphLayoutFactory>(line, str, state);
if (line.layout == NULL) { if (line.layout == NULL) {
static bool warned = false; static bool warned = false;
if (!warned) { if (!warned) {
@@ -668,11 +686,22 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
state = old_state; state = old_state;
str = old_str; str = old_str;
GetLayouter<FallbackParagraphLayout>(line, str, state);
} }
#else
GetLayouter<FallbackParagraphLayout>(line, str, state);
#endif #endif
#ifdef WITH_UNISCRIBE
if (line.layout == NULL) {
GetLayouter<UniscribeParagraphLayoutFactory>(line, str, state);
if (line.layout == NULL) {
state = old_state;
str = old_str;
}
}
#endif
if (line.layout == NULL) {
GetLayouter<FallbackParagraphLayoutFactory>(line, str, state);
}
} }
/* Copy all lines into a local cache so we can reuse them later on more easily. */ /* Copy all lines into a local cache so we can reuse them later on more easily. */
@@ -809,6 +838,10 @@ void Layouter::ResetFontCache(FontSize size)
/* We must reset the linecache since it references the just freed fonts */ /* We must reset the linecache since it references the just freed fonts */
ResetLineCache(); ResetLineCache();
#if defined(WITH_UNISCRIBE)
UniscribeResetScriptCache(size);
#endif
} }
/** /**

View File

@@ -284,6 +284,9 @@ static bool SwitchNewGRFBlitter()
#endif #endif
{ "8bpp-optimized", 2, 8, 8, 8, 8 }, { "8bpp-optimized", 2, 8, 8, 8, 8 },
{ "32bpp-optimized", 0, 8, 32, 8, 32 }, { "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 }, { "32bpp-anim", 1, 8, 32, 8, 32 },
}; };

View File

@@ -23,6 +23,8 @@
#include "string_func.h" #include "string_func.h"
#include "gui.h" #include "gui.h"
#include "network/network.h" #include "network/network.h"
#include "network/network_base.h"
#include "network/network_func.h"
#include "safeguards.h" #include "safeguards.h"
@@ -234,7 +236,9 @@ CommandCost CmdSetGoalCompleted(TileIndex tile, DoCommandFlag flags, uint32 p1,
* @param flags type of operation * @param flags type of operation
* @param p1 various bitstuffed elements * @param p1 various bitstuffed elements
* - p1 = (bit 0 - 15) - Unique ID to use for this question. * - 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 p2 Buttons of the question.
* @param text Text of the question. * @param text Text of the question.
* @return the cost of this operation or an error * @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); uint16 uniqueid = (GoalType)GB(p1, 0, 16);
CompanyID company = (CompanyID)GB(p1, 16, 8); 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 (_current_company != OWNER_DEITY) return CMD_ERROR;
if (StrEmpty(text)) return CMD_ERROR; if (StrEmpty(text)) 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 (company != INVALID_COMPANY && !Company::IsValidID(company)) return CMD_ERROR;
}
if (CountBits(p2) < 1 || CountBits(p2) > 3) return CMD_ERROR; if (CountBits(p2) < 1 || CountBits(p2) > 3) return CMD_ERROR;
if (p2 >= (1 << GOAL_QUESTION_BUTTON_COUNT)) return CMD_ERROR; if (p2 >= (1 << GOAL_QUESTION_BUTTON_COUNT)) return CMD_ERROR;
if (type >= GOAL_QUESTION_TYPE_COUNT) return CMD_ERROR; if (type >= GOAL_QUESTION_TYPE_COUNT) return CMD_ERROR;
if (flags & DC_EXEC) { 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(); return CommandCost();

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