Skip to content

Commit b77f558

Browse files
committed
Merge upstream main into fix/initialize-fov-buffer
2 parents d1e182c + 4e50c13 commit b77f558

9 files changed

Lines changed: 138 additions & 91 deletions

File tree

‎.github/workflows/python-package.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defaults:
1818

1919
env:
2020
git-depth: 0 # Depth to search for tags.
21-
sdl-version: "3.4.18" # SDL version to bundle
21+
sdl-version: "3.4.20" # SDL version to bundle
2222

2323
jobs:
2424
ruff:
@@ -83,7 +83,7 @@ jobs:
8383
strategy:
8484
matrix:
8585
os: ["windows-latest", "macos-latest"]
86-
sdl-version: ["3.2.30", "3.4.18"]
86+
sdl-version: ["3.2.30", "3.4.20"]
8787
fail-fast: true
8888
steps:
8989
- uses: actions/checkout@v7
@@ -214,7 +214,7 @@ jobs:
214214
persist-credentials: false
215215
fetch-depth: ${{ env.git-depth }}
216216
- name: Checkout submodules
217-
run: git submodule update --init --depth 1
217+
run: git submodule update --init --recursive --depth 1
218218
- name: Set up Python
219219
uses: actions/setup-python@v7
220220
with:
@@ -291,7 +291,7 @@ jobs:
291291

292292
build-macos:
293293
needs: [ruff, mypy, sdist]
294-
runs-on: "macos-14"
294+
runs-on: "macos-26"
295295
timeout-minutes: 30
296296
strategy:
297297
fail-fast: true

‎.readthedocs.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ build:
1414

1515
submodules:
1616
include: all
17+
recursive: true
1718

1819
# Build documentation in the docs/ directory with Sphinx
1920
sphinx:

‎.vscode/settings.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"files.associations": {
1616
"*.spec": "python"
1717
},
18+
"cmake.ignoreCMakeListsMissing": true,
1819
"mypy-type-checker.importStrategy": "fromEnvironment",
1920
"cSpell.words": [
2021
"aarch",

‎CHANGELOG.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,29 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
1010

1111
- `tcod.map.compute_fov` now raises `ValueError` instead of warning when `pov` is outside the transparency array, as previously announced by the warning.
1212

13+
## [21.2.5] - 2026-11-21
14+
15+
### Changed
16+
17+
- Updated libtcod to 2.3.3
18+
19+
## [21.2.4] - 2026-11-13
20+
21+
### Changed
22+
23+
- Updated libtcod to 2.3.2
24+
25+
### Security
26+
27+
- Safer handling of untrusted REXPaint files.
28+
29+
## [21.2.3] - 2026-11-09
30+
31+
### Changed
32+
33+
- Updated libtcod to 2.3.0
34+
- Updated bundled SDL to 3.4.20
35+
1336
## [21.2.2] - 2026-10-22
1437

1538
### Changed

‎build_libtcod.py‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
RE_PREPROCESSOR = re.compile(r"(?!#define\s+\w+\s+\d+$)#.*?(?<!\\)$", re.DOTALL | re.MULTILINE)
4343
RE_INCLUDE = re.compile(r'#include "([^"]*)"')
4444
RE_TAGS = re.compile(
45-
r"TCODLIB_C?API|TCOD_PUBLIC|TCOD_NODISCARD|TCOD_DEPRECATED_NOMESSAGE|TCOD_DEPRECATED_ENUM"
45+
r"TCODLIB_C?API|TCOD_PUBLIC|TCOD_PRIVATE|TCOD_NODISCARD|TCOD_DEPRECATED_NOMESSAGE|TCOD_DEPRECATED_ENUM"
4646
r"|(TCOD_DEPRECATED\(\".*?\"\))"
47-
r"|(TCOD_DEPRECATED|TCODLIB_FORMAT)\([^)]*\)|__restrict"
47+
r"|(TCOD_DEPRECATED|TCODLIB_FORMAT)\([^)]*\)"
4848
r"|TCODLIB_(BEGIN|END)_IGNORE_DEPRECATIONS"
4949
)
5050
RE_VAFUNC = re.compile(r"^[^;]*\([^;]*va_list.*\);", re.MULTILINE)
51-
RE_INLINE = re.compile(r"(^.*?inline.*?\(.*?\))\s*\{.*?\}$", re.DOTALL | re.MULTILINE)
51+
RE_INLINE = re.compile(r"(^[^\n]*?inline.*?\(.*?\))\s*\{.*?\n\}$", re.DOTALL | re.MULTILINE)
5252

5353

5454
class ParsedHeader:
@@ -74,6 +74,7 @@ def __init__(self, path: Path) -> None:
7474
header = RE_TAGS.sub("", header)
7575
header = RE_VAFUNC.sub("", header)
7676
header = RE_INLINE.sub(r"\1;", header)
77+
header = header.replace("__restrict", "restrict") # Resolve header qualifier
7778
self.header = header.strip()
7879
self.depends = frozenset(depends)
7980
self.all_headers[self.path] = self
@@ -185,7 +186,6 @@ def walk_sources(directory: str) -> Iterator[str]:
185186
sources += glob.glob("libtcod/src/vendor/zlib/*.c")
186187

187188
if sys.platform == "win32":
188-
libraries += ["User32"]
189189
define_macros.append(("TCODLIB_API", ""))
190190
define_macros.append(("_CRT_SECURE_NO_WARNINGS", None))
191191

@@ -197,21 +197,20 @@ def walk_sources(directory: str) -> Iterator[str]:
197197
# Fix implicit declaration of multiple functions in zlib.
198198
define_macros.append(("HAVE_UNISTD_H", 1))
199199

200+
define_macros.append(("UTF8PROC_STATIC", None))
200201

201202
tdl_build = os.environ.get("TDL_BUILD", "RELEASE").upper()
202203

203-
MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/GS-", "/wd4996"]}
204+
MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/wd4996"]}
204205
MSVC_LDFLAGS: dict[str, list[str]] = {"DEBUG": [], "RELEASE": ["/LTCG"]}
205206
GCC_CFLAGS = {
206207
"DEBUG": ["-std=c99", "-Og", "-g", "-fPIC"],
207208
"RELEASE": [
208209
"-std=c99",
209210
"-flto",
210211
"-O3",
211-
"-g",
212212
"-fPIC",
213213
"-Wno-deprecated-declarations",
214-
"-Wno-discarded-qualifiers", # Ignore discarded restrict qualifiers.
215214
],
216215
}
217216

@@ -232,7 +231,7 @@ def walk_sources(directory: str) -> Iterator[str]:
232231
# Print the source, for debugging.
233232
print(f"Error with: {include.path}")
234233
for i, line in enumerate(include.header.split("\n"), 1):
235-
print(f"{i:03i} {line}")
234+
print(f"{i:03d} {line}")
236235
raise
237236
ffi.cdef(
238237
"""

‎build_sdl.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def python_machine() -> str:
4646
# Reject versions of SDL older than this, update the requirements in the readme if you change this.
4747
SDL_MIN_VERSION = (3, 2, 0)
4848
# The SDL version to parse and export symbols from.
49-
SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.4.18")
49+
SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.4.20")
5050
# The SDL version to include in binary distributions.
51-
SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.4.18")
51+
SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.4.20")
5252

5353

5454
# Used to remove excessive newlines in debug outputs.

‎libtcod‎

Submodule libtcod updated 158 files

0 commit comments

Comments
 (0)