mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 17:19:09 +00:00
Compare commits
65 Commits
827a479d79
...
0.6.3
Author | SHA1 | Date | |
---|---|---|---|
|
ad06485692 | ||
|
b89e90e0c0 | ||
|
ad4dcad00a | ||
|
2f22fd155b | ||
|
fde71ec047 | ||
|
23cfc3bec7 | ||
|
68fe4d71e1 | ||
456b479a21 | |||
|
cbc69f8067 | ||
|
d53ec0c4cd | ||
|
bbaaaaa506 | ||
|
290b0c1099 | ||
|
d86dc41a0a | ||
|
52154a3f64 | ||
|
09cf61b466 | ||
|
c9d52ddeff | ||
|
0222967c41 | ||
|
16492fe7b1 | ||
|
5f7f86e3be | ||
|
9878c58727 | ||
|
39f8e1085f | ||
|
467de8942b | ||
|
6054758c1d | ||
|
22cda2f1b8 | ||
|
a0f6275c3a | ||
|
c29c7f7932 | ||
|
6097389437 | ||
|
bafea078f2 | ||
|
5c97e3307c | ||
|
3cd7a5959f | ||
|
7da596b92d | ||
|
fbbd7bef6d | ||
|
b95eb99c55 | ||
|
a68eee5f31 | ||
|
4f76d929c6 | ||
|
94ae5be42a | ||
|
808f15e43f | ||
|
71144d1a98 | ||
|
44a476c946 | ||
|
76a2221dbb | ||
|
966c2fe4b9 | ||
|
f4d1d082ab | ||
|
391127bfaf | ||
|
ee7bad769f | ||
|
9e966f9cd0 | ||
|
942a752e2a | ||
|
9e03a7b23a | ||
|
e114133d18 | ||
|
9241c4649d | ||
|
f126c2e66f | ||
|
c973bd87ce | ||
|
4cb6a89e81 | ||
|
7bf1737a66 | ||
|
fb0afc9cca | ||
|
9f65c1b8f0 | ||
|
1a495b0b1c | ||
|
5294075ad4 | ||
|
ed4ae53e8a | ||
|
c53f9fc2a2 | ||
|
cbd426059e | ||
|
624549464f | ||
|
1f9dce4697 | ||
|
185c30b6bf | ||
|
8df7a53652 | ||
|
9d47454105 |
2
Doxyfile
2
Doxyfile
@@ -158,7 +158,7 @@ RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = YES
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
|
173
Makefile.bundle.in
Normal file
173
Makefile.bundle.in
Normal file
@@ -0,0 +1,173 @@
|
||||
#
|
||||
# Creation of bundles
|
||||
#
|
||||
|
||||
# The revision is needed for the bundle name and creating an OSX application bundle.
|
||||
ifdef REVISION
|
||||
REV := $(REVISION)
|
||||
else
|
||||
# Detect the revision
|
||||
VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
|
||||
REV := $(shell echo "$(VERSIONS)" | cut -f 1)
|
||||
endif
|
||||
|
||||
# Make sure we have something in REV
|
||||
ifeq ($(REV),)
|
||||
REV := norev000
|
||||
endif
|
||||
|
||||
ifndef BUNDLE_NAME
|
||||
BUNDLE_NAME = OTTD-$(OS)-custom-$(REV)
|
||||
endif
|
||||
|
||||
# An OSX application bundle needs the data files, lang files and openttd executable in a different location.
|
||||
ifdef OSXAPP
|
||||
DATA_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/data
|
||||
LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/lang
|
||||
TTD_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/MacOS
|
||||
else
|
||||
DATA_DIR = $(BUNDLE_DIR)/data
|
||||
LANG_DIR = $(BUNDLE_DIR)/lang
|
||||
TTD_DIR = $(BUNDLE_DIR)
|
||||
endif
|
||||
|
||||
bundle: all
|
||||
@echo '[BUNDLE] Constructing bundle'
|
||||
$(Q)rm -rf "${BUNDLE_DIR}"
|
||||
$(Q)mkdir -p "${BUNDLE_DIR}"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/docs"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/scenario"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/scenario/heightmap"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/media"
|
||||
$(Q)mkdir -p "$(TTD_DIR)"
|
||||
$(Q)mkdir -p "$(DATA_DIR)"
|
||||
$(Q)mkdir -p "$(LANG_DIR)"
|
||||
ifdef OSXAPP
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources"
|
||||
$(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo"
|
||||
$(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns"
|
||||
$(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "${BUNDLE_DIR}/$(OSXAPP)" "$(REV)"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/OSX_install_instructions.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(DATA_DIR)"
|
||||
endif
|
||||
$(Q)cp "$(BIN_DIR)/$(TTD)" "$(TTD_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/data/"*.grf "$(DATA_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/data/opntitle.dat" "$(DATA_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/lang/"*.lng "$(LANG_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/readme.txt" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/COPYING" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/32bpp.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/"
|
||||
ifdef MAN_DIR
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/man/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/openttd.6" "$(BUNDLE_DIR)/man/"
|
||||
$(Q)gzip "$(BUNDLE_DIR)/man/openttd.6"
|
||||
endif
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/"
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd."*.png "$(BUNDLE_DIR)/media/"
|
||||
ifdef MENU_DIR
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
|
||||
endif
|
||||
ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/\"*.scn 2> /dev/null`"; then echo 1; fi), 1)
|
||||
$(Q)cp "$(BIN_DIR)/scenario/"*.scn "$(BUNDLE_DIR)/scenario/"
|
||||
endif
|
||||
ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/heightmaps/\"* 2>/dev/null`"; then echo 1; fi), 1)
|
||||
$(Q)cp "$(BIN_DIR)/scenario/heightmaps/"* "$(BUNDLE_DIR)/scenario/heightmap/"
|
||||
endif
|
||||
ifeq ($(TTD), openttd.exe)
|
||||
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
|
||||
endif
|
||||
|
||||
### Packing the current bundle into several compressed file formats ###
|
||||
#
|
||||
# Zips & dmgs do not contain a root folder, i.e. they have files in the root of the zip/dmg.
|
||||
# gzip, bzip2 and lha archives have a root folder, with the same name as the bundle.
|
||||
#
|
||||
# One can supply a custom name by adding BUNDLE_NAME:=<name> to the make command.
|
||||
#
|
||||
bundle_zip: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).zip'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)cd "$(BUNDLE_DIR)" && zip -r $(shell if test -z "$(VERBOSE)"; then echo '-q'; fi) "$(BUNDLES_DIR)/$(BUNDLE_NAME).zip" .
|
||||
|
||||
bundle_gzip: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.gz'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.gzip" && tar -zc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.gz" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.gzip"
|
||||
|
||||
bundle_bzip2: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.bz2'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.bzip2" && tar -jc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.bz2" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.bzip2"
|
||||
|
||||
bundle_lha: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).lha'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.lha" && lha ao6 "$(BUNDLES_DIR)/$(BUNDLE_NAME).lha" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.lha"
|
||||
|
||||
bundle_dmg: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
$(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(REV)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg"
|
||||
$(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
|
||||
bundle_exe: all
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).exe'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)unix2dos "$(ROOT_DIR)/docs/"* "$(ROOT_DIR)/readme.txt" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt"
|
||||
$(Q)cd $(ROOT_DIR)/os/win32/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi
|
||||
$(Q)mv $(ROOT_DIR)/os/win32/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe"
|
||||
|
||||
ifdef OSXAPP
|
||||
install:
|
||||
@echo '[INSTALL] Cannot install the OSX Application Bundle'
|
||||
else
|
||||
install: bundle
|
||||
@echo '[INSTALL] Installing OpenTTD'
|
||||
$(Q)install -d "$(INSTALL_BINARY_DIR)"
|
||||
$(Q)install -d "$(INSTALL_ICON_DIR)"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/gm"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/data"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
|
||||
$(Q)install -d "$(INSTALL_DOC_DIR)"
|
||||
$(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(INSTALL_DOC_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)"
|
||||
ifdef ICON_THEME_DIR
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
|
||||
else
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/"*.png "$(INSTALL_ICON_DIR)"
|
||||
endif
|
||||
ifdef MAN_DIR
|
||||
$(Q)install -d "$(INSTALL_MAN_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)"
|
||||
endif
|
||||
ifdef MENU_DIR
|
||||
$(Q)install -d "$(INSTALL_MENU_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)"
|
||||
endif
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)"
|
||||
endif # OSXAPP
|
172
Makefile.in
172
Makefile.in
@@ -1,5 +1,3 @@
|
||||
# Auto-generated file -- DO NOT EDIT
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
@@ -11,18 +9,25 @@ include Makefile.am
|
||||
|
||||
SOURCE_LIST = !!SOURCE_LIST!!
|
||||
CONFIG_CACHE_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!!
|
||||
CONFIG_CACHE_PWD = !!CONFIG_CACHE_PWD!!
|
||||
CONFIGURE_FILES = !!CONFIGURE_FILES!!
|
||||
LIPO = !!LIPO!!
|
||||
BIN_DIR = !!BIN_DIR!!
|
||||
ICON_THEME_DIR = !!ICON_THEME_DIR!!
|
||||
MAN_DIR = !!MAN_DIR!!
|
||||
MENU_DIR = !!MENU_DIR!!
|
||||
SRC_DIR = !!SRC_DIR!!
|
||||
ROOT_DIR = !!ROOT_DIR!!
|
||||
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
|
||||
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
|
||||
INSTALL_DIR = !!INSTALL_DIR!!
|
||||
INSTALL_BINARY_DIR = "$(INSTALL_DIR)/"!!BINARY_DIR!!
|
||||
INSTALL_MAN_DIR = "$(INSTALL_DIR)/$(MAN_DIR)"
|
||||
INSTALL_MENU_DIR = "$(INSTALL_DIR)/$(MENU_DIR)"
|
||||
INSTALL_ICON_DIR = "$(INSTALL_DIR)/"!!ICON_DIR!!
|
||||
INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)"
|
||||
INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!!
|
||||
INSTALL_PERSONAL_DIR = !!PERSONAL_DIR!!
|
||||
INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!!
|
||||
TTD = !!TTD!!
|
||||
TTDS = $(SRC_DIRS:%=%/$(TTD))
|
||||
OS = !!OS!!
|
||||
@@ -31,9 +36,10 @@ REVISION = !!REVISION!!
|
||||
AWK = !!AWK!!
|
||||
DISTCC = !!DISTCC!!
|
||||
|
||||
RES := $(shell if ! [ -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST)`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
|
||||
RES := $(shell if [ ! -f $(CONFIG_CACHE_PWD) ] || [ "`pwd`" != "`cat $(CONFIG_CACHE_PWD)`" ]; then echo "`pwd`" > $(CONFIG_CACHE_PWD); fi )
|
||||
RES := $(shell if [ ! -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST) 2>/dev/null`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
|
||||
|
||||
all: config.cache
|
||||
all: config.pwd config.cache
|
||||
ifdef DISTCC
|
||||
@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter"; echo; fi
|
||||
endif
|
||||
@@ -72,7 +78,13 @@ help:
|
||||
@echo " bundle_lha create the lha installation bundle"
|
||||
@echo " bundle_dmg create the dmg installation bundle"
|
||||
|
||||
config.pwd: $(CONFIG_CACHE_PWD)
|
||||
$(MAKE) reconfigure
|
||||
|
||||
config.cache: $(CONFIG_CACHE_SOURCE_LIST) $(CONFIGURE_FILES)
|
||||
$(MAKE) reconfigure
|
||||
|
||||
reconfigure:
|
||||
ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
|
||||
@echo "----------------"
|
||||
@echo "The system detected that source.list or any configure file is altered."
|
||||
@@ -81,7 +93,7 @@ ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
|
||||
# Make sure we don't lock config.cache
|
||||
@$(shell cat config.cache | sed 's/\\ /\\\\ /g') || exit 1
|
||||
@echo "----------------"
|
||||
@echo "Reconfig done. Now compiling..."
|
||||
@echo "Reconfig done. Please re-execute make."
|
||||
@echo "----------------"
|
||||
else
|
||||
@echo "----------------"
|
||||
@@ -107,8 +119,9 @@ mrproper:
|
||||
rm -f $$dir/Makefile; \
|
||||
done
|
||||
$(Q)rm -rf objs
|
||||
$(Q)rm -f Makefile Makefile.am
|
||||
$(Q)rm -f $(CONFIG_CACHE_SOURCE_LIST) config.cache config.log
|
||||
$(Q)rm -f Makefile Makefile.am Makefile.bundle
|
||||
$(Q)rm -f media/openttd.desktop
|
||||
$(Q)rm -f $(CONFIG_CACHE_SOURCE_LIST) config.cache config.pwd config.log $(CONFIG_CACHE_PWD)
|
||||
$(Q)rm -rf $(BUNDLE_DIR)
|
||||
$(Q)rm -rf $(BUNDLES_DIR)
|
||||
|
||||
@@ -136,145 +149,4 @@ run-prof: all
|
||||
$(MAKE) -C $$dir $@; \
|
||||
done
|
||||
|
||||
#
|
||||
# Creation of bundles
|
||||
#
|
||||
|
||||
# The revision is needed for the bundle name and creating an OSX application bundle.
|
||||
ifdef REVISION
|
||||
REV := $(REVISION)
|
||||
else
|
||||
# Are we a SVN dir?
|
||||
ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1)
|
||||
# Find if the local source if modified
|
||||
REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' )
|
||||
# Find the revision like: rXXXX-branch
|
||||
REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branches/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
|
||||
endif
|
||||
endif
|
||||
# Make sure we have something in REV
|
||||
ifeq ($(REV),)
|
||||
REV := norev000
|
||||
endif
|
||||
|
||||
ifndef BUNDLE_NAME
|
||||
BUNDLE_NAME = OTTD-$(OS)-custom-$(REV)
|
||||
endif
|
||||
|
||||
# An OSX application bundle needs the data files, lang files and openttd executable in a different location.
|
||||
ifdef OSXAPP
|
||||
DATA_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/data
|
||||
LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/lang
|
||||
TTD_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/MacOS
|
||||
else
|
||||
DATA_DIR = $(BUNDLE_DIR)/data
|
||||
LANG_DIR = $(BUNDLE_DIR)/lang
|
||||
TTD_DIR = $(BUNDLE_DIR)
|
||||
endif
|
||||
|
||||
bundle: all
|
||||
@echo '[BUNDLE] Constructing bundle'
|
||||
$(Q)rm -rf "${BUNDLE_DIR}"
|
||||
$(Q)mkdir -p "${BUNDLE_DIR}"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/docs"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/scenario"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/scenario/heightmap"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/media"
|
||||
$(Q)mkdir -p "$(TTD_DIR)"
|
||||
$(Q)mkdir -p "$(DATA_DIR)"
|
||||
$(Q)mkdir -p "$(LANG_DIR)"
|
||||
ifdef OSXAPP
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources"
|
||||
$(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo"
|
||||
$(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns"
|
||||
$(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "${BUNDLE_DIR}/$(OSXAPP)" "$(REV)"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/OSX_install_instructions.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(DATA_DIR)"
|
||||
endif
|
||||
$(Q)cp "$(BIN_DIR)/$(TTD)" "$(TTD_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/data/"*.grf "$(DATA_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/data/opntitle.dat" "$(DATA_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/lang/"*.lng "$(LANG_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/readme.txt" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/COPYING" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/32bpp.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.64.png" "$(BUNDLE_DIR)/media/"
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/"
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.32.bmp" "$(BUNDLE_DIR)/media/"
|
||||
ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/\"*.scn 2> /dev/null`"; then echo 1; fi), 1)
|
||||
$(Q)cp "$(BIN_DIR)/scenario/"*.scn "$(BUNDLE_DIR)/scenario/"
|
||||
endif
|
||||
ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/heightmaps/\"* 2>/dev/null`"; then echo 1; fi), 1)
|
||||
$(Q)cp "$(BIN_DIR)/scenario/heightmaps/"* "$(BUNDLE_DIR)/scenario/heightmap/"
|
||||
endif
|
||||
ifeq ($(TTD), openttd.exe)
|
||||
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING"
|
||||
endif
|
||||
|
||||
### Packing the current bundle into several compressed file formats ###
|
||||
#
|
||||
# Zips & dmgs do not contain a root folder, i.e. they have files in the root of the zip/dmg.
|
||||
# gzip, bzip2 and lha archives have a root folder, with the same name as the bundle.
|
||||
#
|
||||
# One can supply a custom name by adding BUNDLE_NAME:=<name> to the make command.
|
||||
#
|
||||
bundle_zip: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).zip'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)cd "$(BUNDLE_DIR)" && zip -r $(shell if test -z "$(VERBOSE)"; then echo '-q'; fi) "$(BUNDLES_DIR)/$(BUNDLE_NAME).zip" .
|
||||
|
||||
bundle_gzip: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.gz'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.gzip" && tar -zc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.gz" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.gzip"
|
||||
|
||||
bundle_bzip2: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.bz2'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.bzip2" && tar -jc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.bz2" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.bzip2"
|
||||
|
||||
bundle_lha: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).lha'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.lha" && lha ao6 "$(BUNDLES_DIR)/$(BUNDLE_NAME).lha" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.lha"
|
||||
|
||||
bundle_dmg: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
$(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(REV)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg"
|
||||
$(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
|
||||
ifdef OSXAPP
|
||||
install:
|
||||
@echo '[INSTALL] Cannot install the OSX Application Bundle'
|
||||
else
|
||||
install: bundle
|
||||
@echo '[INSTALL] Installing OpenTTD'
|
||||
$(Q)install -d "$(INSTALL_BINARY_DIR)"
|
||||
$(Q)install -d "$(INSTALL_ICON_DIR)"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/gm"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/data"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/docs"
|
||||
$(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(INSTALL_DATA_DIR)/docs"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/"* "$(INSTALL_ICON_DIR)"
|
||||
ifdef INSTALL_PERSONAL_DIR
|
||||
$(Q)mkdir -p ~/"$(INSTALL_PERSONAL_DIR)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/scenario" ~/"$(INSTALL_PERSONAL_DIR)"
|
||||
else
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)"
|
||||
endif # INSTALL_PERSONAL_DIR
|
||||
endif # OSXAPP
|
||||
include Makefile.bundle
|
||||
|
@@ -1,5 +1,3 @@
|
||||
# Auto-generated file -- DO NOT EDIT
|
||||
|
||||
STRGEN = !!STRGEN!!
|
||||
ENDIAN_CHECK = !!ENDIAN_CHECK!!
|
||||
SRC_DIR = !!SRC_DIR!!
|
||||
|
28
Makefile.msvc
Normal file
28
Makefile.msvc
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Makefile for creating bundles of MSVC's binaries in the same way as we make
|
||||
# the zip bundles for ALL other OSes.
|
||||
#
|
||||
# Usage: make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=openttd-<version>-win[32|64]
|
||||
# or make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=OTTD-win[32|64]-nightly-<revision>
|
||||
#
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
else
|
||||
Q = @
|
||||
endif
|
||||
|
||||
AWK = "awk"
|
||||
ROOT_DIR := $(shell pwd)
|
||||
BIN_DIR = "$(ROOT_DIR)/bin"
|
||||
SRC_DIR = "$(ROOT_DIR)/src"
|
||||
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
|
||||
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
|
||||
TTD = "openttd.exe"
|
||||
TARGET := $(shell echo $(PLATFORM) | sed "s/win64/x64/;s/win32/Win32/")
|
||||
|
||||
all:
|
||||
$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)
|
||||
|
||||
include Makefile.bundle.in
|
@@ -1,5 +1,3 @@
|
||||
# Auto-generated file -- DO NOT EDIT
|
||||
|
||||
CC_HOST = !!CC_HOST!!
|
||||
CXX_HOST = !!CXX_HOST!!
|
||||
CC_BUILD = !!CC_BUILD!!
|
||||
@@ -11,6 +9,7 @@ CFLAGS = !!CFLAGS!!
|
||||
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
||||
LIBS = !!LIBS!!
|
||||
LDFLAGS = !!LDFLAGS!!
|
||||
ROOT_DIR = !!ROOT_DIR!!
|
||||
BIN_DIR = !!BIN_DIR!!
|
||||
LANG_DIR = !!LANG_DIR!!
|
||||
SRC_OBJS_DIR = !!SRC_OBJS_DIR!!
|
||||
@@ -89,38 +88,26 @@ $(LANG_OBJS_DIR)/$(STRGEN):
|
||||
$(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN)
|
||||
$(MAKE) -C $(LANG_OBJS_DIR) table/strings.h
|
||||
|
||||
# Make the revision number
|
||||
# Always run version detection, so we always have an accurate modified
|
||||
# flag
|
||||
VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
|
||||
MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3)
|
||||
|
||||
ifdef REVISION
|
||||
# Use specified revision (which should be of the form "r000").
|
||||
REV := $(REVISION)
|
||||
REV_NR := $(shell echo $(REVISION) | sed "s/[^0-9]//g")
|
||||
else
|
||||
# Are we a SVN dir?
|
||||
ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1)
|
||||
# Find if the local source if modified
|
||||
REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' )
|
||||
# Find the revision like: rXXXX-branch
|
||||
REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branch/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
|
||||
REV_NR := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^Last Changed Rev:/ { print $$4 }')
|
||||
else
|
||||
# Are we a git dir?
|
||||
ifeq ($(shell if test -d $(SRC_DIR)/../.git; then echo 1; fi), 1)
|
||||
# Find the revision like: gXXXXM-branch
|
||||
REV := g$(shell if head=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`; then echo "$$head" | cut -c1-8; fi)$(shell if cd "$(SRC_DIR)/.." && git diff-index HEAD src | read dummy; then echo M; fi)$(shell git branch|grep '[*]' | sed 's/\* /-/;s/^-master$$//')
|
||||
REV_NR := $(shell LC_ALL=C cd "$(SRC_DIR)/.." && git log --pretty=format:%s src | grep -m 1 "^(svn r[0-9]*)" | sed "s/.*(svn r\([0-9]*\)).*/\1/" )
|
||||
else
|
||||
# Are we a hg (Mercurial) dir?
|
||||
ifeq ($(shell if test -d $(SRC_DIR)/../.hg; then echo 1; fi), 1)
|
||||
# Find the revision like: hXXXXM-branch
|
||||
REV := h$(shell if head=`LC_ALL=C hg tip 2>/dev/null`; then echo "$$head" | head -n 1 | cut -c19-26; fi)$(shell if hg status $(SRC_DIR) | grep -v '^?' | read dummy; then echo M; fi)$(shell hg branch | sed 's/^/-/;s/^-default$$//')
|
||||
REV_NR := $(shell LC_ALL=C hg log -k "svn" -l 1 --template "{desc}\n" $(SRC_DIR) | grep -m 1 "^(svn r[0-9]*)" | sed "s/.*(svn r\([0-9]*\)).*/\1/" )
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# Use autodetected revisions
|
||||
REV := $(shell echo "$(VERSIONS)" | cut -f 1)
|
||||
REV_NR := $(shell echo "$(VERSIONS)" | cut -f 2)
|
||||
endif
|
||||
|
||||
# Make sure we have something in REV
|
||||
# Make sure we have something in REV and REV_NR
|
||||
ifeq ($(REV),)
|
||||
REV := norev000
|
||||
endif
|
||||
ifeq ($(REV_NR),)
|
||||
REV_NR := 0
|
||||
endif
|
||||
|
||||
@@ -132,7 +119,7 @@ RES := $(shell if [ "`cat $(CONFIG_CACHE_ENDIAN) 2>/dev/null`" != "$(ENDIAN_FORC
|
||||
# If there is a change in the source-file-list, make sure we recheck the deps
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi )
|
||||
# If there is a change in the revision, make sure we recompile rev.cpp
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV)" ]; then echo "$(REV)" > $(CONFIG_CACHE_VERSION); fi )
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV) $(MODIFIED)" ]; then echo "$(REV) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi )
|
||||
|
||||
ifndef MAKEDEPEND
|
||||
# The slow, but always correct, dep-check
|
||||
@@ -287,7 +274,7 @@ $(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
|
||||
# Revision files
|
||||
|
||||
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in
|
||||
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s#@@REVISION@@#$(REV_NR)#g;s#@@VERSION@@#$(REV)#g;s#@@DATE@@#`date +%d.%m.%y`#g" > $(SRC_DIR)/rev.cpp
|
||||
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s#@@REVISION@@#$(REV_NR)#g;s#@@VERSION@@#$(REV)#g;s#@@MODIFIED@@#$(MODIFIED)#g;s#@@DATE@@#`date +%d.%m.%y`#g" > $(SRC_DIR)/rev.cpp
|
||||
|
||||
$(SRC_DIR)/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/ottdres.rc.in
|
||||
$(Q)cat $(SRC_DIR)/ottdres.rc.in | sed "s#@@REVISION@@#$(REV_NR)#g;s#@@VERSION@@#$(REV)#g;s#@@DATE@@#`date +%d.%m.%y`#g" > $(SRC_DIR)/ottdres.rc
|
||||
|
BIN
bin/data/generictrams_v0.4.grf
Normal file
BIN
bin/data/generictrams_v0.4.grf
Normal file
Binary file not shown.
BIN
bin/scenario/Greenistan.scn
Normal file
BIN
bin/scenario/Greenistan.scn
Normal file
Binary file not shown.
BIN
bin/scenario/Polopolis.scn
Normal file
BIN
bin/scenario/Polopolis.scn
Normal file
Binary file not shown.
BIN
bin/scenario/Skadi Islands.scn
Normal file
BIN
bin/scenario/Skadi Islands.scn
Normal file
Binary file not shown.
BIN
bin/scenario/Terra Incognita.scn
Normal file
BIN
bin/scenario/Terra Incognita.scn
Normal file
Binary file not shown.
BIN
bin/scenario/Wales and West England.scn
Normal file
BIN
bin/scenario/Wales and West England.scn
Normal file
Binary file not shown.
245
changelog.txt
245
changelog.txt
@@ -1,3 +1,244 @@
|
||||
0.6.3 (2008-10-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: NewGRF VarAction 2 variable 43 for industries saw MP_VOID tiles as land tiles and was inefficient (r14417, r14416, r14415)
|
||||
- Fix: Possible buffer overrun/wrong parameter type passed to printf (r14414, r14397)
|
||||
- Fix: Generation seed set using -G was always overwritten by -g (r14408)
|
||||
- Fix: Do not allow extending signals by dragging in any direction other than the track direction [FS#2202] (r14013)
|
||||
|
||||
|
||||
0.6.3-RC1 (2008-09-22)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Invalid v->u.air.targetairport could cause crashes at several places [FS#2300] (r14383, r14344, r14343)
|
||||
- Fix: Moving the first vehicle of a train elsewhere might require a new unitnumber for the remaining chain which might not be available (r14384)
|
||||
- Fix: Trams jumping when reversing on a single trambit (like caused during road construction reworks) or when (manually) reversing in a corner [FS#1852] (r14371)
|
||||
- Fix: Multiheaded parts in free wagon chains weren't connected (could cause desyncs) (r14366, r14362)
|
||||
- Fix: [Win32] Some keypress combinations could be handled twice [FS#2206] (r14363)
|
||||
- Fix: The ownership of roadtiles was not properly set for very old savegames (including TTD's) making it impossible to remove some pieces of road [FS#2311] (r14359)
|
||||
- Fix: Desync due to randomly ordered vehicle hash by flooding and road vehicle overtake/following (r14356, r14258)
|
||||
- Fix: Signs were not updated on company bankrupcy/sell, and thus could have the colour of invalid player (r14348)
|
||||
- Fix: Delete the RenameSignWindow when 'its' sign is deleted (r14345)
|
||||
- Fix: Signs from old savegames were lost (causing little memory leaks) (r14340)
|
||||
- Fix: When a company was renamed and then manager was renamed before building anything, company name changed (r14328)
|
||||
- Fix: When you rename a town before building something and build something near that town your company would be called "<old townname> Transport" [FS#2251] (r14327)
|
||||
- Fix: Free any blocks that a helicopter may have on an oilrig when the helicopter gets forcefully removed (bankruptcy). For other airports this isn't needed as they can't be used by multiple companies [FS#2241] (r14324)
|
||||
- Fix: Possible assert when renaming removed waypoint (r14322)
|
||||
- Fix: Properly delete orders so the pool doesn't fill up (r14319)
|
||||
- Fix: Do not allow building road over level crossings and drive-through road stops in the wrong direction; do not allow adding roadtypes to non-drive through road stops; pay for all added road bits [FS#2268] (r14316, r14315, r14314, r14308)
|
||||
- Fix: Aircraft frozen above oil rig when the next order is invalid [FS#2244] (r14309)
|
||||
- Fix: [YAPF] Only reserve road slots for multistop when they are really reachable [FS#2294] (r14305)
|
||||
- Fix: One could be trying to get the station name of a station that is outside of the pool (r14297)
|
||||
- Fix: Default for sound effects and music volume should be in the valid range for that setting [FS#2286] (r14289)
|
||||
- Fix: Make small UFO aware of articulated RVs so they crash the complete vehicle instead of a small part of it (r14270)
|
||||
- Fix: Desyncs after deleting a waypoint because of explicit destructor call instead of using operator delete (r14265)
|
||||
- Fix: Merge keycode for "normal" 0-9 keys and keypad 0-9 keys so people do not get confused that the keypad does not work as expected [FS#2277] (r14260)
|
||||
- Fix: Clicking on the smallmap didn't break the "follow vehicle in main viewport" [FS#2269] (r14243)
|
||||
- Fix: The engine-purchase-list-sorter doubled running-cost and halfed capacity of double-headed engines [FS#2267] (r14239)
|
||||
- Fix: Feeder share was computed wrong when splitting cargo packet (r14234)
|
||||
- Fix: Signs (town name, station name, ...) could be too long for 8bit width in pixels (r14221)
|
||||
- Fix: 10 days != 6*2.5 days, effectively causing the payment graph to show the wrong data (r14219)
|
||||
- Fix: When determining length of a string with limited size, first check if we are not out of bounds already (r14204)
|
||||
- Fix: Properly update the current timetable's travel/wait times instead of only doing it for one vehicle in the shared order chain and only when some bit has not been set [FS#2236] (r14192)
|
||||
- Fix: Sprite payload skipping would not skip enough bytes in a very small subset of compressed sprites (r14191)
|
||||
- Fix: After applying NewGRF settings, all rail and road types were available as the engine availability check was performed too early (r14182)
|
||||
- Fix: Close all related vehicle lists when closing a station window (and not only the train list) (r14180)
|
||||
- Fix: RemoveOrderFromAllVehicles() did not mark enough windows dirty (r14179)
|
||||
- Fix: Incorrect cargo weights (r14144)
|
||||
- Fix: GetSlopeZ() gets a virtual coordinate, not a tile (r14139)
|
||||
- Fix: Close the 'manage vehicles' dropdown once the number of vehicles in the list reaches 0 [FS#2249] (r14133)
|
||||
- Fix: [strgen] Changing order of parameters {X:...} did not work for strings including some {StringY} (r14111)
|
||||
- Fix: Desync due to bubbles in toyland (r14110)
|
||||
- Fix: Make NewGRF action 0x06's changes persistent over the several loading stages [FS#1986] (r14102)
|
||||
- Fix: Make the 'Transfer Credit' display aware of the entire consist, not only the first vehicle (r14098)
|
||||
- Fix: Do not flood a NewGRF industry when it implicitly tells that it wants to be build on water (land shape flags bit 5) [FS#2230] (r14093)
|
||||
- Fix: The vehicle window of articulated road vehicles would show the clone/refit button when the vehicle was not completely stopped in the depot (r14090)
|
||||
- Fix: Flawed parsing of words (as in 2 bytes) in GRF strings due to sign extension [FS#2228] (r14087)
|
||||
- Fix: Division by 0 in NewAI [FS#2226] (r14062)
|
||||
- Fix: NewGRF callback 23 did not use the NewGRF compatible text stack [FS#2224] (r14058)
|
||||
- Fix: NewGRF text stack's "push word" didn't move the data around properly (r14057)
|
||||
- Fix: Long strings in the edit box would cause OpenTTD to stop drawing the string. This is especially noticable with low resolutions and the chat input box (r14054)
|
||||
- Fix: [OSX] changed the condition for selecting 8 or 32 bpp blitter by default. Now we will pick 32 bpp if no 8 bpp fullscreen resolutions are available on the main display (the one with the dock) (r14032)
|
||||
- Fix: Crash when the AI tries to find the depot of an airport that doesn't have a depot [FS#2190] (r13999)
|
||||
- Fix: MSVC cannot handle changed files in the prebuild event, so make the version determination a separate subproject [FS#2004] (r13998)
|
||||
- Fix: The dedicated console removed any character that was not a printable ASCII character instead. Now it allows UTF8 formated strings too [FS#2189] (r13992)
|
||||
- Fix: Resetting construction stage counter reset more than it should (r13981)
|
||||
- Fix: Wrong tooltip for the industry directory's list [FS#2178] (r13917)
|
||||
|
||||
|
||||
0.6.2 (2008-08-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Custom vehicle names from TTD(Patch) games were lost (r13884)
|
||||
- Fix: NewGRF Callback 10 (visual effect and powered wagons setting) and powered wagons operation were not performed for articulated wagons [FS#2167] (r13870)
|
||||
- Fix: In some cases the sprite cache could be filled with unremovable items [FS#2153] (r13869)
|
||||
- Fix: Return of wrong parent scope of (NewGRF) industry variables (r13868)
|
||||
- Fix: Loading of TTD(Patch) savegames from the command line did not work (r13859)
|
||||
- Fix: Buffer overflow for too long filename supplied as '-g' parameter (r13858)
|
||||
- Fix: Cargo type lookup was incorrect for NewGRF version 7 files without a translation table [FS#2157] (r13855)
|
||||
- Fix: GetTownByTile() is only valid for houses and roads (r13851)
|
||||
- Fix: Power, running cost and capacity of multiheaded engines were (too often) doubled in newspaper resp. offer window (r13844)
|
||||
- Fix: FreeType may return a bitmap glyph even if a grey-scale glyph was requested [FS#2152] (r13832)
|
||||
|
||||
|
||||
0.6.2-RC2 (2008-07-25)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Building through the wrong side of a drive through station was allowed [FS#2166] (r13822)
|
||||
- Fix: Check for vehicle length changes outside a depot (callback 0x11) and give a warning about that [FS#2150] (r13816)
|
||||
- Fix: Several minor memory leaks. They only happened once per game (r13809, 13810)
|
||||
- Fix: Checking for train waiting at other side of two-way signal was broken [FS#2162] (r13806)
|
||||
- Fix: Some revision checking code was unintentionally disabled (r13776)
|
||||
- Fix: Enforce the validity of a NetworkAction (chat packet) issued by a client (r13775)
|
||||
- Fix: Selecting non-full length vehicles in the depot gui would place the "mouse pointer" out of the center of the vehicle making it hard to "aim" [FS#2147] (r13759)
|
||||
- Fix: NewGRF rail continuation would always mark a tunnel on the same axis as connected, even when the tunnel faces the wrong direction (r13734)
|
||||
- Fix: Assumption that non-north tiles of a house do not have the 1x1 building bit set was flawed with some NewGRFs. This caused the amount of houses to differ, which causes the town radii to differ, which causes desyncs when towns are expanded (r13729)
|
||||
- Fix: Possible desync on the autorenew settings 20+ game years (i.e. 4.5+ hours) after a company was started (r13718)
|
||||
- Fix: Any player could construct new companies [FS#2144] (r13716)
|
||||
- Fix: Remove the unique_id from the message that a client has joined as it is only exposes the unique_id more than needed (r13714)
|
||||
- Fix: Possible crash on creating a network packet (r13713)
|
||||
- Fix: Enforce the length restrictions of company and president name in the commands too (r13712)
|
||||
|
||||
|
||||
0.6.2-RC1 (2008-07-16)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Possible buffer overflow in string truncation code (r13700)
|
||||
- Fix: Handle SETX(Y) properly when truncating a string instead of ignoring it and returning a too long string (r13699)
|
||||
- Fix: In some cases the (sound) mixer could overflow causing artefacts in the sound [FS#2120] (r13695)
|
||||
- Fix: Do not rely on .tar files always ending with a block of zeros (r13693)
|
||||
- Fix: Make sure a command is ran in the context of autoreplace or not (r13691)
|
||||
- Fix: In the case that elrails and 'realistic' acceleration are disabled all electrified engines would have no power on load, until the vehicle got turned around, loaded or got into a depot [FS#2102]- Fix: Saving TTD imported games in recession failed due to wrong (and unneeded) type conversions in the saveload code [FS#2131] (r13679)
|
||||
- Fix: Inactive companies from old (TTD) saves could be marked active in some cases, which then loads garbage in their statistics and such [FS#2126] (r13676)
|
||||
- Fix: Memory leak when NewGRFs got forcefully disabled and they defined GOTO labels (r13675)
|
||||
- Fix: Crash when drawing a non-real sprite caused by NewGRF interference [FS#2127] (r13674)
|
||||
- Fix: Desync when building electrified trains on a dedicated server that was started with electrification disabled [FS#2122] (r13673)
|
||||
- Fix: Bus/truck forgetting go-to-depot order when entering a non-drivethrough road stop [FS#2117] (r13664)
|
||||
- Fix: Server crashing when banning the rconning client (r13661)
|
||||
- Fix: Signals were not updated correctly when a player removed a non-existing track piece (r13626)
|
||||
- Fix: Crash when one tries to raise the nothern corner of MP_VOID tiles (i.e. the southern corner of the tiles on the southern map edge) in the scenario editor [FS#2106] (r13624)
|
||||
- Fix: Only the front of a RV would be considered when determining to what cargos a vehicle can be refitted instead of all cargos [FS#2109] (r13622)
|
||||
- Fix: If the first bridge can not be build for a given length, then none of the other bridges can. Effectively meaning that if someone replaces the first bridge with a bridge that can be only 3 tiles longs then only other bridges that can be 3 tiles long will be buildable, but only if they are 3 tiles long [FS#2100] (r13611)
|
||||
- Fix: Signal states could be propagated through waypoints built in orthogonal axis (r13589)
|
||||
- Fix: [OSX] 10.5 failed to switch to fullscreen (r13584)
|
||||
- Fix: RVs continueing onto next DT station when they are build adjacent to them [FS#2040] (r13581)
|
||||
- Fix: Disable static NewGRFs when non-static NewGRFs query them in the context of network games. This makes it impossible for static NewGRFs to disable non-static NewGRFs and 'bad' things happening because the non-static NewGRF doesn't know about the static NewGRF (r13576)
|
||||
- Fix: Properly count number of non-north housetiles [FS#2083] (r13518)
|
||||
- Fix: Incorrect usage of strtoul (r13508)
|
||||
- Fix: Clear the memory for the new AI during the loading of a savegame so it does not try to execute commands generated in a different savegame, which could be resulting in the AI trying to give orders to stations that do not exist (r13505)
|
||||
- Fix: Drawing of zoomed out partial sprites could cause deadlocks or crashes (r13502)
|
||||
- Fix: First determine where to *exactly* build a house before asking a NewGRF whether the location is good instead of possibly moving the house a tile after the NewGRF said the location is good (r13489)
|
||||
- Fix: Track was not removed on company bankrupcy when there was a ship on lower halftile (r13488)
|
||||
- Fix: Let ships also navigate on half-tile sloped watery rail tiles (r13485)
|
||||
- Fix: Division by zero when one would press 'd' (skip order) when there's no order (r13409)
|
||||
- Fix: Do not crash when resolving vehicle sprite groups with zero sprites (r13397)
|
||||
- Fix: In the purchase list, CB36 for capacity was not called for the first part of rail and road vehicles (r13385)
|
||||
- Fix: Loading of very old OpenTTD savegames was broken (r13373)
|
||||
|
||||
|
||||
0.6.1 (2008-06-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Industry tiles would sometimes tell they need a 'level' slope when they do not want the slope (r13348)
|
||||
- Fix: Attempts to make the old AI perform better (r13217, r13221, r13222)
|
||||
|
||||
|
||||
0.6.1-RC2 (2008-05-21)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Do not send rcon commands of the server to the first client but do directly execute those on the server (r13137)
|
||||
- Fix: For multiheaded engines, halve power and running cost when used instead of when loading, to allow callback values to work properly (r13074)
|
||||
- Fix: Loading of TTDP savegames with rivers in them [FS#2005] (r13066)
|
||||
- Fix: Update build industry window when raw_industry_construction setting is modified (r13060)
|
||||
- Fix: Revert changes to multihead engine weight -- the original values were correct (r13023)
|
||||
- Fix: Debugging was not possible with MSVC 2008 (r12996)
|
||||
- Fix: List used for sorting GRFs was not freed (r12993)
|
||||
- Fix: Default difficulty settings were different to TTD's original settings [FS#1977] (r12951)
|
||||
- Fix: All vehicles would be available when an original scenario would be played [FS#1982] (r12948)
|
||||
- Fix: Keep only first 15 bits for non failed callback results (r12947)
|
||||
- Fix: Reading/modifying invalid data under some circumstances (r12943)
|
||||
- Fix: Minor errors related to industries accepted/produced cargo (r12933)
|
||||
- Fix: Town rating was affected even after the test run (r12920)
|
||||
- Fix: Flood road tiles even when there are road works in progress [FS#1965] (r12919)
|
||||
- Fix: Do not initialize Station struct with tile=0, buoys will never change that value [FS#1960] (r12915)
|
||||
- Fix: Game crash when a spectator/server tried to show an engine with no owner when a NewGRF requested a specific variable (r12914)
|
||||
- Fix: Report reverse sprite status (FD/FE) to NewGRF for manually toggled vehicles (r12910)
|
||||
- Fix: Vehicles going twice to a depot when the automatic service interfered with the current order [FS#1985] (r12629)
|
||||
|
||||
|
||||
0.6.1-RC1 (2008-04-26)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Vehicle groups, engine replacement rules and player/company names were not properly reset/freed after bankrupt (r12906)
|
||||
- Fix: Remove trams from savegames saved in OTTD without tram support, it is better than to simply crash [FS#1953] (r12904)
|
||||
- Fix: GCC on FreeBSD does not support -dumpmachine causing configure to fail. Use g++ instead [FS#1928] (r12876)
|
||||
- Fix: Make the town rating tests use less memory and much quicker (r12859)
|
||||
- Fix: Usage of AutoPtr made (trying to) build stuff very (time) expensive (r12857, r12855)
|
||||
- Fix: Ensure that prop 25 is set for all vehicles in the consist before other properties as it could cause desyncs (r12856)
|
||||
- Fix: Too much catenary was drawn about tunnel entrances, middle bridge pieces and non-rail station tiles (r12853, r12852)
|
||||
- Fix: Use YAPF for fairly old savegames from before YAPF was introduced (r12845)
|
||||
- Fix: The industry tick trigger should only be triggered once every 256 ticks, not every tick... Also bail out of the triggers a little earlier if you know they are not going to happen anyway (r12844)
|
||||
- Fix: Inconsistent use of 8/15-bitness of NewGRF callback results with respect to TTDP's implementation of the specification (r12819, r12818, r12759)
|
||||
- Fix: Possible out of bounds array access (r12809)
|
||||
- Fix: Enforce autorenew values range in command (r12808)
|
||||
- Fix: Vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading [FS#1938] (r12795)
|
||||
- Fix: [OSX] In some rare cases when using an uncalibrated monitor the system colour space could not be retrieved. Show an error when this happens instead of just trying an assertion (r12776)
|
||||
- Fix: Slope checking for NewGRFs failed (r12759)
|
||||
- Fix: Check the TILE_NOT_SLOPED flag of the _north_ tile of multi-tile houses to decide if autoslope is allowed (r12717)
|
||||
- Fix: Do not move windows below the toolbar on resizes unless they would go behind the toolbar [FS#1904] (r12714)
|
||||
- Fix: Increase default sound buffer size only for Vista [FS#1914] (r12708)
|
||||
- Fix: Do not crash very hard on unrecognised savegames, just go back to the intro menu instead (r12707)
|
||||
- Fix: In some cases a news messages would not be shown [FS#1906] (r12683)
|
||||
- Fix: Removing road pieces from a town gave you twice the intended penalty [FS#1920] (r12682)
|
||||
- Fix: When a road vehicle has a tram only stop multiple times in a row in it's orders, only the first one would be skipped [FS#1918] (r12678)
|
||||
- Fix: Colour remaps on station sprites only worked for company colours [FS#1902] (r12674)
|
||||
- Fix: Remove buggy buoys at tile 0 from old TTDP savegames (r12642)
|
||||
- Fix: Possible NULL pointer dereference when reading some NewGRF data [FS#1913] (r12637)
|
||||
- Fix: Infinite loop in case your compiler decides that enums are unsigned by default (r12622)
|
||||
- Fix: The convert signal button disallowed signal dragging when the signal GUI was closed (r12577)
|
||||
- Fix: Binding to a specific IP could cause OpenTTD to not register properly with the masterserver if one has multiple external interfaces (r12574)
|
||||
- Fix: min() has 32bit arguments, clamping of 64bit values did not work (r12572)
|
||||
- Fix: Towns could not terraform when inflation rised terraform prices enough (r12564)
|
||||
- Fix: Do not affect town rating change by the order in which we examine stations (r12561)
|
||||
- Fix: Redraw the signal GUI when the signal drag density changes in the patch settings and vice versa (r12553)
|
||||
- Fix: Do not install scenarios into the current user's homedir when running 'make install', that is silly. Simply always install scenarios system wide instead (r12542)
|
||||
|
||||
|
||||
0.6.0 (2008-04-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Final formatting of some string codes from NewGRFs was not done correctly [FS#1889] (r12488)
|
||||
- Fix: Timetable times for aircraft were always doubled [FS#1883] (r12477)
|
||||
- Fix: Remove broken endian-dependent code and unnecessary rgb to bgr swapping [FS#1880] (r12453)
|
||||
- Fix: Do not 'disable' the drawing of autorail overlays when the tile is 'error'-marked (red pulsating selection) [FS#1871] (r12439)
|
||||
- Fix: Plural rule for Icelandic was wrong (r12417)
|
||||
|
||||
|
||||
0.6.0-RC1 (2008-03-26)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Show whether a town is a "city" in the town description title bar (r12391)
|
||||
- Feature: Increase house animation frame number from 32 to 128 (r12347)
|
||||
- Fix: Loading of TTD savegames (r12399, r12401)
|
||||
- Fix: Vehicle lists related to stations not closed when the station is deleted [FS#1872] (r12393)
|
||||
- Fix: Trams failing to turn on bridge heads/tunnel entrances [FS#1851] (r123890)
|
||||
- Fix: Train could break apart when reversed while partially in a depot [FS#1841] (r12386, r12384)
|
||||
- Fix: Non-breaking spaces should not be broken (r12385)
|
||||
- Fix: Check return of AfterLoadGame for success or failure when loading TTD games [FS#1860] (r12383)
|
||||
- Fix: Use 'items' unit for batteries, fizzy drinks, toys and bubbles in total cargo tab [FS#1864] (r12382)
|
||||
- Fix: The number of houses wasn't computed right [FS#1835, FS#1535] (r12381)
|
||||
- Fix: Update train acceleration and max speed after setting cached value to ensure the correct max speed is used with disabled real acceleration (r12380)
|
||||
- Fix: Refresh vehicle details window when cached values are updated (r12378)
|
||||
- Fix: Set cached value for vehicle property 25 before other cached values [FS#1854] (r12377)
|
||||
- Fix: Don't close a dropmenu when clicking on a dropdown widget (r12374)
|
||||
- Fix: win32 music driver fails if path is too long or if containing non-latin chars [FS#1849] (r12373, r12372)
|
||||
- Fix: Do not let window hide behind the main toolbar after resizing the screen [FS#1823] (r12371)
|
||||
- Fix: Close language drop down when parent window is clicked/closed [FS#1853] (r12370)
|
||||
- Fix: Reset train speed limits when _patches.realistic_acceleration changes (r12369)
|
||||
- Fix: Commands were sent to clients waiting for map download causing 'executing command from the past' error [FS#1650] (r12367)
|
||||
- Fix: Do not allow building 'zero' road bits (r12363)
|
||||
- Fix: Randomize variable 8F only once per callback 28 (r12362)
|
||||
- Fix: openttdd.grf was using the wrong colours for glyphs due to a grfcodec bug (fixed in grfcodec 0.9.10 r1837) (r12360)
|
||||
- Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa (r12352, r12358)
|
||||
- Fix: Do not try to flood water tile [FS#1836] (r12350)
|
||||
- Fix: NTP skipped junction just after bridge end (r12348)
|
||||
- Fix: Remove duplicated and inconsistent code wrt. autoreplace with rules in both vehicles' group and ALL_GROUP [FS#1748, FS#1825] (r12346)
|
||||
- Fix: Don't try to restore backupped timetable when timetabling is disabled [FS#1828] (r12345)
|
||||
- Fix: Slow helicopters never got the 'chance' to finish the landing routine (r12343)
|
||||
- Fix: GRM buffer for cargos was incorrect size [FS#1827] (r12341)
|
||||
- Fix: Recalculate cached train data after clearing reversing flag when entering depot (r12339)
|
||||
|
||||
|
||||
0.6.0-beta5 (2008-03-04)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Vehicle variable FE bit 5, 6 and 8 [FS#1812] (r12331, r12330)
|
||||
@@ -15,7 +256,7 @@
|
||||
- Fix: Include prop 25 data for all train parts, not just those that carry cargo (r12314)
|
||||
- Fix: YAPF and NTP did not apply penalty for uphill tracks on steep slopes (r12313)
|
||||
- Fix: Restore timetable from backupped orders and add group ID to the backup [FS#1549] (r12296)
|
||||
- Fix: Do not draw trees nor lamps between tram tracks (r12290) [FS#1807]
|
||||
- Fix: Do not draw trees nor lamps between tram tracks (r12290) [FS#1807]
|
||||
- Fix: [Win32] Do not create save dir on install (r12269)
|
||||
- Fix: Autoreplace did not update vehicle index for timetable window [FS#1805] (r12261)
|
||||
- Fix: GetProductionAroundTiles() may fail if only the second production slot exists (r12258)
|
||||
@@ -26,7 +267,7 @@
|
||||
- Fix: When loading a savegame fails, do not start creating a new game, just go straight back to the intro screen (r12202)
|
||||
- Fix: Force AI to build rail or road instead of bridges if possible, so it doesn't build bridges everywhere (r12200)
|
||||
- Fix: "Transparent buildings" now only toggles buildings, so show tick when buildings are transparent [FS#1789] (r12198)
|
||||
- Fix: Show correct last year profit when the train had negative income [FS#1788] (r12197)
|
||||
- Fix: Show correct last year profit when the train had negative income [FS#1788] (r12197)
|
||||
- Fix: There can be oil rigs at map borders, do not set water class for them [FS#1787] (r12195)
|
||||
- Fix: Do not start overtaking if the RV reaches wrong-way one-way-road in the next tiles (r12191)
|
||||
- Fix: Assert when trying to play tile sound at NW border of map (placing buyos, leveling land) [FS#1784] (r12186)
|
||||
|
285
config.lib
Normal file → Executable file
285
config.lib
Normal file → Executable file
@@ -5,7 +5,7 @@ log() {
|
||||
}
|
||||
|
||||
set_default() {
|
||||
released_version=""
|
||||
released_version="0.6.3"
|
||||
|
||||
ignore_extra_parameters="0"
|
||||
# We set all kinds of defaults for params. Later on the user can override
|
||||
@@ -28,10 +28,15 @@ set_default() {
|
||||
prefix_dir="/usr/local"
|
||||
binary_dir="games"
|
||||
data_dir="share/games/openttd"
|
||||
doc_dir="1"
|
||||
icon_dir="share/pixmaps"
|
||||
icon_theme_dir="1"
|
||||
personal_dir="1"
|
||||
shared_dir="1"
|
||||
install_dir="/"
|
||||
man_dir="1"
|
||||
menu_dir="1"
|
||||
menu_group="Game;"
|
||||
enable_debug="0"
|
||||
enable_desync_debug="0"
|
||||
enable_profiling="0"
|
||||
@@ -40,7 +45,7 @@ set_default() {
|
||||
enable_static="1"
|
||||
enable_translator="0"
|
||||
enable_unicode="1"
|
||||
enable_assert="1"
|
||||
enable_assert="0"
|
||||
enable_strip="1"
|
||||
enable_universal="1"
|
||||
enable_osx_g5="0"
|
||||
@@ -48,6 +53,7 @@ set_default() {
|
||||
enable_cocoa_quickdraw="1"
|
||||
with_osx_sysroot="1"
|
||||
with_application_bundle="1"
|
||||
with_menu_entry="1"
|
||||
with_sdl="1"
|
||||
with_cocoa="1"
|
||||
with_zlib="1"
|
||||
@@ -85,10 +91,15 @@ set_default() {
|
||||
prefix_dir
|
||||
binary_dir
|
||||
data_dir
|
||||
doc_dir
|
||||
icon_dir
|
||||
icon_theme_dir
|
||||
man_dir
|
||||
menu_dir
|
||||
personal_dir
|
||||
shared_dir
|
||||
install_dir
|
||||
menu_group
|
||||
enable_debug
|
||||
enable_desync_debug
|
||||
enable_profiling
|
||||
@@ -188,9 +199,23 @@ detect_params() {
|
||||
--data-dir) prevp_p="data-dir";;
|
||||
--data-dir=*) data_dir="$optarg";;
|
||||
|
||||
--doc-dir) prevp_p="doc-dir";;
|
||||
--doc-dir=*) doc_dir="$optarg";;
|
||||
|
||||
--icon-dir) prevp_p="icon-dir";;
|
||||
--icon-dir=*) icon_dir="$optarg";;
|
||||
|
||||
--icon-theme-dir) prevp_p="icon-theme-dir";;
|
||||
--icon-theme-dir=*) icon_theme_dir="$optarg";;
|
||||
--without-icon-theme) icon_theme_dir="";;
|
||||
|
||||
--menu-dir) prevp_p="menu_dir";;
|
||||
--menu-dir=*) menu_dir="$optarg";;
|
||||
--without-menu-entry) menu_dir="";;
|
||||
|
||||
--man-dir) prevp_p="man_dir";;
|
||||
--man-dir=*) man_dir="$optarg";;
|
||||
|
||||
--personal-dir) prevp_p="personal-dir";;
|
||||
--personal-dir=*) personal_dir="$optarg";;
|
||||
--without-personal-dir) personal_dir="";;
|
||||
@@ -204,6 +229,11 @@ detect_params() {
|
||||
|
||||
|
||||
|
||||
--menu-group) prevp_p="menu_group";;
|
||||
--menu-group=*) menu_group="$optarg";;
|
||||
|
||||
|
||||
|
||||
--enable-debug) enable_debug="1";;
|
||||
--enable-debug=*) enable_debug="$optarg";;
|
||||
--enable-desync-debug) enable_desync_debug="1";;
|
||||
@@ -392,9 +422,9 @@ check_params() {
|
||||
exit 1
|
||||
fi
|
||||
# OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
|
||||
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP)$'`" ]; then
|
||||
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP)$'`" ]; then
|
||||
echo "configure: error: invalid option --os=$os"
|
||||
echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP]"
|
||||
echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP]"
|
||||
exit 1
|
||||
fi
|
||||
# cpu_type can be either 32 or 64
|
||||
@@ -419,11 +449,11 @@ check_params() {
|
||||
|
||||
detect_awk
|
||||
|
||||
detect_os
|
||||
|
||||
check_build
|
||||
check_host
|
||||
|
||||
detect_os
|
||||
|
||||
# We might enable universal builds always on OSX targets.. but currently we don't
|
||||
# if [ "$enable_universal" = "1" ] && [ "$os" != "OSX" ]; then
|
||||
if [ "$enable_universal" = "1" ]; then
|
||||
@@ -564,7 +594,6 @@ check_params() {
|
||||
detect_png
|
||||
detect_freetype
|
||||
detect_fontconfig
|
||||
detect_iconv
|
||||
detect_pspconfig
|
||||
detect_libtimidity
|
||||
|
||||
@@ -737,7 +766,7 @@ check_params() {
|
||||
# First, are we a real OSX system, else we can't detect it
|
||||
native=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | grep darwin`
|
||||
# If $host doesn't match $build , we are cross-compiling
|
||||
if [ -n "$native" ] && [ "$build" == "$host" ]; then
|
||||
if [ -n "$native" ] && [ "$build" = "$host" ]; then
|
||||
$cxx_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector
|
||||
res=`./G5_detector`
|
||||
rm -f G5_detector
|
||||
@@ -810,6 +839,22 @@ check_params() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$doc_dir" = "1" ]; then
|
||||
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
|
||||
doc_dir="share/doc/openttd"
|
||||
else
|
||||
doc_dir="$data_dir/docs"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$icon_theme_dir" = "1" ]; then
|
||||
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
|
||||
icon_theme_dir="share/icons/hicolor"
|
||||
else
|
||||
icon_theme_dir=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$personal_dir" = "1" ]; then
|
||||
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
|
||||
personal_dir="OpenTTD"
|
||||
@@ -829,6 +874,28 @@ check_params() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$man_dir" = "1" ]; then
|
||||
# add manpage on UNIX systems
|
||||
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
|
||||
man_dir="share/man/man6"
|
||||
else
|
||||
man_dir=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$menu_dir" = "1" ]; then
|
||||
# add a freedesktop menu item only for some UNIX systems
|
||||
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
|
||||
menu_dir="share/applications"
|
||||
else
|
||||
menu_dir=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# "set_universal_binary_flags" needs to be before "detect_iconv"
|
||||
set_universal_binary_flags
|
||||
detect_iconv
|
||||
|
||||
if [ -n "$personal_dir" ]
|
||||
then
|
||||
log 1 "personal home directory... $personal_dir"
|
||||
@@ -849,6 +916,27 @@ check_params() {
|
||||
else
|
||||
log 1 "installation directory... none"
|
||||
fi
|
||||
|
||||
if [ -n "$icon_theme_dir" ]
|
||||
then
|
||||
log 1 "icon theme directory... $icon_theme_dir"
|
||||
else
|
||||
log 1 "icon theme directory... none"
|
||||
fi
|
||||
|
||||
if [ -n "$man_dir" ]
|
||||
then
|
||||
log 1 "manual page directory... $man_dir"
|
||||
else
|
||||
log 1 "manual page directory... none"
|
||||
fi
|
||||
|
||||
if [ -n "$menu_dir" ]
|
||||
then
|
||||
log 1 "menu item directory... $menu_dir"
|
||||
else
|
||||
log 1 "menu item directory... none"
|
||||
fi
|
||||
}
|
||||
|
||||
make_cflags_and_ldflags() {
|
||||
@@ -880,7 +968,7 @@ make_cflags_and_ldflags() {
|
||||
else
|
||||
OBJS_SUBDIR="debug"
|
||||
|
||||
# Each debug level reduces the optimalization by a bit
|
||||
# Each debug level reduces the optimization by a bit
|
||||
if [ $enable_debug -ge 1 ]; then
|
||||
CFLAGS="$CFLAGS -g -D_DEBUG"
|
||||
if [ "$os" = "PSP" ]; then
|
||||
@@ -931,10 +1019,20 @@ make_cflags_and_ldflags() {
|
||||
# Make sure we mark GCC 2.95 flag for Makefile.src.in, as we
|
||||
# need a lovely hack there to make it compile correctly.
|
||||
gcc295="1"
|
||||
|
||||
# Disable warnings about unused variables when
|
||||
# compiling with asserts disabled
|
||||
if [ $enable_assert -eq 0 ]; then
|
||||
CFLAGS="$CFLAGS -Wno-unused"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $cc_version -ge 30 ]; then
|
||||
CFLAGS="$CFLAGS -W -Wno-unused-parameter"
|
||||
# Do not warn about unused variables when building without asserts
|
||||
if [ $enable_assert -eq 0 ]; then
|
||||
CFLAGS="$CFLAGS -Wno-unused-variable"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $cc_version -ge 34 ]; then
|
||||
@@ -974,7 +1072,6 @@ make_cflags_and_ldflags() {
|
||||
|
||||
if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
LIBS="$LIBS -lrt"
|
||||
fi
|
||||
|
||||
if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ] && [ "$os" != "WINCE" ]; then
|
||||
@@ -1016,7 +1113,7 @@ make_cflags_and_ldflags() {
|
||||
fi
|
||||
|
||||
# Most targets act like UNIX, just with some additions
|
||||
if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
|
||||
if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
|
||||
CFLAGS="$CFLAGS -DUNIX"
|
||||
fi
|
||||
# And others like Windows
|
||||
@@ -1188,11 +1285,6 @@ make_cflags_and_ldflags() {
|
||||
CFLAGS="$CFLAGS -mtune=970 -mcpu=970 -mpowerpc-gpopt"
|
||||
fi
|
||||
|
||||
if [ "$with_osx_sysroot" != "0" ] && [ "$with_osx_sysroot" != "3" ]; then
|
||||
CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$with_osx_sysroot.sdk"
|
||||
LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$with_osx_sysroot.sdk"
|
||||
fi
|
||||
|
||||
if [ -n "$personal_dir" ]; then
|
||||
CFLAGS="$CFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\""
|
||||
fi
|
||||
@@ -1347,13 +1439,26 @@ check_compiler() {
|
||||
}
|
||||
|
||||
check_build() {
|
||||
check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
|
||||
if [ "$os" = "FREEBSD" ]; then
|
||||
# FreeBSD's C compiler does not support dump machine.
|
||||
# However, removing C support is not possible because PSP must be linked with the C compiler.
|
||||
check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CXX" "g++" "c++" "0" "-dumpmachine"
|
||||
else
|
||||
check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
|
||||
fi
|
||||
}
|
||||
|
||||
check_host() {
|
||||
# By default the host is the build
|
||||
if [ -z "$host" ]; then host="$build"; fi
|
||||
check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
|
||||
|
||||
if [ "$os" = "FREEBSD" ]; then
|
||||
# FreeBSD's C compiler does not support dump machine.
|
||||
# However, removing C support is not possible because PSP must be linked with the C compiler.
|
||||
check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CXX" "g++" "c++" "0" "-dumpmachine"
|
||||
else
|
||||
check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
|
||||
fi
|
||||
}
|
||||
|
||||
check_cxx_build() {
|
||||
@@ -1396,6 +1501,26 @@ check_lipo() {
|
||||
fi
|
||||
}
|
||||
|
||||
set_universal_binary_flags() {
|
||||
if [ -z "$osx_target_version" ]; then
|
||||
# if we don't speficy a target version then we presume 10.4
|
||||
osx_target_version=10.4
|
||||
fi
|
||||
|
||||
if [ "$osx_target_version" = "10.4" ]; then
|
||||
# Apple added u to 10.4 to show that it's universal
|
||||
# There is a version without the u, but it's only in Xcode 2.0 and people should use the free update to 2.5
|
||||
osx_sysroot_version=10.4u
|
||||
else
|
||||
osx_sysroot_version="$osx_target_version"
|
||||
fi
|
||||
|
||||
if [ "$with_osx_sysroot" = "3" ]; then
|
||||
CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$osx_sysroot_version.sdk -mmacosx-version-min=$osx_target_version"
|
||||
LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$osx_sysroot_version.sdk -mmacosx-version-min=$osx_target_version"
|
||||
fi
|
||||
}
|
||||
|
||||
check_direct_music() {
|
||||
echo "
|
||||
#include <windows.h>
|
||||
@@ -1511,7 +1636,7 @@ detect_awk() {
|
||||
|
||||
detect_os() {
|
||||
if [ "$os" = "DETECT" ]; then
|
||||
# Detect UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
|
||||
# Detect UNIX, OSX, FREEBSD, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
|
||||
|
||||
# Try first via dumpmachine, then via uname
|
||||
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
|
||||
@@ -1519,6 +1644,8 @@ detect_os() {
|
||||
/darwin/ { print "OSX"; exit}
|
||||
/freebsd/ { print "FREEBSD"; exit}
|
||||
/openbsd/ { print "OPENBSD"; exit}
|
||||
/netbsd/ { print "NETBSD"; exit}
|
||||
/hp-ux/ { print "HPUX"; exit}
|
||||
/morphos/ { print "MORPHOS"; exit}
|
||||
/beos/ { print "BEOS"; exit}
|
||||
/sunos/ { print "SUNOS"; exit}
|
||||
@@ -1536,6 +1663,8 @@ detect_os() {
|
||||
/darwin/ { print "OSX"; exit}
|
||||
/freebsd/ { print "FREEBSD"; exit}
|
||||
/openbsd/ { print "OPENBSD"; exit}
|
||||
/netbsd/ { print "NETBSD"; exit}
|
||||
/hp-ux/ { print "HPUX"; exit}
|
||||
/morphos/ { print "MORPHOS"; exit}
|
||||
/beos/ { print "BEOS"; exit}
|
||||
/sunos/ { print "SUNOS"; exit}
|
||||
@@ -1548,7 +1677,7 @@ detect_os() {
|
||||
if [ -z "$os" ]; then
|
||||
log 1 "detecting OS... none detected"
|
||||
log 1 "I couldn't detect your OS. Please use --os=OS to force one"
|
||||
log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP"
|
||||
log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -2116,6 +2245,9 @@ detect_cputype() {
|
||||
}
|
||||
|
||||
make_sed() {
|
||||
T_CFLAGS="$CFLAGS"
|
||||
T_LDFLAGS="$LDFLAGS"
|
||||
|
||||
# We check here if we are PPC, because then we need to enable FOUR_BYTE_BOOL
|
||||
# We do this here, and not sooner, so universal builds also have this
|
||||
# automatically correct
|
||||
@@ -2124,17 +2256,7 @@ make_sed() {
|
||||
# bytes too, but only for PPC.
|
||||
ppc=`$cc_host -dumpmachine | egrep "powerpc|ppc"`
|
||||
if [ -n "$ppc" ]; then
|
||||
T_CFLAGS="$CFLAGS -DFOUR_BYTE_BOOL"
|
||||
osx_sysroot_version=10.4u
|
||||
else
|
||||
T_CFLAGS="$CFLAGS"
|
||||
osx_sysroot_version=10.4u
|
||||
fi
|
||||
|
||||
T_LDFLAGS="$LDFLAGS"
|
||||
if [ "$with_osx_sysroot" = "3" ]; then
|
||||
T_CFLAGS="$T_CFLAGS -isysroot /Developer/SDKs/MacOSX$osx_sysroot_version.sdk"
|
||||
T_LDFLAGS="$T_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$osx_sysroot_version.sdk"
|
||||
T_CFLAGS="$T_CFLAGS -DFOUR_BYTE_BOOL"
|
||||
fi
|
||||
|
||||
SRC_OBJS_DIR="$BASE_SRC_OBJS_DIR/$OBJS_SUBDIR"
|
||||
@@ -2169,7 +2291,10 @@ make_sed() {
|
||||
s#!!TTD!!#$TTD#g;
|
||||
s#!!BINARY_DIR!!#$prefix_dir/$binary_dir#g;
|
||||
s#!!DATA_DIR!!#$prefix_dir/$data_dir#g;
|
||||
s#!!DOC_DIR!!#$prefix_dir/$doc_dir#g;
|
||||
s#!!MAN_DIR!!#$prefix_dir/$man_dir#g;
|
||||
s#!!ICON_DIR!!#$prefix_dir/$icon_dir#g;
|
||||
s#!!ICON_THEME_DIR!!#$prefix_dir/$icon_theme_dir#g;
|
||||
s#!!PERSONAL_DIR!!#$personal_dir#g;
|
||||
s#!!SHARED_DIR!!#$shared_dir#g;
|
||||
s#!!INSTALL_DIR!!#$install_dir#g;
|
||||
@@ -2186,6 +2311,7 @@ make_sed() {
|
||||
s#!!CONFIG_CACHE_SOURCE!!#config.cache.source#g;
|
||||
s#!!CONFIG_CACHE_VERSION!!#config.cache.version#g;
|
||||
s#!!CONFIG_CACHE_SOURCE_LIST!!#config.cache.source.list#g;
|
||||
s#!!CONFIG_CACHE_PWD!!#config.cache.pwd#g;
|
||||
s#!!LANG_SUPPRESS!!#$lang_suppress#g;
|
||||
s#!!OBJS_C!!#$OBJS_C#g;
|
||||
s#!!OBJS_CPP!!#$OBJS_CPP#g;
|
||||
@@ -2199,6 +2325,45 @@ make_sed() {
|
||||
s#!!GCC295!!#$gcc295#g;
|
||||
s#!!DISTCC!!#$distcc#g;
|
||||
"
|
||||
|
||||
if [ "$icon_theme_dir" != "" ]; then
|
||||
SRC_REPLACE="$SRC_REPLACE
|
||||
s#!!ICON_THEME_DIR!!#$prefix_dir/$icon_theme_dir#g;
|
||||
"
|
||||
else
|
||||
SRC_REPLACE="$SRC_REPLACE
|
||||
s#!!ICON_THEME_DIR!!##g;
|
||||
"
|
||||
fi
|
||||
|
||||
if [ "$man_dir" != "" ]; then
|
||||
SRC_REPLACE="$SRC_REPLACE
|
||||
s#!!MAN_DIR!!#$prefix_dir/$man_dir#g;
|
||||
"
|
||||
else
|
||||
SRC_REPLACE="$SRC_REPLACE
|
||||
s#!!MAN_DIR!!##g;
|
||||
"
|
||||
fi
|
||||
|
||||
if [ "$menu_dir" != "" ]; then
|
||||
SRC_REPLACE="$SRC_REPLACE
|
||||
s#!!MENU_DIR!!#$prefix_dir/$menu_dir#g;
|
||||
"
|
||||
else
|
||||
SRC_REPLACE="$SRC_REPLACE
|
||||
s#!!MENU_DIR!!##g;
|
||||
"
|
||||
fi
|
||||
}
|
||||
|
||||
generate_menu_item() {
|
||||
MENU_REPLACE="
|
||||
s#!!TTD!!#$TTD#g;
|
||||
s#!!MENU_GROUP!!#$menu_group#g
|
||||
"
|
||||
echo "Generating menu item..."
|
||||
< $ROOT_DIR/media/openttd.desktop.in sed "$MENU_REPLACE" > media/openttd.desktop
|
||||
}
|
||||
|
||||
generate_main() {
|
||||
@@ -2208,13 +2373,22 @@ generate_main() {
|
||||
|
||||
# Create the main Makefile
|
||||
echo "Generating Makefile..."
|
||||
< $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" > Makefile
|
||||
echo "# Auto-generated file from 'Makefile.in' -- DO NOT EDIT" > Makefile
|
||||
< $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" >> Makefile
|
||||
cp $ROOT_DIR/Makefile.bundle.in Makefile.bundle
|
||||
echo "# Auto-generated file -- DO NOT EDIT" > Makefile.am
|
||||
echo >> Makefile.am
|
||||
# Make the copy of the source-list, so we don't trigger an unwanted recompile
|
||||
cp $SOURCE_LIST config.cache.source.list
|
||||
# Add the current directory, so we don't trigger an unwanted recompile
|
||||
echo "`pwd`" > config.cache.pwd
|
||||
# Make sure config.cache is OLDER then config.cache.source.list
|
||||
touch config.cache
|
||||
touch config.pwd
|
||||
|
||||
if [ "$menu_dir" != "" ]; then
|
||||
generate_menu_item
|
||||
fi
|
||||
}
|
||||
|
||||
generate_lang() {
|
||||
@@ -2226,7 +2400,8 @@ generate_lang() {
|
||||
mkdir -p $LANG_OBJS_DIR
|
||||
|
||||
echo "Generating lang/Makefile..."
|
||||
< $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" > $LANG_OBJS_DIR/Makefile
|
||||
echo "# Auto-generated file from 'Makefile.lang.in' -- DO NOT EDIT" > $LANG_OBJS_DIR/Makefile
|
||||
< $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" >> $LANG_OBJS_DIR/Makefile
|
||||
echo "DIRS += $LANG_OBJS_DIR" >> Makefile.am
|
||||
echo "LANG_DIRS += $LANG_OBJS_DIR" >> Makefile.am
|
||||
}
|
||||
@@ -2240,7 +2415,8 @@ generate_src_normal() {
|
||||
mkdir -p $SRC_OBJS_DIR
|
||||
|
||||
echo "Generating $2/Makefile..."
|
||||
< $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" > $SRC_OBJS_DIR/Makefile
|
||||
echo "# Auto-generated file from 'Makefile.src.in' -- DO NOT EDIT" > $SRC_OBJS_DIR/Makefile
|
||||
< $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" >> $SRC_OBJS_DIR/Makefile
|
||||
echo "DIRS += $SRC_OBJS_DIR" >> Makefile.am
|
||||
echo "SRC_DIRS += $SRC_OBJS_DIR" >> Makefile.am
|
||||
}
|
||||
@@ -2295,51 +2471,66 @@ showhelp() {
|
||||
echo " --strip=STRIP the strip to use [HOST-strip]"
|
||||
echo " --awk=AWK the awk to use in configure [awk]"
|
||||
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
|
||||
echo " --os=OS the OS we are compiling for [DETECT]"
|
||||
echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/MORPHOS/"
|
||||
echo " BEOS/SUNOS/CYGWIN/MINGW/OS2/WINCE/PSP"
|
||||
echo " --os=OS the OS we are compiling for [$os]"
|
||||
echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/"
|
||||
echo " MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
|
||||
echo " WINCE/PSP"
|
||||
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
|
||||
echo " --revision=rXXXX overwrite the revision detection."
|
||||
echo " Use with care!"
|
||||
echo ""
|
||||
echo "Paths:"
|
||||
echo " --prefix-dir=dir specifies the prefix for all installed"
|
||||
echo " files [/usr/local]"
|
||||
echo " files [$prefix_dir]"
|
||||
echo " --binary-dir=dir location of the binary. Will be prefixed"
|
||||
echo " with the prefix-dir [games]"
|
||||
echo " with the prefix-dir [$binary_dir]"
|
||||
echo " --data-dir=dir location of data files (lang, data, gm)."
|
||||
echo " Will be prefixed with the prefix-dir"
|
||||
echo " [share/games/openttd]"
|
||||
echo " [$data_dir]"
|
||||
echo " --doc-dir=dir location of the doc files"
|
||||
echo " Will be prefixed with the prefix-dir"
|
||||
echo " [$doc_dir]"
|
||||
echo " --icon-dir=dir location of icons. Will be prefixed"
|
||||
echo " with the prefix-dir [share/pixmaps]"
|
||||
echo " with the prefix-dir [$icon_dir]"
|
||||
echo " --icon-theme-dir=dir location of icon theme."
|
||||
echo " Will be prefixed with the prefix-dir"
|
||||
echo " and postfixed with size-dirs [$icon_theme_dir]"
|
||||
echo " --man-dir=dir location of the manual page (UNIX only)"
|
||||
echo " Will be prefixed with the prefix-dir"
|
||||
echo " [$man_dir]"
|
||||
echo " --menu-dir=dir location of the menu item. (UNIX only, except OSX)"
|
||||
echo " Will be prefixed with the prefix-dir"
|
||||
echo " [$menu_dir]"
|
||||
echo " --personal-dir=dir location of the personal directory"
|
||||
echo " [os-dependent default]"
|
||||
echo " [$personal_dir]"
|
||||
echo " --shared-dir=dir location of shared data files"
|
||||
echo " [os-dependent default]"
|
||||
echo " [$shared_dir]"
|
||||
echo " --install-dir=dir specifies the root to install to."
|
||||
echo " Useful to install into jails [/]"
|
||||
echo " Useful to install into jails [$install_dir]"
|
||||
echo ""
|
||||
echo "Features and packages:"
|
||||
echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)"
|
||||
echo " --enable_desync_debug=[LVL] enable desync debug options (LVL=[012], 0 is none"
|
||||
echo " --enable-desync-debug=[LVL] enable desync debug options (LVL=[012], 0 is none"
|
||||
echo " --enable-profiling enables profiling"
|
||||
echo " --enable-dedicated compile a dedicated server (without video)"
|
||||
echo " --enable-static enable static compile (doesn't work for"
|
||||
echo " all HOSTs)"
|
||||
echo " --enable-translator enable extra output for translators"
|
||||
echo " --enable-universal enable universal builds (OSX ONLY)"
|
||||
echo " --enable-osx-g5 enables optimalizations for G5 (OSX ONLY)"
|
||||
echo " --enable-osx-g5 enables optimizations for G5 (OSX ONLY)"
|
||||
echo " --disable-cocoa-quartz disable the quartz window mode driver for Cocoa (OSX ONLY)"
|
||||
echo " --disable-cocoa-quickdraw disable the quickdraw window mode driver for Cocoa (OSX ONLY)"
|
||||
echo " --disable-unicode disable unicode support to build win9x"
|
||||
echo " version (Win32 ONLY)"
|
||||
echo " --disable-network disable network support"
|
||||
echo " --disable-assert disable asserts (continue on errors)"
|
||||
echo " --disable-strip disable any possible stripping"
|
||||
echo " --enable-strip enable any possible stripping"
|
||||
echo " --without-osx-sysroot disable the automatic adding of sysroot "
|
||||
echo " (OSX ONLY)"
|
||||
echo " --without-application-bundle disable generation of application bundle"
|
||||
echo " (OSX ONLY)"
|
||||
echo " --without-menu-entry Don't generate a menu item (Freedesktop based only)"
|
||||
echo " --menu-group=group Category in which the menu item will be placed (Freedesktop based only)"
|
||||
echo " --with-direct-music enable direct music support (Win32 ONLY)"
|
||||
echo " --with-sort=sort define a non-default location for sort"
|
||||
echo " --with-midi=midi define which midi-player to use"
|
||||
|
6
configure
vendored
6
configure
vendored
@@ -17,7 +17,7 @@ ROOT_DIR="`dirname $0`"
|
||||
ROOT_DIR="`cd $ROOT_DIR && pwd`"
|
||||
|
||||
PWD="`pwd`"
|
||||
PREFIX="`pwd`/bin"
|
||||
PREFIX="$PWD/bin"
|
||||
|
||||
. $ROOT_DIR/config.lib
|
||||
|
||||
@@ -32,7 +32,7 @@ MEDIA_DIR="$ROOT_DIR/media"
|
||||
SOURCE_LIST="$ROOT_DIR/source.list"
|
||||
|
||||
if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then
|
||||
if ! [ -f "config.cache" ]; then
|
||||
if [ ! -f "config.cache" ]; then
|
||||
echo "can't reconfigure, because never configured before"
|
||||
exit 1
|
||||
fi
|
||||
@@ -64,7 +64,7 @@ else
|
||||
PIPE_SORT="$sort"
|
||||
fi
|
||||
|
||||
if ! [ -f "$LANG_DIR/english.txt" ]; then
|
||||
if [ ! -f "$LANG_DIR/english.txt" ]; then
|
||||
echo "Languages not found in $LANG_DIR. Can't continue without it."
|
||||
echo "Please make sure the dir exists and contains at least english.txt"
|
||||
fi
|
||||
|
@@ -1,28 +1,37 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd Sep 15, 2007
|
||||
.Dd Jul 20, 2008
|
||||
.Dt OPENTTD 6
|
||||
.Sh NAME
|
||||
.Nm openttd
|
||||
.Nd An open source clone of the Microprose game "Transport Tycoon Deluxe"
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl Defhi
|
||||
.Op Fl Defhix
|
||||
.Op Fl G Ar seed
|
||||
.Op Fl b Ar blitter
|
||||
.Op Fl d Ar [level | cat=lvl[, ...]]
|
||||
.Op Fl c Ar config_file
|
||||
.Op Fl g Ar [savegame]
|
||||
.Op Fl l Ar host[:port]
|
||||
.Op Fl n Ar host[:port][#player]
|
||||
.Op Fl r Ar widthxheight
|
||||
.Op Fl t Ar date
|
||||
.Op Fl m Ar driver
|
||||
.Op Fl s Ar driver
|
||||
.Op Fl v Ar driver
|
||||
.Op Fl b Ar blitter
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width ".Fl n Ar host[:port][#player]"
|
||||
.It Fl D
|
||||
.It Fl D Ar [host][:port]
|
||||
Start a dedicated server
|
||||
.It Fl G Ar seed
|
||||
Seed the pseudo random number generator
|
||||
.It Fl b Ar blitter
|
||||
Set the blitter, see
|
||||
.Fl h
|
||||
.It Fl c Ar config_file
|
||||
Use 'config_file' instead of 'openttd.cfg'
|
||||
.It Fl d Ar [level]
|
||||
Set debug verbosity for all categories to
|
||||
.Ar level
|
||||
@@ -42,6 +51,9 @@ at start or start a new game if omitted
|
||||
Display a summary of all options and available drivers
|
||||
.It Fl i
|
||||
Force to use the DOS palette (use this if you see a lot of magenta)
|
||||
.It Fl l Ar host[:port]
|
||||
Redirect DEBUG(), See
|
||||
.Fl D
|
||||
.It Fl m Ar driver
|
||||
Set the music driver, see
|
||||
.Fl h
|
||||
@@ -57,6 +69,8 @@ Set the starting date
|
||||
.It Fl v Ar driver
|
||||
Set the video driver, see
|
||||
.Fl h
|
||||
.It Fl x
|
||||
Do not automatically save to config file on exit
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
http://wiki.openttd.org/, http://www.openttd.org
|
||||
|
116
findversion.sh
Executable file
116
findversion.sh
Executable file
@@ -0,0 +1,116 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Arguments given? Show help text.
|
||||
if [ "$#" != "0" ]; then
|
||||
cat <<EOF
|
||||
Usage: ./findversion.sh
|
||||
Finds the current revision and if the code is modified.
|
||||
|
||||
Output: <REV>\t<REV_NR>\t<MODIFIED>\t<CLEAN_REV>
|
||||
REV
|
||||
a string describing what version of the code the current checkout is
|
||||
based on. The exact format of this string depends on the version
|
||||
control system in use, but it tries to identify the revision used as
|
||||
close as possible (using the svn revision number or hg/git hash).
|
||||
This also includes an indication of whether the checkout was
|
||||
modified and which branch was checked out. This value is not
|
||||
guaranteed to be sortable, but is mainly meant for identifying the
|
||||
revision and user display.
|
||||
|
||||
If no revision identifier could be found, this is left empty.
|
||||
REV_NR
|
||||
the revision number of the svn revision this checkout is based on.
|
||||
This can be used to determine which functionality is present in this
|
||||
checkout. For trunk svn checkouts and hg/git branches based upon it,
|
||||
this number should be accurate. For svn branch checkouts, this
|
||||
number is mostly meaningless, at least when comparing with the
|
||||
REV_NR from other branches or trunk.
|
||||
|
||||
This number should be sortable. Within a given branch or trunk, a
|
||||
higher number means a newer version. However, when using git or hg,
|
||||
this number will not increase on new commits.
|
||||
|
||||
If no revision number could be found, this is left empty.
|
||||
MODIFIED
|
||||
Whether (the src directory of) this checkout is modified or not. A
|
||||
value of 0 means not modified, a value of 2 means it was modified.
|
||||
Modification is determined in relation to the commit identified by
|
||||
REV, so not in relation to the svn revision identified by REV_NR.
|
||||
|
||||
A value of 1 means that the modified status is unknown, because this
|
||||
is not an svn/git/hg checkout for example.
|
||||
|
||||
CLEAN_REV
|
||||
the same as REV but without branch name
|
||||
|
||||
By setting the AWK environment variable, a caller can determine which
|
||||
version of "awk" is used. If nothing is set, this script defaults to
|
||||
"awk".
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Allow awk to be provided by the caller.
|
||||
if [ -z "$AWK" ]; then
|
||||
AWK=awk
|
||||
fi
|
||||
|
||||
# Find out some dirs
|
||||
cd `dirname "$0"`
|
||||
ROOT_DIR=`pwd`
|
||||
SRC_DIR=src
|
||||
|
||||
# Determine if we are using a modified version
|
||||
# Assume the dir is not modified
|
||||
MODIFIED="0"
|
||||
if [ -d "$ROOT_DIR/.svn" ]; then
|
||||
# We are an svn checkout
|
||||
if [ -n "`svnversion \"$SRC_DIR\" | grep 'M'`" ]; then
|
||||
MODIFIED="2"
|
||||
fi
|
||||
# Find the revision like: rXXXXM-branch
|
||||
BRANCH=`LC_ALL=C svn info "$SRC_DIR" | "$AWK" '/^URL:.*branches/ { split($2, a, "/"); for(i in a) if (a[i]=="branches") { print a[i+1]; break } }'`
|
||||
TAG=`LC_ALL=C svn info "$SRC_DIR" | "$AWK" '/^URL:.*tags/ { split($2, a, "/"); for(i in a) if (a[i]=="tags") { print a[i+1]; break } }'`
|
||||
REV_NR=`LC_ALL=C svn info "$SRC_DIR" | "$AWK" '/^Last Changed Rev:/ { print $4 }'`
|
||||
if [ -n "$TAG" ]; then
|
||||
REV=$TAG
|
||||
else
|
||||
REV="r$REV_NR"
|
||||
fi
|
||||
elif [ -d "$ROOT_DIR/.git" ]; then
|
||||
# We are a git checkout
|
||||
if [ -n "`git diff-index HEAD \"$SRC_DIR\"`" ]; then
|
||||
MODIFIED="2"
|
||||
fi
|
||||
HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null | cut -c1-8`
|
||||
REV="g$HASH"
|
||||
BRANCH=`git branch|grep '[*]' | sed 's/\* //;s/^master$//'`
|
||||
REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"`
|
||||
elif [ -d "$ROOT_DIR/.hg" ]; then
|
||||
# We are a hg checkout
|
||||
if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then
|
||||
MODIFIED="2"
|
||||
fi
|
||||
HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3 | cut -c1-8`
|
||||
REV="h$HASH"
|
||||
BRANCH=`hg branch | sed 's/^default$//'`
|
||||
REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"`
|
||||
else
|
||||
# We don't know
|
||||
MODIFIED="1"
|
||||
BRANCH=""
|
||||
REV=""
|
||||
REV_NR=""
|
||||
fi
|
||||
|
||||
if [ "$MODIFIED" -eq "2" ]; then
|
||||
REV="${REV}M"
|
||||
fi
|
||||
|
||||
CLEAN_REV=${REV}
|
||||
|
||||
if [ -n "$BRANCH" ]; then
|
||||
REV="${REV}-$BRANCH"
|
||||
fi
|
||||
|
||||
echo "$REV $REV_NR $MODIFIED $CLEAN_REV"
|
@@ -11,15 +11,25 @@ by the number below on http://bugs.openttd.org.
|
||||
If the bug report is closed, it has been fixed, which then can be verified
|
||||
in the latest SVN version of /trunk.
|
||||
|
||||
Bugs for 0.6.0-beta5
|
||||
Bugs for 0.6.3
|
||||
------------------------------------------------------------------------
|
||||
URL: http://bugs.openttd.org
|
||||
|
||||
- 2176 Towns unconditionally flatten all land
|
||||
- 2138 Unexpected cargo appears
|
||||
- 2132 Station vehicle/service window closes even when pinned
|
||||
- 2129 Strings from message boxes could sometimes change (e.g. the screenshot filename)
|
||||
- 2085 Vehicle list of shared vehicles without orders not possible
|
||||
- 1944 Road vehicles not picking empty drivethrough platform
|
||||
- 1923 Unique names not always enforced
|
||||
- 1890 Airplanes copy helipcopters goto heliport order
|
||||
- 1885 Almost all unserved industries die in big maps
|
||||
- 1858 Industry legend in small map overwrites buttons
|
||||
- 1802 Path with space in configure fails
|
||||
- 1793 Inconsistent travel time for fast trains
|
||||
- 1762 Strange Autoreplace behaviour
|
||||
- 1711 Gravel and Clay have no worth
|
||||
- 1752 User input is not checked
|
||||
- 1693 Removing road does not reset owner
|
||||
- 1495 Long vehicles block multistop station
|
||||
- 1487 Ending_year is never written to
|
||||
- 1473 Train not going to available platform
|
||||
- 1404 Spinner widget interprets one click as many
|
||||
- 1264 Autoreplace for multiple NewGRF DMU sets fails
|
||||
|
13
media/openttd.desktop.in
Normal file
13
media/openttd.desktop.in
Normal file
@@ -0,0 +1,13 @@
|
||||
# $Id$
|
||||
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Version=1.1
|
||||
Name=OpenTTD
|
||||
GenericName=A clone of Transport Tycoon Deluxe
|
||||
Comment=A business simulation game
|
||||
Icon=openttd
|
||||
Exec=!!TTD!!
|
||||
Terminal=false
|
||||
Categories=!!MENU_GROUP!!
|
@@ -15,7 +15,7 @@ You should copy the data files from the original TTD into the data directory
|
||||
For in game music (optional), you should copy all files in the gm/
|
||||
subdir of your ttd installation to /usr/share/games/openttd/gm. You
|
||||
should also install timidity and a soundfont (freepats is packaged in
|
||||
debian and works out of the box).
|
||||
Debian and works out of the box).
|
||||
|
||||
Don't forget to use -m extmidi if you want music, and if you have
|
||||
problems, remember that not all audio devices support multiple
|
||||
@@ -23,12 +23,9 @@ You should copy the data files from the original TTD into the data directory
|
||||
mixing. My VIA AC97 device cannot do hardware mixing, for example.
|
||||
|
||||
-Scenarios
|
||||
There are a few scenarios included in this release. When you start
|
||||
openttd it will look for scenarios in ~/.openttd/scenario, while the
|
||||
premade scenarios are in /usr/share/games/openttd/data/scenario. You
|
||||
have two options to use the scenarios.
|
||||
* Navigate to /usr/share/games/openttd/data/scenario within openttd.
|
||||
* Copy scenarios from /usr/share/games/openttd/data/scenario to
|
||||
~/.openttd/scenario. We are looking into a better solution for this.
|
||||
There are no scenarios included in this release. Scenarios can be
|
||||
downloaded separately from the OpenTTD website and all over the
|
||||
internet. Place scenarios in your ~/.openttd/scenario directory to
|
||||
use them.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl>, Tue, 25 Jan 2004 14:11:01 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl>, Tue, 25 Jan 2004 14:11:01 +0200
|
||||
|
@@ -1,98 +1,138 @@
|
||||
openttd (0.6.0~beta5) unstable; urgency=low
|
||||
openttd (0.6.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 04 Mar 2008 18:06:31 +0100
|
||||
-- Remko Bijker <rubidium@openttd.org> Wed, 01 Oct 2008 18:48:05 +0200
|
||||
|
||||
openttd (0.6.0~beta4-1) unstable; urgency=low
|
||||
openttd (0.6.3~rc1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 18 Feb 2008 20:09:29 +0100
|
||||
-- Remko Bijker <rubidium@openttd.org> Mon, 22 Sep 2008 22:17:05 +0200
|
||||
|
||||
openttd (0.6.0~beta3-1) unstable; urgency=low
|
||||
openttd (0.6.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
- Fixes remote crash vulnerability CVE-2008-3547. Closes: #493714
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 16 Jan 2008 21:40:07 +0100
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 08 Aug 2008 11:07:05 +0200
|
||||
|
||||
openttd (0.6.0~beta2-1) unstable; urgency=low
|
||||
openttd (0.6.2~rc2-1) experimental; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Sun, 09 Dec 2007 22:05:05 +0100
|
||||
[ Jordi Mallach ]
|
||||
* Fix typo in README.Debian (lintian).
|
||||
* Remove dpatch build-dep and the empty debian/patches dir.
|
||||
* Don't ignore possible "make distclean" errors.
|
||||
|
||||
openttd (0.6.0~beta1-1) unstable; urgency=low
|
||||
-- Jordi Mallach <jordi@debian.org> Sat, 26 Jul 2008 01:35:30 +0200
|
||||
|
||||
openttd (0.6.2~rc1-1) experimental; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Sun, 18 Nov 2007 16:05:05 +0100
|
||||
-- Jordi Mallach <jordi@debian.org> Thu, 24 Jul 2008 16:09:57 +0200
|
||||
|
||||
openttd (0.6.1-1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release.
|
||||
* Remove no_install_personal.dpatch, it is included upstream now.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Thu, 05 Jun 2008 00:47:36 +0200
|
||||
|
||||
openttd (0.6.0-2) unstable; urgency=low
|
||||
|
||||
[ Jordi Mallach ]
|
||||
* Rename XS-Vcs-* to the official Vcs-* fields.
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* Don't install anything into ~ during make install, this prevented
|
||||
successful builds on some architectures. Fix imported from upstream.
|
||||
* Put the homepage in it's own Homepage field instead of in the description.
|
||||
* Bump Standards-Version to 3.7.3
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Thu, 03 Apr 2008 00:07:10 +0200
|
||||
|
||||
openttd (0.6.0-1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release:
|
||||
- Adds note about font-configuration for non-latin languages.
|
||||
Closes: #462604
|
||||
* Add .desktop file, provided by Andrea Colangelo.
|
||||
Closes: #460073
|
||||
* Add Finnish Debconf translation, provided by Esko Arajärvi.
|
||||
Closes: #456956
|
||||
|
||||
[ Jordi Mallach ]
|
||||
* Fixes and improvements for the .desktop file according to the spec.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Wed, 02 Apr 2008 14:04:40 +0200
|
||||
|
||||
openttd (0.5.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Sat, 15 Sep 2007 13:30:00 +0100
|
||||
|
||||
openttd (0.5.3~rc3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Thu, 30 Aug 2007 23:30:00 +0100
|
||||
|
||||
openttd (0.5.3~rc2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Sat, 7 Jul 2007 20:05:00 +0100
|
||||
|
||||
openttd (0.5.3~rc1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Thu, 28 Jun 2007 18:00:00 +0100
|
||||
-- Jordi Mallach <jordi@debian.org> Tue, 18 Sep 2007 12:05:28 +0200
|
||||
|
||||
openttd (0.5.2-1) unstable; urgency=low
|
||||
|
||||
[ Jordi Mallach ]
|
||||
* New upstream release.
|
||||
* Debconf translation updates:
|
||||
- Catalan.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 29 May 2007 20:00:00 +0100
|
||||
[ Christian Perrier ]
|
||||
* Debconf templates and debian/control reviewed by the debian-l10n-
|
||||
english team as part of the Smith review project.
|
||||
Closes: #422183, #419096.
|
||||
* Debconf translation updates:
|
||||
- Swedish. Closes: #422780
|
||||
- Basque. Closes: #422786
|
||||
- Czech. Closes: #422809
|
||||
- Galician. Closes: #422831
|
||||
- German. Closes: #422908
|
||||
- Tamil. Closes: #423079
|
||||
- Russian. Closes: #423224
|
||||
- Portuguese. Closes: #423413
|
||||
- French. Closes: #424436
|
||||
- Brazilian Portuguese. Closes: #425585
|
||||
- Dutch. Closes: #425707
|
||||
|
||||
openttd (0.5.2~rc1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Wed, 16 May 2007 23:35:39 +0100
|
||||
-- Jordi Mallach <jordi@debian.org> Sat, 02 Jun 2007 06:24:34 +0200
|
||||
|
||||
openttd (0.5.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release
|
||||
* Add German and Swedish translations (Closes: #420258, #419097)
|
||||
* Remove bogus fuzzy mark from the Catalan translation
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 20 Apr 2007 21:45:32 +0100
|
||||
[ Jordi Mallach ]
|
||||
* debian/control: add XS-Vcs-Svn and XS-Vcs-Browser fields.
|
||||
|
||||
openttd (0.5.1~rc3-1) unstable; urgency=low
|
||||
-- Jordi Mallach <jordi@debian.org> Mon, 23 Apr 2007 21:03:06 +0200
|
||||
|
||||
* New upstream release.
|
||||
openttd (0.5.0-2) unstable; urgency=low
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 17 Apr 2007 22:00:46 +0100
|
||||
* Upload to Debian.
|
||||
|
||||
openttd (0.5.1~rc2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 23 Mar 2007 23:45:46 +0100
|
||||
|
||||
openttd (0.5.1~rc1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Wed, 20 Mar 2007 22:03:46 +0100
|
||||
-- Jordi Mallach <jordi@debian.org> Sun, 11 Mar 2007 14:12:37 +0100
|
||||
|
||||
openttd (0.5.0-1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 26 Feb 2007 21:07:05 +0100
|
||||
[ Jordi Mallach ]
|
||||
* Depend on ${misc:Depends}, not debconf directly.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Thu, 8 Mar 2007 15:34:54 +0100
|
||||
|
||||
openttd (0.5.0~rc5-1) unstable; urgency=low
|
||||
|
||||
@@ -195,13 +235,13 @@ openttd (0.4.0.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Matthijs Kooijman <matthijs@katherina.student.utwente.nl> Mon, 23 May 2005 13:04:24 +0200
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 23 May 2005 13:04:24 +0200
|
||||
|
||||
openttd (0.4.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Matthijs Kooijman <matthijs@katherina.student.utwente.nl> Mon, 16 May 2005 00:16:17 +0200
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 16 May 2005 00:16:17 +0200
|
||||
|
||||
openttd (0.3.6-1) unstable; urgency=low
|
||||
|
||||
@@ -209,18 +249,18 @@ openttd (0.3.6-1) unstable; urgency=low
|
||||
* Modifed Makefile to install xpm icon and scenarios in /usr/share/games/openttd/
|
||||
* Added openttd.32.xpm, openttd.64.xpm was too big
|
||||
|
||||
-- root <root@katherina.student.utwente.nl> Tue, 25 Jan 2005 19:21:08 +0100
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 25 Jan 2005 19:21:08 +0100
|
||||
|
||||
openttd (0.3.5-2) unstable; urgency=low
|
||||
|
||||
* Fixed some lintian warnings.
|
||||
* Added openttd.64.xpm (icon for menu).
|
||||
|
||||
-- Matthijs Kooijman <matthijs@katherina.student.utwente.nl> Mon, 27 Dec 2004 01:51:36 +0100
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 27 Dec 2004 01:51:36 +0100
|
||||
|
||||
openttd (0.3.5-1) unstable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@katherina.student.utwente.nl> Fri, 24 Dec 2004 02:58:47 +0100
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 24 Dec 2004 02:58:47 +0100
|
||||
|
||||
|
@@ -6,16 +6,16 @@
|
||||
FILES="trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf sample.cat"
|
||||
DATADIR=/usr/share/games/openttd/data
|
||||
|
||||
MISSING="No";
|
||||
MISSING="No"
|
||||
for FILE in $FILES; do
|
||||
# Check if all the files needed are here.
|
||||
if [ ! -e $DATADIR/$FILE ]; then
|
||||
MISSING="Yes";
|
||||
break;
|
||||
fi;
|
||||
done;
|
||||
MISSING="Yes"
|
||||
break
|
||||
fi;
|
||||
done
|
||||
|
||||
if [ $MISSING = "Yes" ]; then
|
||||
db_input high openttd/datafiles || true
|
||||
db_go
|
||||
fi;
|
||||
fi
|
||||
|
@@ -1,20 +1,21 @@
|
||||
Source: openttd
|
||||
Section: contrib/games
|
||||
Priority: optional
|
||||
Maintainer: Matthijs Kooijman <m.kooijman@student.utwente.nl>
|
||||
Maintainer: Matthijs Kooijman <matthijs@stdin.nl>
|
||||
Uploaders: Jordi Mallach <jordi@debian.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), dpatch, libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev
|
||||
Standards-Version: 3.7.2
|
||||
Build-Depends: debhelper (>= 4.0.0), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev
|
||||
Standards-Version: 3.7.3
|
||||
Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/deb-maint/openttd/trunk/
|
||||
Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/openttd/trunk
|
||||
Homepage: http://www.openttd.org/
|
||||
|
||||
Package: openttd
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, debconf
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: timidity, freepats
|
||||
Description: reimplementation of Transport Tycoon Deluxe with enhancements
|
||||
A reimplementation of the Microprose game "Transport Tycoon Deluxe" with lots
|
||||
of new features and enhancements.
|
||||
You require the data files of the original Transport Tycoon Deluxe
|
||||
for Windows to play the game. You have to MANUALLY copy them to the
|
||||
game data directory! (see README.Debian for details)
|
||||
.
|
||||
Homepage: http://www.openttd.org/
|
||||
OpenTTD is a reimplementation of the Microprose game "Transport
|
||||
Tycoon Deluxe" with lots of new features and enhancements. The data
|
||||
files of the original Transport Tycoon Deluxe for Windows are
|
||||
mandatory to play the game. They must be manually copied to the game
|
||||
data directory (see README.Debian for details).
|
||||
|
@@ -1,35 +1,40 @@
|
||||
# Catalan translation of openttd's Debconf templates.
|
||||
# Copyright <EFBFBD> 2007 Software in the Public Interest
|
||||
# Copyright © 2007 Software in the Public Interest, Inc.
|
||||
# This file is distributed under the same license as the openttd package.
|
||||
# Jordi Mallach <jordi@debian.org>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd 0.5.0-1\n"
|
||||
"Project-Id-Version: openttd 0.5.2-1\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-02-01 12:25+0100\n"
|
||||
"PO-Revision-Date: 2007-02-01 12:16+0100\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-06-01 00:45+0200\n"
|
||||
"Last-Translator: Jordi Mallach <jordi@debian.org>\n"
|
||||
"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: note
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "You need to install data files"
|
||||
msgstr "Heu d'instal<61>lar els fitxers de dades"
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Es necessiten els fitxers de dades"
|
||||
|
||||
#. Type: note
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"OpenTTD needs the data files from the original TTD game to run. You should "
|
||||
"install these data files before you can play the game. See README.Debian for "
|
||||
"more details on which files need to be copied where."
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"OpenTTD necessita els fitxers de dades del joc TTD original per a funcionar. "
|
||||
"Haureu d'instal<61>lar aquests fitxers de dades abans de poder jugar al joc. "
|
||||
"Llegiu el document README.Debian per a obtindre m<>s detalls sobre quins "
|
||||
"fitxers s'han de copiar i a quina ubicaci<63>."
|
||||
"Per a funcionar, OpenTTD necessita els fitxers de dades del joc "
|
||||
"Transport Tycoon Deluxe original."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr "Vegeu el fitxer /usr/share/doc/openttd/README.Debian per a obtenir-ne més detalls sobre els fitxers necessaris i la seua ubicació."
|
||||
|
42
os/debian/po/cs.po
Normal file
42
os/debian/po/cs.po
Normal file
@@ -0,0 +1,42 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 10:52+0200\n"
|
||||
"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
|
||||
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Vyžadovány datové soubory"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Pro svůj běh vyžaduje OpenTTD datové soubory z původní hry Transport Tycoon "
|
||||
"Deluxe."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Podrobnosti o vyžadovaných souborech a jejich umístění naleznete v souboru /"
|
||||
"usr/share/doc/openttd/README.Debian."
|
55
os/debian/po/de.po
Normal file
55
os/debian/po/de.po
Normal file
@@ -0,0 +1,55 @@
|
||||
# Translation of openttd debconf templates to German
|
||||
# Copyright (C) Helge Kreutzmann <debian@helgefjell.de>, 2007.
|
||||
# This file is distributed under the same license as the openttd package.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd 0.5.0-2\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 21:21+0200\n"
|
||||
"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
|
||||
"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-15\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Ben<65>tigte Datendateien"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Zum Betrieb ben<65>tigt OpenTTD Datendateien aus dem Originalspiel Transport "
|
||||
"Tycoon Deluxe."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Lesen Sie die Datei /usr/share/doc/openttd/README.Debian f<>r weitere Details "
|
||||
"<22>ber die ben<65>tigten Dateien und ihren Ort."
|
||||
|
||||
#~ msgid "You need to install data files"
|
||||
#~ msgstr "Sie m<>ssen Daten-Dateien installieren"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "OpenTTD needs the data files from the original Transport Tycoon Deluxe "
|
||||
#~ "game to run. You should install these data files before you can play the "
|
||||
#~ "game. See README.Debian for more details on which files need to be copied "
|
||||
#~ "where."
|
||||
#~ msgstr ""
|
||||
#~ "OpenTTD ben<65>tigt zur Ausf<73>hrung Daten-Dateien aus dem Originalspiel "
|
||||
#~ "<22>Transport Tycoon Deluxe<78>. Sie sollten diese Daten-Dateien installieren, "
|
||||
#~ "bevor Sie das Spiel spielen k<>nnen. Lesen Sie README.Debian f<>r weitere "
|
||||
#~ "Details dar<61>ber, welche Dateien wohin kopiert werden m<>ssen."
|
42
os/debian/po/eu.po
Normal file
42
os/debian/po/eu.po
Normal file
@@ -0,0 +1,42 @@
|
||||
# OpenTTD debconf template basque translation
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Piarres eobide <pi@beobide.net>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenTTD Debconf\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 09:55+0200\n"
|
||||
"Last-Translator: Piarres eobide <pi@beobide.net>\n"
|
||||
"Language-Team: Euskara <Librezale@librezale.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Datu fitxategiak behar dira"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Funtziona dezan, OpenTTD-ek jatorrizko 'Transport Tycoon Deluxe' jokoaren "
|
||||
"datu fitxategiak behar ditu."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"/usr/share/doc/openttd/README.Debian fitxategia begiratu beharrezko "
|
||||
"fitategien eta bere kokapenari buruz xehetasun gehiago ikusteko."
|
32
os/debian/po/fi.po
Normal file
32
os/debian/po/fi.po
Normal file
@@ -0,0 +1,32 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd_0.5.3-1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-09-19 04:33+0200\n"
|
||||
"PO-Revision-Date: 2007-12-18 20:01+0200\n"
|
||||
"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
|
||||
"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-Language: Finnish\n"
|
||||
"X-Poedit-Country: Finland\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "Data files needed"
|
||||
msgstr "Datatiedostoja puuttuu"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "For its operation, OpenTTD needs the data files from the original Transport Tycoon Deluxe game."
|
||||
msgstr "OpenTTD tarvitsee toimiakseen datatiedostoja alkuperäisestä Transport Tycoon Deluxe -pelistä."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "See the /usr/share/doc/openttd/README.Debian file for more details about the needed files and their location."
|
||||
msgstr "Tiedostossa /usr/share/doc/openttd/README.Debian on (englanniksi) lisätietoja tarvittavista tiedostoista ja niiden sijainnista."
|
||||
|
42
os/debian/po/fr.po
Normal file
42
os/debian/po/fr.po
Normal file
@@ -0,0 +1,42 @@
|
||||
# debian-l10n-french translation of 0.5.1-1.
|
||||
# Copyright (C) 2007 THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Ivan Buresi <err747@free.fr>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.5.1-1\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 11:41+0200\n"
|
||||
"Last-Translator: Ivan Buresi <err747@free.fr>\n"
|
||||
"Language-Team: debian-l10n-french <debian-l10n-french@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Fichiers de données indispensables"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Pour fonctionner correctement, OpenTTD a besoin des fichiers de données du "
|
||||
"jeu « Transport Tycoon Deluxe » original."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Veuillez lire le fichier /usr/share/doc/openttd/README.Debian pour plus "
|
||||
"d'informations sur les fichiers requis et leur emplacement."
|
41
os/debian/po/gl.po
Normal file
41
os/debian/po/gl.po
Normal file
@@ -0,0 +1,41 @@
|
||||
# Galician translation of openttd's debconf templates
|
||||
# This file is distributed under the same license as the openttd package.
|
||||
# Jacobo Tarrio <jtarrio@debian.org>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 13:12+0200\n"
|
||||
"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
|
||||
"Language-Team: Galician <proxecto@trasno.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Precísase de ficheiros de datos"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Para o seu funcionamento, OpenTTD precisa dos ficheiros de datos do xogo "
|
||||
"Transport Tycoon Deluxe orixinal."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Consulte o ficheiro /usr/share/doc/openttd/README.Debian para máis "
|
||||
"información sobre os ficheiros necesarios e as súas ubicacións."
|
43
os/debian/po/nl.po
Normal file
43
os/debian/po/nl.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-16 19:25+0100\n"
|
||||
"Last-Translator: Bart Cornelis <cobaco@skolelinux.no>\n"
|
||||
"Language-Team: debian-l10n-dutch <debian-l10n-dutch@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-Language: Dutch\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Databestanden zijn vereist"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Om te werken heeft OpenTTD de databestanden van het oorspronkelijkee "
|
||||
"'Transport Tycoon Deluxe'-spel nodig."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Meer informatie over de vereiste bestanden en hun locatie vindt u in /usr/"
|
||||
"share/doc/openttd/README.Debian . "
|
42
os/debian/po/pt.po
Normal file
42
os/debian/po/pt.po
Normal file
@@ -0,0 +1,42 @@
|
||||
# Portuguese translation of openttd's debconf messages.
|
||||
# Copyright (C) 2007
|
||||
# This file is distributed under the same license as the openttd package.
|
||||
# Ricardo Silva <ardoric@gmail.com>, 2007
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-09 09:37+0100\n"
|
||||
"Last-Translator: Ricardo Silva <ardoric@gmail.com>\n"
|
||||
"Language-Team: Portuguese <traduz@debianpt.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "São necessários ficheiros de dados"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Para esta operação o OpenTTD precisa dos ficheiros de dados do jogo original "
|
||||
"Transport Tycool Deluxe."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Veja o ficheiro /usr/share/doc/openttd/README.Debian para mais detalhes "
|
||||
"sobre os ficheiros que são necessários e a sua localização."
|
43
os/debian/po/pt_BR.po
Normal file
43
os/debian/po/pt_BR.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# openttd Brazilian Portuguese translation
|
||||
# Copyright (C) 2007, Eder L. Marques
|
||||
# This file is distributed under the same license as the openttd package.
|
||||
# Eder L. Marques <frolic@debian-ce.org>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd 0.5.0-2\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 11:00-0300\n"
|
||||
"Last-Translator: Eder L. Marques <frolic@debian-ce.org>\n"
|
||||
"Language-Team: l10n Portuguese <debian-l10n-portuguese@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"pt_BR utf-8\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Arquivos de dados necessários"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Para sua operação, o OpenTTD necessita dos arquivos de dados do jogo "
|
||||
"Transport Tycoon Deluxe original."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Veja o arquivo /usr/share/doc/openttd/README.Debian para maiores detalhes "
|
||||
"sobre os arquivos necessários e suas localizações."
|
45
os/debian/po/ru.po
Normal file
45
os/debian/po/ru.po
Normal file
@@ -0,0 +1,45 @@
|
||||
# translation of openttd_debconf_ru.po to Russian
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Yuri Kozlov <kozlov.y@gmail.com>, 2007.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.5.1-1\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-10 21:45+0400\n"
|
||||
"Last-Translator: Yuri Kozlov <kozlov.y@gmail.com>\n"
|
||||
"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
|
||||
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Необходимы файлы данных"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"Для работы OpenTTD требуются файлы данных от оригинальной игры Transport "
|
||||
"Tycoon Deluxe."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"В файле /usr/share/doc/openttd/README.Debian приведена информация о том, "
|
||||
"какие файлы нужны и где они лежат."
|
56
os/debian/po/sv.po
Normal file
56
os/debian/po/sv.po
Normal file
@@ -0,0 +1,56 @@
|
||||
# Swedish translation for openttd debconf template.
|
||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the openttd package.
|
||||
# Daniel Nylander <po@danielnylander.se>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 09:47+0100\n"
|
||||
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
|
||||
"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "Datafiler behövs"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"För att fungera behöva OpenTTD datafilerna från det ursprungliga spelet "
|
||||
"Transport Tycoon Deluxe."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"Se filen /usr/share/doc/openttd/README.Debian för mer information om de "
|
||||
"nödvändiga filera och var de finns någonstans."
|
||||
|
||||
#~ msgid "You need to install data files"
|
||||
#~ msgstr "Du behöver installera datafilerna"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "OpenTTD needs the data files from the original Transport Tycoon Deluxe "
|
||||
#~ "game to run. You should install these data files before you can play the "
|
||||
#~ "game. See README.Debian for more details on which files need to be copied "
|
||||
#~ "where."
|
||||
#~ msgstr ""
|
||||
#~ "OpenTTD behöver datafilerna från det ursprungliga spelet Transport Tycoon "
|
||||
#~ "Deluxe för att kunna köras. Du måste installera dessa datafiler innan du "
|
||||
#~ "kan spela spelet. Se README.Debian för fler detaljer om vilka filer som "
|
||||
#~ "behöver kopieras."
|
43
os/debian/po/ta.po
Normal file
43
os/debian/po/ta.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# translation of openttd.po to TAMIL
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Dr.T.Vasudevan <agnihot3@gmail.com>, 2007.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openttd\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: 2007-05-08 15:04+0530\n"
|
||||
"Last-Translator: Dr.T.Vasudevan <agnihot3@gmail.com>\n"
|
||||
"Language-Team: TAMIL <ubuntu-l10n-tam@lists.ubuntu.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr "தேவையான தரவு கோப்புகள்"
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
"இயங்குவதற்கு ஓபன் டிடிடி(OpenTTD) க்கு ட்ரான்ஸ்போர்ட் டைகூன் டீலக்ஸ் விளையாட்டிலிருந்து "
|
||||
"தரவு கோப்புகள் தேவை."
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
"தேவையான கோப்புகள் அவற்றின் இடம் ஆகியவற்றை அறிய /usr/share/doc/openttd/README "
|
||||
"டெபியன் கோப்பை பார்க்கவும்."
|
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
|
||||
"POT-Creation-Date: 2007-02-01 12:25+0100\n"
|
||||
"POT-Creation-Date: 2007-05-08 09:39+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -16,17 +16,24 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: note
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "You need to install data files"
|
||||
#: ../templates:2001
|
||||
msgid "Data files needed"
|
||||
msgstr ""
|
||||
|
||||
#. Type: note
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"OpenTTD needs the data files from the original TTD game to run. You should "
|
||||
"install these data files before you can play the game. See README.Debian for "
|
||||
"more details on which files need to be copied where."
|
||||
"For its operation, OpenTTD needs the data files from the original Transport "
|
||||
"Tycoon Deluxe game."
|
||||
msgstr ""
|
||||
|
||||
#. Type: error
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
msgid ""
|
||||
"See the /usr/share/doc/openttd/README.Debian file for more details about the "
|
||||
"needed files and their location."
|
||||
msgstr ""
|
||||
|
@@ -6,9 +6,7 @@
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
include /usr/share/dpatch/dpatch.make
|
||||
|
||||
configure: patch configure-stamp
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
@@ -29,13 +27,16 @@ build-stamp:
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean: unpatch
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
# We check for Makefile presence, because clean is called at the
|
||||
# start of the build process (before configure) where we don't
|
||||
# have a Makefile yet.
|
||||
[ ! -f Makefile ] || $(MAKE) distclean
|
||||
|
||||
dh_clean
|
||||
|
||||
@@ -84,4 +85,4 @@ binary-arch: build install
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure patch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||
|
@@ -1,6 +1,16 @@
|
||||
# These templates have been reviewed by the debian-l10n-english
|
||||
# team
|
||||
#
|
||||
# If modifications/additions/rewording are needed, please ask
|
||||
# for an advice to debian-l10n-english@lists.debian.org
|
||||
#
|
||||
# Even minor modifications require translation updates and such
|
||||
# changes should be coordinated with translators and reviewers.
|
||||
Template: openttd/datafiles
|
||||
Type: note
|
||||
_Description: You need to install data files
|
||||
OpenTTD needs the data files from the original TTD game to run. You should
|
||||
install these data files before you can play the game. See README.Debian
|
||||
for more details on which files need to be copied where.
|
||||
Type: error
|
||||
_Description: Data files needed
|
||||
For its operation, OpenTTD needs the data files from the original
|
||||
Transport Tycoon Deluxe game.
|
||||
.
|
||||
See the /usr/share/doc/openttd/README.Debian file for more details
|
||||
about the needed files and their location.
|
||||
|
@@ -1,9 +0,0 @@
|
||||
You require the data files of the original Transport Tycoon Deluxe
|
||||
for Windows to play the game. You have to manually copy the following
|
||||
files to %{_gamesdatadir}/openttd/data/
|
||||
sample.cat
|
||||
trg1r.grf
|
||||
trgcr.grf
|
||||
trghr.grf
|
||||
trgir.grf
|
||||
trgtr.grf
|
@@ -1,146 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# openttd.spec
|
||||
# This SPEC file controls the building of custom OpenTTD RPM
|
||||
# packages.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
%define name openttd
|
||||
%define version 0.5.0
|
||||
%define release 1mdk
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Prologue information
|
||||
#------------------------------------------------------------------------------
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Summary: An open source clone of the Microprose game "Transport Tycoon Deluxe"
|
||||
Group: Games/Strategy
|
||||
License: GPL
|
||||
|
||||
URL: http://www.openttd.org
|
||||
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Packager: Dominik Scherer <dominik@openttd.com>
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
BuildRequires: libSDL1.2-devel >= 1.2.7
|
||||
BuildRequires: libpng3-devel >= 1.2.5
|
||||
BuildRequires: zlib1-devel >= 1.2.1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Description
|
||||
#------------------------------------------------------------------------------
|
||||
%description
|
||||
An enhanced open source clone of the Microprose game "Transport Tycoon Deluxe".
|
||||
You require the data files of the original Transport Tycoon Deluxe
|
||||
for Windows to play the game. You have to MANUALLY copy them to the
|
||||
game data directory!
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# install scripts
|
||||
#------------------------------------------------------------------------------
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%setup
|
||||
|
||||
%build
|
||||
make BINARY_DIR=%{_gamesbindir} PREFIX=%{_gamesdatadir} DATA_DIR=openttd INSTALL_DIR=%{_gamesdatadir}/openttd/ USE_HOMEDIR=1 PERSONAL_DIR=.openttd INSTALL=1 RELEASE=%{version}
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_gamesbindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang
|
||||
mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data
|
||||
mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/scenario
|
||||
|
||||
cp ./openttd $RPM_BUILD_ROOT%{_gamesbindir}/
|
||||
cp -r ./lang/*.lng $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang/
|
||||
cp -r ./data/*.grf $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data/
|
||||
cp -r ./scenario/*.scn $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/scenario/
|
||||
cp -r ./data/opntitle.dat $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data/
|
||||
|
||||
# icon
|
||||
install -m644 media/openttd.32.png -D $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
|
||||
install -m644 media/openttd.64.png -D $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
|
||||
install -m644 media/openttd.128.png -D $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png
|
||||
|
||||
# menu entry
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_menudir}
|
||||
cat << EOF > $RPM_BUILD_ROOT/%{_menudir}/%{name}
|
||||
?package(%{name}):command="%{_gamesbindir}/openttd" icon="%{name}.png" \
|
||||
needs="X11" section="Amusement/Strategy" title="OpenTTD" \
|
||||
longtitle="%{Summary}"
|
||||
EOF
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%{update_menus}
|
||||
|
||||
%postun
|
||||
%{clean_menus}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Files listing.
|
||||
#------------------------------------------------------------------------------
|
||||
%files
|
||||
%defattr(-,root,root,0755)
|
||||
%{_gamesbindir}/openttd
|
||||
|
||||
%{_gamesdatadir}/openttd/lang/american.lng
|
||||
%{_gamesdatadir}/openttd/lang/catalan.lng
|
||||
%{_gamesdatadir}/openttd/lang/czech.lng
|
||||
%{_gamesdatadir}/openttd/lang/danish.lng
|
||||
%{_gamesdatadir}/openttd/lang/dutch.lng
|
||||
%{_gamesdatadir}/openttd/lang/english.lng
|
||||
%{_gamesdatadir}/openttd/lang/finnish.lng
|
||||
%{_gamesdatadir}/openttd/lang/french.lng
|
||||
%{_gamesdatadir}/openttd/lang/galician.lng
|
||||
%{_gamesdatadir}/openttd/lang/german.lng
|
||||
%{_gamesdatadir}/openttd/lang/hungarian.lng
|
||||
%{_gamesdatadir}/openttd/lang/icelandic.lng
|
||||
%{_gamesdatadir}/openttd/lang/italian.lng
|
||||
%{_gamesdatadir}/openttd/lang/norwegian.lng
|
||||
%{_gamesdatadir}/openttd/lang/origveh.lng
|
||||
%{_gamesdatadir}/openttd/lang/polish.lng
|
||||
%{_gamesdatadir}/openttd/lang/portuguese.lng
|
||||
%{_gamesdatadir}/openttd/lang/romanian.lng
|
||||
%{_gamesdatadir}/openttd/lang/slovak.lng
|
||||
%{_gamesdatadir}/openttd/lang/spanish.lng
|
||||
%{_gamesdatadir}/openttd/lang/swedish.lng
|
||||
|
||||
%{_gamesdatadir}/openttd/data/autorail.grf
|
||||
%{_gamesdatadir}/openttd/data/canalsw.grf
|
||||
%{_gamesdatadir}/openttd/data/openttd.grf
|
||||
%{_gamesdatadir}/openttd/data/opntitle.dat
|
||||
%{_gamesdatadir}/openttd/data/signalsw.grf
|
||||
%{_gamesdatadir}/openttd/data/trkfoundw.grf
|
||||
|
||||
"%{_gamesdatadir}/openttd/scenario/Linkgame Islands 2004.scn"
|
||||
"%{_gamesdatadir}/openttd/scenario/Mountain Pass.scn"
|
||||
"%{_gamesdatadir}/openttd/scenario/Volcano City.scn"
|
||||
|
||||
%{_menudir}/%{name}
|
||||
%{_iconsdir}/*.png
|
||||
%{_miconsdir}/*.png
|
||||
%{_liconsdir}/*.png
|
||||
|
||||
%doc changelog.txt readme.txt COPYING os/linux/README.urpmi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Change Log
|
||||
#------------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Sun Jan 23 2005 Dominik Scherer <dominik@openttd.com> 0.3.6-1mdk
|
||||
- Upgraded to 0.3.6
|
||||
- Structured and commented the spec file a bit (inspired by ScummVM)
|
||||
|
||||
* Fri Dec 24 2004 Dominik Scherer <dominik@openttd.com> 0.3.5-1mdk
|
||||
- Upgraded to 0.3.5
|
||||
- Added a warning message about the additional required files (only displayed when installing via urpmi)
|
||||
|
||||
* Wed Sep 15 2004 Dominik Scherer <> 0.3.4-1mdk
|
||||
- Upgraded to 0.3.4
|
||||
|
||||
* Wed Jul 31 2004 Dominik Scherer <> 0.3.3-1mdk
|
||||
- Initial release
|
75
os/rpm/openttd.spec
Normal file
75
os/rpm/openttd.spec
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# spec file for package openttd (trunk)
|
||||
#
|
||||
# Copyright (c) 2007 The OpenTTD team.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself
|
||||
#
|
||||
Name: openttd
|
||||
Version: svn
|
||||
Release: head
|
||||
Group: Applications/Games
|
||||
Source: %{name}-%{version}-%{release}.tar.gz
|
||||
License: GPL
|
||||
URL: http://www.openttd.org
|
||||
Packager: Denis Burlaka <burlaka@yandex.ru>
|
||||
Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe
|
||||
Requires: SDL zlib libpng freetype2 fontconfig
|
||||
BuildRequires: gcc SDL-devel zlib-devel libpng-devel fontconfig-devel
|
||||
%if %{_vendor}=="suse"
|
||||
BuildRequires: freetype2-devel
|
||||
%endif
|
||||
%if %{_vendor}=="fedora"
|
||||
BuildRequires: freetype-devel
|
||||
%endif
|
||||
%if %{_vendor}=="mandriva"
|
||||
BuildRequires: libfreetype6-devel
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Prefix: /usr
|
||||
|
||||
%description
|
||||
OpenTTD is a clone of the Microprose game "Transport Tycoon Deluxe", a popular game originally written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.
|
||||
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0. For more information, see the file 'COPYING' included with every release and source download of the game.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --prefix-dir=%{prefix} --binary-dir=bin --install-dir="$RPM_BUILD_ROOT"
|
||||
make
|
||||
|
||||
%install
|
||||
make ROOT="$RPM_BUILD_ROOT" install
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
|
||||
cat << EOF > $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
|
||||
[Desktop Entry]
|
||||
Categories=Games;
|
||||
Encoding=UTF-8
|
||||
Exec=/usr/bin/openttd
|
||||
Name=OpenTTD
|
||||
Icon=openttd.32
|
||||
Terminal=false
|
||||
Type=Application
|
||||
EOF
|
||||
|
||||
%clean
|
||||
rm -Rf "$RPM_BUILD_ROOT"
|
||||
|
||||
%files
|
||||
%dir %{_datadir}/games/%{name}
|
||||
%dir %{_datadir}/games/%{name}/lang
|
||||
%dir %{_datadir}/games/%{name}/data
|
||||
%dir %{_datadir}/games/%{name}/gm
|
||||
%dir %{_datadir}/games/%{name}/docs
|
||||
%dir %{_datadir}/pixmaps
|
||||
%defattr(644, root, games, 755)
|
||||
%attr(755, root, games) %{_bindir}/%{name}
|
||||
%{_datadir}/games/%{name}/lang/*
|
||||
%{_datadir}/games/%{name}/data/*
|
||||
%{_datadir}/games/%{name}/docs/*
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
|
Binary file not shown.
@@ -1,9 +1,10 @@
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "0.6.0" ; Define application version
|
||||
!define INSTALLERVERSION 43 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!define APPVERSION "0.6.3" ; Define application version
|
||||
!define INSTALLERVERSION 53 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!include ${VERSION_INCLUDE}
|
||||
|
||||
!define APPURLLINK "http://www.openttd.org"
|
||||
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}-beta5"
|
||||
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
|
||||
!define APPVERSIONINTERNAL "${APPVERSION}.0" ; Needs to be of the format X.X.X.X
|
||||
|
||||
!define MUI_ICON "..\..\..\media\openttd.ico"
|
||||
@@ -18,21 +19,20 @@ SetCompressor LZMA
|
||||
; Version Info
|
||||
Var AddWinPrePopulate
|
||||
VIProductVersion "${APPVERSIONINTERNAL}"
|
||||
VIAddVersionKey "ProductName" "OpenTTD Installer"
|
||||
VIAddVersionKey "ProductName" "OpenTTD Installer ${APPBITS} bits version ${EXTRA_VERSION}"
|
||||
VIAddVersionKey "Comments" "Installs ${APPNAMEANDVERSION}"
|
||||
VIAddVersionKey "CompanyName" "OpenTTD Developers"
|
||||
VIAddVersionKey "FileDescription" "Installs ${APPNAMEANDVERSION}"
|
||||
VIAddVersionKey "ProductVersion" "${APPVERSION}"
|
||||
VIAddVersionKey "InternalName" "InstOpenTTD"
|
||||
VIAddVersionKey "FileVersion" "${APPVERSION}"
|
||||
VIAddVersionKey "InternalName" "InstOpenTTD-${APPARCH}"
|
||||
VIAddVersionKey "FileVersion" "${APPVERSION}-${APPARCH}"
|
||||
VIAddVersionKey "LegalCopyright" " "
|
||||
; Main Install settings
|
||||
Name "${APPNAMEANDVERSION}"
|
||||
Name "${APPNAMEANDVERSION} ${APPBITS} bits version ${EXTRA_VERSION}"
|
||||
|
||||
; NOTE: Keep trailing backslash!
|
||||
InstallDir "$PROGRAMFILES\OpenTTD\"
|
||||
InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder"
|
||||
OutFile "openttd-${APPVERSION}-win32.exe"
|
||||
OutFile "openttd-${APPVERSION}-${APPARCH}.exe"
|
||||
CRCCheck force
|
||||
|
||||
ShowInstDetails show
|
||||
@@ -45,7 +45,7 @@ Var CDDRIVE
|
||||
!include "MUI.nsh"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
||||
@@ -75,6 +75,8 @@ Page custom SelectCDEnter SelectCDExit ": TTD folder"
|
||||
; New custom page to show UNICODE and MSLU information
|
||||
Page custom ShowWarningsPage
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run ${APPNAMEANDVERSION} now!"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\openttd.exe"
|
||||
!define MUI_FINISHPAGE_LINK "Visit the OpenTTD site for latest news, FAQs and downloads"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}"
|
||||
@@ -84,6 +86,7 @@ Page custom ShowWarningsPage
|
||||
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBack
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!define MUI_PAGE_HEADER_TEXT "Uninstall ${APPNAMEANDVERSION}"
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
@@ -103,7 +106,6 @@ Section "!OpenTTD" Section1
|
||||
; Copy language files
|
||||
SetOutPath "$INSTDIR\lang\"
|
||||
File ${PATH_ROOT}bin\lang\*.lng
|
||||
File ${PATH_ROOT}src\lang\english.txt
|
||||
|
||||
; Copy data files
|
||||
SetOutPath "$INSTDIR\data\"
|
||||
@@ -127,8 +129,7 @@ Section "!OpenTTD" Section1
|
||||
File ${PATH_ROOT}known-bugs.txt
|
||||
|
||||
; Copy executable
|
||||
File /oname=openttd.exe ${PATH_ROOT}objs\Win32\Release\openttd.exe
|
||||
File ${PATH_ROOT}objs\strgen\strgen.exe
|
||||
File /oname=openttd.exe ${BINARY_DIR}\openttd.exe
|
||||
|
||||
|
||||
; Delete old files from the main dir. they are now placed in data/ and lang/
|
||||
@@ -245,10 +246,10 @@ Section "Uninstall"
|
||||
Delete "$INSTDIR\readme.txt"
|
||||
Delete "$INSTDIR\known-bugs.txt"
|
||||
Delete "$INSTDIR\openttd.exe"
|
||||
Delete "$INSTDIR\strgen.exe"
|
||||
Delete "$INSTDIR\COPYING"
|
||||
Delete "$INSTDIR\INSTALL.LOG"
|
||||
Delete "$INSTDIR\crash.log"
|
||||
Delete "$INSTDIR\crash.dmp"
|
||||
Delete "$INSTDIR\openttd.cfg"
|
||||
Delete "$INSTDIR\hs.dat"
|
||||
Delete "$INSTDIR\cached_sprites.*"
|
||||
@@ -267,6 +268,8 @@ Section "Uninstall"
|
||||
Delete "$INSTDIR\data\openttd.grf"
|
||||
Delete "$INSTDIR\data\roadstops.grf"
|
||||
Delete "$INSTDIR\data\trkfoundw.grf"
|
||||
Delete "$INSTDIR\data\openttdd.grf"
|
||||
Delete "$INSTDIR\data\openttdw.grf"
|
||||
|
||||
Delete "$INSTDIR\data\sample.cat"
|
||||
; Windows Data files
|
||||
@@ -287,7 +290,6 @@ Section "Uninstall"
|
||||
|
||||
; Language files
|
||||
Delete "$INSTDIR\lang\*.lng"
|
||||
Delete "$INSTDIR\lang\english.txt"
|
||||
|
||||
; Remove remaining directories
|
||||
RMDir "$SMPROGRAMS\$SHORTCUTS\Extras\"
|
||||
@@ -388,14 +390,55 @@ Function GetWindowsVersion
|
||||
ClearErrors
|
||||
StrCpy $R0 "winnt"
|
||||
|
||||
ReadRegStr $R1 HKLM "SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion" CurrentVersion
|
||||
IfErrors 0 WinNT
|
||||
GetVersion::WindowsPlatformId
|
||||
Pop $R0
|
||||
IntCmp $R0 2 WinNT 0
|
||||
StrCpy $R0 "win9x"
|
||||
WinNT:
|
||||
ClearErrors
|
||||
Push $R0
|
||||
FunctionEnd
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; Check whether we're not running an installer for 64 bits on 32 bits and vice versa
|
||||
Function CheckProcessorArchitecture
|
||||
GetVersion::WindowsPlatformArchitecture
|
||||
Pop $R0
|
||||
IntCmp $R0 64 Win64 0
|
||||
ClearErrors
|
||||
IntCmp ${APPBITS} 64 0 Done
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "You want to install the 64 bits OpenTTD on a 32 bits Operating System. This is not going to work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
GoTo Done
|
||||
Win64:
|
||||
ClearErrors
|
||||
IntCmp ${APPBITS} 64 Done 0
|
||||
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "You want to install the 32 bits OpenTTD on a 64 bits Operating System. This is not adviced, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
GoTo Done
|
||||
Abort:
|
||||
Quit
|
||||
Done:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; Check whether we're not running an installer for NT on 9x and vice versa
|
||||
Function CheckWindowsVersion
|
||||
Call GetWindowsVersion
|
||||
Pop $R0
|
||||
StrCmp $R0 "win9x" 0 WinNT
|
||||
ClearErrors
|
||||
StrCmp ${APPARCH} "win9x" Done 0
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "You want to install the Windows 2000, XP and Vista version on Windows 95, 98 or ME. This is will not work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
GoTo Done
|
||||
WinNT:
|
||||
ClearErrors
|
||||
StrCmp ${APPARCH} "win9x" 0 Done
|
||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "You want to install the Windows 95, 98 and ME version on Windows 2000, XP or Vista. This is not adviced, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
Abort:
|
||||
Quit
|
||||
Done:
|
||||
FunctionEnd
|
||||
|
||||
Var OLDVERSION
|
||||
Var UninstallString
|
||||
|
||||
@@ -446,6 +489,8 @@ InstallerIsOlder:
|
||||
|
||||
FinishCallback:
|
||||
ClearErrors
|
||||
Call CheckProcessorArchitecture
|
||||
Call CheckWindowsVersion
|
||||
FunctionEnd
|
||||
; eof
|
||||
|
||||
|
5
os/win32/installer/version_win32.txt
Normal file
5
os/win32/installer/version_win32.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
!define APPBITS 32 ; Define number of bits for the architecture
|
||||
!define EXTRA_VERSION "for Windows 2000, XP and Vista"
|
||||
!define APPARCH "win32" ; Define the application architecture
|
||||
!define BINARY_DIR "${PATH_ROOT}objs\win32\Release"
|
||||
InstallDir "$PROGRAMFILES32\OpenTTD\"
|
5
os/win32/installer/version_win64.txt
Normal file
5
os/win32/installer/version_win64.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
!define APPBITS 64 ; Define number of bits for the architecture
|
||||
!define EXTRA_VERSION "for Windows XP and Vista"
|
||||
!define APPARCH "win64" ; Define the application architecture
|
||||
!define BINARY_DIR "${PATH_ROOT}objs\x64\Release"
|
||||
InstallDir "$PROGRAMFILES64\OpenTTD\"
|
5
os/win32/installer/version_win9x.txt
Normal file
5
os/win32/installer/version_win9x.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
!define APPBITS 32 ; Define number of bits for the architecture
|
||||
!define EXTRA_VERSION "for Windows 95, 98 and ME"
|
||||
!define APPARCH "win9x" ; Define the application architecture
|
||||
!define BINARY_DIR "${PATH_ROOT}bin"
|
||||
InstallDir "$PROGRAMFILES32\OpenTTD\"
|
@@ -9,34 +9,39 @@ Sub FindReplaceInFile(filename, to_find, replacement)
|
||||
data = file.ReadAll
|
||||
file.Close
|
||||
data = Replace(data, to_find, replacement)
|
||||
Set file = FSO.CreateTextFile(FileName, -1, 0)
|
||||
Set file = FSO.CreateTextFile(filename, -1, 0)
|
||||
file.Write data
|
||||
file.Close
|
||||
End Sub
|
||||
|
||||
Sub UpdateFile(revision, version, cur_date, filename)
|
||||
Sub UpdateFile(modified, revision, version, cur_date, filename)
|
||||
FSO.CopyFile filename & ".in", filename
|
||||
FindReplaceInFile filename, "@@MODIFIED@@", modified
|
||||
FindReplaceInFile filename, "@@REVISION@@", revision
|
||||
FindReplaceInFile filename, "@@VERSION@@", version
|
||||
FindReplaceInFile filename, "@@DATE@@", cur_date
|
||||
End Sub
|
||||
|
||||
Sub UpdateFiles(version)
|
||||
Dim WshShell, cur_date, revision, oExec
|
||||
Dim WshShell, cur_date, modified, revision, oExec
|
||||
Set WshShell = CreateObject("WScript.Shell")
|
||||
cur_date = DatePart("D", Date) & "." & DatePart("M", Date) & "." & DatePart("YYYY", Date)
|
||||
revision = 0
|
||||
modified = 1
|
||||
Select Case Mid(version, 1, 1)
|
||||
Case "r" ' svn
|
||||
revision = Mid(version, 2)
|
||||
If InStr(revision, "M") Then
|
||||
revision = Mid(revision, 1, InStr(revision, "M") - 1)
|
||||
modified = 2
|
||||
Else
|
||||
modified = 0
|
||||
End If
|
||||
If InStr(revision, "-") Then
|
||||
revision = Mid(revision, 1, InStr(revision, "-") - 1)
|
||||
End If
|
||||
Case "h" ' mercurial (hg)
|
||||
Set oExec = WshShell.Exec("hg log -k " & Chr(34) & "svn" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " ../src")
|
||||
Set oExec = WshShell.Exec("hg log -r " & Mid(version, 2, 8) & ":0 -k " & Chr(34) & "svn" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " ../src")
|
||||
If Err.Number = 0 Then
|
||||
revision = Mid(OExec.StdOut.ReadLine(), 7)
|
||||
revision = Mid(revision, 1, InStr(revision, ")") - 1)
|
||||
@@ -49,8 +54,8 @@ Sub UpdateFiles(version)
|
||||
End If
|
||||
End Select
|
||||
|
||||
UpdateFile revision, version, cur_date, "../src/rev.cpp"
|
||||
UpdateFile revision, version, cur_date, "../src/ottdres.rc"
|
||||
UpdateFile modified, revision, version, cur_date, "../src/rev.cpp"
|
||||
UpdateFile modified, revision, version, cur_date, "../src/ottdres.rc"
|
||||
End Sub
|
||||
|
||||
Function ReadRegistryKey(shive, subkey, valuename, architecture)
|
||||
@@ -136,6 +141,11 @@ Function DetermineSVNVersion()
|
||||
' Do we have subversion installed? Check immediatelly whether we've got a modified WC.
|
||||
Set oExec = WshShell.Exec("svnversion ../src")
|
||||
If Err.Number = 0 Then
|
||||
' Wait till the application is finished ...
|
||||
Do While oExec.Status = 0
|
||||
Loop
|
||||
End If
|
||||
If Err.Number = 0 And oExec.ExitCode = 0 Then
|
||||
Dim modified
|
||||
If InStr(OExec.StdOut.ReadLine(), "M") Then
|
||||
modified = "M"
|
||||
@@ -173,6 +183,11 @@ Function DetermineSVNVersion()
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("git rev-parse --verify --short=8 HEAD")
|
||||
If Err.Number = 0 Then
|
||||
' Wait till the application is finished ...
|
||||
Do While oExec.Status = 0
|
||||
Loop
|
||||
End If
|
||||
If Err.Number = 0 And oExec.ExitCode = 0 Then
|
||||
version = "g" & oExec.StdOut.ReadLine()
|
||||
Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../src")
|
||||
Do While oExec.Status = 0 And Err.Number = 0
|
||||
@@ -184,7 +199,7 @@ Function DetermineSVNVersion()
|
||||
Set oExec = WshShell.Exec("git symbolic-ref HEAD")
|
||||
If Err.Number = 0 Then
|
||||
line = oExec.StdOut.ReadLine()
|
||||
line = Mid(line, InStrRev(line, "/")+1)
|
||||
line = Mid(line, InStrRev(line, "/") + 1)
|
||||
If line <> "master" Then
|
||||
version = version & "-" & line
|
||||
End If
|
||||
@@ -192,14 +207,20 @@ Function DetermineSVNVersion()
|
||||
Else
|
||||
' try mercurial (hg)
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("hg tip")
|
||||
Set oExec = WshShell.Exec("hg parents")
|
||||
If Err.Number = 0 Then
|
||||
version = "h" & Mid(OExec.StdOut.ReadLine(), 19, 8)
|
||||
' Wait till the application is finished ...
|
||||
Do While oExec.Status = 0
|
||||
Loop
|
||||
End If
|
||||
If Err.Number = 0 And oExec.ExitCode = 0 Then
|
||||
line = OExec.StdOut.ReadLine()
|
||||
version = "h" & Mid(line, InStrRev(line, ":") + 1, 8)
|
||||
Set oExec = WshShell.Exec("hg status ../src")
|
||||
If Err.Number = 0 Then
|
||||
Do
|
||||
line = OExec.StdOut.ReadLine()
|
||||
If Mid(line, 1, 1) <> "?" Then
|
||||
If Len(line) > 0 And Mid(line, 1, 1) <> "?" Then
|
||||
version = version & "M"
|
||||
Exit Do
|
||||
End If
|
||||
@@ -239,7 +260,7 @@ Function IsCachedVersion(version)
|
||||
End Function
|
||||
|
||||
Dim version
|
||||
version = DetermineSVNVersion
|
||||
version = "0.6.3"
|
||||
If Not (IsCachedVersion(version) And FSO.FileExists("../src/rev.cpp") And FSO.FileExists("../src/ottdres.rc")) Then
|
||||
UpdateFiles version
|
||||
End If
|
||||
|
@@ -4,6 +4,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs80.vcp
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966} = {0F066B23-18DF-4284-8265-F4A5E7E3B966}
|
||||
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC} = {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs80.vcproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
|
||||
@@ -13,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs80.vcproj"
|
||||
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs80.vcproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -45,6 +48,14 @@ Global
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -33,8 +33,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -145,8 +143,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -243,8 +239,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -356,8 +350,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -2075,14 +2067,6 @@
|
||||
RelativePath=".\..\src\misc\array.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\misc\autocopyptr.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\misc\autoptr.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\misc\binaryheap.hpp"
|
||||
>
|
||||
|
@@ -33,8 +33,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -145,8 +143,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -243,8 +239,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -356,8 +350,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@@ -4,6 +4,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs90.vcp
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966} = {0F066B23-18DF-4284-8265-F4A5E7E3B966}
|
||||
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC} = {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs90.vcproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
|
||||
@@ -13,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs90.vcproj"
|
||||
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs90.vcproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -45,6 +48,14 @@ Global
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32
|
||||
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32
|
||||
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -34,8 +34,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -144,8 +142,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -241,8 +237,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -353,8 +347,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -2072,14 +2064,6 @@
|
||||
RelativePath=".\..\src\misc\array.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\misc\autocopyptr.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\misc\autoptr.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\misc\binaryheap.hpp"
|
||||
>
|
||||
|
@@ -34,8 +34,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -144,8 +142,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -241,8 +237,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@@ -353,8 +347,6 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
37
projects/openttd_vs90.vcproj.user
Normal file
37
projects/openttd_vs90.vcproj.user
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioUserFile
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
ShowAllFiles="false"
|
||||
>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
WorkingDirectory="..\bin"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
WorkingDirectory="..\bin"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<DebugSettings
|
||||
WorkingDirectory="..\bin"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<DebugSettings
|
||||
WorkingDirectory="..\bin"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
44
projects/version_vs80.vcproj
Normal file
44
projects/version_vs80.vcproj
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="version"
|
||||
ProjectGUID="{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
|
||||
RootNamespace="version"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\src\rev.cpp.in"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
45
projects/version_vs90.vcproj
Normal file
45
projects/version_vs90.vcproj
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="version"
|
||||
ProjectGUID="{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
|
||||
RootNamespace="version"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Determining version number"
|
||||
CommandLine=""$(InputDir)/determineversion.vbs""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\src\rev.cpp.in"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2008-03-04
|
||||
Release version: 0.6.0-beta5
|
||||
Last updated: 2008-10-01
|
||||
Release version: 0.6.3
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@@ -439,8 +439,6 @@ water_map.h
|
||||
|
||||
# Misc
|
||||
misc/array.hpp
|
||||
misc/autocopyptr.hpp
|
||||
misc/autoptr.hpp
|
||||
misc/binaryheap.hpp
|
||||
misc/blob.hpp
|
||||
misc/countedptr.hpp
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include "../player_base.h"
|
||||
#include "ai.h"
|
||||
#include "default/default.h"
|
||||
#include "trolly/trolly.h"
|
||||
#include "../signal_func.h"
|
||||
|
||||
AIStruct _ai;
|
||||
@@ -223,6 +224,13 @@ void AI_PlayerDied(PlayerID player)
|
||||
{
|
||||
/* Called if this AI died */
|
||||
_ai_player[player].active = false;
|
||||
|
||||
if (_players_ainew[player].pathfinder == NULL) return;
|
||||
|
||||
AyStarMain_Free(_players_ainew[player].pathfinder);
|
||||
delete _players_ainew[player].pathfinder;
|
||||
_players_ainew[player].pathfinder = NULL;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,9 +252,5 @@ void AI_Initialize()
|
||||
*/
|
||||
void AI_Uninitialize()
|
||||
{
|
||||
const Player* p;
|
||||
|
||||
FOR_ALL_PLAYERS(p) {
|
||||
if (p->is_active && p->is_ai) AI_PlayerDied(p->index);
|
||||
}
|
||||
for (PlayerID p = PLAYER_FIRST; p < MAX_PLAYERS; p++) AI_PlayerDied(p);
|
||||
}
|
||||
|
@@ -3377,7 +3377,8 @@ static void AiStateAirportStuff(Player *p)
|
||||
|
||||
AirportFTAClass::Flags flags = st->Airport()->flags;
|
||||
|
||||
if (!(flags & (_players_ai[p->index].build_kind == 1 && i == 0 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES))) {
|
||||
/* if airport doesn't accept our kind of plane, dismiss it */
|
||||
if (!(flags & (_players_ai[p->index].build_kind == 1 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3463,12 +3464,29 @@ static bool AiCheckAirportResources(TileIndex tile, const AiDefaultBlockData *p,
|
||||
static int AiFindBestDefaultAirportBlock(TileIndex tile, byte cargo, byte heli, CommandCost *cost)
|
||||
{
|
||||
const AiDefaultBlockData *p;
|
||||
uint i;
|
||||
|
||||
for (i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
|
||||
// If we are doing a helicopter service, avoid building
|
||||
// airports where they can't land.
|
||||
if (heli && !(GetAirport(p->attr)->flags & AirportFTAClass::HELICOPTERS)) continue;
|
||||
bool no_small = false;
|
||||
|
||||
if (!heli) {
|
||||
/* do not build small airport if we have large available and we are not building heli route */
|
||||
uint valid = GetValidAirports();
|
||||
for (uint i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
|
||||
uint flags = GetAirport(p->attr)->flags;
|
||||
if (HasBit(valid, p->attr) && (flags & AirportFTAClass::AIRPLANES) && !(flags & AirportFTAClass::SHORT_STRIP)) {
|
||||
no_small = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (uint i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
|
||||
uint flags = GetAirport(p->attr)->flags;
|
||||
/* If we are doing a helicopter service, avoid building airports where they can't land */
|
||||
if (heli && !(flags & AirportFTAClass::HELICOPTERS)) continue;
|
||||
/* Similiar with aircraft ... */
|
||||
if (!heli && !(flags & AirportFTAClass::AIRPLANES)) continue;
|
||||
/* Do not build small airport if we prefer large */
|
||||
if (no_small && (flags & AirportFTAClass::SHORT_STRIP)) continue;
|
||||
|
||||
*cost = AiDoBuildDefaultAirportBlock(tile, p, 0);
|
||||
if (CmdSucceeded(*cost) && AiCheckAirportResources(tile, p, cargo))
|
||||
@@ -3581,6 +3599,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
|
||||
|
||||
veh = AiChooseAircraftToBuild(p->player_money, forbidden);
|
||||
if (veh == INVALID_ENGINE) return;
|
||||
if (GetStationByTile(tile)->Airport()->nof_depots == 0) return;
|
||||
|
||||
/* XXX - Have the AI pick the hangar terminal in an airport. Eg get airport-type
|
||||
* and offset to the FIRST depot because the AI picks the st->xy tile */
|
||||
|
@@ -881,6 +881,7 @@ static int AiNew_HowManyVehicles(Player *p)
|
||||
length = _players_ainew[p->index].path_info.route_length;
|
||||
// Calculating tiles a day a vehicle moves is not easy.. this is how it must be done!
|
||||
tiles_a_day = RoadVehInfo(i)->max_speed * DAY_TICKS / 256 / 16;
|
||||
if (tiles_a_day == 0) tiles_a_day = 1;
|
||||
// We want a vehicle in a station once a month at least, so, calculate it!
|
||||
// (the * 2 is because we have 2 stations ;))
|
||||
amount = length * 2 * 2 / tiles_a_day / 30;
|
||||
@@ -897,6 +898,7 @@ static int AiNew_HowManyVehicles(Player *p)
|
||||
length = _players_ainew[p->index].path_info.route_length;
|
||||
// Calculating tiles a day a vehicle moves is not easy.. this is how it must be done!
|
||||
tiles_a_day = RoadVehInfo(i)->max_speed * DAY_TICKS / 256 / 16;
|
||||
if (tiles_a_day == 0) tiles_a_day = 1;
|
||||
if (_players_ainew[p->index].from_deliver) {
|
||||
max_cargo = GetIndustry(_players_ainew[p->index].from_ic)->last_month_production[0];
|
||||
} else {
|
||||
|
@@ -127,4 +127,6 @@ struct Aircraft : public Vehicle {
|
||||
void OnNewDay();
|
||||
};
|
||||
|
||||
Station *GetTargetAirportIfValid(const Vehicle *v);
|
||||
|
||||
#endif /* AIRCRAFT_H */
|
||||
|
@@ -190,15 +190,17 @@ void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal)
|
||||
{
|
||||
const AircraftVehicleInfo* avi = AircraftVehInfo(engine);
|
||||
int spritenum = avi->image_index;
|
||||
SpriteID sprite = (6 + _aircraft_sprite[spritenum]);
|
||||
SpriteID sprite = 0;
|
||||
|
||||
if (is_custom_sprite(spritenum)) {
|
||||
sprite = GetCustomVehicleIcon(engine, DIR_W);
|
||||
if (sprite == 0) {
|
||||
spritenum = _orig_aircraft_vehicle_info[engine - AIRCRAFT_ENGINES_INDEX].image_index;
|
||||
sprite = (6 + _aircraft_sprite[spritenum]);
|
||||
}
|
||||
}
|
||||
if (sprite == 0) {
|
||||
sprite = 6 + _aircraft_sprite[spritenum];
|
||||
}
|
||||
|
||||
DrawSprite(sprite, pal, x, y);
|
||||
|
||||
@@ -269,7 +271,7 @@ uint16 AircraftDefaultCargoCapacity(CargoID cid, const AircraftVehicleInfo *avi)
|
||||
* @param tile tile of depot where aircraft is built
|
||||
* @param flags for command
|
||||
* @param p1 aircraft type being built (engine)
|
||||
* @param p2 bit 0 when set, the unitnumber will be 0, otherwise it will be a free number
|
||||
* @param p2 unused
|
||||
* return result of operation. Could be cost, error
|
||||
*/
|
||||
CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
@@ -294,7 +296,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
|
||||
}
|
||||
|
||||
UnitID unit_num = HasBit(p2, 0) ? 0 : GetFreeUnitNumber(VEH_AIRCRAFT);
|
||||
UnitID unit_num = (flags & DC_AUTOREPLACE) ? 0 : GetFreeUnitNumber(VEH_AIRCRAFT);
|
||||
if (unit_num > _patches.max_aircraft)
|
||||
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
|
||||
|
||||
@@ -527,7 +529,7 @@ CommandCost CmdStartStopAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32
|
||||
/* Check if this aircraft can be started/stopped. The callback will fail or
|
||||
* return 0xFF if it can. */
|
||||
uint16 callback = GetVehicleCallback(CBID_VEHICLE_START_STOP_CHECK, 0, 0, v->engine_type, v);
|
||||
if (callback != CALLBACK_FAILED && callback != 0xFF) {
|
||||
if (callback != CALLBACK_FAILED && GB(callback, 0, 8) != 0xFF) {
|
||||
StringID error = GetGRFStringID(GetEngineGRFID(v->engine_type), 0xD000 + callback);
|
||||
return_cmd_error(error);
|
||||
}
|
||||
@@ -593,9 +595,9 @@ CommandCost CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uin
|
||||
} else {
|
||||
bool next_airport_has_hangar = true;
|
||||
StationID next_airport_index = v->u.air.targetairport;
|
||||
const Station *st = GetStation(next_airport_index);
|
||||
const Station *st = GetTargetAirportIfValid(v);
|
||||
/* If the station is not a valid airport or if it has no hangars */
|
||||
if (!st->IsValid() || st->airport_tile == 0 || st->Airport()->nof_depots == 0) {
|
||||
if (st == NULL || st->Airport()->nof_depots == 0) {
|
||||
/* the aircraft has to search for a hangar on its own */
|
||||
StationID station = FindNearestHangar(v);
|
||||
|
||||
@@ -704,7 +706,7 @@ CommandCost CmdRefitAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
|
||||
static void CheckIfAircraftNeedsService(Vehicle *v)
|
||||
{
|
||||
if (_patches.servint_aircraft == 0 || !VehicleNeedsService(v)) return;
|
||||
if (_patches.servint_aircraft == 0 || !v->NeedsAutomaticServicing()) return;
|
||||
if (v->IsInDepot()) {
|
||||
VehicleServiceInDepot(v);
|
||||
return;
|
||||
@@ -1021,9 +1023,16 @@ static byte AircraftGetEntryPoint(const Vehicle *v, const AirportFTAClass *apc)
|
||||
assert(v != NULL);
|
||||
assert(apc != NULL);
|
||||
|
||||
const Station *st = GetStation(v->u.air.targetairport);
|
||||
/* Make sure we don't go to 0,0 if the airport has been removed. */
|
||||
TileIndex tile = (st->airport_tile != 0) ? st->airport_tile : st->xy;
|
||||
/* In the case the station doesn't exit anymore, set target tile 0.
|
||||
* It doesn't hurt much, aircraft will go to next order, nearest hangar
|
||||
* or it will simply crash in next tick */
|
||||
TileIndex tile = 0;
|
||||
|
||||
if (IsValidStationID(v->u.air.targetairport)) {
|
||||
const Station *st = GetStation(v->u.air.targetairport);
|
||||
/* Make sure we don't go to 0,0 if the airport has been removed. */
|
||||
tile = (st->airport_tile != 0) ? st->airport_tile : st->xy;
|
||||
}
|
||||
|
||||
int delta_x = v->x_pos - TileX(tile) * TILE_SIZE;
|
||||
int delta_y = v->y_pos - TileY(tile) * TILE_SIZE;
|
||||
@@ -1049,15 +1058,20 @@ static byte AircraftGetEntryPoint(const Vehicle *v, const AirportFTAClass *apc)
|
||||
static bool AircraftController(Vehicle *v)
|
||||
{
|
||||
int count;
|
||||
const Station *st = GetStation(v->u.air.targetairport);
|
||||
const AirportFTAClass *afc = st->Airport();
|
||||
const AirportMovingData *amd;
|
||||
|
||||
/* NULL if station is invalid */
|
||||
const Station *st = IsValidStationID(v->u.air.targetairport) ? GetStation(v->u.air.targetairport) : NULL;
|
||||
/* 0 if there is no station */
|
||||
TileIndex tile = 0;
|
||||
if (st != NULL) {
|
||||
tile = st->airport_tile;
|
||||
if (tile == 0) tile = st->xy;
|
||||
}
|
||||
/* DUMMY if there is no station or no airport */
|
||||
const AirportFTAClass *afc = tile == 0 ? GetAirport(AT_DUMMY) : st->Airport();
|
||||
|
||||
/* prevent going to 0,0 if airport is deleted. */
|
||||
TileIndex tile = st->airport_tile;
|
||||
if (tile == 0) {
|
||||
tile = st->xy;
|
||||
|
||||
if (st == NULL || st->airport_tile == 0) {
|
||||
/* Jump into our "holding pattern" state machine if possible */
|
||||
if (v->u.air.pos >= afc->nofelements) {
|
||||
v->u.air.pos = v->u.air.previous_pos = AircraftGetEntryPoint(v, afc);
|
||||
@@ -1073,7 +1087,7 @@ static bool AircraftController(Vehicle *v)
|
||||
}
|
||||
|
||||
/* get airport moving data */
|
||||
amd = afc->MovingData(v->u.air.pos);
|
||||
const AirportMovingData *amd = afc->MovingData(v->u.air.pos);
|
||||
|
||||
int x = TileX(tile) * TILE_SIZE;
|
||||
int y = TileY(tile) * TILE_SIZE;
|
||||
@@ -1105,7 +1119,7 @@ static bool AircraftController(Vehicle *v)
|
||||
|
||||
/* Helicopter landing. */
|
||||
if (amd->flag & AMED_HELI_LOWER) {
|
||||
if (st->airport_tile == 0) {
|
||||
if (st == NULL) {
|
||||
/* FIXME - AircraftController -> if station no longer exists, do not land
|
||||
* helicopter will circle until sign disappears, then go to next order
|
||||
* what to do when it is the only order left, right now it just stays in 1 place */
|
||||
@@ -1116,7 +1130,7 @@ static bool AircraftController(Vehicle *v)
|
||||
}
|
||||
|
||||
/* Vehicle is now at the airport. */
|
||||
v->tile = st->airport_tile;
|
||||
v->tile = tile;
|
||||
|
||||
/* Find altitude of landing position. */
|
||||
int z = GetSlopeZ(x, y) + 1 + afc->delta_z;
|
||||
@@ -1270,10 +1284,10 @@ static void HandleCrashedAircraft(Vehicle *v)
|
||||
{
|
||||
v->u.air.crashed_counter++;
|
||||
|
||||
Station *st = GetStation(v->u.air.targetairport);
|
||||
Station *st = GetTargetAirportIfValid(v);
|
||||
|
||||
/* make aircraft crash down to the ground */
|
||||
if (v->u.air.crashed_counter < 500 && st->airport_tile==0 && ((v->u.air.crashed_counter % 3) == 0) ) {
|
||||
if (v->u.air.crashed_counter < 500 && st == NULL && ((v->u.air.crashed_counter % 3) == 0) ) {
|
||||
uint z = GetSlopeZ(v->x_pos, v->y_pos);
|
||||
v->z_pos -= 1;
|
||||
if (v->z_pos == z) {
|
||||
@@ -1304,9 +1318,11 @@ static void HandleCrashedAircraft(Vehicle *v)
|
||||
/* clear runway-in on all airports, set by crashing plane
|
||||
* small airports use AIRPORT_BUSY, city airports use RUNWAY_IN_OUT_block, etc.
|
||||
* but they all share the same number */
|
||||
CLRBITS(st->airport_flags, RUNWAY_IN_block);
|
||||
CLRBITS(st->airport_flags, RUNWAY_IN_OUT_block); // commuter airport
|
||||
CLRBITS(st->airport_flags, RUNWAY_IN2_block); // intercontinental
|
||||
if (st != NULL) {
|
||||
CLRBITS(st->airport_flags, RUNWAY_IN_block);
|
||||
CLRBITS(st->airport_flags, RUNWAY_IN_OUT_block); // commuter airport
|
||||
CLRBITS(st->airport_flags, RUNWAY_IN2_block); // intercontinental
|
||||
}
|
||||
|
||||
MarkSingleVehicleDirty(v);
|
||||
|
||||
@@ -1368,7 +1384,7 @@ static void ProcessAircraftOrder(Vehicle *v)
|
||||
case OT_GOTO_DEPOT:
|
||||
if (!(v->current_order.flags & OFB_PART_OF_ORDERS)) return;
|
||||
if (v->current_order.flags & OFB_SERVICE_IF_NEEDED &&
|
||||
!VehicleNeedsService(v)) {
|
||||
!v->NeedsServicing()) {
|
||||
UpdateVehicleTimetable(v, true);
|
||||
v->cur_order_index++;
|
||||
}
|
||||
@@ -1399,8 +1415,8 @@ static void ProcessAircraftOrder(Vehicle *v)
|
||||
* go to a depot, we have to keep that order so the aircraft
|
||||
* actually stops.
|
||||
*/
|
||||
const Station *st = GetStation(v->u.air.targetairport);
|
||||
if (!st->IsValid() || st->airport_tile == 0) {
|
||||
const Station *st = GetTargetAirportIfValid(v);
|
||||
if (st == NULL) {
|
||||
CommandCost ret;
|
||||
PlayerID old_player = _current_player;
|
||||
|
||||
@@ -1454,16 +1470,15 @@ static void CrashAirplane(Vehicle *v)
|
||||
|
||||
v->cargo.Truncate(0);
|
||||
v->Next()->cargo.Truncate(0);
|
||||
const Station *st = GetStation(v->u.air.targetairport);
|
||||
const Station *st = GetTargetAirportIfValid(v);
|
||||
StringID newsitem;
|
||||
if (st->airport_tile == 0) {
|
||||
if (st == NULL) {
|
||||
newsitem = STR_PLANE_CRASH_OUT_OF_FUEL;
|
||||
} else {
|
||||
SetDParam(1, st->index);
|
||||
newsitem = STR_A034_PLANE_CRASH_DIE_IN_FIREBALL;
|
||||
}
|
||||
|
||||
SetDParam(1, st->index);
|
||||
AddNewsItem(newsitem,
|
||||
NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_VEHICLE, NT_ACCIDENT, 0),
|
||||
v->index,
|
||||
@@ -1539,7 +1554,8 @@ static void AircraftNextAirportPos_and_Order(Vehicle *v)
|
||||
v->current_order.type == OT_GOTO_DEPOT)
|
||||
v->u.air.targetairport = v->current_order.dest;
|
||||
|
||||
const AirportFTAClass *apc = GetStation(v->u.air.targetairport)->Airport();
|
||||
const Station *st = GetTargetAirportIfValid(v);
|
||||
const AirportFTAClass *apc = st == NULL ? GetAirport(AT_DUMMY) : st->Airport();
|
||||
v->u.air.pos = v->u.air.previous_pos = AircraftGetEntryPoint(v, apc);
|
||||
}
|
||||
|
||||
@@ -1690,21 +1706,23 @@ static void AircraftEventHandler_AtTerminal(Vehicle *v, const AirportFTAClass *a
|
||||
/* airport-road is free. We either have to go to another airport, or to the hangar
|
||||
* ---> start moving */
|
||||
|
||||
bool go_to_hangar = false;
|
||||
switch (v->current_order.type) {
|
||||
case OT_GOTO_STATION: // ready to fly to another airport
|
||||
/* airplane goto state takeoff, helicopter to helitakeoff */
|
||||
v->u.air.state = (v->subtype == AIR_HELICOPTER) ? HELITAKEOFF : TAKEOFF;
|
||||
break;
|
||||
case OT_GOTO_DEPOT: // visit hangar for serivicing, sale, etc.
|
||||
if (v->current_order.dest == v->u.air.targetairport) {
|
||||
v->u.air.state = HANGAR;
|
||||
} else {
|
||||
v->u.air.state = (v->subtype == AIR_HELICOPTER) ? HELITAKEOFF : TAKEOFF;
|
||||
}
|
||||
go_to_hangar = v->current_order.dest == v->u.air.targetairport;
|
||||
break;
|
||||
default: // orders have been deleted (no orders), goto depot and don't bother us
|
||||
v->current_order.Free();
|
||||
v->u.air.state = HANGAR;
|
||||
go_to_hangar = GetStation(v->u.air.targetairport)->Airport()->nof_depots != 0;
|
||||
}
|
||||
|
||||
if (go_to_hangar) {
|
||||
v->u.air.state = HANGAR;
|
||||
} else {
|
||||
/* airplane goto state takeoff, helicopter to helitakeoff */
|
||||
v->u.air.state = (v->subtype == AIR_HELICOPTER) ? HELITAKEOFF : TAKEOFF;
|
||||
}
|
||||
AirportMove(v, apc);
|
||||
}
|
||||
@@ -2135,7 +2153,6 @@ static bool AirportFindFreeHelipad(Vehicle *v, const AirportFTAClass *apc)
|
||||
static void AircraftEventHandler(Vehicle *v, int loop)
|
||||
{
|
||||
v->tick_counter++;
|
||||
v->current_order_time++;
|
||||
|
||||
if (v->vehstatus & VS_CRASHED) {
|
||||
HandleCrashedAircraft(v);
|
||||
@@ -2149,7 +2166,7 @@ static void AircraftEventHandler(Vehicle *v, int loop)
|
||||
if (v->breakdown_ctr <= 2) {
|
||||
HandleBrokenAircraft(v);
|
||||
} else {
|
||||
v->breakdown_ctr--;
|
||||
if (v->current_order.type != OT_LOADING) v->breakdown_ctr--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2172,6 +2189,8 @@ void Aircraft::Tick()
|
||||
|
||||
AgeAircraftCargo(this);
|
||||
|
||||
this->current_order_time++;
|
||||
|
||||
for (uint i = 0; i != 2; i++) {
|
||||
AircraftEventHandler(this, i);
|
||||
if (this->type != VEH_AIRCRAFT) // In case it was deleted
|
||||
@@ -2180,6 +2199,24 @@ void Aircraft::Tick()
|
||||
}
|
||||
|
||||
|
||||
/** Returns aircraft's target station if v->u.air.target_airport
|
||||
* is a valid station with airport.
|
||||
* @param v vehicle to get target airport for
|
||||
* @return pointer to target station, NULL if invalid
|
||||
*/
|
||||
Station *GetTargetAirportIfValid(const Vehicle *v)
|
||||
{
|
||||
assert(v->type == VEH_AIRCRAFT);
|
||||
|
||||
StationID sid = v->u.air.targetairport;
|
||||
|
||||
if (!IsValidStationID(sid)) return NULL;
|
||||
|
||||
Station *st = GetStation(sid);
|
||||
|
||||
return st->airport_tile == 0 ? NULL : st;
|
||||
}
|
||||
|
||||
/** need to be called to load aircraft from old version */
|
||||
void UpdateOldAircraft()
|
||||
{
|
||||
|
@@ -28,6 +28,7 @@
|
||||
void DrawAircraftDetails(const Vehicle *v, int x, int y)
|
||||
{
|
||||
int y_offset = (v->Next()->cargo_cap != 0) ? -11 : 0;
|
||||
Money feeder_share = 0;
|
||||
|
||||
for (const Vehicle *u = v ; u != NULL ; u = u->Next()) {
|
||||
if (IsNormalAircraft(u)) {
|
||||
@@ -53,11 +54,12 @@ void DrawAircraftDetails(const Vehicle *v, int x, int y)
|
||||
SetDParam(1, cargo_count);
|
||||
SetDParam(2, u->cargo.Source());
|
||||
DrawString(x, y + 21 + y_offset, STR_8813_FROM, TC_FROMSTRING);
|
||||
feeder_share += u->cargo.FeederShare();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetDParam(0, v->cargo.FeederShare());
|
||||
SetDParam(0, feeder_share);
|
||||
DrawString(x, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window)
|
||||
uint i;
|
||||
for (i = 1; i < MAX_UVALUE(EngineID); i++) {
|
||||
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, engine_type, v);
|
||||
if (callback == CALLBACK_FAILED || callback == 0xFF) break;
|
||||
if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) break;
|
||||
}
|
||||
|
||||
delete v;
|
||||
@@ -42,18 +42,18 @@ uint16 *GetCapacityOfArticulatedParts(EngineID engine, VehicleType type)
|
||||
|
||||
if (type == VEH_TRAIN) {
|
||||
const RailVehicleInfo *rvi = RailVehInfo(engine);
|
||||
capacity[rvi->cargo_type] = rvi->capacity;
|
||||
capacity[rvi->cargo_type] = GetEngineProperty(engine, 0x14, rvi->capacity);
|
||||
if (rvi->railveh_type == RAILVEH_MULTIHEAD) capacity[rvi->cargo_type] += rvi->capacity;
|
||||
} else if (type == VEH_ROAD) {
|
||||
const RoadVehicleInfo *rvi = RoadVehInfo(engine);
|
||||
capacity[rvi->cargo_type] = rvi->capacity;
|
||||
capacity[rvi->cargo_type] = GetEngineProperty(engine, 0x0F, rvi->capacity);
|
||||
}
|
||||
|
||||
if (!HasBit(EngInfo(engine)->callbackmask, CBM_VEHICLE_ARTIC_ENGINE)) return capacity;
|
||||
|
||||
for (uint i = 1; i < MAX_UVALUE(EngineID); i++) {
|
||||
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, engine, NULL);
|
||||
if (callback == CALLBACK_FAILED || callback == 0xFF) break;
|
||||
if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) break;
|
||||
|
||||
EngineID artic_engine = GetFirstEngineOfType(type) + GB(callback, 0, 7);
|
||||
|
||||
@@ -79,7 +79,7 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type)
|
||||
|
||||
for (uint i = 1; i < MAX_UVALUE(EngineID); i++) {
|
||||
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, v->engine_type, v);
|
||||
if (callback == CALLBACK_FAILED || callback == 0xFF) return;
|
||||
if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) return;
|
||||
|
||||
/* Attempt to use pre-allocated vehicles until they run out. This can happen
|
||||
* if the callback returns different values depending on the cargo type. */
|
||||
|
@@ -58,7 +58,7 @@ static void MoveVehicleCargo(Vehicle *dest, Vehicle *source)
|
||||
* the complete train, which is without the weight of cargo we just
|
||||
* moved back into some (of the) new wagon(s).
|
||||
*/
|
||||
if (dest->type == VEH_TRAIN) TrainConsistChanged(dest->First());
|
||||
if (dest->type == VEH_TRAIN) TrainConsistChanged(dest->First(), true);
|
||||
}
|
||||
|
||||
static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, const EngineID engine_type)
|
||||
@@ -127,7 +127,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type)
|
||||
* @param flags is the flags to use when calling DoCommand(). Mainly DC_EXEC counts
|
||||
* @return value is cost of the replacement or CMD_ERROR
|
||||
*/
|
||||
static CommandCost ReplaceVehicle(Vehicle **w, byte flags, Money total_cost)
|
||||
static CommandCost ReplaceVehicle(Vehicle **w, uint32 flags, Money total_cost)
|
||||
{
|
||||
CommandCost cost;
|
||||
CommandCost sell_value;
|
||||
@@ -157,7 +157,7 @@ static CommandCost ReplaceVehicle(Vehicle **w, byte flags, Money total_cost)
|
||||
* We take it back if building fails or when we really sell the old engine */
|
||||
SubtractMoneyFromPlayer(sell_value);
|
||||
|
||||
cost = DoCommand(old_v->tile, new_engine_type, 3, flags, GetCmdBuildVeh(old_v));
|
||||
cost = DoCommand(old_v->tile, new_engine_type, 0, flags | DC_AUTOREPLACE, GetCmdBuildVeh(old_v));
|
||||
if (CmdFailed(cost)) {
|
||||
/* Take back the money we just gave the player */
|
||||
sell_value.MultiplyCost(-1);
|
||||
@@ -246,7 +246,7 @@ static CommandCost ReplaceVehicle(Vehicle **w, byte flags, Money total_cost)
|
||||
if (next_veh != NULL) {
|
||||
/* Verify that the wagons can be placed on the engine in question.
|
||||
* This is done by building an engine, test if the wagons can be added and then sell the test engine. */
|
||||
DoCommand(old_v->tile, new_engine_type, 3, DC_EXEC, GetCmdBuildVeh(old_v));
|
||||
DoCommand(old_v->tile, new_engine_type, 0, DC_EXEC | DC_AUTOREPLACE, GetCmdBuildVeh(old_v));
|
||||
Vehicle *temp = GetVehicle(_new_vehicle_id);
|
||||
tmp_move = DoCommand(0, (temp->index << 16) | next_veh->index, 1, 0, CMD_MOVE_RAIL_VEHICLE);
|
||||
DoCommand(0, temp->index, 0, DC_EXEC, GetCmdSellVeh(old_v));
|
||||
|
@@ -9,6 +9,10 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#if defined(WITH_COCOA)
|
||||
bool QZ_CanDisplay8bpp();
|
||||
#endif /* defined(WITH_COCOA) */
|
||||
|
||||
/**
|
||||
* The base factory, keeping track of all blitters.
|
||||
*/
|
||||
@@ -65,6 +69,15 @@ public:
|
||||
{
|
||||
const char *default_blitter = "8bpp-optimized";
|
||||
|
||||
#if defined(WITH_COCOA)
|
||||
/* Some people reported lack of fullscreen support in 8 bpp mode.
|
||||
* While we prefer 8 bpp since it's faster, we will still have to test for support. */
|
||||
if (!QZ_CanDisplay8bpp()) {
|
||||
/* The main display can't go to 8 bpp fullscreen mode.
|
||||
* We will have to switch to 32 bpp by default. */
|
||||
default_blitter = "32bpp-anim";
|
||||
}
|
||||
#endif /* defined(WITH_COCOA) */
|
||||
if (GetBlitters().size() == 0) return NULL;
|
||||
const char *bname = (StrEmpty(name)) ? default_blitter : name;
|
||||
|
||||
|
@@ -44,7 +44,7 @@ static inline const BridgeSpec *GetBridgeSpec(BridgeType i)
|
||||
|
||||
void DrawBridgeMiddle(const TileInfo *ti);
|
||||
|
||||
bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len);
|
||||
bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len, uint32 flags = 0);
|
||||
int CalcBridgeLenCostFactor(int x);
|
||||
|
||||
void ResetBridges();
|
||||
|
@@ -218,8 +218,8 @@ static int CDECL TrainEnginePowerSorter(const void *a, const void *b)
|
||||
const RailVehicleInfo *rvi_a = RailVehInfo(*(const EngineID*)a);
|
||||
const RailVehicleInfo *rvi_b = RailVehInfo(*(const EngineID*)b);
|
||||
|
||||
int va = rvi_a->power << (rvi_a->railveh_type == RAILVEH_MULTIHEAD ? 1 : 0);
|
||||
int vb = rvi_b->power << (rvi_b->railveh_type == RAILVEH_MULTIHEAD ? 1 : 0);
|
||||
int va = rvi_a->power;
|
||||
int vb = rvi_b->power;
|
||||
int r = va - vb;
|
||||
|
||||
return _internal_sort_order ? -r : r;
|
||||
@@ -230,8 +230,8 @@ static int CDECL TrainEngineRunningCostSorter(const void *a, const void *b)
|
||||
const RailVehicleInfo *rvi_a = RailVehInfo(*(const EngineID*)a);
|
||||
const RailVehicleInfo *rvi_b = RailVehInfo(*(const EngineID*)b);
|
||||
|
||||
Money va = rvi_a->running_cost * GetPriceByIndex(rvi_a->running_cost_class) * (rvi_a->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
|
||||
Money vb = rvi_b->running_cost * GetPriceByIndex(rvi_b->running_cost_class) * (rvi_b->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
|
||||
Money va = rvi_a->running_cost * GetPriceByIndex(rvi_a->running_cost_class);
|
||||
Money vb = rvi_b->running_cost * GetPriceByIndex(rvi_b->running_cost_class);
|
||||
int r = ClampToI32(va - vb);
|
||||
|
||||
return _internal_sort_order ? -r : r;
|
||||
@@ -266,8 +266,11 @@ static int CDECL TrainEngineNumberSorter(const void *a, const void *b)
|
||||
|
||||
static int CDECL TrainEngineCapacitySorter(const void *a, const void *b)
|
||||
{
|
||||
int va = RailVehInfo(*(const EngineID*)a)->capacity;
|
||||
int vb = RailVehInfo(*(const EngineID*)b)->capacity;
|
||||
const RailVehicleInfo *rvi_a = RailVehInfo(*(const EngineID*)a);
|
||||
const RailVehicleInfo *rvi_b = RailVehInfo(*(const EngineID*)b);
|
||||
|
||||
int va = rvi_a->capacity * (rvi_a->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
|
||||
int vb = rvi_b->capacity * (rvi_b->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
|
||||
int r = va - vb;
|
||||
|
||||
if (r == 0) {
|
||||
@@ -602,7 +605,7 @@ static int DrawRailEnginePurchaseInfo(int x, int y, EngineID engine_number, cons
|
||||
|
||||
/* Max speed - Engine power */
|
||||
SetDParam(0, GetEngineProperty(engine_number, 0x09, rvi->max_speed) * 10 / 16);
|
||||
SetDParam(1, GetEngineProperty(engine_number, 0x0B, rvi->power) << multihead);
|
||||
SetDParam(1, GetEngineProperty(engine_number, 0x0B, rvi->power));
|
||||
DrawString(x, y, STR_PURCHASE_INFO_SPEED_POWER, TC_FROMSTRING);
|
||||
y += 10;
|
||||
|
||||
@@ -615,7 +618,7 @@ static int DrawRailEnginePurchaseInfo(int x, int y, EngineID engine_number, cons
|
||||
|
||||
/* Running cost */
|
||||
if (rvi->running_cost_class != 0xFF) {
|
||||
SetDParam(0, (GetEngineProperty(engine_number, 0x0D, rvi->running_cost) * GetPriceByIndex(rvi->running_cost_class) >> 8) << multihead);
|
||||
SetDParam(0, GetEngineProperty(engine_number, 0x0D, rvi->running_cost) * GetPriceByIndex(rvi->running_cost_class) >> 8);
|
||||
DrawString(x, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
|
||||
y += 10;
|
||||
}
|
||||
|
@@ -217,19 +217,21 @@ bool CargoList::MoveTo(CargoList *dest, uint count, CargoList::MoveToAction mta,
|
||||
/* Can move only part of the packet, so split it into two pieces */
|
||||
if (mta != MTA_FINAL_DELIVERY) {
|
||||
CargoPacket *cp_new = new CargoPacket();
|
||||
|
||||
Money fs = cp->feeder_share * count / static_cast<uint>(cp->count);
|
||||
cp->feeder_share -= fs;
|
||||
|
||||
cp_new->source = cp->source;
|
||||
cp_new->source_xy = cp->source_xy;
|
||||
cp_new->loaded_at_xy = (mta == MTA_CARGO_LOAD) ? data : cp->loaded_at_xy;
|
||||
|
||||
cp_new->days_in_transit = cp->days_in_transit;
|
||||
cp_new->feeder_share = cp->feeder_share / count;
|
||||
cp_new->feeder_share = fs;
|
||||
/* When cargo is moved into another vehicle you have *always* paid for it */
|
||||
cp_new->paid_for = (mta == MTA_CARGO_LOAD) ? false : cp->paid_for;
|
||||
|
||||
cp_new->count = count;
|
||||
dest->packets.push_back(cp_new);
|
||||
|
||||
cp->feeder_share /= cp->count - count;
|
||||
}
|
||||
cp->count -= count;
|
||||
|
||||
|
@@ -264,14 +264,15 @@ enum {
|
||||
* This enums defines some flags which can be used for the commands.
|
||||
*/
|
||||
enum {
|
||||
DC_EXEC = 0x01, ///< execute the given command
|
||||
DC_AUTO = 0x02, ///< don't allow building on structures
|
||||
DC_QUERY_COST = 0x04, ///< query cost only, don't build.
|
||||
DC_NO_WATER = 0x08, ///< don't allow building on water
|
||||
DC_NO_RAIL_OVERLAP = 0x10, ///< don't allow overlap of rails (used in buildrail)
|
||||
DC_AI_BUILDING = 0x20, ///< special building rules for AI
|
||||
DC_NO_TOWN_RATING = 0x40, ///< town rating does not disallow you from building
|
||||
DC_BANKRUPT = 0x80, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases
|
||||
DC_EXEC = 0x001, ///< execute the given command
|
||||
DC_AUTO = 0x002, ///< don't allow building on structures
|
||||
DC_QUERY_COST = 0x004, ///< query cost only, don't build.
|
||||
DC_NO_WATER = 0x008, ///< don't allow building on water
|
||||
DC_NO_RAIL_OVERLAP = 0x010, ///< don't allow overlap of rails (used in buildrail)
|
||||
DC_AI_BUILDING = 0x020, ///< special building rules for AI
|
||||
DC_NO_TOWN_RATING = 0x040, ///< town rating does not disallow you from building
|
||||
DC_BANKRUPT = 0x080, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases
|
||||
DC_AUTOREPLACE = 0x100, ///< autoreplace/autorenew is in progress
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -697,7 +697,7 @@ IConsoleAlias *IConsoleAliasGet(const char *name)
|
||||
static inline int IConsoleCopyInParams(char *dst, const char *src, uint bufpos)
|
||||
{
|
||||
int len = min(ICON_MAX_STREAMSIZE - bufpos, (uint)strlen(src));
|
||||
strncpy(dst, src, len);
|
||||
strecpy(dst, src, dst + len - 1);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
@@ -426,9 +426,9 @@ DEF_CONSOLE_CMD(ConBan)
|
||||
}
|
||||
|
||||
if (ci != NULL) {
|
||||
IConsolePrint(_icolour_def, "Client banned");
|
||||
banip = inet_ntoa(*(struct in_addr *)&ci->client_ip);
|
||||
SEND_COMMAND(PACKET_SERVER_ERROR)(NetworkFindClientStateFromIndex(index), NETWORK_ERROR_KICKED);
|
||||
IConsolePrint(_icolour_def, "Client banned");
|
||||
} else {
|
||||
IConsolePrint(_icolour_def, "Client not online, banned IP");
|
||||
}
|
||||
@@ -537,7 +537,11 @@ DEF_CONSOLE_CMD(ConRcon)
|
||||
|
||||
if (argc < 3) return false;
|
||||
|
||||
SEND_COMMAND(PACKET_CLIENT_RCON)(argv[1], argv[2]);
|
||||
if (_network_server) {
|
||||
IConsoleCmdExec(argv[2]);
|
||||
} else {
|
||||
SEND_COMMAND(PACKET_CLIENT_RCON)(argv[1], argv[2]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -177,7 +177,7 @@ static inline int32 ClampToI32(const int64 a)
|
||||
*/
|
||||
static inline uint16 ClampToU16(const uint64 a)
|
||||
{
|
||||
return min(a, 0xFFFF);
|
||||
return (uint16)(a <= 0xFFFFU ? a : 0xFFFFU);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -440,6 +440,20 @@ static void DepotClick(Window *w, int x, int y)
|
||||
WP(w, depot_d).sel = v->index;
|
||||
SetWindowDirty(w);
|
||||
SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, w);
|
||||
|
||||
switch (v->type) {
|
||||
case VEH_TRAIN:
|
||||
_cursor.short_vehicle_offset = 16 - v->u.rail.cached_veh_length * 2;
|
||||
break;
|
||||
|
||||
case VEH_ROAD:
|
||||
_cursor.short_vehicle_offset = 16 - v->u.road.cached_veh_length * 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
_cursor.short_vehicle_offset = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include "vehicle_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "sound_func.h"
|
||||
#include "roadveh.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -329,7 +330,7 @@ static void DisasterTick_Ufo(Vehicle *v)
|
||||
v->current_order.dest = 1;
|
||||
|
||||
FOR_ALL_VEHICLES(u) {
|
||||
if (u->type == VEH_ROAD && IsHumanPlayer(u->owner)) {
|
||||
if (u->type == VEH_ROAD && IsRoadVehFront(u) && IsHumanPlayer(u->owner)) {
|
||||
v->dest_tile = u->index;
|
||||
v->age = 0;
|
||||
return;
|
||||
@@ -340,7 +341,7 @@ static void DisasterTick_Ufo(Vehicle *v)
|
||||
} else {
|
||||
/* Target a vehicle */
|
||||
u = GetVehicle(v->dest_tile);
|
||||
if (u->type != VEH_ROAD) {
|
||||
if (u->type != VEH_ROAD || !IsRoadVehFront(u)) {
|
||||
DeleteDisasterVeh(v);
|
||||
return;
|
||||
}
|
||||
@@ -363,12 +364,16 @@ static void DisasterTick_Ufo(Vehicle *v)
|
||||
v->age++;
|
||||
if (u->u.road.crashed_ctr == 0) {
|
||||
u->u.road.crashed_ctr++;
|
||||
u->vehstatus |= VS_CRASHED;
|
||||
|
||||
AddNewsItem(STR_B001_ROAD_VEHICLE_DESTROYED,
|
||||
NEWS_FLAGS(NM_THIN, NF_VIEWPORT | NF_VEHICLE, NT_ACCIDENT, 0),
|
||||
u->index,
|
||||
0);
|
||||
|
||||
for (Vehicle *w = u; w != NULL; w = w->Next()) {
|
||||
w->vehstatus |= VS_CRASHED;
|
||||
MarkSingleVehicleDirty(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -45,6 +45,8 @@
|
||||
#include "rail_map.h"
|
||||
#include "signal_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "signs.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -455,6 +457,24 @@ void ChangeOwnershipOfPlayerItems(PlayerID old_player, PlayerID new_player)
|
||||
UpdateSignalsInBuffer();
|
||||
}
|
||||
|
||||
/* In all cases clear replace engine rules.
|
||||
* Even if it was copied, it could interfere with new owner's rules */
|
||||
RemoveAllEngineReplacementForPlayer(GetPlayer(old_player));
|
||||
|
||||
if (new_player == PLAYER_SPECTATOR) {
|
||||
RemoveAllGroupsForPlayer(old_player);
|
||||
} else {
|
||||
Group *g;
|
||||
FOR_ALL_GROUPS(g) {
|
||||
if (g->owner == old_player) g->owner = new_player;
|
||||
}
|
||||
}
|
||||
|
||||
Sign *si;
|
||||
FOR_ALL_SIGNS(si) {
|
||||
if (si->owner == old_player) si->owner = new_player == PLAYER_SPECTATOR ? OWNER_NONE : new_player;
|
||||
}
|
||||
|
||||
/* Change color of existing windows */
|
||||
if (new_player != PLAYER_SPECTATOR) ChangeWindowOwner(old_player, new_player);
|
||||
|
||||
@@ -1597,7 +1617,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
||||
byte load_amount = EngInfo(v->engine_type)->load_amount;
|
||||
if (_patches.gradual_loading && HasBit(EngInfo(v->engine_type)->callbackmask, CBM_VEHICLE_LOAD_AMOUNT)) {
|
||||
uint16 cb_load_amount = GetVehicleCallback(CBID_VEHICLE_LOAD_AMOUNT, 0, 0, v->engine_type, v);
|
||||
if (cb_load_amount != CALLBACK_FAILED && cb_load_amount != 0) load_amount = cb_load_amount & 0xFF;
|
||||
if (cb_load_amount != CALLBACK_FAILED && GB(cb_load_amount, 0, 8) != 0) load_amount = GB(cb_load_amount, 0, 8);
|
||||
}
|
||||
|
||||
GoodsEntry *ge = &st->goods[v->cargo_type];
|
||||
@@ -1997,7 +2017,7 @@ static const SaveLoad _economy_desc[] = {
|
||||
SLE_CONDVAR(Economy, max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, 0, 64),
|
||||
SLE_CONDVAR(Economy, max_loan_unround, SLE_INT64, 65, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Economy, max_loan_unround_fract, SLE_UINT16, 70, SL_MAX_VERSION),
|
||||
SLE_VAR(Economy, fluct, SLE_FILE_I16 | SLE_VAR_I32),
|
||||
SLE_VAR(Economy, fluct, SLE_INT16),
|
||||
SLE_VAR(Economy, interest_rate, SLE_UINT8),
|
||||
SLE_VAR(Economy, infl_amount, SLE_UINT8),
|
||||
SLE_VAR(Economy, infl_amount_pr, SLE_UINT8),
|
||||
|
@@ -15,7 +15,7 @@ struct Economy {
|
||||
Money max_loan; ///< Maximum possible loan
|
||||
Money max_loan_unround; ///< Economy fluctuation status
|
||||
uint16 max_loan_unround_fract; ///< Fraction of the unrounded max loan
|
||||
int fluct;
|
||||
int16 fluct;
|
||||
byte interest_rate; ///< Interest
|
||||
byte infl_amount; ///< inflation amount
|
||||
byte infl_amount_pr; ///< "floating" portion of inflation
|
||||
|
@@ -502,10 +502,13 @@ int32 SettingsDisableElrail(int32 p1)
|
||||
}
|
||||
}
|
||||
|
||||
/* setup total power for trains */
|
||||
/* Fix the total power and acceleration for trains */
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
/* power is cached only for front engines */
|
||||
if (v->type == VEH_TRAIN && IsFrontEngine(v)) TrainPowerChanged(v);
|
||||
/* power and acceleration is cached only for front engines */
|
||||
if (v->type == VEH_TRAIN && IsFrontEngine(v)) {
|
||||
TrainPowerChanged(v);
|
||||
UpdateTrainAcceleration(v);
|
||||
}
|
||||
}
|
||||
|
||||
FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index);
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#include "aircraft.h"
|
||||
#include "newgrf_cargo.h"
|
||||
#include "group.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "strings_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "functions.h"
|
||||
@@ -174,6 +173,13 @@ void StartupEngines()
|
||||
e->player_avail = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Update the bitmasks for the vehicle lists */
|
||||
Player *p;
|
||||
FOR_ALL_PLAYERS(p) {
|
||||
p->avail_railtypes = GetPlayerRailtypes(p->index);
|
||||
p->avail_roadtypes = GetPlayerRoadtypes(p->index);
|
||||
}
|
||||
}
|
||||
|
||||
static void AcceptEnginePreview(EngineID eid, PlayerID player)
|
||||
@@ -516,19 +522,15 @@ CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, Engi
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
er = new EngineRenew(old_engine, new_engine);
|
||||
if (er == NULL) return CMD_ERROR;
|
||||
AutoPtrT<EngineRenew> er_auto_delete = er;
|
||||
|
||||
if (!EngineRenew::CanAllocateItem()) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
er = new EngineRenew(old_engine, new_engine);
|
||||
er->group_id = group;
|
||||
|
||||
/* Insert before the first element */
|
||||
er->next = (EngineRenew *)(*erl);
|
||||
*erl = (EngineRenewList)er;
|
||||
|
||||
er_auto_delete.Detach();
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include "variables.h"
|
||||
#include "newgrf_engine.h"
|
||||
#include "strings_func.h"
|
||||
#include "articulated_vehicles.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -116,21 +117,34 @@ void ShowEnginePreviewWindow(EngineID engine)
|
||||
AllocateWindowDescFront(&_engine_preview_desc, engine);
|
||||
}
|
||||
|
||||
static uint GetTotalCapacityOfArticulatedParts(EngineID engine, VehicleType type)
|
||||
{
|
||||
uint total = 0;
|
||||
|
||||
uint16 *cap = GetCapacityOfArticulatedParts(engine, type);
|
||||
for (uint c = 0; c < NUM_CARGO; c++) {
|
||||
total += cap[c];
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
{
|
||||
const RailVehicleInfo *rvi = RailVehInfo(engine);
|
||||
int multihead = (rvi->railveh_type == RAILVEH_MULTIHEAD) ? 1 : 0;
|
||||
|
||||
SetDParam(0, (_price.build_railvehicle >> 3) * rvi->base_cost >> 5);
|
||||
SetDParam(2, rvi->max_speed * 10 / 16);
|
||||
SetDParam(3, rvi->power << multihead);
|
||||
SetDParam(1, rvi->weight << multihead);
|
||||
SetDParam(0, (_price.build_railvehicle >> 3) * GetEngineProperty(engine, 0x17, rvi->base_cost) >> 5);
|
||||
SetDParam(2, GetEngineProperty(engine, 0x09, rvi->max_speed) * 10 / 16);
|
||||
SetDParam(3, GetEngineProperty(engine, 0x0B, rvi->power));
|
||||
SetDParam(1, GetEngineProperty(engine, 0x16, rvi->weight) << multihead);
|
||||
|
||||
SetDParam(4, rvi->running_cost * GetPriceByIndex(rvi->running_cost_class) >> 8 << multihead);
|
||||
SetDParam(4, GetEngineProperty(engine, 0x0D, rvi->running_cost) * GetPriceByIndex(rvi->running_cost_class) >> 8);
|
||||
|
||||
if (rvi->capacity != 0) {
|
||||
uint capacity = GetTotalCapacityOfArticulatedParts(engine, VEH_TRAIN);
|
||||
if (capacity != 0) {
|
||||
SetDParam(5, rvi->cargo_type);
|
||||
SetDParam(6, rvi->capacity << multihead);
|
||||
SetDParam(6, capacity);
|
||||
} else {
|
||||
SetDParam(5, CT_INVALID);
|
||||
}
|
||||
@@ -140,11 +154,11 @@ static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
{
|
||||
const AircraftVehicleInfo *avi = AircraftVehInfo(engine);
|
||||
SetDParam(0, (_price.aircraft_base >> 3) * avi->base_cost >> 5);
|
||||
SetDParam(0, (_price.aircraft_base >> 3) * GetEngineProperty(engine, 0x0B, avi->base_cost) >> 5);
|
||||
SetDParam(1, avi->max_speed * 10 / 16);
|
||||
SetDParam(2, avi->passenger_capacity);
|
||||
SetDParam(3, avi->mail_capacity);
|
||||
SetDParam(4, avi->running_cost * _price.aircraft_running >> 8);
|
||||
SetDParam(4, GetEngineProperty(engine, 0x0E, avi->running_cost) * _price.aircraft_running >> 8);
|
||||
|
||||
DrawStringMultiCenter(x, y, STR_A02E_COST_MAX_SPEED_CAPACITY, maxw);
|
||||
}
|
||||
@@ -153,11 +167,11 @@ static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
{
|
||||
const RoadVehicleInfo *rvi = RoadVehInfo(engine);
|
||||
|
||||
SetDParam(0, (_price.roadveh_base >> 3) * rvi->base_cost >> 5);
|
||||
SetDParam(0, (_price.roadveh_base >> 3) * GetEngineProperty(engine, 0x11, rvi->base_cost) >> 5);
|
||||
SetDParam(1, rvi->max_speed * 10 / 32);
|
||||
SetDParam(2, rvi->running_cost * GetPriceByIndex(rvi->running_cost_class) >> 8);
|
||||
SetDParam(3, rvi->cargo_type);
|
||||
SetDParam(4, rvi->capacity);
|
||||
SetDParam(4, GetTotalCapacityOfArticulatedParts(engine, VEH_ROAD));
|
||||
|
||||
DrawStringMultiCenter(x, y, STR_902A_COST_SPEED_RUNNING_COST, maxw);
|
||||
}
|
||||
@@ -165,11 +179,11 @@ static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
static void DrawShipEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
{
|
||||
const ShipVehicleInfo *svi = ShipVehInfo(engine);
|
||||
SetDParam(0, svi->base_cost * (_price.ship_base >> 3) >> 5);
|
||||
SetDParam(1, svi->max_speed * 10 / 32);
|
||||
SetDParam(0, GetEngineProperty(engine, 0x0A, svi->base_cost) * (_price.ship_base >> 3) >> 5);
|
||||
SetDParam(1, GetEngineProperty(engine, 0x0B, svi->max_speed) * 10 / 32);
|
||||
SetDParam(2, svi->cargo_type);
|
||||
SetDParam(3, svi->capacity);
|
||||
SetDParam(4, svi->running_cost * _price.ship_running >> 8);
|
||||
SetDParam(3, GetEngineProperty(engine, 0x0D, svi->capacity));
|
||||
SetDParam(4, GetEngineProperty(engine, 0x0F, svi->running_cost) * _price.ship_running >> 8);
|
||||
DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw);
|
||||
}
|
||||
|
||||
|
@@ -315,7 +315,7 @@ FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subd
|
||||
f = fopen(buf, mode);
|
||||
#if !defined(WIN32)
|
||||
if (f == NULL) {
|
||||
strtolower(buf + strlen(_searchpaths[sp]) - 1);
|
||||
strtolower(buf + ((subdir == NO_DIRECTORY) ? 0 : strlen(_searchpaths[sp]) - 1));
|
||||
f = fopen(buf, mode);
|
||||
}
|
||||
#endif
|
||||
@@ -330,7 +330,7 @@ FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subd
|
||||
|
||||
FILE *FioFOpenFileTar(TarFileListEntry *entry, size_t *filesize)
|
||||
{
|
||||
FILE *f = fopen(entry->tar->filename, "rb");
|
||||
FILE *f = fopen(entry->tar_filename, "rb");
|
||||
assert(f != NULL);
|
||||
|
||||
fseek(f, entry->position, SEEK_SET);
|
||||
@@ -470,9 +470,8 @@ static bool TarListAddFile(const char *filename)
|
||||
FILE *f = fopen(filename, "rb");
|
||||
assert(f != NULL);
|
||||
|
||||
TarListEntry *tar_entry = MallocT<TarListEntry>(1);
|
||||
tar_entry->filename = strdup(filename);
|
||||
_tar_list.insert(TarList::value_type(filename, tar_entry));
|
||||
const char *dupped_filename = strdup(filename);
|
||||
_tar_list[filename].filename = dupped_filename;
|
||||
|
||||
TarHeader th;
|
||||
char buf[sizeof(th.name) + 1], *end;
|
||||
@@ -483,9 +482,10 @@ static bool TarListAddFile(const char *filename)
|
||||
char empty[512];
|
||||
memset(&empty[0], 0, sizeof(empty));
|
||||
|
||||
while (!feof(f)) {
|
||||
fread(&th, 1, 512, f);
|
||||
pos += 512;
|
||||
for (;;) { // Note: feof() always returns 'false' after 'fseek()'. Cool, isn't it?
|
||||
size_t num_bytes_read = fread(&th, 1, 512, f);
|
||||
if (num_bytes_read != 512) break;
|
||||
pos += num_bytes_read;
|
||||
|
||||
/* Check if we have the new tar-format (ustar) or the old one (a lot of zeros after 'link' field) */
|
||||
if (strncmp(th.magic, "ustar", 5) != 0 && memcmp(&th.magic, &empty[0], 512 - offsetof(TarHeader, magic)) != 0) {
|
||||
@@ -522,9 +522,9 @@ static bool TarListAddFile(const char *filename)
|
||||
|
||||
/* Store this entry in the list */
|
||||
TarFileListEntry entry;
|
||||
entry.tar = tar_entry;
|
||||
entry.size = skip;
|
||||
entry.position = pos;
|
||||
entry.tar_filename = dupped_filename;
|
||||
entry.size = skip;
|
||||
entry.position = pos;
|
||||
/* Force lowercase */
|
||||
strtolower(name);
|
||||
|
||||
|
@@ -67,13 +67,15 @@ extern const char *_searchpaths[NUM_SEARCHPATHS];
|
||||
*/
|
||||
struct TarListEntry {
|
||||
const char *filename;
|
||||
TarListEntry() : filename(NULL) {}
|
||||
~TarListEntry() { free((void*)this->filename); }
|
||||
};
|
||||
struct TarFileListEntry {
|
||||
TarListEntry *tar;
|
||||
const char *tar_filename;
|
||||
int size;
|
||||
int position;
|
||||
};
|
||||
typedef std::map<std::string, TarListEntry *> TarList;
|
||||
typedef std::map<std::string, TarListEntry> TarList;
|
||||
typedef std::map<std::string, TarFileListEntry> TarFileList;
|
||||
extern TarList _tar_list;
|
||||
extern TarFileList _tar_filelist;
|
||||
|
@@ -308,12 +308,12 @@ static FiosItem *FiosGetFileList(int mode, fios_getlist_callback_proc *callback_
|
||||
* @param mode Save/load mode.
|
||||
* @param file Name of the file to check.
|
||||
* @param ext A pointer to the extension identifier inside file
|
||||
* @param title Buffer if a callback wants to lookup the title of the file
|
||||
* @param title Buffer if a callback wants to lookup the title of the file; NULL to skip the lookup
|
||||
* @return a FIOS_TYPE_* type of the found file, FIOS_TYPE_INVALID if not a savegame
|
||||
* @see FiosGetFileList
|
||||
* @see FiosGetSavegameList
|
||||
*/
|
||||
static byte FiosGetSavegameListCallback(int mode, const char *file, const char *ext, char *title)
|
||||
byte FiosGetSavegameListCallback(int mode, const char *file, const char *ext, char *title)
|
||||
{
|
||||
/* Show savegame files
|
||||
* .SAV OpenTTD saved game
|
||||
@@ -325,7 +325,7 @@ static byte FiosGetSavegameListCallback(int mode, const char *file, const char *
|
||||
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
|
||||
if (strcasecmp(ext, ".ss1") == 0 || strcasecmp(ext, ".sv1") == 0 ||
|
||||
strcasecmp(ext, ".sv2") == 0) {
|
||||
GetOldSaveGameName(title, _fios_path, file);
|
||||
if (title != NULL) GetOldSaveGameName(title, _fios_path, file);
|
||||
return FIOS_TYPE_OLDFILE;
|
||||
}
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ enum FileType {
|
||||
FT_HEIGHTMAP, ///< heightmap file
|
||||
};
|
||||
|
||||
enum {
|
||||
enum FiosType {
|
||||
FIOS_TYPE_DRIVE = 0,
|
||||
FIOS_TYPE_PARENT = 1,
|
||||
FIOS_TYPE_DIR = 2,
|
||||
@@ -99,6 +99,8 @@ bool FiosDelete(const char *name);
|
||||
void FiosMakeSavegameName(char *buf, const char *name, size_t size);
|
||||
/* Allocate a new FiosItem */
|
||||
FiosItem *FiosAlloc();
|
||||
/* Determines type of savegame (or tells it is not a savegame) */
|
||||
byte FiosGetSavegameListCallback(int mode, const char *file, const char *ext, char *title);
|
||||
|
||||
int CDECL compare_FiosItems(const void *a, const void *b);
|
||||
|
||||
|
@@ -415,6 +415,9 @@ const Sprite *GetGlyph(FontSize size, WChar key)
|
||||
FT_Load_Char(face, key, FT_LOAD_DEFAULT);
|
||||
FT_Render_Glyph(face->glyph, aa ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
|
||||
|
||||
/* Despite requesting a normal glyph, FreeType may have returned a bitmap */
|
||||
aa = (slot->bitmap.palette_mode == FT_PIXEL_MODE_GRAY);
|
||||
|
||||
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */
|
||||
width = max(1, slot->bitmap.width + (size == FS_NORMAL));
|
||||
height = max(1, slot->bitmap.rows + (size == FS_NORMAL));
|
||||
|
@@ -473,7 +473,7 @@ static void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
|
||||
* (use random seed) it should not be possible to be
|
||||
* entered into the input field; the generate seed
|
||||
* button can be used instead. */
|
||||
_patches_newgame.generation_seed = minu(strtoul(_genseed_buffer, NULL, sizeof(_genseed_buffer) - 1), MAX_UVALUE(uint32) - 1);
|
||||
_patches_newgame.generation_seed = minu(strtoul(_genseed_buffer, NULL, 10), MAX_UVALUE(uint32) - 1);
|
||||
break;
|
||||
|
||||
case WE_DROPDOWN_SELECT:
|
||||
|
41
src/gfx.cpp
41
src/gfx.cpp
@@ -230,15 +230,20 @@ static int TruncateString(char *str, int maxw)
|
||||
w += GetCharacterWidth(size, c);
|
||||
|
||||
if (w >= maxw) {
|
||||
/* string got too big... insert dotdotdot */
|
||||
ddd_pos[0] = ddd_pos[1] = ddd_pos[2] = '.';
|
||||
ddd_pos[3] = '\0';
|
||||
/* string got too big... insert dotdotdot, but make sure we do not
|
||||
* print anything beyond the string termination character. */
|
||||
for (int i = 0; *ddd_pos != '\0' && i < 3; i++, ddd_pos++) *ddd_pos = '.';
|
||||
*ddd_pos = '\0';
|
||||
return ddd_w;
|
||||
}
|
||||
} else {
|
||||
if (c == SCC_SETX) str++;
|
||||
else if (c == SCC_SETXY) str += 2;
|
||||
else if (c == SCC_TINYFONT) {
|
||||
if (c == SCC_SETX) {
|
||||
w = *str;
|
||||
str++;
|
||||
} else if (c == SCC_SETXY) {
|
||||
w = *str;
|
||||
str += 2;
|
||||
} else if (c == SCC_TINYFONT) {
|
||||
size = FS_SMALL;
|
||||
ddd = GetCharacterWidth(size, '.') * 3;
|
||||
} else if (c == SCC_BIGFONT) {
|
||||
@@ -563,8 +568,8 @@ Dimension GetStringBoundingBox(const char *str)
|
||||
|
||||
/** Draw a string at the given coordinates with the given colour
|
||||
* @param string the string to draw
|
||||
* @param x offset from left side of the screen, if negative offset from the right side
|
||||
* @param y offset from top side of the screen, if negative offset from the bottom
|
||||
* @param x offset from left side of the screen
|
||||
* @param y offset from top side of the screen
|
||||
* @param real_color colour of the string, see _string_colormap in
|
||||
* table/palettes.h or docs/ottd-colourtext-palette.png or the enum TextColour in gfx_type.h
|
||||
* @return the x-coordinates where the drawing has finished. If nothing is drawn
|
||||
@@ -580,11 +585,7 @@ int DoDrawString(const char *string, int x, int y, uint16 real_color)
|
||||
byte previous_color = color;
|
||||
|
||||
if (color != 0xFE) {
|
||||
if (x >= dpi->left + dpi->width ||
|
||||
x + _screen.width * 2 <= dpi->left ||
|
||||
y >= dpi->top + dpi->height ||
|
||||
y + _screen.height <= dpi->top)
|
||||
return x;
|
||||
if (x >= dpi->left + dpi->width || y >= dpi->top + dpi->height) return x;
|
||||
|
||||
if (color != 0xFF) {
|
||||
switch_color:;
|
||||
@@ -669,7 +670,7 @@ void DrawSprite(SpriteID img, SpriteID pal, int x, int y, const SubSprite *sub)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub)
|
||||
static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub)
|
||||
{
|
||||
const DrawPixelInfo *dpi = _cur_dpi;
|
||||
Blitter::BlitterParams bp;
|
||||
@@ -695,8 +696,8 @@ static inline void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMod
|
||||
bp.height = UnScaleByZoom(sprite->height - clip_top - clip_bottom, dpi->zoom);
|
||||
bp.top = 0;
|
||||
bp.left = 0;
|
||||
bp.skip_left = UnScaleByZoom(clip_left, dpi->zoom);
|
||||
bp.skip_top = UnScaleByZoom(clip_top, dpi->zoom);
|
||||
bp.skip_left = UnScaleByZoomLower(clip_left, dpi->zoom);
|
||||
bp.skip_top = UnScaleByZoomLower(clip_top, dpi->zoom);
|
||||
|
||||
x += ScaleByZoom(bp.skip_left, dpi->zoom);
|
||||
y += ScaleByZoom(bp.skip_top, dpi->zoom);
|
||||
@@ -747,6 +748,9 @@ static inline void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMod
|
||||
if (bp.width <= 0) return;
|
||||
}
|
||||
|
||||
assert(bp.skip_left + bp.width <= UnScaleByZoom(sprite->width, dpi->zoom));
|
||||
assert(bp.skip_top + bp.height <= UnScaleByZoom(sprite->height, dpi->zoom));
|
||||
|
||||
BlitterFactoryBase::GetCurrentBlitter()->Draw(&bp, mode, dpi->zoom);
|
||||
}
|
||||
|
||||
@@ -957,7 +961,7 @@ void DrawMouseCursor()
|
||||
}
|
||||
|
||||
w = _cursor.size.x;
|
||||
x = _cursor.pos.x + _cursor.offs.x;
|
||||
x = _cursor.pos.x + _cursor.offs.x + _cursor.short_vehicle_offset;
|
||||
if (x < 0) {
|
||||
w += x;
|
||||
x = 0;
|
||||
@@ -985,7 +989,7 @@ void DrawMouseCursor()
|
||||
|
||||
/* Draw cursor on screen */
|
||||
_cur_dpi = &_screen;
|
||||
DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x, _cursor.pos.y);
|
||||
DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x + _cursor.short_vehicle_offset, _cursor.pos.y);
|
||||
|
||||
_video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
|
||||
|
||||
@@ -1236,6 +1240,7 @@ static void SetCursorSprite(SpriteID cursor, SpriteID pal)
|
||||
cv->offs.y = p->y_offs;
|
||||
|
||||
cv->dirty = true;
|
||||
cv->short_vehicle_offset = 0;
|
||||
}
|
||||
|
||||
static void SwitchAnimatedCursor()
|
||||
|
@@ -72,16 +72,6 @@ enum WindowKeyCodes {
|
||||
* a-z are mapped to 97-122 */
|
||||
|
||||
/* Numerical keyboard */
|
||||
WKC_NUM_0 = 128,
|
||||
WKC_NUM_1 = 129,
|
||||
WKC_NUM_2 = 130,
|
||||
WKC_NUM_3 = 131,
|
||||
WKC_NUM_4 = 132,
|
||||
WKC_NUM_5 = 133,
|
||||
WKC_NUM_6 = 134,
|
||||
WKC_NUM_7 = 135,
|
||||
WKC_NUM_8 = 136,
|
||||
WKC_NUM_9 = 137,
|
||||
WKC_NUM_DIV = 138,
|
||||
WKC_NUM_MUL = 139,
|
||||
WKC_NUM_MINUS = 140,
|
||||
@@ -112,6 +102,7 @@ struct AnimCursor {
|
||||
struct CursorVars {
|
||||
Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
|
||||
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
|
||||
int short_vehicle_offset; ///< offset of the X for short vehicles
|
||||
SpriteID sprite; ///< current image of cursor
|
||||
SpriteID pal;
|
||||
|
||||
|
@@ -765,7 +765,7 @@ static void CargoPaymentRatesWndProc(Window *w, WindowEvent *e)
|
||||
|
||||
gd.colors[i] = cs->legend_colour;
|
||||
for (uint j = 0; j != 20; j++) {
|
||||
gd.cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 6 + 6, c);
|
||||
gd.cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, c);
|
||||
}
|
||||
|
||||
i++;
|
||||
|
@@ -12,7 +12,6 @@
|
||||
#include "train.h"
|
||||
#include "aircraft.h"
|
||||
#include "vehicle_gui.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "strings_func.h"
|
||||
#include "functions.h"
|
||||
#include "window_func.h"
|
||||
@@ -92,20 +91,14 @@ CommandCost CmdCreateGroup(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
VehicleType vt = (VehicleType)p1;
|
||||
if (!IsPlayerBuildableVehicleType(vt)) return CMD_ERROR;
|
||||
|
||||
AutoPtrT<Group> g_auto_delete;
|
||||
|
||||
Group *g = new Group(_current_player);
|
||||
if (g == NULL) return CMD_ERROR;
|
||||
|
||||
g_auto_delete = g;
|
||||
if (!Group::CanAllocateItem()) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
Group *g = new Group(_current_player);
|
||||
g->replace_protection = false;
|
||||
g->vehicle_type = vt;
|
||||
|
||||
InvalidateWindowData(GetWCForVT(vt), (vt << 11) | VLW_GROUP_LIST | _current_player);
|
||||
|
||||
g_auto_delete.Detach();
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include "newgrf_industries.h"
|
||||
#include "newgrf_industrytiles.h"
|
||||
#include "newgrf_callbacks.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "autoslope.h"
|
||||
#include "transparency.h"
|
||||
#include "water.h"
|
||||
@@ -331,6 +330,19 @@ static uint GetSlopeZ_Industry(TileIndex tile, uint x, uint y)
|
||||
|
||||
static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh)
|
||||
{
|
||||
IndustryGfx gfx = GetIndustryGfx(tile);
|
||||
|
||||
/* For NewGRF industry tiles we might not be drawing a foundation. We need to
|
||||
* account for this, as other structures should
|
||||
* draw the wall of the foundation in this case.
|
||||
*/
|
||||
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
|
||||
const IndustryTileSpec *indts = GetIndustryTileSpec(gfx);
|
||||
if (indts->grf_prop.spritegroup != NULL && HasBit(indts->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) {
|
||||
uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, GetIndustryByTile(tile), tile);
|
||||
if (callback_res == 0) return FOUNDATION_NONE;
|
||||
}
|
||||
}
|
||||
return FlatteningFoundation(tileh);
|
||||
}
|
||||
|
||||
@@ -395,7 +407,9 @@ static CommandCost ClearTile_Industry(TileIndex tile, byte flags)
|
||||
if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
|
||||
!_cheats.magic_bulldozer.value) ||
|
||||
((flags & DC_AUTO) != 0) ||
|
||||
(_current_player == OWNER_WATER && (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER))) {
|
||||
(_current_player == OWNER_WATER &&
|
||||
((indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) ||
|
||||
HasBit(GetIndustryTileSpec(GetIndustryGfx(tile))->slopes_refused, 5)))) {
|
||||
SetDParam(0, indspec->name);
|
||||
return_cmd_error(STR_4800_IN_THE_WAY);
|
||||
}
|
||||
@@ -1025,6 +1039,9 @@ static void ProduceIndustryGoods(Industry *i)
|
||||
|
||||
if (cut) ChopLumberMillTrees(i);
|
||||
}
|
||||
|
||||
TriggerIndustry(i, INDUSTRY_TRIGGER_INDUSTRY_TICK);
|
||||
StartStopIndustryTileAnimation(i, IAT_INDUSTRY_TICK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1046,8 +1063,6 @@ void OnTick_Industry()
|
||||
if (_game_mode == GM_EDITOR) return;
|
||||
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
TriggerIndustry(i, INDUSTRY_TRIGGER_INDUSTRY_TICK);
|
||||
StartStopIndustryTileAnimation(i, IAT_INDUSTRY_TICK);
|
||||
ProduceIndustryGoods(i);
|
||||
}
|
||||
}
|
||||
@@ -1383,7 +1398,7 @@ static bool CheckIfFarEnoughFromIndustry(TileIndex tile, int type)
|
||||
const IndustrySpec *indspec = GetIndustrySpec(type);
|
||||
const Industry *i;
|
||||
|
||||
if (_patches.same_industry_close && indspec->accepts_cargo[0] == CT_INVALID)
|
||||
if (_patches.same_industry_close && indspec->IsRawIndustry())
|
||||
/* Allow primary industries to be placed close to any other industry */
|
||||
return true;
|
||||
|
||||
@@ -1393,7 +1408,7 @@ static bool CheckIfFarEnoughFromIndustry(TileIndex tile, int type)
|
||||
|
||||
/* check if an industry that accepts the same goods is nearby */
|
||||
if (in_low_distance &&
|
||||
indspec->accepts_cargo[0] != CT_INVALID && // not a primary industry?
|
||||
!indspec->IsRawIndustry() && // not a primary industry?
|
||||
indspec->accepts_cargo[0] == i->accepts_cargo[0] && (
|
||||
/* at least one of those options must be true */
|
||||
_game_mode != GM_EDITOR || // editor must not be stopped
|
||||
@@ -1583,17 +1598,19 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, uint
|
||||
if (!CheckIfIndustryIsAllowed(tile, type, t)) return NULL;
|
||||
if (!CheckSuitableIndustryPos(tile)) return NULL;
|
||||
|
||||
Industry *i = new Industry(tile);
|
||||
if (i == NULL) return NULL;
|
||||
AutoPtrT<Industry> i_auto_delete = i;
|
||||
if (!Industry::CanAllocateItem()) return NULL;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
Industry *i = new Industry(tile);
|
||||
if (!custom_shape_check) CheckIfCanLevelIndustryPlatform(tile, DC_EXEC, it, type);
|
||||
DoCreateNewIndustry(i, tile, type, it, itspec_index, t, OWNER_NONE);
|
||||
i_auto_delete.Detach();
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
return i;
|
||||
/* We need to return a non-NULL pointer to tell we have created an industry.
|
||||
* However, we haven't created a real one (no DC_EXEC), so return a fake one. */
|
||||
return GetIndustry(0);
|
||||
}
|
||||
|
||||
/** Build/Fund an industry
|
||||
@@ -1894,7 +1911,8 @@ static void CanCargoServiceIndustry(CargoID cargo, Industry *ind, bool *c_accept
|
||||
const IndustrySpec *indspec = GetIndustrySpec(ind->type);
|
||||
|
||||
/* Check for acceptance of cargo */
|
||||
for (uint j = 0; j < lengthof(ind->accepts_cargo) && ind->accepts_cargo[j] != CT_INVALID; j++) {
|
||||
for (byte j = 0; j < lengthof(ind->accepts_cargo); j++) {
|
||||
if (ind->accepts_cargo[j] == CT_INVALID) continue;
|
||||
if (cargo == ind->accepts_cargo[j]) {
|
||||
if (HasBit(indspec->callback_flags, CBM_IND_REFUSE_CARGO)) {
|
||||
uint16 res = GetIndustryCallback(CBID_INDUSTRY_REFUSE_CARGO,
|
||||
@@ -1908,7 +1926,8 @@ static void CanCargoServiceIndustry(CargoID cargo, Industry *ind, bool *c_accept
|
||||
}
|
||||
|
||||
/* Check for produced cargo */
|
||||
for (uint j = 0; j < lengthof(ind->produced_cargo) && ind->produced_cargo[j] != CT_INVALID; j++) {
|
||||
for (byte j = 0; j < lengthof(ind->produced_cargo); j++) {
|
||||
if (ind->produced_cargo[j] == CT_INVALID) continue;
|
||||
if (cargo == ind->produced_cargo[j]) {
|
||||
*c_produces = true;
|
||||
break;
|
||||
@@ -2070,7 +2089,8 @@ static void ChangeIndustryProduction(Industry *i, bool monthly)
|
||||
|
||||
if (smooth_economy) {
|
||||
closeit = true;
|
||||
for (byte j = 0; j < 2 && i->produced_cargo[j] != CT_INVALID; j++){
|
||||
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||
if (i->produced_cargo[j] == CT_INVALID) continue;
|
||||
uint32 r = Random();
|
||||
int old_prod, new_prod, percent;
|
||||
/* If over 60% is transported, mult is 1, else mult is -1. */
|
||||
|
@@ -60,13 +60,59 @@ static struct IndustryData {
|
||||
assert_compile(lengthof(_fund_gui.index) == lengthof(_fund_gui.text));
|
||||
assert_compile(lengthof(_fund_gui.index) == lengthof(_fund_gui.enabled));
|
||||
|
||||
static void SetupFundArrays(Window *w)
|
||||
{
|
||||
IndustryType ind;
|
||||
const IndustrySpec *indsp;
|
||||
|
||||
_fund_gui.count = 0;
|
||||
|
||||
for (uint i = 0; i < lengthof(_fund_gui.index); i++) {
|
||||
_fund_gui.index[i] = INVALID_INDUSTRYTYPE;
|
||||
_fund_gui.text[i] = STR_NULL;
|
||||
_fund_gui.enabled[i] = false;
|
||||
}
|
||||
|
||||
if (_game_mode == GM_EDITOR) { // give room for the Many Random "button"
|
||||
_fund_gui.index[_fund_gui.count] = INVALID_INDUSTRYTYPE;
|
||||
_fund_gui.count++;
|
||||
WP(w, fnd_d).timer_enabled = false;
|
||||
}
|
||||
/* Fill the arrays with industries.
|
||||
* The tests performed after the enabled allow to load the industries
|
||||
* In the same way they are inserted by grf (if any)
|
||||
*/
|
||||
for (ind = 0; ind < NUM_INDUSTRYTYPES; ind++) {
|
||||
indsp = GetIndustrySpec(ind);
|
||||
if (indsp->enabled){
|
||||
/* Rule is that editor mode loads all industries.
|
||||
* In game mode, all non raw industries are loaded too
|
||||
* and raw ones are loaded only when setting allows it */
|
||||
if (_game_mode != GM_EDITOR && indsp->IsRawIndustry() && _patches.raw_industry_construction == 0) {
|
||||
/* Unselect if the industry is no longer in the list */
|
||||
if (WP(w, fnd_d).select == ind) WP(w, fnd_d).index = -1;
|
||||
continue;
|
||||
}
|
||||
_fund_gui.index[_fund_gui.count] = ind;
|
||||
_fund_gui.enabled[_fund_gui.count] = (_game_mode == GM_EDITOR) || CheckIfCallBackAllowsAvailability(ind, IACT_USERCREATION);
|
||||
/* Keep the selection to the correct line */
|
||||
if (WP(w, fnd_d).select == ind) WP(w, fnd_d).index = _fund_gui.count;
|
||||
_fund_gui.count++;
|
||||
}
|
||||
}
|
||||
|
||||
/* first indutry type is selected if the current selection is invalid.
|
||||
* I'll be damned if there are none available ;) */
|
||||
if (WP(w, fnd_d).index == -1) {
|
||||
WP(w, fnd_d).index = 0;
|
||||
WP(w, fnd_d).select = _fund_gui.index[0];
|
||||
}
|
||||
}
|
||||
|
||||
static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
|
||||
{
|
||||
switch (e->event) {
|
||||
case WE_CREATE: {
|
||||
IndustryType ind;
|
||||
const IndustrySpec *indsp;
|
||||
|
||||
/* Shorten the window to the equivalant of the additionnal purchase
|
||||
* info coming from the callback. SO it will only be available to tis full
|
||||
* height when newindistries are loaded */
|
||||
@@ -81,45 +127,15 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
|
||||
|
||||
WP(w, fnd_d).timer_enabled = _loaded_newgrf_features.has_newindustries;
|
||||
|
||||
/* Initilialize structures */
|
||||
_fund_gui.count = 0;
|
||||
|
||||
for (uint i = 0; i < lengthof(_fund_gui.index); i++) {
|
||||
_fund_gui.index[i] = 0xFF;
|
||||
_fund_gui.text[i] = STR_NULL;
|
||||
_fund_gui.enabled[i] = false;
|
||||
}
|
||||
|
||||
w->vscroll.cap = 8; // rows in grid, same in scroller
|
||||
w->resize.step_height = 13;
|
||||
|
||||
if (_game_mode == GM_EDITOR) { // give room for the Many Random "button"
|
||||
_fund_gui.index[_fund_gui.count] = INVALID_INDUSTRYTYPE;
|
||||
_fund_gui.count++;
|
||||
WP(w, fnd_d).timer_enabled = false;
|
||||
}
|
||||
WP(w, fnd_d).index = -1;
|
||||
WP(w, fnd_d).select = INVALID_INDUSTRYTYPE;
|
||||
|
||||
/* Fill the _fund_gui structure with industries.
|
||||
* The tests performed after the enabled allow to load the industries
|
||||
* In the same way they are inserted by grf (if any)
|
||||
*/
|
||||
for (ind = 0; ind < NUM_INDUSTRYTYPES; ind++) {
|
||||
indsp = GetIndustrySpec(ind);
|
||||
if (indsp->enabled){
|
||||
/* Rule is that editor mode loads all industries.
|
||||
* In game mode, all non raw industries are loaded too
|
||||
* and raw ones are loaded only when setting allows it */
|
||||
if (_game_mode != GM_EDITOR && indsp->IsRawIndustry() && _patches.raw_industry_construction == 0) continue;
|
||||
_fund_gui.index[_fund_gui.count] = ind;
|
||||
_fund_gui.enabled[_fund_gui.count] = (_game_mode == GM_EDITOR) || CheckIfCallBackAllowsAvailability(ind, IACT_USERCREATION);
|
||||
_fund_gui.count++;
|
||||
}
|
||||
}
|
||||
/* Initialize arrays */
|
||||
SetupFundArrays(w);
|
||||
|
||||
/* first indutry type is selected.
|
||||
* I'll be damned if there are none available ;) */
|
||||
WP(w, fnd_d).index = 0;
|
||||
WP(w, fnd_d).select = _fund_gui.index[0];
|
||||
WP(w, fnd_d).callback_timer = DAY_TICKS;
|
||||
} break;
|
||||
|
||||
@@ -333,6 +349,10 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
|
||||
case WE_ABORT_PLACE_OBJ:
|
||||
w->RaiseButtons();
|
||||
break;
|
||||
|
||||
case WE_INVALIDATE_DATA:
|
||||
SetupFundArrays(w);
|
||||
SetWindowDirty(w);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,7 +705,7 @@ static const Widget _industry_directory_widgets[] = {
|
||||
{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 201, 300, 14, 25, STR_SORT_BY_PRODUCTION, STR_SORT_ORDER_TIP}, // IDW_SORTBYPROD
|
||||
{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 301, 400, 14, 25, STR_SORT_BY_TRANSPORTED, STR_SORT_ORDER_TIP}, // IDW_SORTBYTRANSPORT
|
||||
{ WWT_PANEL, RESIZE_NONE, 13, 401, 495, 14, 25, 0x0, STR_NULL}, // IDW_SPACER
|
||||
{ WWT_PANEL, RESIZE_BOTTOM, 13, 0, 495, 26, 189, 0x0, STR_200A_TOWN_NAMES_CLICK_ON_NAME}, // IDW_INDUSRTY_LIST
|
||||
{ WWT_PANEL, RESIZE_BOTTOM, 13, 0, 495, 26, 189, 0x0, STR_INDUSTRYDIR_LIST_CAPTION}, // IDW_INDUSRTY_LIST
|
||||
{ WWT_SCROLLBAR, RESIZE_BOTTOM, 13, 496, 507, 14, 177, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, // IDW_SCROLLBAR
|
||||
{ WWT_RESIZEBOX, RESIZE_TB, 13, 496, 507, 178, 189, 0x0, STR_RESIZE_BUTTON}, // IDW_RESIZE
|
||||
{ WIDGETS_END},
|
||||
|
@@ -206,7 +206,8 @@ static inline void SetIndustryConstructionCounter(TileIndex tile, byte value)
|
||||
static inline void ResetIndustryConstructionStage(TileIndex tile)
|
||||
{
|
||||
assert(IsTileType(tile, MP_INDUSTRY));
|
||||
_m[tile].m1 = 0;
|
||||
SB(_m[tile].m1, 0, 4, 0);
|
||||
SB(_m[tile].m1, 7, 1, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -76,8 +76,9 @@ uint ApplyFoundationToSlope(Foundation f, Slope *s)
|
||||
if (!IsFoundation(f)) return 0;
|
||||
|
||||
if (IsLeveledFoundation(f)) {
|
||||
uint dz = TILE_HEIGHT + (IsSteepSlope(*s) ? TILE_HEIGHT : 0);
|
||||
*s = SLOPE_FLAT;
|
||||
return TILE_HEIGHT;
|
||||
return dz;
|
||||
}
|
||||
|
||||
if (f != FOUNDATION_STEEP_BOTH && IsNonContinuousFoundation(f)) {
|
||||
@@ -384,6 +385,9 @@ void DrawFoundation(TileInfo *ti, Foundation f)
|
||||
|
||||
AddSortableSpriteToDraw(inclined_base + inclined, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
|
||||
OffsetGroundSprite(31, 9);
|
||||
} else if (IsLeveledFoundation(f)) {
|
||||
AddSortableSpriteToDraw(leveled_base + SlopeWithOneCornerRaised(highest_corner), PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z - TILE_HEIGHT);
|
||||
OffsetGroundSprite(31, 1);
|
||||
} else if (f == FOUNDATION_STEEP_LOWER) {
|
||||
/* one corner raised */
|
||||
OffsetGroundSprite(31, 1);
|
||||
|
@@ -586,6 +586,9 @@ STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Ongeluk
|
||||
STR_0209_COMPANY_INFORMATION :{YELLOW}Maatskappy informasie
|
||||
STR_NEWS_OPEN_CLOSE :{YELLOW}Oop / sluiting van nywerhede
|
||||
STR_020A_ECONOMY_CHANGES :{YELLOW}Ekonomie veranderings
|
||||
STR_INDUSTRY_CHANGES_SERVED_BY_PLAYER :{YELLOW}Produksie veranderings van nywerhede wat by die speler bedien word
|
||||
STR_INDUSTRY_CHANGES_SERVED_BY_OTHER :{YELLOW}Produksie veranderings van nywerhede wat deur mededingers bedien word
|
||||
STR_OTHER_INDUSTRY_PRODUCTION_CHANGES :{YELLOW}Ander nywerheid produksie veranderings
|
||||
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Raad / informasie op speler se voertuie
|
||||
STR_020C_NEW_VEHICLES :{YELLOW}Nuwe voertuie
|
||||
STR_020D_CHANGES_OF_CARGO_ACCEPTANCE :{YELLOW}Veranderings na vrag aanvarde
|
||||
@@ -930,6 +933,7 @@ STR_OPTIONS_LANG_TIP :{BLACK}Kies die
|
||||
|
||||
STR_OPTIONS_FULLSCREEN :{BLACK}Volskerm
|
||||
STR_OPTIONS_FULLSCREEN_TIP :{BLACK}Kies die blokkie om OpenTTD in volleskerm te speel
|
||||
STR_FULLSCREEN_FAILED :{WHITE}Volskerm metode gedop
|
||||
|
||||
STR_OPTIONS_RES :{BLACK}Skerm resolusie
|
||||
STR_OPTIONS_RES_CBO :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
|
||||
@@ -1157,6 +1161,7 @@ STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Ontsper
|
||||
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Laattoe deele aankoop van ander maatskappye
|
||||
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Wanneer sleep, plaas seine elke: {ORANGE}{STRING} teel(e)
|
||||
STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}Outomaties bou semaphores voor: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ENABLE_SIGNAL_GUI :{LTBLUE}Stel in staak die sein GUI: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_PATCHES_TOWN_LAYOUT_INVALID :{WHITE}Die dorp uitleg "niks meer paaie" is nie geldig in die draaiboek redigeerder
|
||||
STR_CONFIG_PATCHES_TOWN_LAYOUT :{LTBLUE}Kies dorp-pad uitleg: {ORANGE}{STRING}
|
||||
@@ -1689,6 +1694,7 @@ STR_TOWN_LABEL :{WHITE}{TOWN}
|
||||
STR_TOWN_LABEL_TINY_BLACK :{TINYFONT}{BLACK}{TOWN}
|
||||
STR_TOWN_LABEL_TINY_WHITE :{TINYFONT}{WHITE}{TOWN}
|
||||
STR_2002 :{TINYFONT}{BLACK}{SIGN}
|
||||
STR_2002_WHITE :{TINYFONT}{WHITE}{SIGN}
|
||||
STR_2004_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Gebou moet eers afgebreek word
|
||||
STR_2005 :{WHITE}{TOWN}
|
||||
STR_2006_POPULATION :{BLACK}Populasie: {ORANGE}{COMMA}{BLACK} Huise: {ORANGE}{COMMA}
|
||||
@@ -2293,6 +2299,9 @@ STR_RELOCATE_HQ :{BLACK}Beweeg H
|
||||
STR_COMPANY_PASSWORD :{BLACK}Wagwoord
|
||||
STR_COMPANY_PASSWORD_TOOLTIP :{BLACK}Wagwoord-beskerm jou maatskappy om onmagtig gebruikers te belet van verbinding
|
||||
STR_SET_COMPANY_PASSWORD :{BLACK}Stel maatskappy wagwoord
|
||||
STR_COMPANY_PASSWORD_CANCEL :{BLACK}Moenie die ingesleutelde wagwoord bewaar nie
|
||||
STR_COMPANY_PASSWORD_OK :{BLACK}Gee die maatskappy die nuwe wagwoord
|
||||
STR_COMPANY_PASSWORD_CAPTION :{WHITE}Maatskappy wagwoord
|
||||
STR_7073_WORLD_RECESSION_FINANCIAL :{BIGFONT}{BLACK}W<>eld Insinking!{}{}Finansieel eksperte vrees ergste as ekonomie inmekaar sak!
|
||||
STR_7074_RECESSION_OVER_UPTURN_IN :{BIGFONT}{BLACK}Insinking Oor!{}{}Oplewing in sake gee vertroue na nywerhede as ekonomie versterk!
|
||||
STR_7075_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Tokkel groot/klein venster groote
|
||||
|
@@ -1165,7 +1165,7 @@ STR_CONFIG_PATCHES_ENDING_YEAR :{LTBLUE}Termina
|
||||
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Ativar economia regular (alterações menores)
|
||||
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permite comprar ações de outras empresas
|
||||
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Ao arrastar colocar sinais a cada: {ORANGE}{STRING} quadrado(s)
|
||||
STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}Automaticamente constroi semáforos anteriores: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}Construir sinaleiros até: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ENABLE_SIGNAL_GUI :{LTBLUE}Ativar interface de sinais: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_PATCHES_TOWN_LAYOUT_INVALID :{WHITE}O layout de cidade "sem mais estradas" não é válido no editor
|
||||
@@ -1333,6 +1333,7 @@ STR_INDUSTRYDIR_CAPTION :{WHITE}Indústr
|
||||
STR_INDUSTRYDIR_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}){YELLOW} ({COMMA}% transportado)
|
||||
STR_INDUSTRYDIR_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}/{CARGO}){YELLOW} ({COMMA}%/{COMMA}% transportado)
|
||||
STR_INDUSTRYDIR_ITEM_NOPROD :{ORANGE}{INDUSTRY}
|
||||
STR_INDUSTRYDIR_LIST_CAPTION :{BLACK}Nomes das indústrias - clique no nome para localizar a indústria
|
||||
|
||||
STR_INDUSTRY_TOO_CLOSE :{WHITE}...muito perto de outra indústria
|
||||
|
||||
@@ -1717,6 +1718,7 @@ STR_2002 :{TINYFONT}{BLAC
|
||||
STR_2002_WHITE :{TINYFONT}{WHITE}{SIGN}
|
||||
STR_2004_BUILDING_MUST_BE_DEMOLISHED :{WHITE}O edifício deve ser demolido primeiro
|
||||
STR_2005 :{WHITE}{TOWN}
|
||||
STR_CITY :{WHITE}{TOWN} (Cidade)
|
||||
STR_2006_POPULATION :{BLACK}População: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA}
|
||||
STR_2007_RENAME_TOWN :Renomear Cidade
|
||||
STR_2008_CAN_T_RENAME_TOWN :{WHITE}Impossível renomear cidade...
|
||||
@@ -1808,8 +1810,6 @@ STR_205C_PIGGY_BANK :Mealheiro
|
||||
STR_INDUSTRY :{INDUSTRY}
|
||||
STR_TOWN :{TOWN}
|
||||
STR_INDUSTRY_FORMAT :{1:STRING} de {0:TOWN}
|
||||
STR_INDUSTRY_FORMAT.f :{G=f}{1:STRING} de {0:TOWN}
|
||||
STR_INDUSTRY_FORMAT.m :{G=m}{1:STRING} de {0:TOWN}
|
||||
STR_STATION :{STATION}
|
||||
|
||||
##id 0x2800
|
||||
@@ -3101,6 +3101,7 @@ STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} deve s
|
||||
STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{STRING} requer versão {STRING} ou maior do OpenTTD.
|
||||
STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :o arquivo GRF foi designado para tradução
|
||||
STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :Muitos NewGRFs foram carregados.
|
||||
STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Carregar {STRING} como um NewGRF estático em conjunto com {STRING} pode causar desincronias.
|
||||
|
||||
STR_NEWGRF_ADD :{BLACK}Adicionar
|
||||
STR_NEWGRF_ADD_TIP :{BLACK}Adiciona um NewGRF à lista
|
||||
@@ -3132,6 +3133,10 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Falta(m)
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Arquivo(s) GRF faltantes
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Despausar pode travar OpenTTD. Não envie relatórios de erros sobre travas subseqüentes.{}Você realmente quer despausar?
|
||||
|
||||
STR_NEWGRF_BROKEN :{WHITE} '{0:STRING}' tem altas chances de causar desincronias e/ou travamentos.
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Muda o tamanho de um veículo para '{1:ENGINE}' apesar de não estar em um depósito.
|
||||
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Trem '{VEHICLE}' de '{COMPANY}' tem um tamanho inválido. Provavelmente causado por um NewGRF. O jogo pode travar ou sair de sincronia.
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Jogo foi salvo numa versão sem suporte a bondes. Todos os bondes foram removidos.
|
||||
STR_CURRENCY_WINDOW :{WHITE}Moeda Modificada
|
||||
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Taxa de câmbio: {ORANGE}{CURRENCY} = £ {COMMA}
|
||||
STR_CURRENCY_SEPARATOR :{LTBLUE}Separador:
|
||||
@@ -3475,7 +3480,7 @@ STR_FACE_TIE_EARRING_TIP :{BLACK}Alterar
|
||||
############ signal GUI
|
||||
STR_SIGNAL_SELECTION :{WHITE}Seleção de Sinais
|
||||
STR_SIGNAL_CAN_T_CONVERT_SIGNALS_HERE :{WHITE}Impossível converter sinais aqui...
|
||||
STR_BUILD_SIGNAL_SEMAPHORE_NORM_TIP :{BLACK}Sinais padrão (semáforos){}Sinais são necessários para manter trens de colidirem nas malhas ferroviárias com mais de um trem.
|
||||
STR_BUILD_SIGNAL_SEMAPHORE_NORM_TIP :{BLACK}Sinais padrão (semáforos){}Sinais são necessários para impedir trens de colidirem nas malhas ferroviárias com mais de um trem.
|
||||
STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TIP :{BLACK}Sinal de Entrada (semáforo){}Verde contanto que haja um ou mais sinais de saída verdes na atual seção dos trilhos. Do contrário, fica vermelho.
|
||||
STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TIP :{BLACK}Sinal de saída (semáforo){}Funciona como um sinal normal, porém é necessário para o funcionamento correto do sistema de sinais combo ou de entrada.
|
||||
STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TIP :{BLACK}Sinal combo (semáforo){}O sinal combo funciona tanto como um sinal de entrada quanto de saída. Permite construir várias ramificações.
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user