Compare commits

..

1 Commits

Author SHA1 Message Date
Richard Wheeler 7d76b3b296 Change: Fetch OpenGFX2 for CI workflows 2025-12-06 21:56:41 +00:00
1557 changed files with 50979 additions and 64828 deletions
+50
View File
@@ -0,0 +1,50 @@
name: 'Setup vcpkg'
description: 'Installs vcpkg and initialises binary caching via NuGet'
inputs:
vcpkg-location:
description: 'Where to install vcpkg'
required: true
mono-install-command:
description: 'Command to run to install mono'
required: false
runs:
using: "composite"
steps:
- name: Install vcpkg
shell: bash
run: |
git clone https://github.com/microsoft/vcpkg "${{ inputs.vcpkg-location }}"
cd "${{ inputs.vcpkg-location }}"
./bootstrap-vcpkg.$(if [ "${{ runner.os }}" = "Windows" ]; then echo "bat"; else echo "sh"; fi) -disableMetrics
- name: Install mono
if: inputs.mono-install-command
shell: bash
run: |
${{ inputs.mono-install-command }}
echo "MONO=mono" >> "$GITHUB_ENV"
- name: Setup NuGet Credentials
shell: bash
env:
FEED_URL: 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json'
run: |
cd "${{ inputs.vcpkg-location }}"
${{ env.MONO }} $(./vcpkg fetch nuget | tail -n 1) \
sources add \
-source "${{ env.FEED_URL }}" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ github.token }}"
${{ env.MONO }} $(./vcpkg fetch nuget | tail -n 1) \
setapikey "${{ github.token }}" \
-source "${{ env.FEED_URL }}"
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;nuget,GitHub,readwrite')
-85
View File
@@ -1,85 +0,0 @@
"""
Script to scan the OpenTTD source-tree for doxygen @file annotations.
Checks whether they exist, are recognised by doxygen and match coding style.
"""
import os
import sys
END_OF_SENTENCE = [".", "!", "?"]
SOURCE_FILE_EXTENSION = ["cpp", "c", "hpp", "h", "mm", "m", "cc"]
TEMPLATE_FILE_EXTENSION = ["preamble", "in"]
REPO_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
EXCLUDED_FILES = [
os.path.join(REPO_DIR, "src", "script", "api", "squirrel_export.sq.hpp.in"),
os.path.join(REPO_DIR, "src", "script", "api", "script_includes.hpp.in"),
]
def read_files_list_from_file(file_path):
with open(file_path, "r") as f:
while line := f.readline():
yield line[:-1]
def list_files_walk(start_path="."):
for root, dirs, files in os.walk(start_path):
for file in files:
yield os.path.join(root, file)
def check_descriptions(files):
errors = []
for path in files:
if os.path.abspath(path) in EXCLUDED_FILES:
continue
if path.find("3rdparty") != -1 or path.find("lang") != -1:
continue
if not os.path.isfile(path):
continue
name = path[path.rfind("/") + 1 :]
while True:
extension = name[name.rfind('.') + 1 :]
if extension not in TEMPLATE_FILE_EXTENSION:
break
name = name[0 : -len(extension) - 1]
if extension not in SOURCE_FILE_EXTENSION:
continue
with open(path, "r") as f:
content = f.read()
ann = content.find(f"@file {name} ")
reason = f'Should be of the form "/** @file {name} Brief description of the file here. */"'
if ann == -1:
if content.find("@file") == -1:
errors.append(f'File "{path}" does not provide description. {reason}')
continue
else:
end = content.find("\n", ann)
start = content.rfind("\n", 0, ann) + 1
if content[start : ann] == "/** " and content[end - 3 : end] == " */" and content[end - 4] in END_OF_SENTENCE:
continue
elif content[start : ann] == " * ":
if content[start - 4 : start - 1] == "/**" and content[end - 1] in END_OF_SENTENCE and content[end + 1 : end + 4] != " */":
continue
reason = f"Should be of the form:\n/**\n * @file {name} Brief description of the file here.\n * Detailed description of the file here.\n */"
errors.append(f'Description of file "{path}" does not match coding style. {reason}')
return errors
def main():
if len(sys.argv) == 1:
files = list_files_walk(os.path.join(REPO_DIR, "src"))
else:
files = read_files_list_from_file(sys.argv[1])
errors = check_descriptions(files)
if errors:
print("\n".join(errors))
sys.exit(1)
print("OK")
if __name__ == "__main__":
main()
-26
View File
@@ -1,26 +0,0 @@
name: Install Doxygen
runs:
using: composite
steps:
- name: Install Doxygen
run: |
echo "::group::Downloading"
# Download currently (at the time of creation this action) latest version of Doxygen
# because version in ubuntu repository (1.9.8) is outdated and buggy.
wget -O doxygen.tar.gz "https://github.com/doxygen/doxygen/releases/download/Release_1_17_0/doxygen-1.17.0.linux.bin.tar.gz"
echo "::endgroup::"
echo "::group::Unpacking"
tar -xzf doxygen.tar.gz
rm doxygen.tar.gz
echo "::endgroup::"
echo "::group::Installing"
cd doxygen*
sudo make install
echo "::endgroup::"
cd ..
rm -r doxygen*
shell: bash
-28
View File
@@ -1,28 +0,0 @@
""" Script that sorts warnings generated by doxygen to maintain consistent order. """
import sys
def read_by_line(file_path):
with open(file_path, "r") as f:
while line := f.readline():
yield line[:-1]
def main():
if len(sys.argv) != 3:
print("Wrong number of arguments provided, expected two.")
print("Usage: python3 sort_doxygen_warnings.py [input_file] [output_file]")
sys.exit(1)
warnings = []
for line in read_by_line(sys.argv[1]):
if "warning:" in line or "error:" in line:
warnings.append(line)
continue
# Doxygen warnings can span multiple lines, keep these lines together.
warnings[-1] = f"{warnings[-1]}\n{line}"
warnings = sorted(set(warnings))
with open(sys.argv[2], "w") as out:
out.write("\n".join(warnings))
out.write("\n")
print("Doxygen warnings sorted successfully.")
if __name__ == "__main__":
main()
+1 -1
View File
@@ -105,4 +105,4 @@ jobs:
steps:
- name: Check annotations
uses: OpenTTD/actions/annotation-check@v6
uses: OpenTTD/actions/annotation-check@v5
+11 -4
View File
@@ -14,23 +14,30 @@ jobs:
container:
# If you change this version, change the numbers in the cache step,
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
image: emscripten/emsdk:6.0.1
image: emscripten/emsdk:3.1.57
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Fix dubious ownership
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update to modern GCC
run: |
apt-get update
apt-get install -y gcc-12 g++-12
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
- name: Setup cache
uses: actions/cache@v6
uses: actions/cache@v4
with:
# If you change this version, change the numbers in the image configuration step,
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
path: /emsdk/upstream/emscripten/cache
key: 6.0.1-${{ runner.os }}
key: 3.1.57-${{ runner.os }}
- name: Add liblzma support
run: |
+11 -9
View File
@@ -30,11 +30,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: ${{ runner.temp }}/vcpkg
mono-install-command: 'sudo apt-get install -y --no-install-recommends mono-complete'
- name: Install dependencies
run: |
@@ -65,7 +67,7 @@ jobs:
# We only use breakpad from vcpkg, as its CMake files
# are a bit special. So the Ubuntu's variant doesn't work.
${{ steps.vcpkg.outputs.vcpkg }} install breakpad
${{ runner.temp }}/vcpkg/vcpkg install breakpad
echo "::endgroup::"
env:
@@ -76,15 +78,15 @@ jobs:
mkdir -p ~/.local/share/openttd/baseset
cd ~/.local/share/openttd/baseset
echo "::group::Download OpenGFX"
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
echo "::group::Download OpenGFX2"
curl -L https://cdn.openttd.org/opengfx2_classic-releases/0.8/opengfx2_classic-0.8-all.zip -o opengfx2-all.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
unzip opengfx-all.zip
echo "::group::Unpack OpenGFX2"
unzip opengfx2-all.zip
echo "::endgroup::"
rm -f opengfx-all.zip
rm -f opengfx2-all.zip
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
+11 -9
View File
@@ -32,26 +32,28 @@ jobs:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: ${{ runner.temp }}/vcpkg
mono-install-command: 'brew install mono'
- name: Install OpenGFX
run: |
mkdir -p ~/Documents/OpenTTD/baseset
cd ~/Documents/OpenTTD/baseset
echo "::group::Download OpenGFX"
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
echo "::group::Download OpenGFX2"
curl -L https://cdn.openttd.org/opengfx2_classic-releases/0.8/opengfx2_classic-0.8-all.zip -o opengfx2-all.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
unzip opengfx-all.zip
echo "::group::Unpack OpenGFX2"
unzip opengfx2-all.zip
echo "::endgroup::"
rm -f opengfx-all.zip
rm -f opengfx2-all.zip
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
@@ -65,7 +67,7 @@ jobs:
cmake .. \
-DCMAKE_OSX_ARCHITECTURES=${{ inputs.full_arch }} \
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-osx \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
${{ inputs.extra-cmake-parameters }} \
# EOF
echo "::endgroup::"
+15 -16
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
@@ -31,16 +31,15 @@ jobs:
install: >-
git
make
pacboy: >-
cmake:p
gcc:p
lzo2:p
libpng:p
lld:p
ninja:p
libogg:p
opus:p
opusfile:p
mingw-w64-${{ inputs.arch }}-cmake
mingw-w64-${{ inputs.arch }}-gcc
mingw-w64-${{ inputs.arch }}-lzo2
mingw-w64-${{ inputs.arch }}-libpng
mingw-w64-${{ inputs.arch }}-lld
mingw-w64-${{ inputs.arch }}-ninja
mingw-w64-${{ inputs.arch }}-libogg
mingw-w64-${{ inputs.arch }}-opus
mingw-w64-${{ inputs.arch }}-opusfile
- name: Install OpenGFX
shell: bash
@@ -48,15 +47,15 @@ jobs:
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
cd "C:/Users/Public/Documents/OpenTTD/baseset"
echo "::group::Download OpenGFX"
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
echo "::group::Download OpenGFX2"
curl -L https://cdn.openttd.org/opengfx2_classic-releases/0.8/opengfx2_classic-0.8-all.zip -o opengfx2-all.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
unzip opengfx-all.zip
echo "::group::Unpack OpenGFX2"
unzip opengfx2-all.zip
echo "::endgroup::"
rm -f opengfx-all.zip
rm -f opengfx2-all.zip
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
+4 -2
View File
@@ -31,8 +31,10 @@ jobs:
fail-fast: false
matrix:
include:
- msystem: UCRT64
- msystem: MINGW64
arch: x86_64
- msystem: MINGW32
arch: i686
name: MinGW (${{ matrix.arch }})
@@ -55,4 +57,4 @@ jobs:
steps:
- name: Check annotations
uses: OpenTTD/actions/annotation-check@v6
uses: OpenTTD/actions/annotation-check@v5
+10 -9
View File
@@ -18,11 +18,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: ${{ runner.temp }}/vcpkg
- name: Install OpenGFX
shell: bash
@@ -30,15 +31,15 @@ jobs:
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
cd "C:/Users/Public/Documents/OpenTTD/baseset"
echo "::group::Download OpenGFX"
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
echo "::group::Download OpenGFX2"
curl -L https://cdn.openttd.org/opengfx2_classic-releases/0.8/opengfx2_classic-0.8-all.zip -o opengfx2-all.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
unzip opengfx-all.zip
echo "::group::Unpack OpenGFX2"
unzip opengfx2-all.zip
echo "::endgroup::"
rm -f opengfx-all.zip
rm -f opengfx2-all.zip
- name: Install MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
@@ -60,7 +61,7 @@ jobs:
cmake .. \
-GNinja \
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-windows-static \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.vcpkg.outputs.vcpkg-cmake }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
# EOF
echo "::endgroup::"
+6 -4
View File
@@ -25,11 +25,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: ${{ runner.temp }}/vcpkg
mono-install-command: 'sudo apt-get install -y --no-install-recommends mono-complete'
- name: Install dependencies
run: |
@@ -59,7 +61,7 @@ jobs:
# We only use breakpad from vcpkg, as its CMake files
# are a bit special. So the Ubuntu's variant doesn't work.
${{ steps.vcpkg.outputs.vcpkg }} install breakpad
${{ runner.temp }}/vcpkg/vcpkg install breakpad
echo "::endgroup::"
env:
+2 -2
View File
@@ -14,12 +14,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
fetch-depth: 4
- name: Get pull-request commits
uses: OpenTTD/actions/checkout-pull-request@v6
uses: OpenTTD/actions/checkout-pull-request@v5
- name: Check commits
uses: OpenTTD/OpenTTD-git-hooks@main
-88
View File
@@ -1,88 +0,0 @@
name: Docs checker
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
docs-checker:
name: New doxygen warnings checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 4
- name: Get pull-request commits
uses: OpenTTD/actions/checkout-pull-request@v6
- name: Install Doxygen
uses: ./.github/install-doxygen
- name: Build docs for PR
run: |
mkdir build
echo "::group::CMake"
cmake -S . -B build -DOPTION_DOCS_ONLY=ON -DOPTION_LINE_IN_DOXYGEN_WARNINGS=OFF -DOPTION_DOXYGEN_GS_WARN_FILE="Warnings.GS" -DOPTION_DOXYGEN_AI_WARN_FILE="Warnings.AI" -DOPTION_DOXYGEN_WARN_FILE="Warnings.source"
echo "::endgroup::"
echo "::group::Build Source"
cmake --build build --target docs_source
python3 .github/sort_doxygen_warnings.py build/Warnings.source doxygen_warnings.PR
echo "::endgroup::"
echo "::group::Build AI"
cmake --build build --target docs_ai
python3 .github/sort_doxygen_warnings.py build/Warnings.AI doxygen_AI_warnings.PR
echo "::endgroup::"
echo "::group::Build GS"
cmake --build build --target docs_game
python3 .github/sort_doxygen_warnings.py build/Warnings.GS doxygen_GS_warnings.PR
echo "::endgroup::"
rm -r build
- name: Build docs for base branch
run: |
git checkout HEAD^
mkdir build
echo "::group::CMake"
cmake -S . -B build -DOPTION_DOCS_ONLY=ON -DOPTION_LINE_IN_DOXYGEN_WARNINGS=OFF -DOPTION_DOXYGEN_GS_WARN_FILE="Warnings.GS" -DOPTION_DOXYGEN_AI_WARN_FILE="Warnings.AI" -DOPTION_DOXYGEN_WARN_FILE="Warnings.source"
echo "::endgroup::"
echo "::group::Build Source"
cmake --build build --target docs_source
python3 .github/sort_doxygen_warnings.py build/Warnings.source doxygen_warnings.base
echo "::endgroup::"
echo "::group::Build AI"
cmake --build build --target docs_ai
python3 .github/sort_doxygen_warnings.py build/Warnings.AI doxygen_AI_warnings.base
echo "::endgroup::"
echo "::group::Build GS"
cmake --build build --target docs_game
python3 .github/sort_doxygen_warnings.py build/Warnings.GS doxygen_GS_warnings.base
echo "::endgroup::"
rm -r build
- name: Compare doxygen warnings and errors
run: |
unset FAIL
diff doxygen_warnings.base doxygen_warnings.PR | grep '^>' && FAIL=1
diff doxygen_AI_warnings.base doxygen_AI_warnings.PR | grep '^>' && FAIL=1
diff doxygen_GS_warnings.base doxygen_GS_warnings.PR | grep '^>' && FAIL=1
if [ $FAIL ]; then
exit 1;
fi
-29
View File
@@ -1,29 +0,0 @@
name: File descriptions
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
file-descriptions:
name: File descriptions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 4
- name: Get pull-request commits
uses: OpenTTD/actions/checkout-pull-request@v6
- name: Check descriptions of source files
run: |
git diff-tree --no-commit-id --name-only -r HEAD HEAD^ > modified_files.txt
cat modified_files.txt
set -ex
python3 .github/file-descriptions.py modified_files.txt
+33 -13
View File
@@ -2,20 +2,31 @@ name: Preview build
on:
workflow_call:
secrets:
PREVIEW_CLOUDFLARE_API_TOKEN:
description: API token to upload a preview to Cloudflare Pages
required: true
PREVIEW_CLOUDFLARE_ACCOUNT_ID:
description: Account ID to upload a preview to Cloudflare Pages
required: true
jobs:
preview:
name: Build preview
environment:
name: preview
url: https://preview.openttd.org/pr${{ github.event.pull_request.number }}/
runs-on: ubuntu-latest
container:
# If you change this version, change the numbers in the cache step,
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
image: emscripten/emsdk:6.0.1
image: emscripten/emsdk:3.1.57
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -24,13 +35,20 @@ jobs:
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git checkout -b pr${{ github.event.pull_request.number }}
- name: Update to modern GCC
run: |
apt-get update
apt-get install -y gcc-12 g++-12
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
- name: Setup cache
uses: actions/cache@v6
uses: actions/cache@v4
with:
path: /emsdk/upstream/emscripten/cache
# If you change this version, change the numbers in the image configuration step,
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
key: 6.0.1-${{ runner.os }}
key: 3.1.57-${{ runner.os }}
- name: Add liblzma support
run: |
@@ -79,14 +97,16 @@ jobs:
cp build/openttd.js public/
cp build/openttd.wasm public/
mkdir pr
echo ${{ github.event.pull_request.number }} > ./pr/number
# Ensure we use the latest version of npm; the one we get with current
# emscripten doesn't allow running "npx wrangler" as root.
# Current emscripten can't install npm>=10.0.0 because node is too old.
npm install -g npm@9
- name: Upload artifacts
uses: actions/upload-artifact@v7
- name: Publish preview
uses: cloudflare/pages-action@v1
with:
name: pr${{ github.event.pull_request.number }}
path: |
public
pr
retention-days: 1
apiToken: ${{ secrets.PREVIEW_CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.PREVIEW_CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.PREVIEW_CLOUDFLARE_PROJECT_NAME }}
directory: public
branch: pr${{ github.event.pull_request.number }}
-59
View File
@@ -1,59 +0,0 @@
name: Preview publish
on:
workflow_run:
workflows:
- Preview
types:
- completed
jobs:
preview:
name: Publish preview
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Create deployment
id: deployment
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/repos/${{ github.repository }}/deployments \
-d '{"ref":"${{ github.event.workflow_run.head_sha }}","environment":"preview","required_contexts":[]}' \
| jq --raw-output0 '"url=\(.statuses_url)"' >> $GITHUB_OUTPUT
- name: Download artifacts
uses: actions/download-artifact@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{github.event.workflow_run.id }}
- name: Get PR number
id: pr
run: |
echo "number=$(cat pr/number)" >> $GITHUB_OUTPUT
- name: Publish preview
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.PREVIEW_CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.PREVIEW_CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy public --project-name=${{ vars.PREVIEW_CLOUDFLARE_PROJECT_NAME }} --branch pr${{ steps.pr.outputs.number }}
- name: Update deployment
if: always()
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2026-03-10" \
${{ steps.deployment.outputs.url }} \
-d '{"state":"${{ job.status }}","log_url":"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}","environment_url":"https://preview.openttd.org/pr${{ steps.pr.outputs.number }}/","auto_inactive":false}'
+1 -1
View File
@@ -1,7 +1,7 @@
name: Preview
on:
pull_request:
pull_request_target:
types:
- labeled
- synchronize
+15 -4
View File
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -23,8 +23,19 @@ jobs:
run: |
tar -xf source.tar.gz --strip-components=1
- name: Install Doxygen
uses: ./.github/install-doxygen
- name: Install dependencies
run: |
echo "::group::Update apt"
sudo apt-get update
echo "::endgroup::"
echo "::group::Install dependencies"
sudo apt-get install -y --no-install-recommends \
doxygen \
# EOF
echo "::endgroup::"
env:
DEBIAN_FRONTEND: noninteractive
- name: Build
run: |
@@ -67,7 +78,7 @@ jobs:
echo "::endgroup::"
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: openttd-docs
path: build/bundles/*.tar.xz
+5 -9
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -40,11 +40,9 @@ jobs:
echo "::group::Install system dependencies"
# perl-IPC-Cmd, wget, and zip are needed to run vcpkg.
# autoconf-archive is needed to build ICU.
# perl-Time-Piece is needed to build OpenSSL.
yum install -y \
autoconf-archive \
perl-IPC-Cmd \
perl-Time-Piece \
wget \
zip \
# EOF
@@ -83,7 +81,6 @@ jobs:
yum install -y \
alsa-lib-devel \
pulseaudio-libs-devel \
pipewire-devel \
# EOF
echo "::endgroup::"
@@ -113,8 +110,7 @@ jobs:
echo "::endgroup::"
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: /vcpkg
mono-install-command: 'yum install -y mono-complete'
@@ -129,7 +125,7 @@ jobs:
echo "::group::CMake"
cmake ${GITHUB_WORKSPACE} \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
-DOPTION_PACKAGE_DEPENDENCIES=ON \
@@ -160,14 +156,14 @@ jobs:
echo "::endgroup::"
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: openttd-linux-generic
path: build/bundles
retention-days: 5
- name: Store symbols
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: symbols-linux-generic
path: build/symbols
+10 -8
View File
@@ -23,7 +23,7 @@ jobs:
xcode-version: latest-stable
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -38,8 +38,10 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: ${{ runner.temp }}/vcpkg
mono-install-command: 'brew install mono'
- name: Install dependencies
env:
@@ -77,7 +79,7 @@ jobs:
echo "::endgroup::"
- name: Import code signing certificates
uses: Apple-Actions/import-codesign-certs@v7
uses: Apple-Actions/import-codesign-certs@v5
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
@@ -95,7 +97,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DVCPKG_TARGET_TRIPLET=arm64-osx \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
@@ -116,7 +118,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DVCPKG_TARGET_TRIPLET=x64-osx \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
@@ -203,14 +205,14 @@ jobs:
mv _CPack_Packages/*/Bundle/openttd-*.zip bundles/
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: openttd-macos-universal
path: build-x64/bundles
retention-days: 5
- name: Store symbols
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: symbols-macos-universal
path: build-x64/symbols
+5 -5
View File
@@ -30,14 +30,14 @@ jobs:
steps:
- name: Checkout (Release)
if: github.event_name == 'release'
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
# We generate a changelog; for this we need the full git log.
fetch-depth: 0
- name: Checkout (Manual)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.ref }}
# We generate a changelog; for this we need the full git log.
@@ -45,7 +45,7 @@ jobs:
- name: Checkout (Trigger)
if: github.event_name == 'repository_dispatch'
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
ref: ${{ github.event.client_payload.ref }}
# We generate a changelog; for this we need the full git log.
@@ -202,14 +202,14 @@ jobs:
echo "::endgroup::"
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: openttd-source
path: build/bundles/*
retention-days: 5
- name: Store source (for other jobs)
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: internal-source
path: source.tar.gz
+8 -8
View File
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -25,17 +25,17 @@ jobs:
tar -xf source.tar.gz --strip-components=1
- name: Download x86 build
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-x86
- name: Download x64 build
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-x64
- name: Download arm64 build
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-arm64
@@ -124,7 +124,7 @@ jobs:
run: |
cd builds
REM We need to provide a signed .msix to the Windows Store, so generate a certificate with password 'password'
REM We need to provide a signed .appx to the Windows Store, so generate a certificate with password 'password'
call ..\os\windows\winstore\generate-key.bat "CN=78024DA8-4BE4-4C77-B12E-547BBF7359D2" password cert.pfx
- name: Generate assets
@@ -176,16 +176,16 @@ jobs:
REM Build and sign the package
makeappx build /v /f PackagingLayout.xml /op output\ /bv %OTTD_VERSION% /pv %OTTD_VERSION% /ca
SignTool sign /fd sha256 /a /f cert.pfx /p password "output\OpenTTD.msixbundle"
SignTool sign /fd sha256 /a /f cert.pfx /p password "output\OpenTTD.appxbundle"
REM Move resulting files to bundles folder
mkdir bundles
mkdir bundles\internal
move cert.pfx bundles\internal\openttd-${{ inputs.version }}-windows-store.pfx
move output\OpenTTD.msixbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.msixbundle
move output\OpenTTD.appxbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.appxbundle
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: openttd-windows-store
path: builds/bundles
+9 -8
View File
@@ -30,7 +30,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -46,14 +46,15 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
uses: ./.github/actions/setup-vcpkg
with:
vcpkg-location: ${{ runner.temp }}/vcpkg
- name: Install dependencies
shell: bash
run: |
echo "::group::Install choco dependencies"
choco install pandoc nsis
choco install pandoc
echo "::endgroup::"
echo "::group::Install breakpad dependencies"
@@ -102,7 +103,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-GNinja \
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.vcpkg.outputs.vcpkg-cmake }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
-DOPTION_USE_NSIS=ON \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -132,7 +133,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-GNinja \
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.vcpkg.outputs.vcpkg-cmake }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
@@ -193,14 +194,14 @@ jobs:
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: openttd-windows-${{ matrix.arch }}
path: build/bundles
retention-days: 5
- name: Store symbols
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: symbols-windows-${{ matrix.arch }}
path: build/symbols
-15
View File
@@ -153,18 +153,3 @@ jobs:
with:
version: ${{ needs.source.outputs.version }}
upload-windows-store:
name: Upload (Windows Store)
needs:
- upload
# Only upload final release builds to Windows Store; "-beta" or "-RC" tags should be ignored
if: needs.source.outputs.is_tag == 'true' && !contains(needs.source.outputs.version, '-')
uses: ./.github/workflows/upload-windows-store.yml
secrets: inherit
with:
version: ${{ needs.source.outputs.version }}
trigger_type: ${{ needs.source.outputs.trigger_type }}
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Check for finding script functions that require company/deity mode enforcement/checks
run: |
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Check for unused strings
run: |
+5 -5
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Download all bundles
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
- name: Calculate checksums
run: |
@@ -70,14 +70,14 @@ jobs:
done
- name: Store bundles
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: cdn-bundles
path: bundles/*
retention-days: 5
- name: Store breakpad symbols
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v5
with:
name: cdn-symbols
path: symbols/*
@@ -88,7 +88,7 @@ jobs:
- prepare
name: Publish bundles
uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v6
uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v5
secrets:
CDN_SIGNING_KEY: ${{ secrets.CDN_SIGNING_KEY }}
DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
@@ -103,7 +103,7 @@ jobs:
- prepare
name: Publish symbols
uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v6
uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v5
secrets:
SYMBOLS_SIGNING_KEY: ${{ secrets.SYMBOLS_SIGNING_KEY }}
with:
+11 -10
View File
@@ -15,39 +15,40 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
path: internal-source
- name: Download bundle (Windows x86)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-x86
path: openttd-windows-x86
- name: Download bundle (Windows x64)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-x64
path: openttd-windows-x64
- name: Download bundle (MacOS)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-macos-universal
path: openttd-macos-universal
- name: Download bundle (Linux)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-linux-generic
path: openttd-linux-generic
- name: Install GOG Galaxy Build Creator
run: |
wget https://cdn.gog.com/open/galaxy/pipeline/10.6.7.17/gnu-linux/GOGGalaxyPipelineBuilder
chmod +x ./GOGGalaxyPipelineBuilder
wget https://cdn.gog.com/open/galaxy/pipeline/build_creator/gnu-linux/GOGGalaxyBuildCreator-1.4.0.AppImage
7z x GOGGalaxyBuildCreator-1.4.0.AppImage
chmod +x ./app/GOGGalaxyPipelineBuilder
- name: Install OpenGFX
shell: bash
@@ -144,8 +145,8 @@ jobs:
echo "::endgroup::"
echo "::group::Upload to GOG"
../GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing windows.json
../GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing macos.json
../GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing linux.json
../app/GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing windows.json
../app/GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing macos.json
../app/GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing linux.json
echo "::endgroup::"
)
+5 -5
View File
@@ -18,31 +18,31 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: internal-source
path: internal-source
- name: Download bundle (Windows x86)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-x86
path: openttd-windows-x86
- name: Download bundle (Windows x64)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-windows-x64
path: openttd-windows-x64
- name: Download bundle (MacOS)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-macos-universal
path: openttd-macos-universal
- name: Download bundle (Linux)
uses: actions/download-artifact@v8
uses: actions/download-artifact@v6
with:
name: openttd-linux-generic
path: openttd-linux-generic
@@ -1,44 +0,0 @@
name: Upload (Windows Store)
on:
workflow_call:
inputs:
version:
required: true
type: string
trigger_type:
required: true
type: string
jobs:
upload:
name: Upload (Windows Store)
runs-on: windows-latest
steps:
- name: Download bundle (Windows Store)
uses: actions/download-artifact@v8
with:
name: openttd-windows-store
path: openttd-windows-store
- name: Configure Microsoft Store CLI
uses: microsoft/microsoft-store-apppublisher@v1.3
- name: Reconfigure store credentials
run: msstore reconfigure `
--tenantId ${{ secrets.AZURE_TENANT_ID }} `
--sellerId ${{ secrets.WINSTORE_SELLER_ID }} `
--clientId ${{ secrets.AZURE_WINSTORE_APPLICATION_CLIENT_ID }} `
--clientSecret ${{ secrets.AZURE_WINSTORE_APPLICATION_SECRET }}
- name: Publish msix package
shell: pwsh
run: |
$bundle = Get-ChildItem openttd-windows-store/internal/openttd-*.msixbundle | Select-Object -First 1
if (-not $bundle) {
throw "No msixbundle found"
}
msstore publish $bundle.FullName -id 9NCJG5RVRR1C -v
+5 -9
View File
@@ -5,7 +5,7 @@ if(NOT BINARY_NAME)
endif()
project(${BINARY_NAME}
VERSION 16.0
VERSION 15.0
LANGUAGES CXX
)
@@ -75,10 +75,6 @@ add_custom_target(find_version
-DREV_MAJOR=${PROJECT_VERSION_MAJOR}
-DREV_MINOR=${PROJECT_VERSION_MINOR}
-DWINDOWS=${WIN32}
-DDOXYGEN_WARN_FORMAT_LINE=${DOXYGEN_WARN_FORMAT_LINE}
-DDOXYGEN_WARN_FILE=${DOXYGEN_WARN_FILE}
-DDOXYGEN_GS_WARN_FILE=${DOXYGEN_GS_WARN_FILE}
-DDOXYGEN_AI_WARN_FILE=${DOXYGEN_AI_WARN_FILE}
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/FindVersion.cmake"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
BYPRODUCTS ${GENERATED_SOURCE_FILES}
@@ -189,7 +185,7 @@ if(UNIX AND NOT APPLE AND NOT OPTION_DEDICATED)
if(NOT SDL2_FOUND AND NOT ALLEGRO_FOUND)
message(FATAL_ERROR "SDL2 or Allegro is required for this platform")
endif()
if(HARFBUZZ_FOUND AND NOT ICU_I18N_FOUND)
if(HARFBUZZ_FOUND AND NOT ICU_i18n_FOUND)
message(WARNING "HarfBuzz depends on ICU i18n to function; HarfBuzz will be disabled")
endif()
if(NOT HARFBUZZ_FOUND)
@@ -327,8 +323,8 @@ if(NOT OPTION_DEDICATED)
link_package(FREETYPE TARGET Freetype::Freetype)
link_package(Fontconfig TARGET Fontconfig::Fontconfig)
link_package(Harfbuzz TARGET harfbuzz::harfbuzz)
link_package(ICU_I18N TARGET ICU::i18n)
link_package(ICU_UC TARGET ICU::uc)
link_package(ICU_i18n)
link_package(ICU_uc)
link_package(OpusFile TARGET OpusFile::opusfile)
if(SDL2_FOUND AND OPENGL_FOUND AND UNIX)
@@ -370,7 +366,7 @@ if(EMSCRIPTEN)
add_definitions(-s DISABLE_EXCEPTION_CATCHING=0)
# Export functions to Javascript.
target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXPORTED_RUNTIME_METHODS='[\"cwrap\", \"HEAPU8\"]'")
target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
# Preload all the files we generate during build.
# As we do not compile with FreeType / FontConfig, we also have no way to
+2 -1
View File
@@ -304,7 +304,8 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
+16 -20
View File
@@ -1,7 +1,7 @@
# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
# Doxyfile 1.9.4
@@ -45,9 +45,7 @@ PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 2
ALIASES = important="@attention" # @important is available in newer versions of doxygen.
ALIASES += split_group{1}="@}^^@{^^@ingroup \1^^" \
split_group{3;}="^^@defgroup \1_\2 \3^^@ingroup \1^^@{^^@}^^@}^^@{^^@ingroup \1_\2^^"
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
@@ -61,7 +59,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
@@ -120,12 +118,11 @@ WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = YES
WARN_IF_UNDOC_ENUM_VAL = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$${DOXYGEN_WARN_FORMAT_LINE}: $text"
WARN_LINE_FORMAT = "at line $${DOXYGEN_WARN_FORMAT_LINE} of file $file"
WARN_LOGFILE = ${DOXYGEN_WARN_FILE}
WARN_FORMAT = "$file:$line: $text"
WARN_LINE_FORMAT = "at line $line of file $file"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
@@ -137,15 +134,12 @@ FILE_PATTERNS = *.c \
*.cpp \
*.c++ \
*.h \
*.hpp \
*.mm \
*.m
*.hpp
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */3rdparty \
*/script/api \
*/tests
*/script/api
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
@@ -191,6 +185,7 @@ HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
@@ -226,6 +221,7 @@ EXT_LINKS_IN_WINDOW = NO
OBFUSCATE_EMAILS = YES
HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
FORMULA_MACROFILE =
USE_MATHJAX = NO
MATHJAX_VERSION = MathJax_2
@@ -260,6 +256,7 @@ USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
@@ -320,14 +317,10 @@ PREDEFINED = WITH_ZLIB \
WITH_HARFBUZZ \
WITH_ICU_I18N \
UNICODE \
DOXYGEN_API \
_UNICODE \
_GNU_SOURCE \
CDECL= \
CALLBACK= \
APIENTRY= \
FINAL=
EXPAND_AS_DEFINED = DEFINE_POOL_METHOD
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
@@ -344,6 +337,8 @@ DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
@@ -371,6 +366,7 @@ PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
-1
View File
@@ -15,7 +15,6 @@ set(AI_COMPAT_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
)
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.0 to 0.7. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.1 to 1.0. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.2 to 1.1. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.11 to 1.10. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 12 to 1.11. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.3 to 1.2. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.4 to 1.3. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.5 to 1.4. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.6 to 1.5. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.7 to 1.6. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.8 to 1.7. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.9 to 1.8. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.10 to 1.9. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 13 to 12. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 14 to 13. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 15 to 14. */
-8
View File
@@ -1,8 +0,0 @@
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 16 to 15. */
-1
View File
@@ -12,7 +12,6 @@ set(GS_COMPAT_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
)
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.11 to 1.10. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 12 to 1.11. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.3 to 1.2. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.4 to 1.3. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.5 to 1.4 */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.6 to 1.5. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.7 to 1.6. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.8 to 1.7. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.9 to 1.8. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 1.10 to 1.9. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 13 to 12. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 14 to 13. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains code to downgrade the API from 15 to 14. */
-140
View File
@@ -1,140 +0,0 @@
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 16 to 15. */
/*
* These window/widget related enumerations have never been stable, but breaking anything using them
* is a really big ask when restructuring code. If in the future things are removed from the underlying
* enumerations, feel free to remove them from this compatibility script.
*/
GSWindow.WN_GAME_OPTIONS_AI <- GSWindow.GameOptionsWindowNumber.AI;
GSWindow.WN_GAME_OPTIONS_GS <- GSWindow.GameOptionsWindowNumber.GS;
GSWindow.WN_GAME_OPTIONS_ABOUT <- GSWindow.GameOptionsWindowNumber.About;
GSWindow.WN_GAME_OPTIONS_NEWGRF_STATE <- GSWindow.GameOptionsWindowNumber.NewGRFState;
GSWindow.WN_GAME_OPTIONS_GAME_OPTIONS <- GSWindow.GameOptionsWindowNumber.GameOptions;
GSWindow.WN_GAME_OPTIONS_GAME_SETTINGS <- GSWindow.GameOptionsWindowNumber.GameOptions;
GSWindow.WN_QUERY_STRING <- GSWindow.QueryStringWindowNumber.Default;
GSWindow.WN_QUERY_STRING_SIGN <- GSWindow.QueryStringWindowNumber.Sign;
GSWindow.WN_CONFIRM_POPUP_QUERY <- GSWindow.ConfirmPopupQueryWindowNumber.Default;
GSWindow.WN_CONFIRM_POPUP_QUERY_BOOTSTRAP <- GSWindow.ConfirmPopupQueryWindowNumber.Bootstrap;
GSWindow.WN_NETWORK_WINDOW_GAME <- GSWindow.NetworkWindowNumber.Game;
GSWindow.WN_NETWORK_WINDOW_CONTENT_LIST <- GSWindow.NetworkWindowNumber.ContentList;
GSWindow.WN_NETWORK_WINDOW_START <- GSWindow.NetworkWindowNumber.StartServer;
GSWindow.WN_NETWORK_STATUS_WINDOW_JOIN <- GSWindow.NetworkStatusWindowNumber.Join;
GSWindow.WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD <- GSWindow.NetworkStatusWindowNumber.ContentDownload;
GSWindow.WC_NONE <- GSWindow.WindowClass.None;
GSWindow.WC_MAIN_WINDOW <- GSWindow.WindowClass.MainWindow;
GSWindow.WC_MAIN_TOOLBAR <- GSWindow.WindowClass.MainToolbar;
GSWindow.WC_STATUS_BAR <- GSWindow.WindowClass.Statusbar;
GSWindow.WC_BUILD_TOOLBAR <- GSWindow.WindowClass.BuildToolbar;
GSWindow.WC_SCEN_BUILD_TOOLBAR <- GSWindow.WindowClass.ScenarioBuildToolbar;
GSWindow.WC_BUILD_TREES <- GSWindow.WindowClass.BuildTrees;
GSWindow.WC_TRANSPARENCY_TOOLBAR <- GSWindow.WindowClass.TransparencyToolbar;
GSWindow.WC_BUILD_SIGNAL <- GSWindow.WindowClass.BuildSignal;
GSWindow.WC_SMALLMAP <- GSWindow.WindowClass.SmallMap;
GSWindow.WC_ERRMSG <- GSWindow.WindowClass.ErrorMessage;
GSWindow.WC_TOOLTIPS <- GSWindow.WindowClass.ToolTips;
GSWindow.WC_QUERY_STRING <- GSWindow.WindowClass.QueryString;
GSWindow.WC_CONFIRM_POPUP_QUERY <- GSWindow.WindowClass.ConfirmPopupQuery;
GSWindow.WC_GOAL_QUESTION <- GSWindow.WindowClass.GoalQuestion;
GSWindow.WC_SAVELOAD <- GSWindow.WindowClass.SaveLoad;
GSWindow.WC_LAND_INFO <- GSWindow.WindowClass.LandInfo;
GSWindow.WC_DROPDOWN_MENU <- GSWindow.WindowClass.DropdownMenu;
GSWindow.WC_OSK <- GSWindow.WindowClass.OnScreenKeyboard;
GSWindow.WC_SET_DATE <- GSWindow.WindowClass.SetDate;
GSWindow.WC_SCRIPT_SETTINGS <- GSWindow.WindowClass.ScriptSettings;
GSWindow.WC_GRF_PARAMETERS <- GSWindow.WindowClass.NewGRFParameters;
GSWindow.WC_TEXTFILE <- GSWindow.WindowClass.Textfile;
GSWindow.WC_TOWN_AUTHORITY <- GSWindow.WindowClass.TownAuthority;
GSWindow.WC_VEHICLE_DETAILS <- GSWindow.WindowClass.VehicleDetails;
GSWindow.WC_VEHICLE_REFIT <- GSWindow.WindowClass.VehicleRefit;
GSWindow.WC_VEHICLE_ORDERS <- GSWindow.WindowClass.VehicleOrders;
GSWindow.WC_REPLACE_VEHICLE <- GSWindow.WindowClass.ReplaceVehicle;
GSWindow.WC_VEHICLE_TIMETABLE <- GSWindow.WindowClass.VehicleTimetable;
GSWindow.WC_COMPANY_COLOUR <- GSWindow.WindowClass.CompanyLivery;
GSWindow.WC_COMPANY_MANAGER_FACE <- GSWindow.WindowClass.CompanyManagerFace;
GSWindow.WC_SELECT_STATION <- GSWindow.WindowClass.JoinStation;
GSWindow.WC_NEWS_WINDOW <- GSWindow.WindowClass.News;
GSWindow.WC_TOWN_DIRECTORY <- GSWindow.WindowClass.TownDirectory;
GSWindow.WC_SUBSIDIES_LIST <- GSWindow.WindowClass.SubsidyList;
GSWindow.WC_INDUSTRY_DIRECTORY <- GSWindow.WindowClass.IndustryDirectory;
GSWindow.WC_MESSAGE_HISTORY <- GSWindow.WindowClass.MessageHistory;
GSWindow.WC_SIGN_LIST <- GSWindow.WindowClass.SignList;
GSWindow.WC_SCRIPT_LIST <- GSWindow.WindowClass.ScriptList;
GSWindow.WC_GOALS_LIST <- GSWindow.WindowClass.GoalList;
GSWindow.WC_STORY_BOOK <- GSWindow.WindowClass.StoryBook;
GSWindow.WC_STATION_LIST <- GSWindow.WindowClass.StationList;
GSWindow.WC_TRAINS_LIST <- GSWindow.WindowClass.TrainList;
GSWindow.WC_ROADVEH_LIST <- GSWindow.WindowClass.RoadVehicleList;
GSWindow.WC_SHIPS_LIST <- GSWindow.WindowClass.ShipList;
GSWindow.WC_AIRCRAFT_LIST <- GSWindow.WindowClass.AircraftList;
GSWindow.WC_TOWN_VIEW <- GSWindow.WindowClass.TownView;
GSWindow.WC_VEHICLE_VIEW <- GSWindow.WindowClass.VehicleView;
GSWindow.WC_STATION_VIEW <- GSWindow.WindowClass.StationView;
GSWindow.WC_VEHICLE_DEPOT <- GSWindow.WindowClass.VehicleDepot;
GSWindow.WC_WAYPOINT_VIEW <- GSWindow.WindowClass.WaypointView;
GSWindow.WC_INDUSTRY_VIEW <- GSWindow.WindowClass.IndustryView;
GSWindow.WC_COMPANY <- GSWindow.WindowClass.Company;
GSWindow.WC_BUILD_OBJECT <- GSWindow.WindowClass.BuildObject;
GSWindow.WC_BUILD_HOUSE <- GSWindow.WindowClass.BuildHouse;
GSWindow.WC_BUILD_VEHICLE <- GSWindow.WindowClass.BuildVehicle;
GSWindow.WC_BUILD_BRIDGE <- GSWindow.WindowClass.BuildBridge;
GSWindow.WC_BUILD_STATION <- GSWindow.WindowClass.BuildStation;
GSWindow.WC_BUS_STATION <- GSWindow.WindowClass.BuildBusStation;
GSWindow.WC_TRUCK_STATION <- GSWindow.WindowClass.BuildTruckStation;
GSWindow.WC_BUILD_DEPOT <- GSWindow.WindowClass.BuildDepot;
GSWindow.WC_BUILD_WAYPOINT <- GSWindow.WindowClass.BuildWaypoint;
GSWindow.WC_FOUND_TOWN <- GSWindow.WindowClass.FoundTown;
GSWindow.WC_BUILD_INDUSTRY <- GSWindow.WindowClass.BuildIndustry;
GSWindow.WC_SELECT_GAME <- GSWindow.WindowClass.SelectGame;
GSWindow.WC_SCEN_LAND_GEN <- GSWindow.WindowClass.ScenarioGenerateLandscape;
GSWindow.WC_GENERATE_LANDSCAPE <- GSWindow.WindowClass.GenerateLandscape;
GSWindow.WC_MODAL_PROGRESS <- GSWindow.WindowClass.ModalProgress;
GSWindow.WC_NETWORK_WINDOW <- GSWindow.WindowClass.Network;
GSWindow.WC_CLIENT_LIST <- GSWindow.WindowClass.NetworkClientList;
GSWindow.WC_NETWORK_STATUS_WINDOW <- GSWindow.WindowClass.NetworkStatus;
GSWindow.WC_NETWORK_ASK_RELAY <- GSWindow.WindowClass.NetworkAskRelay;
GSWindow.WC_NETWORK_ASK_SURVEY <- GSWindow.WindowClass.NetworkAskSurvey;
GSWindow.WC_SEND_NETWORK_MSG <- GSWindow.WindowClass.NetworkChat;
GSWindow.WC_INDUSTRY_CARGOES <- GSWindow.WindowClass.IndustryCargoes;
GSWindow.WC_GRAPH_LEGEND <- GSWindow.WindowClass.GraphLegend;
GSWindow.WC_FINANCES <- GSWindow.WindowClass.Finances;
GSWindow.WC_INCOME_GRAPH <- GSWindow.WindowClass.IncomeGraph;
GSWindow.WC_OPERATING_PROFIT <- GSWindow.WindowClass.OperatingProfitGraph;
GSWindow.WC_DELIVERED_CARGO <- GSWindow.WindowClass.DeliveredCargoGraph;
GSWindow.WC_PERFORMANCE_HISTORY <- GSWindow.WindowClass.PerformanceGraph;
GSWindow.WC_COMPANY_VALUE <- GSWindow.WindowClass.CompanyValueGraph;
GSWindow.WC_COMPANY_LEAGUE <- GSWindow.WindowClass.CompanyLeague;
GSWindow.WC_PAYMENT_RATES <- GSWindow.WindowClass.CargoPaymentRatesGraph;
GSWindow.WC_PERFORMANCE_DETAIL <- GSWindow.WindowClass.PerformanceDetail;
GSWindow.WC_INDUSTRY_PRODUCTION <- GSWindow.WindowClass.IndustryProductionGraph;
GSWindow.WC_TOWN_CARGO_GRAPH <- GSWindow.WindowClass.TownCargoGraph;
GSWindow.WC_COMPANY_INFRASTRUCTURE <- GSWindow.WindowClass.CompanyInfrastructure;
GSWindow.WC_BUY_COMPANY <- GSWindow.WindowClass.BuyCompany;
GSWindow.WC_ENGINE_PREVIEW <- GSWindow.WindowClass.EnginePreview;
GSWindow.WC_MUSIC_WINDOW <- GSWindow.WindowClass.Music;
GSWindow.WC_MUSIC_TRACK_SELECTION <- GSWindow.WindowClass.MusicTrackSelection;
GSWindow.WC_GAME_OPTIONS <- GSWindow.WindowClass.GameOptions;
GSWindow.WC_CUSTOM_CURRENCY <- GSWindow.WindowClass.CustomCurrenty;
GSWindow.WC_CHEATS <- GSWindow.WindowClass.Cheat;
GSWindow.WC_EXTRA_VIEWPORT <- GSWindow.WindowClass.ExtraViewport;
GSWindow.WC_CONSOLE <- GSWindow.WindowClass.Console;
GSWindow.WC_BOOTSTRAP <- GSWindow.WindowClass.Bootstrap;
GSWindow.WC_HIGHSCORE <- GSWindow.WindowClass.Highscore;
GSWindow.WC_ENDSCREEN <- GSWindow.WindowClass.Endscreen;
GSWindow.WC_SCRIPT_DEBUG <- GSWindow.WindowClass.ScriptDebug;
GSWindow.WC_NEWGRF_INSPECT <- GSWindow.WindowClass.NewGRFInspect;
GSWindow.WC_SPRITE_ALIGNER <- GSWindow.WindowClass.SpriteAligner;
GSWindow.WC_LINKGRAPH_LEGEND <- GSWindow.WindowClass.LinkGraphLegend;
GSWindow.WC_SAVE_PRESET <- GSWindow.WindowClass.SavePreset;
GSWindow.WC_FRAMERATE_DISPLAY <- GSWindow.WindowClass.FramerateDisplay;
GSWindow.WC_FRAMETIME_GRAPH <- GSWindow.WindowClass.FrametimeGraph;
GSWindow.WC_SCREENSHOT <- GSWindow.WindowClass.Screenshot;
GSWindow.WC_HELPWIN <- GSWindow.WindowClass.Help;
GSWindow.WC_INVALID <- GSWindow.WindowClass.Invalid;
-299
View File
@@ -1,304 +1,5 @@
## 16.x
### 16.0-beta2 (2026-07-12)
- Feature: Allow bridges over depots (#15836)
- Feature: Increase maximum number of vehicles per type to 10,000 (#15810)
- Feature: Add and remove whole classes to picker collections (#15808)
- Feature: Station list can be filtered by name (#15772)
- Change: Use "bridge ... too low" message for bridgeable objects (#15838)
- Fix: Use meaningful tooltips for graph range toggle buttons (#15842)
- Fix #15826: Exclude allow any/all options for AI companies (#15834)
- Fix #7992: Fix for catenary road and tram catenary sprites not being drawn on bridges (#15811)
- Fix #15784: Crash due to incorrect road build toolbar when switching road tram types (#15789)
- Fix: [NewGRF] Make 'signals on traffic side' consistent with explicit settings (#15661)
- Fix: [Win32] Explicitly initialize COM in Win32 video driver (#15553)
### 16.0-beta1 (2026-06-25)
- Feature: Add default road and tram selection (#15585)
- Feature: Trains with an engine on the rear can drive backwards when reversing (#15379)
- Feature: Add worldgen setting for average height of terrain (#14989)
- Feature: Add text filter to dropdown lists (#14842)
- Feature: User-defined collections of saved items in the picker window (#14813)
- Feature: Configurable sign text colors in scenario editor (#14743)
- Feature: Allow placing an area of 1x1 houses in scenario editor (#14708)
- Feature: Scale cargo payment aging rate (#14635)
- Feature: Support automatic detection of data from Atari's Transport Tycoon Deluxe re-release (#15483)
- Add: [NewGRF] Implement custom waypoint layouts by callback 24 (#15616)
- Add: List 'Place object' in landscaping dropdown (#15609)
- Add: Setting to disable aircraft range limit (#15433)
- Add: Show maximum reliability in vehicle info (#15401)
- Add: Lower the Send To Depot button when a vehicle is on its way to one (#15397)
- Add: Setting to disallow train magic flip, and reverse at reduced speed (#15391)
- Add: [NewGRF] Variable for when a train is driving backwards (#15379)
- Add: [NewGRF] Flag to allow unpowered wagon to lead train when backing up (#15379)
- Add: [NewGRF] Station flag to divide cargo by area instead of perimeter (#15253)
- Add: Company allow-list can be set to allow anyone (#15204)
- Add: Record history of cargo delivered to towns (#15184)
- Add: Show additional vehicle details based on sort criteria (#15158)
- Add: Setting to control minimum distance between towns (#14893)
- Change: Selecting Rail/Roadtype updates build toolbar instead of closing and reopening (#15589)
- Change: Default setting to review orders excludes stopped vehicles (#15565)
- Change: Most used rail type takes ownership into account (#15489)
- Change: Test font for eligibility before adding as fallback (#15412)
- Change: Clarify max age shown in vehicle info window (#15403)
- Change: Show "Delete All" in order window delete button when applicable (#15370)
- Change: Make continuation error messages consistent (#15328)
- Change: Distinguish between 'Flat land required' and 'Land sloped in wrong direction' for building depots (#15327)
- Change: Allow subsidies with CargoDist (#15189)
- Change: Removing river tiles reduces local authority rating (#15180)
- Change: Protect rivers from removal when terraforming (#15176)
- Change: [Script] Reformat callstack output (#15171)
- Change: Apply slightly more padding to image-text buttons (#15077)
- Change: [NewGRF] Display rail and road type speed limit text in yellow (#15076)
- Change: Make smallmap show infinite water, if enabled (#15041)
- Change: Add support for next/previous/first/last rail/road/tram type hotkeys (#15028)
- Change: Allow rocks on desert tiles (#14979)
- Change: [Script] Include Array/PriorityQueye/ScriptList contents in script memory allocation total (#14954)
- Change: [Script] Various ScriptList methods are now suspendable (#14943, #14762)
- Change: Improve generation of coasts at map edges (#14868)
- Change: Show only selected badge in badge filter dropdown buttons (#14855)
- Change: River springs must be surrounded by hills (#14845)
- Change: Vehicles loading at stations don't lose reliability (#14841)
- Change: Generate lighthouses along coasts and near towns (#14828)
- Change: Transmitter object only spawns after original base year (#14786)
- Change: Share one window for engine preview pop ups (#14703)
- Fix: [NewGRF] Town name language incorrectly decoded (#15691)
- Fix #15606: Undefined behaviour may cause buttons to be invisible (#15686)
- Fix #14975: Show correct tile for tunnel error message (#15660)
- Fix: [NewGRF] Incorrect language IDs passed to TranslateTTDPatchCodes (#15655)
- Fix: Scenario editor random industry generation (#15626)
- Fix: [NewGRF] Ignore blocked waypoint tiles (#15620)
- Fix: [NewGRF] Pylons and no-wires flags were ignored for waypoint tiles (#15619)
- Fix: Dedicated server signal handling for SIGTERM/SIGINT/SIGQUIT (#15607)
- Fix: [NewGRF] Potential out-of-bounds read when performing GRM (#15600)
- Fix: Badge offsets not ignored when determining width (#15588)
- Fix: Account for NewGRF's global train width when drawing dual-head engines (#15587)
- Fix: Station list facility buttons do not produce click sound (#15569)
- Fix #15495: Fix incorrectly built default waypoints (#15562)
- Fix #15495: Unable to build bridge over default waypoints (#15562)
- Fix #15235: Make GameScripts obey town road construction setting (#15559)
- Fix: Crash when loading crash save with no viewport coordinates (#15550)
- Fix #15520: Fix viewport snap back on stop following vehicle (#15520) (#15531)
- Fix: Buttons for choosing engine in preview window show for single engine (#15514)
- Fix #15511: Vehicle passed to commands must be a company buildable type (#15512)
- Fix #15497: [Script] ScriptController::Break not pausing in TestMode (#15498)
- Fix: Coordinate transformation for JSON town placement when anticlockwise (#15490)
- Fix: NewGRF debug handler for towns in wrong place since badges (#15467)
- Fix: Object id overrides were not reset between games (#15465)
- Fix: Debug saveload errors were clobbered (#15452)
- Fix: Refresh client list when client renames (#15439)
- Fix #15428: [Fluidsynth] Treat configured synth.gain as maximum instead of hardcoded value (#15429)
- Fix: Refresh string width cache for all loaded fonts (#15427)
- Fix: Typo in Hungarian town name suffix ("kak" -> "lak") (#15421)
- Fix: [NewGRF] Variable 0x69 has not been added for waypoints (#15396)
- Fix: Dropdown text filter could interfere with hotkeys after closing (#15395)
- Fix: Rejecting or accepting engine preview incorrectly closed preview window (#15378)
- Fix #15318: Nonsensical error message when trying to send aircraft to hangar with no usable airports (#15334)
- Fix #15234: Null pointer dereference opening sign edit window when sign 0 does not exist (#15236)
- Fix: [GS] Docs are missing or do not match the code (#15230)
- Fix: Off by one and redundant logic in snowy road checks (#15214)
- Fix #15137: Roads built on steep slopes at the minimum snow level height have inconsistent snowiness (#15190)
- Fix: Station view window fold/unfold not refreshing scrollbar (#15187)
- Fix: Use consistent description for invalid orders (#15177)
- Fix: [Script] Give GetPrimary/SecondaryLiveryColour preconditions (#15169)
- Fix: Cocoa video driver did not register (#15145)
- Fix: MacOS version detection was broken (#15145)
- Fix #13600: Make terraform click+draggable in scenario editor (#15135)
- Fix: [Script] Map some error strings to existing errors (#15113)
- Fix: Allow to build buoys at (0x0) (#14983)
- Fix #14610: Do not treat aircraft with only depot orders as having valid orders (#14961)
- Fix #12937: Allow the computer to go to sleep while the game is paused (#14948)
- Fix: Company query popups do not update in multiplayer (#14947)
- Fix #14892: Potential crash when logging fonts for survey (#14896)
- Fix #14827: Store random trigger information per-tile (#14830)
## 15.x
### 15.3 (2026-04-04)
- Fix: Conditional orders could require a maximum reliability over 100% (#15409)
- Fix: Improve appearance of toolbars and main menu images/text with some non-default base sets (#15402)
- Fix: [Script] IsBuildableRectangle for a 0x0 tile should return false (#15357)
- Fix: Desync caused by train crashes (#15338)
- Fix: Incorrect scroll bar capacity for train details window total cargo tab (#15329)
- Fix #15310: Crash caused by a helicopter running out of fuel near map edge (#15311)
### 15.2 (2026-02-18)
- Fix: Crashed zeppelin not blocking runway (#15281)
- Fix #15269: Crash when building drive-through stop on unowned one-way road (#15270)
- Fix #15247: Crash when handling invalid sprite in OpenGL cursor sprite system (#15248)
- Fix #15105: Czech townname generation causing crashes (#15231)
- Fix: Incorrect ground type test when placing towns (#15217)
- Fix: Town supplied cargo history incorrectly clamped to 16 bit values (#15183)
- Fix #15085: Crash when GUI scale changes before video driver is fully initialised (#15175)
- Fix: Articulated road vehicle following with immediately sequential u-turns (#15170)
- Fix #15166: Foundations missing adjacent to NewGRF objects without foundation (#15168)
- Fix #14035: [Fluidsynth] Read settings from config files if available (#15044)
- Fix #15263: Badge filter toggles no longer worked (#14972)
### 15.1 (2026-01-24)
- Fix #15088: When building a new train, the refit button state may be incorrect (#15162)
- Fix #15160: Incorrect company names displayed in load game window (#15161)
- Fix #15153: Wrong tile used to get bridge reservation overlay (#15154)
- Fix #15116: Old cargo/industry sets without cargo translation table broken (#15150)
- Fix: Possible crash converting company liveries in older savegames/scenarios (#15148)
- Fix: Allow infinite water to be (de)selected when loading heightmap (#15146)
- Fix: Tile suitability test for farm field no longer handled snow tiles (#15134)
- Fix #15131: Trees no longer spread on partially snowy tiles (#15133)
- Fix: Change tooltips to match change from checkboxes to switches (#15123)
- Fix: [Script] Potential out of bounds array/string slice indexes (#15106)
- Fix: [Script] Potential out of bounds indexed string access (#15106)
- Fix: [Script] Check if array sort function modified array (#15106)
- Fix #15069: World generation map edges GUI starts in an invalid state (#15082)
- Fix #15079: Incorrect dates shown on town cargo history graph (#15080)
- Fix #15067: Mark NewGRF settings as modified after moving by drag & drop (#15068)
- Fix: Incorrect error message for aqueducts reaching northern map borders (#14974)
- Fix: Standardize wording of GRF/NewGRF (#15059)
- Fix #15046: Crash on loading game due to invalid group parents (#15049)
- Fix: Disable_elrails handling with engines that use both RAIL and ELRL (#15045)
- Fix: [Fluidsynth] Read settings from system and user config files if available (#15044)
- Fix #15039: Name and version can disappear from content list (#15040)
- Fix #15026: Remove incorrect info from base sounds tooltip (#15029)
- Fix: [Script] Improve reporting of invalid GetAPIVersion return (#15015)
- Fix: [Script] Undefined behaviour after calling SwapList during iteration (#14805)
### 15.0 (2026-01-01)
- Fix: Small ufos would loop over vehicles in depots forever (#15008)
- Fix #14982: Can't place buoys under bridges (#15007)
- Fix #15004: Crashes when dropdown is held open during endgame screen (#15006)
- Fix: Further improve town spawning near water (#15002)
- Fix: Use correct 'minutes per year' setting for old savegames (#14995)
- Fix: Rare crash dividing by 0 when drawing a line (#14994)
- Fix #14992: Respect non-stop order setting when adding waypoint orders (#14993)
### 15.0-RC4 (2025-12-26)
- Fix: Incorrect text colour in fund industry window (#14987)
- Fix: Towns failed to find spawn locations near water (#14988)
- Fix: Don't draw bridge deck rail sprites for default bridges (#14985)
- Fix: "(Invalid parameter)" in error message when trying to remove another player's object (#14981)
- Fix #14978: Don't clear water tiles after removing buoys (#14980)
- Fix #14973: Composed strings are incorrect colour (#14976)
- Fix: Badge filter toggles no longer worked (#14972)
- Fix #12465: Click/tooltip alignment of industry chain cargo lines (#14963)
- Fix #14951: Possible incorrect data in industry production graphs (#14962)
- Fix #14958: Crash when opening station window (#14959)
- Fix #14938: Don't allow cacti to die off (#14956)
- Fix: Don't allow joining a company after it was taken over (#14955)
- Fix #14949: Crash when moving station sign in a network game (#14950)
- Fix #14945: Hang when deleting implicit orders during vehicle loading (#14946)
### 15.0-RC3 (2025-12-20)
- Fix #14932: [NewGRF] Increase internal badge index size to avoid overflowing BadgeIDs (#14933)
- Fix: Crash related to object picker recolours in Scenario Editor (#14929)
- Fix #14921: Crash during station autorefit if station doesn't accept current cargo type (#14924)
- Fix #14917: Crash when opening house picker with no houses available (#14920)
- Fix #14916: Duration of error message window could be too short (#14919)
- Fix #14915: Crash due to divide-by-zero of industry probabilities (#14918)
- Fix: Script configs were cleared by intro game (#14910)
- Fix: [NewGRF] Automatically push/pop colours when formatting a sub-string (#14006)
### 15.0-RC2 (2025-12-13)
- Fix #14677: Desync due to using newgame time settings to validate savegame time settings (#14904)
- Fix: Graph label allocated size could be too small (#14901)
- Fix #14891: Minimum sprite zoomlevel could break in some cases showing placeholder sprites instead (#14894)
- Fix #14889: [FluidSynth] Don't try to load a soundfont that doesn't exist (#14890)
- Revert: Dynamic font loading changes removed (#14903)
### 15.0-RC1 (2025-12-07)
- Feature: Automatically load extra fonts for missing glyphs (#13303, #14856)
- Feature: Rivers can end in wetlands if unable to reach sea (#14784, #14846)
- Feature: Signs, waypoint and station names may be moved (#14744)
- Feature: House placer mode to replace existing houses (#14469)
- Feature: Draw infinite water when all borders are water (#13289)
- Add: [NewGRF] Allow badges to be excluded from badge name list (#14818)
- Add: [Script] ScriptTile::IsHouseTile (#14806)
- Add: Game units for height (#14615)
- Add: Show height difference in bridge is too low error message (#14614)
- Add: Include build cost in rail/road dropdowns (#14599)
- Add: Show all railtypes in the build vehicle and engine preview dialogs (#14357)
- Add: [Script] Function to get all rail types of an rail engine (#14357)
- Add: [NewGRF] Train property to set multiple track types for an engine (#14357)
- Add: [Script] Auto-convert ObjectType bool to integer when setting values for items in lists via [] (#14308)
- Change: Ensure generated towns have enough room (#14803)
- Change: Eliminate small seas instead of ending rivers there (#14797)
- Change: Clamp terraform toolbar to main toolbar (#14725)
- Change: Make groups window group list aware of interface scaling (#14679)
- Change: Prefer normal/medium weight font in FontConfig fallback detection (#14672)
- Change: Support interface scaling in network client list buttons (#14659)
- Change: Record and show multiple errors for each NewGRF (#14658)
- Change: Replace the "(City)" identifier in the town directory with the city icon (#14634)
- Change: Determine automatic interface scale by window size (#14627)
- Change: Apply interface scale to window snap distance (#14625)
- Change: Ask for confirmation before deleting a savegame / scenario / heightmap (#14621)
- Change: Add lock penalty to ship pathfinder (#14603)
- Change: Allow bridges over locks & docks (#14595, #14594)
- Change: Removed disable_node_optimization YAPF setting (#14578)
- Change: Provide road and rail overlay sprites for bridge decks (#14557)
- Change: Scale number of towns/industries by amount of land tiles (#10063)
- Fix #14802: Close NewGRF inspection window when overbuilding with default station/waypoint (#14859)
- Fix #14839: Do not set stacked widget height, which might not be shown (#14858)
- Fix: Incorrect background colour in badge configuration list (#14850)
- Fix #14844: Use company colour remap for badges in picker window (#14849)
- Fix: Drop down scrolling broken for mixed-height items (#14840)
- Fix #8062: (Try to) ensure enough room for profit in vehicle group window (#14835)
- Fix #9071: Don't consider tram tracks when growing towns (#14833)
- Fix: Saved default houses had incorrect class and index information (#14812)
- Fix #14756: Invalidate nested focus before widget container is cleared (#14809)
- Fix #14800: Incorrect register processing in GetCustomStationRelocation (#14801)
- Fix #14755: Remove clicked type selection when not visible (#14796)
- Fix: Incorrect parsing of var 6x parameter in NewGRF debug window (#14789)
- Fix: Improve lighthouse spawn conditions (#14785)
- Fix #14777: authorized_key add/remove console commands did not apply to correct list (#14778)
- Fix: Incorrect spacing for badges in dropdown lists (#14768)
- Fix: Unconfigured badge classes should be visible in column 0 by default (#14766)
- Fix #14763: Crash if NewGRF currency separator is not valid (#14764)
- Fix #14701: Company colour remap for sprites in badge filter dropdowns (#14732)
- Fix: Do not pre-fill industry production history for unused production slots (#14730)
- Fix: Depot-related crash when loading old savegames (#14729)
- Fix #14721, #14723: Inconsistent behaviour when skipping signals (#14724)
- Fix: Miscalculated cargo penalty for poor station rating (#14712)
- Fix: Crash when user enters a blank line in the console (#14711)
- Fix: Console command dump_info should not reverse non-ASCII label (#14697)
- Fix: Incorrect parameter order for CmdSetCompanyManagerFace (#14695)
- Fix: Bootstrap ignored default OpenTTD truetype fonts (#14684)
- Fix: League Table layout broken with RTL languages (#14667)
- Fix #14549: Changing interface scale could underflow viewport zoom (#14655)
- Fix: Incorrect row height in network server list (#14653)
- Fix: Doubled beep sounds when clicking toolbar buttons (#14642)
- Fix: Wrong button type for town menu in scenario editor toolbar (#14641)
- Fix #14631: Waypoint customs spec not allocated properly on initial construction (#14633)
- Fix: Variant cycle detection in FinaliseEngineArray (#14629)
- Fix #14620: Use full file path when deleting files (#14623)
- Fix: [Script] Return rail types as list instead of bitmask (#14617)
- Fix #14604: Clearing tiles to build objects did not update town ratings (#14616)
- Fix: Bridge height check for waypoints didn't include axis in layout (#14609)
- Fix #14607: Bridge-over-station discrepancy depending on build order (#14608)
- Fix: Don't add spacing in rail/road type dropdowns if no badges are present (#14598)
- Fix: [Script] Incorrect infrastructure cost for road/tram tiles (#14596)
- Fix #14588: Show error when unable to clone partly-cleared crashed train (#14591)
- Fix #14586: Empty station tile layouts incorrectly substituted with default layouts (#14587)
- Fix #14584: Crash due to drawing non-existent orders of new vehicle (#14585)
- Fix #14572: Incorrect playlist entry was removed if there are duplicates (#14583)
- Fix: Wrong row may be selected in music playlists (#14581)
- Fix #14569: Ensure music playlist window is large enough (#14570)
- Fix #14278: [Script] Memory allocation limit did not work and could result in a crash (#14568)
- Fix: Road stop properties 0x13/0x14 were not skipped properly (#14567)
- Fix #13922: Ensure music track number widget is wide enough for track number (#14566)
- Fix: Badge filters were only applied to trains (#14565)
- Fix: [NewGRF] Industry acceptance/production when not contiguous range from 0 (#14555)
- Fix #14240: Remember previous GUI scale when toggling auto-detect (#14380)
- Remove: Rail type cost from replace vehicle window (#14748)
### 15.0-beta3 (2025-08-31)
- Feature: Identify cities in the main viewport by appending an icon to their names (#14504)
+27
View File
@@ -56,6 +56,11 @@ macro(compile_flags)
# This flag disables the broken optimisation to work around the bug
add_compile_options(/d2ssa-rse-)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(
-Wno-multichar
)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_compile_options(
-W
@@ -73,6 +78,9 @@ macro(compile_flags)
-Wnon-virtual-dtor
-Wsuggest-override
# We use 'ABCD' multichar for SaveLoad chunks identifiers
-Wno-multichar
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680 and PR#5246.
-fno-strict-enums
@@ -92,6 +100,9 @@ macro(compile_flags)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-flifetime-dse=1" LIFETIME_DSE_FOUND)
add_compile_options(
# GCC 4.2+ automatically assumes that signed overflows do
# not occur in signed arithmetics, whereas we are not
@@ -99,6 +110,10 @@ macro(compile_flags)
# about its own optimized code in some places.
"-fno-strict-overflow"
# -flifetime-dse=2 (default since GCC 6) doesn't play
# well with our custom pool item allocator
"$<$<BOOL:${LIFETIME_DSE_FOUND}>:-flifetime-dse=1>"
# We have a fight between clang wanting std::move() and gcc not wanting it
# and of course they both warn when the other compiler is happy
"-Wno-redundant-move"
@@ -118,6 +133,18 @@ macro(compile_flags)
endif()
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
add_compile_options(
-Wall
# warning #873: function ... ::operator new ... has no corresponding operator delete ...
-wd873
# warning #1292: unknown attribute "fallthrough"
-wd1292
# warning #1899: multicharacter character literal (potential portability problem)
-wd1899
# warning #2160: anonymous union qualifier is ignored
-wd2160
)
else()
message(FATAL_ERROR "No warning flags are set for this compiler yet; please consider creating a Pull Request to add support for this compiler.")
endif()
+2 -6
View File
@@ -5,12 +5,12 @@
#
# create_regression(file1 ...)
#
macro(create_regression SCRIPT_FOLDER)
macro(create_regression)
set(REGRESSION_SOURCE_FILES ${ARGN})
foreach(REGRESSION_SOURCE_FILE IN LISTS REGRESSION_SOURCE_FILES)
string(REPLACE "${CMAKE_SOURCE_DIR}/regression/" "" REGRESSION_SOURCE_FILE_NAME "${REGRESSION_SOURCE_FILE}")
string(CONCAT REGRESSION_BINARY_FILE "${CMAKE_BINARY_DIR}/${SCRIPT_FOLDER}/" "${REGRESSION_SOURCE_FILE_NAME}")
string(CONCAT REGRESSION_BINARY_FILE "${CMAKE_BINARY_DIR}/ai/" "${REGRESSION_SOURCE_FILE_NAME}")
add_custom_command(OUTPUT ${REGRESSION_BINARY_FILE}
COMMAND ${CMAKE_COMMAND} -E copy
@@ -38,7 +38,6 @@ macro(create_regression SCRIPT_FOLDER)
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
-DSCRIPT_FOLDER=${SCRIPT_FOLDER}
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
DEPENDS openttd regression_${REGRESSION_TEST_NAME}_files
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
@@ -51,12 +50,9 @@ macro(create_regression SCRIPT_FOLDER)
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
-DSCRIPT_FOLDER=${SCRIPT_FOLDER}
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
set_property(TEST regression_${REGRESSION_TEST_NAME} PROPERTY RUN_SERIAL TRUE)
add_dependencies(regression regression_${REGRESSION_TEST_NAME})
endmacro()
+69
View File
@@ -0,0 +1,69 @@
# CMake provides a FindICU module since version 3.7.
# But it doesn't use pkgconfig, doesn't set expected variables,
# And it returns incomplete dependencies if only some modules are searched.
#[=======================================================================[.rst:
FindICU
-------
Finds components of the ICU library.
Accepted components are: uc, i18n, le, lx, io, data
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``ICU_FOUND``
True if components of ICU library are found.
``ICU_VERSION``
The version of the ICU library which was found.
``ICU_<c>_FOUND``
True if the system has the <c> component of ICU library.
``ICU_<c>_INCLUDE_DIRS``
Include directories needed to use the <c> component of ICU library.
``ICU_<c>_LIBRARIES``
Libraries needed to link to the <c> component of ICU library.
#]=======================================================================]
find_package(PkgConfig QUIET)
set(ICU_KNOWN_COMPONENTS "uc" "i18n" "le" "lx" "io" "data")
foreach(MOD_NAME IN LISTS ICU_FIND_COMPONENTS)
if(NOT MOD_NAME IN_LIST ICU_KNOWN_COMPONENTS)
message(FATAL_ERROR "Unknown ICU component: ${MOD_NAME}")
endif()
pkg_check_modules(PC_ICU_${MOD_NAME} QUIET icu-${MOD_NAME})
# Check the libraries returned by pkg-config really exist.
unset(PC_LIBRARIES)
foreach(LIBRARY IN LISTS PC_ICU_${MOD_NAME}_LIBRARIES)
unset(PC_LIBRARY CACHE)
find_library(PC_LIBRARY NAMES ${LIBRARY})
if(NOT PC_LIBRARY)
unset(PC_ICU_${MOD_NAME}_FOUND)
endif()
list(APPEND PC_LIBRARIES ${PC_LIBRARY})
endforeach()
unset(PC_LIBRARY CACHE)
if(${PC_ICU_${MOD_NAME}_FOUND})
set(ICU_COMPONENT_FOUND TRUE)
set(ICU_${MOD_NAME}_FOUND TRUE)
set(ICU_${MOD_NAME}_LIBRARIES ${PC_LIBRARIES})
set(ICU_${MOD_NAME}_INCLUDE_DIRS ${PC_ICU_${MOD_NAME}_INCLUDE_DIRS})
set(ICU_VERSION ${PC_ICU_${MOD_NAME}_VERSION})
endif()
endforeach()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ICU
FOUND_VAR ICU_FOUND
REQUIRED_VARS ICU_COMPONENT_FOUND
VERSION_VAR ICU_VERSION
HANDLE_COMPONENTS
)
+31 -50
View File
@@ -190,63 +190,44 @@ elseif(UNIX)
set(CPACK_GENERATOR "TXZ")
set(PLATFORM "unknown")
else()
if(EXISTS "/etc/os-release")
file(STRINGS "/etc/os-release" OS_RELEASE_LIKE_CONTENTS REGEX "^ID_LIKE=")
if (OS_RELEASE_LIKE_CONTENTS)
string(REGEX MATCH "ID_LIKE=\\\"?([^\\\"]+)" _ ${OS_RELEASE_LIKE_CONTENTS})
string(REGEX MATCHALL "([^ ]+)" DISTRO_LIKE_IDS ${CMAKE_MATCH_1})
endif()
if (DISTRO_LIKE_IDS)
set(DISTRO_IDS ${DISTRO_LIKE_IDS})
else()
file(STRINGS "/etc/os-release" OS_RELEASE_CONTENTS REGEX "^ID=")
string(REGEX MATCH "ID=(.*)" _ ${OS_RELEASE_CONTENTS})
set(DISTRO_IDS ${CMAKE_MATCH_1})
endif()
if("arch" IN_LIST DISTRO_IDS)
set(PLATFORM "arch")
set(CPACK_GENERATOR "TXZ")
elseif("fedora" IN_LIST DISTRO_IDS OR "rhel" IN_LIST DISTRO_IDS)
set(PLATFORM "fedora")
set(CPACK_GENERATOR "RPM")
include(PackageRPM)
elseif("debian" IN_LIST DISTRO_IDS OR "ubuntu" IN_LIST DISTRO_IDS OR "linuxmint" IN_LIST DISTRO_IDS)
file(STRINGS "/etc/os-release" OS_RELEASE_CODENAME REGEX "^VERSION_CODENAME=")
string(REGEX MATCH "VERSION_CODENAME=(.*)" _ ${OS_RELEASE_CODENAME})
set(RELEASE_CODENAME ${CMAKE_MATCH_1})
string(TOLOWER "${DISTRO_ID}-${RELEASE_CODENAME}" PLATFORM)
find_program(LSB_RELEASE_EXEC lsb_release)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
OUTPUT_VARIABLE LSB_RELEASE_ID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(LSB_RELEASE_ID)
if(LSB_RELEASE_ID STREQUAL "Ubuntu" OR LSB_RELEASE_ID STREQUAL "Debian" OR LSB_RELEASE_ID STREQUAL "Linuxmint")
execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs
OUTPUT_VARIABLE LSB_RELEASE_CODENAME
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(TOLOWER "${LSB_RELEASE_ID}-${LSB_RELEASE_CODENAME}" PLATFORM)
set(CPACK_GENERATOR "DEB")
include(PackageDeb)
elseif(LSB_RELEASE_ID STREQUAL "Fedora")
set(PLATFORM "fedora")
set(CPACK_GENERATOR "RPM")
include(PackageRPM)
else()
set(UNSUPPORTED_PLATFORM_NAME "LSB-based Linux distribution '${LSB_RELEASE_ID}'")
endif()
elseif(EXISTS "/etc/os-release")
file(STRINGS "/etc/os-release" OS_RELEASE_CONTENTS REGEX "^ID=")
string(REGEX MATCH "ID=(.*)" _ ${OS_RELEASE_CONTENTS})
set(DISTRO_ID ${CMAKE_MATCH_1})
if(DISTRO_ID STREQUAL "arch")
set(PLATFORM "arch")
set(CPACK_GENERATOR "TXZ")
elseif(DISTRO_ID STREQUAL "fedora" OR DISTRO_ID STREQUAL "rhel")
set(PLATFORM "fedora")
set(CPACK_GENERATOR "RPM")
include(PackageRPM)
else()
set(UNSUPPORTED_PLATFORM_NAME "Linux distribution '${DISTRO_ID}' from /etc/os-release")
endif()
else()
find_program(LSB_RELEASE_EXEC lsb_release)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
OUTPUT_VARIABLE LSB_RELEASE_ID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(LSB_RELEASE_ID)
if(LSB_RELEASE_ID STREQUAL "Ubuntu" OR LSB_RELEASE_ID STREQUAL "Debian" OR LSB_RELEASE_ID STREQUAL "Linuxmint")
execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs
OUTPUT_VARIABLE LSB_RELEASE_CODENAME
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(TOLOWER "${LSB_RELEASE_ID}-${LSB_RELEASE_CODENAME}" PLATFORM)
set(CPACK_GENERATOR "DEB")
include(PackageDeb)
elseif(LSB_RELEASE_ID STREQUAL "Fedora")
set(PLATFORM "fedora")
set(CPACK_GENERATOR "RPM")
include(PackageRPM)
else()
set(UNSUPPORTED_PLATFORM_NAME "LSB-based Linux distribution '${LSB_RELEASE_ID}'")
endif()
else()
set(UNSUPPORTED_PLATFORM_NAME "Linux distribution")
endif()
set(UNSUPPORTED_PLATFORM_NAME "Linux distribution")
endif()
if(NOT PLATFORM)
-20
View File
@@ -61,32 +61,12 @@ function(set_options)
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
option(OPTION_ALLOW_INVALID_SIGNATURE "Allow loading of content with invalid signatures" OFF)
option(OPTION_LINE_IN_DOXYGEN_WARNINGS "Print line number in doxygen warnings" ON)
if (OPTION_DOCS_ONLY)
set(OPTION_TOOLS_ONLY ON PARENT_SCOPE)
endif()
if (OPTION_LINE_IN_DOXYGEN_WARNINGS)
set(DOXYGEN_WARN_FORMAT_LINE "line" PARENT_SCOPE)
endif()
option(OPTION_SURVEY_KEY "Survey-key to use for the opt-in survey (empty if you have none)" "")
option(OPTION_DOXYGEN_WARN_FILE "File to write doxygen warnings into (if empty warnings are written to standard error)" "")
option(OPTION_DOXYGEN_GS_WARN_FILE "File to write doxygen warnings from game script docs into (if empty warnings are written to standard error)" "")
option(OPTION_DOXYGEN_AI_WARN_FILE "File to write doxygen warnings from AI docs into (if empty warnings are written to standard error)" "")
if(OPTION_DOXYGEN_WARN_FILE)
set(DOXYGEN_WARN_FILE ${CMAKE_BINARY_DIR}/${OPTION_DOXYGEN_WARN_FILE} PARENT_SCOPE)
endif()
if(OPTION_DOXYGEN_GS_WARN_FILE)
set(DOXYGEN_GS_WARN_FILE ${CMAKE_BINARY_DIR}/${OPTION_DOXYGEN_GS_WARN_FILE} PARENT_SCOPE)
endif()
if(OPTION_DOXYGEN_AI_WARN_FILE)
set(DOXYGEN_AI_WARN_FILE ${CMAKE_BINARY_DIR}/${OPTION_DOXYGEN_AI_WARN_FILE} PARENT_SCOPE)
endif()
endfunction()
# Show the values of the generic options.
-3
View File
@@ -135,9 +135,6 @@ if(GENERATE_OTTDREV)
message(STATUS "Generating .ottdrev")
file(WRITE ${CMAKE_SOURCE_DIR}/.ottdrev "${REV_VERSION}\t${REV_ISODATE}\t${REV_MODIFIED}\t${REV_HASH}\t${REV_ISTAG}\t${REV_ISSTABLETAG}\n")
else()
if(REV_ISSTABLETAG AND NOT (REV_VERSION STREQUAL "${REV_MAJOR}.${REV_MINOR}"))
message(FATAL_ERROR "Tag (${REV_VERSION}) doesn't match internal version (${REV_MAJOR}.${REV_MINOR})")
endif()
message(STATUS "Generating rev.cpp")
configure_file("${CMAKE_SOURCE_DIR}/src/rev.cpp.in"
"${FIND_VERSION_BINARY_DIR}/rev.cpp")
+13 -23
View File
@@ -25,13 +25,6 @@ endif()
file(STRINGS ${GENERATE_SOURCE_FILE} ENUM_LINES REGEX "@enum")
function(remove_invalid_links VARIABLE)
string(REGEX REPLACE "#([A-Za-z0-9_]*Widgets)" "@hash \\1" VARIABLE "${VARIABLE}")
string(REPLACE "#" "" VARIABLE "${VARIABLE}")
string(REPLACE "@hash " "#" VARIABLE "${VARIABLE}")
set(NO_INVALID_LINKS ${VARIABLE} PARENT_SCOPE)
endfunction()
foreach(ENUM IN LISTS ENUM_LINES)
string(REGEX REPLACE "^( )// @enum ([^ ]+) ([^ ]+)@([^ ]+)@" "\\4" PLACE_HOLDER "${ENUM}")
set(ADD_INDENT "${CMAKE_MATCH_1}")
@@ -56,17 +49,14 @@ foreach(ENUM IN LISTS ENUM_LINES)
# Remember possible doxygen comment before enum declaration
if((NOT ACTIVE) AND "${LINE}" MATCHES "/\\*\\*")
remove_invalid_links("${LINE}")
set(COMMENT "${ADD_INDENT}${NO_INVALID_LINKS}")
set(COMMENT "${ADD_INDENT}${LINE}")
set(ACTIVE_COMMENT 1)
elseif(ACTIVE_COMMENT EQUAL 1)
remove_invalid_links("${LINE}")
string(APPEND COMMENT "\n${ADD_INDENT}${NO_INVALID_LINKS}")
string(APPEND COMMENT "\n${ADD_INDENT}${LINE}")
endif()
# Check for enum match
if("${LINE}" MATCHES "^ *enum *(class)? *(${ENUM_PATTERN})( *: *[^ ]*)? *\{")
set(ENUM_NAME "${CMAKE_MATCH_2}")
if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN}( *: *[^ ]*)? *\{")
# REGEX REPLACE does a REGEX MATCHALL and fails if an empty string is matched
string(REGEX MATCH "[^ ]*" RESULT "${LINE}")
string(REPLACE "${RESULT}" "" RM_INDENT "${LINE}")
@@ -110,23 +100,23 @@ foreach(ENUM IN LISTS ENUM_LINES)
endforeach()
if(CMAKE_MATCH_3)
# CMAKE_MATCH_3 contains inline comment.
remove_invalid_links("${CMAKE_MATCH_3}")
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${CMAKE_MATCH_1}${CMAKE_MATCH_2}${SPACES} = to_underlying(::${ENUM_NAME}::${CMAKE_MATCH_2}),${SPACES}${NO_INVALID_LINKS}")
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${CMAKE_MATCH_1}${CMAKE_MATCH_2}${SPACES} = ::${CMAKE_MATCH_2},${SPACES}${CMAKE_MATCH_3}")
else()
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${CMAKE_MATCH_1}${CMAKE_MATCH_2}${SPACES} = to_underlying(::${ENUM_NAME}::${CMAKE_MATCH_2}),")
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${CMAKE_MATCH_1}${CMAKE_MATCH_2}${SPACES} = ::${CMAKE_MATCH_2},")
endif()
elseif("${LINE}" STREQUAL "")
string(APPEND ${PLACE_HOLDER} "\n")
elseif("${LINE}" MATCHES "^ *\};")
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${LINE}\n")
unset(ACTIVE)
else()
# Line is not an enum member, so it might be a comment.
remove_invalid_links("${LINE}")
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${NO_INVALID_LINKS}")
string(APPEND ${PLACE_HOLDER} "\n${ADD_INDENT}${LINE}")
endif()
endif()
if("${LINE}" MATCHES "^ *\};")
if(ACTIVE)
string(APPEND ${PLACE_HOLDER} "\n")
endif()
unset(ACTIVE)
endif()
endforeach()
endforeach()
endforeach()
+4 -7
View File
@@ -7,14 +7,11 @@ cmake_minimum_required(VERSION 3.17)
if(NOT REGRESSION_TEST)
message(FATAL_ERROR "Script needs REGRESSION_TEST defined (tip: use -DREGRESSION_TEST=..)")
endif()
if(NOT SCRIPT_FOLDER)
message(FATAL_ERROR "Script needs SCRIPT_FOLDER defined (tip: use -DSCRIPT_FOLDER=..)")
endif()
if(NOT OPENTTD_EXECUTABLE)
message(FATAL_ERROR "Script needs OPENTTD_EXECUTABLE defined (tip: use -DOPENTTD_EXECUTABLE=..)")
endif()
if(NOT EXISTS ${SCRIPT_FOLDER}/${REGRESSION_TEST}/test.sav)
if(NOT EXISTS ai/${REGRESSION_TEST}/test.sav)
message(FATAL_ERROR "Regression test ${REGRESSION_TEST} does not exist (tip: check regression folder for the correct spelling)")
endif()
@@ -38,7 +35,7 @@ endif()
execute_process(COMMAND ${OPENTTD_EXECUTABLE}
-x
-c regression/regression.cfg
-g ${SCRIPT_FOLDER}/${REGRESSION_TEST}/test.sav
-g ai/${REGRESSION_TEST}/test.sav
-snull
-mnull
-vnull:ticks=30000
@@ -80,7 +77,7 @@ string(REGEX REPLACE "\\\[script:[0-9]\\\]" "" REGRESSION_RESULT "${REGRESSION_R
# Convert the output to a format that is expected (and more readable) by result.txt
string(REPLACE "dbg: " "ERROR: " REGRESSION_RESULT "${REGRESSION_RESULT}")
string(REGEX REPLACE "ERROR: \\\[18?\\\] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
string(REPLACE "ERROR: [1] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
string(REPLACE "[P] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
string(REPLACE "[S] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
string(REGEX REPLACE "dbg: ([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
@@ -91,7 +88,7 @@ string(REGEX REPLACE "ERROR: [12]([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSI
string(REGEX REPLACE "ERROR: The first([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
# Read the expected result
file(READ ${SCRIPT_FOLDER}/${REGRESSION_TEST}/result.txt REGRESSION_EXPECTED)
file(READ ai/${REGRESSION_TEST}/result.txt REGRESSION_EXPECTED)
# Convert the string to a list
string(REPLACE "\n" ";" REGRESSION_RESULT "${REGRESSION_RESULT}")
+129 -61
View File
@@ -215,10 +215,6 @@ foreach(LINE IN LISTS SOURCE_LINES)
continue()
endif()
if("${LINE}" MATCHES "^([\t ]*)\\* @suspendable.*$")
set(SUSPENDABLE TRUE)
endif()
# Ignore the comments
if("${LINE}" MATCHES "^#")
continue()
@@ -262,7 +258,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
# We need to make specialized conversions for enums
if("${LINE}" MATCHES "^(\t*)enum *(class)? *([^ ]*)")
if("${LINE}" MATCHES "^(\t*)enum ([^ ]*)")
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
# Check if we want to publish this enum
@@ -280,10 +276,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
set(IN_ENUM TRUE)
if(CMAKE_MATCH_2 STREQUAL "class")
set(IN_SCOPED_ENUM TRUE)
endif()
list(APPEND ENUMS "${CLS}::${CMAKE_MATCH_3}")
list(APPEND ENUMS "${CLS}::${CMAKE_MATCH_2}")
continue()
endif()
@@ -292,7 +285,6 @@ foreach(LINE IN LISTS SOURCE_LINES)
math(EXPR CLS_LEVEL "${CLS_LEVEL} - 1")
if(CLS_LEVEL)
unset(IN_ENUM)
unset(IN_SCOPED_ENUM)
continue()
endif()
@@ -369,86 +361,168 @@ foreach(LINE IN LISTS SOURCE_LINES)
string(APPEND SQUIRREL_EXPORT "\n")
# Enum values
macro(add_scoped_enum_end_if_needed)
if(CURRENT_ENUM_NAME)
unset(CURRENT_ENUM_NAME)
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.AddScopedEnumEnd(engine);\n")
endif()
endmacro()
set(CURRENT_ENUM_NAME 0)
set(MLEN 0)
foreach(ENUM_VALUE IN LISTS ENUM_VALUES)
if(ENUM_VALUE MATCHES "::")
string(REGEX REPLACE ".*:" "" ENUM_VALUE_NAME "${ENUM_VALUE}")
string(REGEX MATCH "::(.*)::" ENUM_NAME "${ENUM_VALUE}")
set(ENUM_NAME ${CMAKE_MATCH_1})
if(CURRENT_ENUM_NAME STREQUAL ENUM_NAME)
else()
add_scoped_enum_end_if_needed()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.AddScopedEnumBegin(engine, \"${ENUM_NAME}\");")
set(CURRENT_ENUM_NAME ${ENUM_NAME})
endif()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, to_underlying(${ENUM_VALUE}), \"${ENUM_VALUE_NAME}\");")
continue()
string(LENGTH "${ENUM_VALUE}" LEN)
if(MLEN LESS LEN)
set(MLEN ${LEN})
endif()
add_scoped_enum_end_if_needed()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, ${CLS}::${ENUM_VALUE}, \"${ENUM_VALUE}\");")
endforeach()
add_scoped_enum_end_if_needed()
foreach(ENUM_VALUE IN LISTS ENUM_VALUES)
string(LENGTH "${ENUM_VALUE}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
unset(SPACES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, ${CLS}::${ENUM_VALUE},${SPACES}\"${ENUM_VALUE}\");")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
# Const values
set(MLEN 0)
foreach(CONST_VALUE IN LISTS CONST_VALUES)
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, ${CLS}::${CONST_VALUE}, \"${CONST_VALUE}\");")
string(LENGTH "${CONST_VALUE}" LEN)
if(MLEN LESS LEN)
set(MLEN ${LEN})
endif()
endforeach()
foreach(CONST_VALUE IN LISTS CONST_VALUES)
string(LENGTH "${CONST_VALUE}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
unset(SPACES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, ${CLS}::${CONST_VALUE},${SPACES}\"${CONST_VALUE}\");")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
# Mapping of OTTD strings to errors
set(MLEN 0)
foreach(ENUM_STRING_TO_ERROR IN LISTS ENUM_STRING_TO_ERRORS)
string(REPLACE ":" ";" ENUM_STRING_TO_ERROR "${ENUM_STRING_TO_ERROR}")
list(GET ENUM_STRING_TO_ERROR 0 ENUM_STRING)
string(LENGTH "${ENUM_STRING}" LEN)
if(MLEN LESS LEN)
set(MLEN ${LEN})
endif()
endforeach()
foreach(ENUM_STRING_TO_ERROR IN LISTS ENUM_STRING_TO_ERRORS)
string(REPLACE ":" ";" ENUM_STRING_TO_ERROR "${ENUM_STRING_TO_ERROR}")
list(GET ENUM_STRING_TO_ERROR 0 ENUM_STRING)
list(GET ENUM_STRING_TO_ERROR 1 ENUM_ERROR)
string(APPEND SQUIRREL_EXPORT "\n\tScriptError::RegisterErrorMap(${ENUM_STRING}, ${CLS}::${ENUM_ERROR});")
string(LENGTH "${ENUM_STRING}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
unset(SPACES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n\tScriptError::RegisterErrorMap(${ENUM_STRING},${SPACES}${CLS}::${ENUM_ERROR});")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
# Mapping of errors to human 'readable' strings.
set(MLEN 0)
foreach(ENUM_ERROR_TO_STRING IN LISTS ENUM_ERROR_TO_STRINGS)
string(LENGTH "${ENUM_ERROR_TO_STRING}" LEN)
string(APPEND SQUIRREL_EXPORT "\n\tScriptError::RegisterErrorMapString(${CLS}::${ENUM_ERROR_TO_STRING}, \"${ENUM_ERROR_TO_STRING}\");")
if(MLEN LESS LEN)
set(MLEN ${LEN})
endif()
endforeach()
foreach(ENUM_ERROR_TO_STRING IN LISTS ENUM_ERROR_TO_STRINGS)
string(LENGTH "${ENUM_ERROR_TO_STRING}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
unset(SPACES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n\tScriptError::RegisterErrorMapString(${CLS}::${ENUM_ERROR_TO_STRING},${SPACES}\"${ENUM_ERROR_TO_STRING}\");")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
# Static methods
set(MLEN 0)
foreach(STATIC_METHOD IN LISTS STATIC_METHODS)
string(REPLACE ":" ";" STATIC_METHOD "${STATIC_METHOD}")
list(GET STATIC_METHOD 0 FUNCNAME)
string(LENGTH "${FUNCNAME}" LEN)
if(MLEN LESS LEN)
set(MLEN ${LEN})
endif()
endforeach()
foreach(STATIC_METHOD IN LISTS STATIC_METHODS)
string(REPLACE ":" ";" STATIC_METHOD "${STATIC_METHOD}")
list(GET STATIC_METHOD 0 FUNCNAME)
list(GET STATIC_METHOD 1 TYPES)
list(GET STATIC_METHOD 2 SUSPENDABLE)
if(SUSPENDABLE)
set(SUSPENDABLE ", true")
endif()
string(LENGTH "${FUNCNAME}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
if("${TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQAdvancedStaticMethod(engine, &${CLS}::${FUNCNAME}, \"${FUNCNAME}\"${SUSPENDABLE});")
if(LEN GREATER 8)
math(EXPR LEN "${LEN} - 8")
else()
set(LEN 0)
endif()
endif()
unset(SPACES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
if("${TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQAdvancedStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
else()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQStaticMethod(engine, &${CLS}::${FUNCNAME}, \"${FUNCNAME}\", \"${TYPES}\"${SUSPENDABLE});")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}\"${TYPES}\");")
endif()
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
# Non-static methods
set(MLEN 0)
foreach(METHOD IN LISTS METHODS)
string(REPLACE ":" ";" METHOD "${METHOD}")
list(GET METHOD 0 FUNCNAME)
string(LENGTH "${FUNCNAME}" LEN)
if(MLEN LESS LEN)
set(MLEN ${LEN})
endif()
endforeach()
foreach(METHOD IN LISTS METHODS)
string(REPLACE ":" ";" METHOD "${METHOD}")
list(GET METHOD 0 FUNCNAME)
list(GET METHOD 1 TYPES)
list(GET METHOD 2 SUSPENDABLE)
if(SUSPENDABLE)
set(SUSPENDABLE ", true")
endif()
string(LENGTH "${FUNCNAME}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
if("${TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQAdvancedMethod(engine, &${CLS}::${FUNCNAME}, \"${FUNCNAME}\"${SUSPENDABLE});")
if(LEN GREATER 8)
math(EXPR LEN "${LEN} - 8")
else()
set(LEN 0)
endif()
endif()
unset(SPACES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
if("${TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQAdvancedMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
else()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQMethod(engine, &${CLS}::${FUNCNAME}, \"${FUNCNAME}\", \"${TYPES}\"${SUSPENDABLE});")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}\"${TYPES}\");")
endif()
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
string(APPEND SQUIRREL_EXPORT "\n")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.PostRegister(engine);")
string(APPEND SQUIRREL_EXPORT "\n}")
@@ -468,16 +542,11 @@ foreach(LINE IN LISTS SOURCE_LINES)
# Add enums
if(IN_ENUM)
string(REGEX MATCH "([^,\t ]+)" ENUM_VALUE "${LINE}")
list(APPEND ENUM_VALUES "${ENUM_VALUE}")
# Check if this a special error enum
list(GET ENUMS -1 ENUM)
string(REGEX MATCH "([^,\t ]+)" ENUM_VALUE "${LINE}")
if(IN_SCOPED_ENUM)
list(APPEND ENUM_VALUES "${ENUM}::${ENUM_VALUE}")
else()
list(APPEND ENUM_VALUES "${ENUM_VALUE}")
endif()
if("${ENUM}" MATCHES ".*::ErrorMessages")
# syntax:
# enum ErrorMessages {
@@ -603,11 +672,10 @@ foreach(LINE IN LISTS SOURCE_LINES)
set(CLS_TYPES "${TYPES}")
elseif("${FUNCNAME}" MATCHES "^_" AND NOT "${TYPES}" STREQUAL "v")
elseif(IS_STATIC)
list(APPEND STATIC_METHODS "${FUNCNAME}:${TYPES}:${SUSPENDABLE}")
list(APPEND STATIC_METHODS "${FUNCNAME}:${TYPES}")
else()
list(APPEND METHODS "${FUNCNAME}:${TYPES}:${SUSPENDABLE}")
list(APPEND METHODS "${FUNCNAME}:${TYPES}")
endif()
unset(SUSPENDABLE)
continue()
endif()
endforeach()
+66 -66
View File
@@ -38,7 +38,7 @@ Last updated: 2024-03-26
packets are dropped in favour of a new packet.
This though will be reflected in the protocol version as announced in the
`PacketAdminType::ServerProtocol` in section 2.0).
`ADMIN_PACKET_SERVER_PROTOCOL` in section 2.0).
A reference implementation in Java for a client connecting to the admin interface
can be found at: [http://dev.openttdcoop.org/projects/joan](http://dev.openttdcoop.org/projects/joan)
@@ -49,18 +49,18 @@ Last updated: 2024-03-26
Create a TCP connection to the server on port 3977. The application is
expected to authenticate within 10 seconds.
To authenticate send either an `PacketAdminType::AdminJoin` or an
`PacketAdminType::AdminJoinSecure` packet.
To authenticate send either an `ADMIN_PACKET_ADMIN_JOIN` or an
`ADMIN_PACKET_ADMIN_JOIN_SECURE` packet.
The `PacketAdminType::AdminJoin` packet sends the password without any
The `ADMIN_PACKET_ADMIN_JOIN` packet sends the password without any
encryption or safeguards over the connection, and as such has been disabled
by default.
The `PacketAdminType::AdminJoinSecure` packet initiates a key exchange
The `ADMIN_PACKET_ADMIN_JOIN_SECURE` packet initiates a key exchange
authentication schema which tells te server which methods the client
supports and the server makes a choice. The server will then send an
`PacketAdminType::ServerAuthenticationRequest` packet to which the client has to respond
with an `PacketAdminType::AdminAuthenticationResponse` packet.
`ADMIN_PACKET_SERVER_AUTH_REQUEST` packet to which the client has to respond
with an `ADMIN_PACKET_ADMIN_AUTH_RESPONSE` packet.
The current choices for secure authentication are authorized keys, where
the client has a private key and the server a list of authorized public
@@ -69,41 +69,41 @@ Last updated: 2024-03-26
The server falls back to password authentication when the client's key is
not in the list of authorized keys.
When authentication has succeeded for either of the `AdminJoin` schemas, the
server will reply with `PacketAdminType::ServerProtocol` followed directly
by `PacketAdminType::ServerWelcome`.
When authentication has succeeded for either of the `JOIN` schemas, the
server will reply with `ADMIN_PACKET_SERVER_PROTOCOL` followed directly
by `ADMIN_PACKET_SERVER_WELCOME`.
`PacketAdminType::ServerProtocol` contains details about the protocol version.
`ADMIN_PACKET_SERVER_PROTOCOL` contains details about the protocol version.
It is the job of your application to check this number and decide whether
it will remain connected or not.
Furthermore, this packet holds details on every `AdminUpdateType` and the
supported `AdminFrequencyTypes` (bitwise representation).
`PacketAdminType::ServerWelcome` contains details on the server and the map,
`ADMIN_PACKET_SERVER_WELCOME` contains details on the server and the map,
e.g. if the server is dedicated, its NetworkLanguage, size of the Map, etc.
Once you have received `PacketAdminType::ServerWelcome` you are connected and
Once you have received `ADMIN_PACKET_SERVER_WELCOME` you are connected and
authorized to do your thing.
The server will not provide any game related updates unless you ask for them.
There are four packets the server will none the less send, if applicable:
- PacketAdminType::ServerError
- PacketAdminType::ServerWelcome
- PacketAdminType::ServerNewGame
- PacketAdminType::ServerShutdown
- ADMIN_PACKET_SERVER_ERROR
- ADMIN_PACKET_SERVER_WELCOME
- ADMIN_PACKET_SERVER_NEWGAME
- ADMIN_PACKET_SERVER_SHUTDOWN
However, `PacketAdminType::ServerWelcome` only after a `PacketAdminType::ServerNewGame`
However, `ADMIN_PACKET_SERVER_WELCOME` only after a `ADMIN_PACKET_SERVER_NEWGAME`
## 3.0) Asking for updates
Asking for updates is done with `PacketAdminType::AdminUpdateFrequency`.
Asking for updates is done with `ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY`.
With this packet you define which update you wish to receive at which
frequency.
Note: not every update type supports every frequency. If in doubt, you can
verify against the data received in `PacketAdminType::ServerProtocol`.
verify against the data received in `ADMIN_PACKET_SERVER_PROTOCOL`.
Please note the potential gotcha in the "Certain packet information" section below
when using the `ADMIN_UPDATE_FREQUENCY` packet.
@@ -114,61 +114,61 @@ Last updated: 2024-03-26
Additional debug information can be found with a debug level of `net=3`.
`AdminUpdateType::Date` results in the server sending:
`ADMIN_UPDATE_DATE` results in the server sending:
- PacketAdminType::ServerDate
- ADMIN_PACKET_SERVER_DATE
`AdminUpdateType::ClientInfo` results in the server sending:
`ADMIN_UPDATE_CLIENT_INFO` results in the server sending:
- PacketAdminType::ServerClientJoin
- PacketAdminType::ServerClientInfo
- PacketAdminType::ServerClientUpdate
- PacketAdminType::ServerClientQuit
- PacketAdminType::ServerClientError
- ADMIN_PACKET_SERVER_CLIENT_JOIN
- ADMIN_PACKET_SERVER_CLIENT_INFO
- ADMIN_PACKET_SERVER_CLIENT_UPDATE
- ADMIN_PACKET_SERVER_CLIENT_QUIT
- ADMIN_PACKET_SERVER_CLIENT_ERROR
`AdminUpdateType::CompanyInfo` results in the server sending:
`ADMIN_UPDATE_COMPANY_INFO` results in the server sending:
- PacketAdminType::ServerCompanyNew
- PacketAdminType::ServerCompanyInfo
- PacketAdminType::ServerCompanyUpdate
- PacketAdminType::ServerCompanyRemove
- ADMIN_PACKET_SERVER_COMPANY_NEW
- ADMIN_PACKET_SERVER_COMPANY_INFO
- ADMIN_PACKET_SERVER_COMPANY_UPDATE
- ADMIN_PACKET_SERVER_COMPANY_REMOVE
`AdminUpdateType::CompanyEconomy` results in the server sending:
`ADMIN_UPDATE_COMPANY_ECONOMY` results in the server sending:
- PacketAdminType::ServerCompanyEconomy
- ADMIN_PACKET_SERVER_COMPANY_ECONOMY
`AdminUpdateType::CompanyStats` results in the server sending:
`ADMIN_UPDATE_COMPANY_STATS` results in the server sending:
- PacketAdminType::ServerCompanyStatistics
- ADMIN_PACKET_SERVER_COMPANY_STATS
`AdminUpdateType::Chat` results in the server sending:
`ADMIN_UPDATE_CHAT` results in the server sending:
- PacketAdminType::ServerChat
- ADMIN_PACKET_SERVER_CHAT
`AdminUpdateType::Console` results in the server sending:
`ADMIN_UPDATE_CONSOLE` results in the server sending:
- PacketAdminType::ServerConsole
- ADMIN_PACKET_SERVER_CONSOLE
`AdminUpdateType::CmdLogging` results in the server sending:
`ADMIN_UPDATE_CMD_LOGGING` results in the server sending:
- PacketAdminType::ServerCommandLogging
- ADMIN_PACKET_SERVER_CMD_LOGGING
## 3.1) Polling manually
Certain `AdminUpdateTypes` can also be polled:
- AdminUpdateType::Date
- AdminUpdateType::ClientInfo
- AdminUpdateType::CompanyInfo
- AdminUpdateType::CompanyEconomy
- AdminUpdateType::CompanyStats
- AdminUpdateType::CmdNames
- ADMIN_UPDATE_DATE
- ADMIN_UPDATE_CLIENT_INFO
- ADMIN_UPDATE_COMPANY_INFO
- ADMIN_UPDATE_COMPANY_ECONOMY
- ADMIN_UPDATE_COMPANY_STATS
- ADMIN_UPDATE_CMD_NAMES
Please note the potential gotcha in the "Certain packet information" section below
when using the `ADMIN_POLL` packet.
`AdminUpdateType::ClientInfo` and `AdminUpdateType::CompanyInfo` accept an additional
`ADMIN_UPDATE_CLIENT_INFO` and `ADMIN_UPDATE_COMPANY_INFO` accept an additional
parameter. This parameter is used to specify a certain client or company.
Setting this parameter to `UINT32_MAX (0xFFFFFFFF)` will tell the server you
want to receive updates for all clients or companies.
@@ -181,16 +181,16 @@ Last updated: 2024-03-26
## 4.0) Sending rcon commands
Rcon runs separate from the `AdminUpdateType::Console` `AdminUpdateType`. Requesting
Rcon runs separate from the `ADMIN_UPDATE_CONSOLE` `AdminUpdateType`. Requesting
the execution of a remote console command is done with the packet
`PacketAdminType::AdminRemoteConsoleCommand`.
`ADMIN_PACKET_ADMIN_RCON`.
Note: No additional authentication is required for rcon commands.
The server will reply with one or more `PacketAdminType::ServerRemoteConsoleCommand` packets.
Finally an `PacketAdminType::AdminRemoteConsoleCommandEnd` packet will be sent. Applications
The server will reply with one or more `ADMIN_PACKET_SERVER_RCON` packets.
Finally an `ADMIN_PACKET_ADMIN_RCON_END` packet will be sent. Applications
will not receive the answer twice if they have asked for the `AdminUpdateType`
`AdminUpdateType::Console`, as the result is not printed on the servers console
`ADMIN_UPDATE_CONSOLE`, as the result is not printed on the servers console
(just like clients rcon commands).
Furthermore, sending a `say` command (or any similar command) will not
@@ -199,7 +199,7 @@ Last updated: 2024-03-26
was not sent from the admin network.
Note that when content is queried or updated via rcon, the processing
happens asynchronously. But the `PacketAdminType::AdminRemoteConsoleCommandEnd` packet is sent
happens asynchronously. But the `ADMIN_PACKET_ADMIN_RCON_END` packet is sent
already right after the content is requested as there's no immediate output.
Thus other packages and the output of content rcon command may be sent at
an arbitrary later time, mixing into the output of other console activity,
@@ -208,7 +208,7 @@ Last updated: 2024-03-26
## 5.0) Sending chat
Sending a `PacketAdminType::AdminChat` results in chat originating from the server.
Sending a `ADMIN_PACKET_ADMIN_CHAT` results in chat originating from the server.
Currently four types of chat are supported:
@@ -223,7 +223,7 @@ Last updated: 2024-03-26
## 5.1) Receiving chat
Register `AdminUpdateType::Chat` at `AdminUpdateFrequency::Automatic` to receive chat.
Register `ADMIN_UPDATE_CHAT` at `AdminUpdateFrequency::Automatic` to receive chat.
The application will be able to receive all chat the server can see.
The configuration option `network.server_admin_chat` specifies whether
@@ -233,12 +233,12 @@ Last updated: 2024-03-26
## 6.0) Disconnecting
It is a kind thing to say good bye before leaving. Do this by sending the
`PacketAdminType::AdminQuit` packet.
`ADMIN_PACKET_ADMIN_QUIT` packet.
## 7.0) Certain packet information
`PacketAdminType::AdminUpdateFrequency` and `PacketAdminType::AdminPoll`
`ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY` and `ADMIN_PACKET_ADMIN_POLL`
Potential gotcha: the AdminUpdateType integer type used is a
uint16 for `UPDATE_FREQUENCY`, and a uint8 for `POLL`.
@@ -246,21 +246,21 @@ Last updated: 2024-03-26
It is safe to cast between the two when sending
(i.e cast from a uint8 to a uint16).
All `PacketAdminType::Server*` packets have an enum value greater 100.
All `ADMIN_PACKET_SERVER_*` packets have an enum value greater 100.
`PacketAdminType::ServerWelcome`
`ADMIN_PACKET_SERVER_WELCOME`
Either directly follows `PacketAdminType::ServerProtocol` or is sent
Either directly follows `ADMIN_PACKET_SERVER_PROTOCOL` or is sent
after a new game has been started or a map loaded, i.e. also
after PacketAdminType::ServerNewGame.
after ADMIN_PACKET_SERVER_NEWGAME.
`PacketAdminType::ServerClientJoin` and `PacketAdminType::ServerCompanyNew`
`ADMIN_PACKET_SERVER_CLIENT_JOIN` and `ADMIN_PACKET_SERVER_COMPANY_NEW`
These packets directly follow their respective INFO packets. If you receive
a CLIENT_JOIN / COMPANY_NEW packet without having received the INFO packet
it may be a good idea to POLL for the specific ID.
`PacketAdminType::ServerCommandNames` and `PacketAdminType::ServerCommandLogging`
`ADMIN_PACKET_SERVER_CMD_NAMES` and `ADMIN_PACKET_SERVER_CMD_LOGGING`
Data provided with these packets is not stable and will not be
treated as such. Do not rely on IDs or names to be constant
-11
View File
@@ -38,17 +38,6 @@ your operating system:
It includes the OpenTTD files (grf+lng) and it will work as long as they
are not touched
7. The Atari Transport Tycoon Deluxe directory, if installed (path may vary)
This refers to the `CD` folder within the Transport Tycoon Deluxe
installation folder (2026 Atari re-release). OpenTTD detects the presence
of this folder based upon the contents of the `installpath.ini` file located
in:
- Windows: `%APPDATA%\Atari\Transport Tycoon Deluxe`
- macOS: `~/Library/Application Support/Atari/Transport Tycoon Deluxe`
- Linux: `$XDG_DATA_HOME/Atari/Transport Tycoon Deluxe`
This is used only for the loading of base sets (graphics, sound, music).
Different types of data or extensions go into different subdirectories of the
chosen main OpenTTD directory:
+94 -98
View File
@@ -16,7 +16,7 @@
<a href="landscape_grid.html">Landscape grid</a> page.
</p>
<p>Nine attributes (counting &quot;<span style="font-weight: bold;">type</span>&quot; and
&quot;<span style="font-weight: bold;">height</span>&quot;) hold the information about a tile.<br>
&quot;<span style="font-weight: bold;">height</span>&quot;) hold the information about a tile.<BR>
These attributes are referred to as
&quot;<span style="font-weight: bold;">type</span>",
&quot;<span style="font-weight: bold;">height</span>",
@@ -50,7 +50,6 @@
<tr><td><tt>0A</tt></td><td>Objects</td></tr>
</table>
</li>
<li>
Bits 3..2:
<table border="1" style="width: 30em;">
<tr bgcolor="#CCCCCC"><td colspan="2">Presence and direction of bridge above.</td></tr>
@@ -58,7 +57,6 @@
<tr><td><tt>01</tt></td><td>Axis X (North-East)</td></tr>
<tr><td><tt>02</tt></td><td>Axis Y (South-West)</td></tr>
</table>
</li>
<li>
<a name="tropic_zone"></a>
Bits 1..0:
@@ -71,14 +69,13 @@
In any other climate these 2 bits are theoretically free of use, however using them does not seem useful.
</li>
</ul>
</li>
<li><span style="font-weight: bold;">m1</span>
<ul>
<li>
<a name="WaterClass"></a>
Bits 6..5:
<table border="1" style="width: 30em;">
<tr bgcolor="#CCCCCC"><td colspan="2">The type of water that is on a tile.</td></tr>
<tr bgcolor="#CCCCCC"><td colspan="2">The type of water that is on a tile.
<tr><td style="width: 5em;"><tt>00</tt></td><td align=left>Sea</td></tr>
<tr><td><tt>01</tt></td><td align=left>Canal</td></tr>
<tr><td><tt>02</tt></td><td align=left>River</td></tr>
@@ -90,7 +87,7 @@
<a name="OwnershipInfo"></a>
Bits 4..0:
<table border="1" style="width: 30em;">
<tr bgcolor="#CCCCCC"><td colspan="2">The owner of a tile can be either companies (human or AI) or "Game entities".</td></tr>
<tr bgcolor="#CCCCCC"><td colspan="2">The owner of a tile can be either companies (human or AI) or "Game entities".
<tr><td style="width: 5em;"><tt>00..0E</tt></td><td align=left>Normal companies</td></tr>
<tr><td><tt>0F</tt></td><td align=left>a town owns the tile</td></tr>
<tr><td><tt>10</tt></td><td align=left>nobody owns the tile</td></tr>
@@ -155,8 +152,8 @@
<li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)</li>
<li>m4 bits 4..2: same as 7..5, but for the SE border</li>
<li>m5 bits 7..5: update counter, incremented on every periodic processing for tile types,
other than <tt>03</tt>, <tt>07</tt>, <tt>0B</tt>, <tt>10</tt> and above.<br>
on wraparound, the tile is updated (for fields, the type of fields in m3 is increased, for other types the tile type in m5 is increased).<br>
other than <tt>03</tt>, <tt>07</tt>, <tt>0B</tt>, <tt>10</tt> and above.<BR>
on wraparound, the tile is updated (for fields, the type of fields in m3 is increased, for other types the tile type in m5 is increased).<BR>
For snow and desert, these bits are not used, tile is updated on every periodic processing.</li>
<li>m5 bits 4..2: tile type:
<table>
@@ -393,7 +390,7 @@
</tr>
</table>
</li>
<li>m5 bit 6 set = with signals:<br>
<li>m5 bit 6 set = with signals:<BR>
There are at most 4 signals on a tile. The signals 0..3 belong to the directions:
<table>
<tr>
@@ -565,7 +562,7 @@
<td>
<ul>
<li>m2: Index into the array of towns (owning town for town roads; closest town otherwise, INVALID_TOWN if there is no town or we are creating a town)</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of road type 1 (tram); OWNER_NONE (<tt>10</tt>) is stored as OWNER_TOWN (<tt>0F</tt>)</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of road type 1 (tram); OWNER_NONE (<tt>10</tt>) is stored as OWNER_TOWN (<tt>0F</tt>)
<li>m4 bits 5..0: <a href="#RoadType">Roadtype</a></li>
<li>m7 bit 5 set = on snow or desert</li>
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
@@ -724,7 +721,6 @@
</ul>
</li>
</ul>
</li>
<li>m3 bit 6 : free</li>
<li>m3 bit 5 : The house is protected from the town upgrading it</li>
<li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
@@ -1054,96 +1050,97 @@
<td>
<ul>
<li>m1 bit 7: Ship docking tile status</li>
<li>m1 bits 6..5 : Water class (sea, canal or river)</li>
<li>m1 bits 6..5 : Water class (sea, canal or river)
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
<li>m2: Depot index (for depots only)</li>
<li>m3 bit 0: Non-flooding state</li>
<li>m4: Random data for canal or river tiles</li>
<li>m5 bits 7..4: Water tile type:
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>water, canal or river</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>coast or riverbank</td>
</tr>
<tr>
<td nowrap valign=top><tt>2</tt>&nbsp; </td>
<td>canal lock<br>
<ul>
<li>m5 bits 3..2: Lock part
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>Middle part</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>Lower part</td>
</tr>
<tr>
<td><tt>2</tt>&nbsp; </td>
<td>Upper part</td>
</tr>
</table>
</li>
<li>m5 bits 1..0: Lock direction
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>NE raised</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>SE raised</td>
</tr>
<tr>
<td><tt>2</tt>&nbsp; </td>
<td>SW raised</td>
</tr>
<tr>
<td><tt>3</tt>&nbsp; </td>
<td>NW raised</td>
</tr>
</table>
</li>
</ul>
</td>
</tr>
<tr>
<td nowrap valign=top><tt>3</tt>&nbsp; </td>
<td>depot<br>
<ul>
<li>m5 bit 1: Depot axis
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>X direction (NE-SW)</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>Y direction (NW-SE)</td>
</tr>
</table>
</li>
<li>m5 bit 0: Depot part
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>North part</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>South part</td>
</tr>
</table>
</li>
</ul>
</td>
</tr>
</table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>water, canal or river</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>coast or riverbank</td>
</tr>
<tr>
<td nowrap valign=top><tt>2</tt>&nbsp; </td>
<td>canal lock<br>
<ul>
<li>m5 bits 3..2: Lock part
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>Middle part</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>Lower part</td>
</tr>
<tr>
<td><tt>2</tt>&nbsp; </td>
<td>Upper part</td>
</tr>
</table>
</li>
<li>m5 bits 1..0: Lock direction
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>NE raised</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>SE raised</td>
</tr>
<tr>
<td><tt>2</tt>&nbsp; </td>
<td>SW raised</td>
</tr>
<tr>
<td><tt>3</tt>&nbsp; </td>
<td>NW raised</td>
</tr>
</table>
</li>
</ul>
</td>
</tr>
<tr>
<td nowrap valign=top><tt>3</tt>&nbsp; </td>
<td>depot<br>
<ul>
<li>m5 bit 1: Depot axis
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>X direction (NE-SW)</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>Y direction (NW-SE)</td>
</tr>
</table>
</li>
<li>m5 bit 0: Depot part
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>North part</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>South part</td>
</tr>
</table>
</li>
</ul>
</td>
</tr>
</table>
</li>
</li>
</ul>
</td>
@@ -1170,7 +1167,7 @@
<ul>
<li>m1 bit 7: clear = under construction
<ul>
<li>m1 bits 6..5 : Water class (sea, canal, river or land)</li>
<li>m1 bits 6..5 : Water class (sea, canal, river or land)
<li>m1 bits 3..2: construction counter, for buildings under construction incremented on every periodic tile processing</li>
<li>m1 bits 1..0: stage of construction (<tt>3</tt> = completed), incremented when the construction counter wraps around<br>
the meaning is different for some animated tiles which are never under construction (types <tt>01</tt>, <tt>1E</tt>..<tt>20</tt>, <tt>30</tt>, <tt>58</tt>; see above)</li>
@@ -1326,8 +1323,7 @@
<td nowrap valign=top><tt>58</tt>&nbsp; </td>
<td align=left>wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
</tr>
</table>
</td>
</table></td>
</tr>
<tr>
+3 -3
View File
@@ -92,7 +92,7 @@ the array so you can quickly see what is used and what is not.
<tr>
<td class="caption">farmland</td>
<td class="bits"><span class="pool" title="Industry index on pool">XXXX XXXX XXXX XXXX</span></td>
<td class="bits"><span class="used" title="Type of hedge on NE border">XXX</span> <span class="used" title="Snow presence">X</span><span class="used" title="Field production stage">XXXX</span></td>
<td class="bits"><span class="used" title="Type of hedge on NE border">XXX</span> <span class="used" title="Field production stage">XXXXX</span></td>
</tr>
<tr>
<td rowspan=3>1</td>
@@ -165,14 +165,14 @@ the array so you can quickly see what is used and what is not.
</tr>
<tr>
<td class="caption">house under construction</td>
<td class="bits"><span class="used" title="House is complete/in construction (see m5)">O</span><span class="free">O</span><span class="used" title="The house is protected from the town upgrading it.">X</span><span class="usable" title="Activated triggers (bits 2..4 don't have a meaning)">X XX</span><span class="used" title="Activated triggers (bits 2..4 don't have a meaning)">XX</span></td>
<td class="bits"><span class="used" title="House is complete/in construction (see m5)">O</span><span class="used" title="House type (m4 + m3[6])">X</span><span class="used" title="The house is protected from the town upgrading it.">X</span><span class="usable" title="Activated triggers (bits 2..4 don't have a meaning)">X XX</span><span class="used" title="Activated triggers (bits 2..4 don't have a meaning)">XX</span></td>
<td class="bits"><span class="free">OOO</span><span class="used" title="Construction stage">X X</span><span class="used" title="Construction counter">XXX</span></td>
</tr>
<tr>
<td>4</td>
<td class="caption">trees</td>
<td class="bits"><span class="free">O</span><span class="used" title="Water class">XX</span><span class="usable" title="Owner (always OWNER_NONE)">1 OOOO</span></td>
<td class="bits"><span class="free">OOOO OOO</span><span class="used" title="Tree ground">XXX</span> <span class="used" title="Tree density">XX</span> <span class="free">OOOO</span></td>
<td class="bits"><span class="free">OOOO OOO</span><span class="used" title="Tree ground">XXX</span> <span class="used" title="Tree density">XX</span> <span class="used" title="Tree counter">XXXX</span></td>
<td class="bits"><span class="usable" title="Tree type unused bits">XX</span><span class="used" title="Tree type">XX XXXX</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="used" title="Number of trees on tile (+1)">XX</span><span class="free">OO O</span><span class="used" title="Tree growth">XXX</span></td>
+16 -16
View File
@@ -69,19 +69,19 @@ An example of a valid tag is `PLYR` when looking at it via ASCII, which contains
`[4..4]` - Next follows a byte where the lower 4 bits contain the type.
The possible valid types are:
- `0` - `ChunkType::Riff` - This chunk is a binary blob.
- `1` - `ChunkType::Array` - This chunk is a list of items.
- `2` - `ChunkType::SparseArray` - This chunk is a list of items.
- `3` - `ChunkType::Table` - This chunk is self-describing list of items.
- `4` - `ChunkType::SparseTable` - This chunk is self-describing list of items.
- `0` - `CH_RIFF` - This chunk is a binary blob.
- `1` - `CH_ARRAY` - This chunk is a list of items.
- `2` - `CH_SPARSE_ARRAY` - This chunk is a list of items.
- `3` - `CH_TABLE` - This chunk is self-describing list of items.
- `4` - `CH_SPARSE_TABLE` - This chunk is self-describing list of items.
Now per type the format is (slightly) different.
### ChunkType::Riff
### CH_RIFF
(since savegame version 295, this chunk type is only used for MAP-chunks, containing bit-information about each tile on the map)
A `ChunkType::Riff` starts with an `uint24` which together with the upper-bits of the type defines the length of the chunk.
A `CH_RIFF` starts with an `uint24` which together with the upper-bits of the type defines the length of the chunk.
In pseudo-code:
```
@@ -94,11 +94,11 @@ if type == 0
The next `length` bytes are part of the chunk.
What those bytes mean depends on the tag of the chunk; further details per chunk can be found in the source-code.
### ChunkType::Array / ChunkType::SparseArray
### CH_ARRAY / CH_SPARSE_ARRAY
(this chunk type is deprecated since savegame version 295 and is no longer in use)
`[0..G1]` - A `ChunkType::Array` / `ChunkType::SparseArray` starts with a `gamma`, indicating the size of the next item plus one.
`[0..G1]` - A `CH_ARRAY` / `CH_SPARSE_ARRAY` starts with a `gamma`, indicating the size of the next item plus one.
If this size value is zero, it indicates the end of the list.
This indicates the full length of the next item minus one.
In psuedo-code:
@@ -111,21 +111,21 @@ loop
read <size> bytes
```
`[]` - For `ChunkType::Array` there is an implicit index.
`[]` - For `CH_ARRAY` there is an implicit index.
The loop starts at zero, and every iteration adds one to the index.
For entries in the game that were not allocated, the `size` will be zero.
`[G1+1..G2]` - For `ChunkType::SparseArray` there is an explicit index.
`[G1+1..G2]` - For `CH_SPARSE_ARRAY` there is an explicit index.
The `gamma` following the size indicates the index.
The content of the item is a binary blob, and similar to `ChunkType::Riff`, it depends on the tag of the chunk what it means.
The content of the item is a binary blob, and similar to `CH_RIFF`, it depends on the tag of the chunk what it means.
Please check the source-code for further details.
### ChunkType::Table / ChunkType::SparseTable
### CH_TABLE / CH_SPARSE_TABLE
(this chunk type only exists since savegame version 295)
Both `ChunkType::Table` and `ChunkType::SparseTable` are very similar to `ChunkType::Array` / `ChunkType::SparseArray` respectively.
Both `CH_TABLE` and `CH_SPARSE_TABLE` are very similar to `CH_ARRAY` / `CH_SPARSE_ARRAY` respectively.
The only change is that the chunk starts with a header.
This header describes the chunk in details; with the header you know the meaning of each byte in the binary blob that follows.
@@ -168,7 +168,7 @@ struct | substruct3
The headers will be, in order: `table`, `substruct1`, `substruct3`, `substruct2`, each ending with a `type` is zero field.
After reading all the fields of all the headers, there is a list of records.
To read this, see `ChunkType::Array` / `ChunkType::SparseArray` for details.
To read this, see `CH_ARRAY` / `CH_SPARSE_ARRAY` for details.
As each `type` has a well defined length, you can read the records even without knowing anything about the chunk-tag yourself.
@@ -187,7 +187,7 @@ The prefix is strongly advised to avoid conflicts with future-settings in an unp
## Scripts custom data format
Script chunks (`AIPL` and `GSDT`) use `ChunkType::Table` chunk type.
Script chunks (`AIPL` and `GSDT`) use `CH_TABLE` chunk type.
At the end of each record there's an `uint8` to indicate if there's custom data (1) or not (0).
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
// This is the DOS 2CC translation map which OpenTTD translates if needed upon loading.
//
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Airport previews"
-1 * 0 05 16 09
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Extra airport graphics"
-1 * 3 05 10 0F
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Aqueduct graphics by Jonathan G. Rennison / PaulC"
// temperate aqueduct
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Autorail graphics"
-1 * 3 05 13 37
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Bridge decks"
-1 * 0 07 83 01 \7= 03 19
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Canal graphics by George"
-1 * 3 05 08 41
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Font characters by PaulC, Bilbo and Jasper Vries"
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Electrified rail by Michael Blunck"
-1 * 3 05 05 30
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Foundations. Non-halftile ones by Marcin Grzegorczyk"
-1 * 6 07 83 01 \7! 00 5B
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Monospaced characters (Liberation Mono)"
-1 * 0 12 01 03 60 20 00
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "One way road graphics"
-1 * 3 05 09 12
+1 -1
View File
@@ -5,7 +5,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
// Sources for OpenTTD's required base graphics.
// Checks whether the correct version of OpenTTD is used before
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "OpenTTD GUI graphics"
-1 * 3 05 15 \b 192 // OPENTTD_SPRITE_COUNT
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Overlay rocks"
-1 * 3 05 1A 5F
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "All black palette"
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Road waypoints"
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Road stop graphics"
-1 * 3 05 11 08

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