Commit Graph
12063 Commits
Author SHA1 Message Date
dependabot[bot] cb638c4b4b Bump actions/setup-java from 5 to 6
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5 to 6.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-08-31 11:13:47 +00:00
Gleb Mazovetskiy 1bb39d680b Use a consistent threading model throughout
Since all of the object files we're building go into the binary that
uses `-pthread` (due to SDL, where available), all of them should be
compiled with `-pthread` to ensure a consistent threading model.

This also allows all object files to use the same PCH on clang,
where threading model is part of the PCH data.
2026-08-24 02:28:56 +01:00
Gleb Mazovetskiy b7eb65b117 CMake: Handle DOS threads via threads-stub
Like Amiga and 3DS, DOS does not have a system threads library. Use
CMake/platforms/threads-stub to provide the dummy Threads::Threads target
instead of special-casing DOS in CMakeLists.txt and
Source/CMakeLists.txt.
2026-08-24 02:28:56 +01:00
Gleb MazovetskiyandClaude Opus 5 9f2ea6b993 Depend on libdevilutionx_sdl2_to_1_2_backports explicitly
DevilutionX::SDL carried libdevilutionx_sdl2_to_1_2_backports, so
linking SDL pulled in our own compatibility shims, and with them
libdevilutionx_strings and libdevilutionx_utils_console. Anything that
only wanted the SDL headers got a chunk of devilutionX behind them.

Drop it from DevilutionX::SDL and let the targets that actually use the
shims say so. That is every target whose objects reference a symbol
defined by sdl2_to_1_2_backports.cpp, found by matching the undefined
symbols in each object library against the ones it defines. Object
libraries do not link, so a missing dependency here is invisible at
build time: the archive reached the executable through whichever target
happened to name it.

The dependency is PUBLIC where one of the target's own headers reaches
utils/sdl2_to_1_2_backports.h and PRIVATE where only its .cpp files do.
libdevilutionx_paths already declared it and is moved to PRIVATE on the
same rule: only utils/paths.cpp includes the header, utils/paths.h does
not.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-24 02:28:56 +01:00
Gleb MazovetskiyandClaude Sonnet 4.6 53b91fd7a2 Untangle more dependencies
Split several monolithic files to reduce transitive dependencies and
enable the dun_render_benchmark to link without bringing in all of
DevilutionX:

- Extract dungeon tile globals and loading functions from `gendung` into
  `dun_tile_data.{hpp,cpp}`
- Extract light table data and MakeLightTable from lighting into
  `engine/light_tables.{hpp,cpp}`
- Move cursor_id and SelectionRegion to cursor_defs.hpp
- Extract quest log rendering to `panels/quest_log.{hpp,cpp}`
- Extract drlg quest setpiece logic to `levels/drlg_quests.{hpp,cpp}`
- Extract quest data loading to `tables/questdat.{hpp,cpp}`
- Move `GameData` and `gbIsMultiplayer` into `game_mode.{hpp,cpp}`
- Add `parse_sfx_id.{hpp,cpp}`
- Update CMake libraries accordingly

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-08-23 06:08:15 +01:00
Gleb Mazovetskiy d6dafeb456 CI: Update Linux_* builds to gcc-14
On Ubuntu 24.04 where the default GCC is 13 but 14 is also available.
2026-08-21 19:12:07 +09:00
StephenCWills cefa2c511d Fix SDLC_PushEvent() return value for SDL1 2026-08-15 15:13:02 -05:00
StephenCWills a7014af1c8 [Amiga] Switch from the archived repo to the AmigaOS3 branch of the active repo 2026-08-15 15:09:56 -05:00
StephenCWills d0d5e9d45c Fix dependency installation in PS Vita CI job 2026-08-14 16:25:03 +02:00
StephenCWills 0738584284 [Amiga] Disable broken optimizations 2026-08-10 04:05:24 +02:00
StephenCWills f841ac78a0 Update mpqfs for endian fixes 2026-08-09 18:47:12 +02:00
MoonBnuuy 882b836fc4 Unpin Amiga compiler 2026-08-09 18:02:57 +02:00
StephenCWills 7519b38471 [3DS] Update text input state using data from the on-screen keyboard 2026-08-09 18:13:12 +09:00
MoonBnuuy aff9a4a9c8 Restore AmigaOS build and runtime support (#8660) 2026-08-06 01:28:14 +00:00
Anders Jenbo 3f9110d1ef Fix Greek translation and check for similar issues in the future 2026-08-02 14:25:45 +02:00
Anders Jenbo e10932e649 Update changelog 2026-08-01 15:51:49 +02:00
Oleksandr Kalko 4b2e6c7494 Update VCPKG baseline commit 2026-07-31 21:58:09 +02:00
NiteKat 2c1a364da4 Add New Quest State for Mushroom Quest (#8475) 2026-07-30 11:14:09 -04:00
Roman Stingler b4dfc8d265 Fix OOB read from unterminated player names in save/network data 2026-07-27 14:34:57 -04:00
Roman Stingler b3e52b1ea2 correct and complete Italian translations 2026-07-27 11:32:22 +01:00
Roman Stingler e09499dfaf fix closing brackets in greek translation 2026-07-27 11:27:43 +01:00
Roman Stingler 05217b620b complete German localization strings 2026-07-27 00:04:46 +01:00
Trihedraf ee6988802a update to libpng 1.6.58
fixes compiling libpng on MacOS. libpng commit https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24
2026-07-25 13:25:08 +02:00
Gleb MazovetskiyandClaude Fable 5 ac2d7fc731 Replace libfmt with std::format
- `fmt::format` with literal format strings -> `std::format`.
- `fmt::format(fmt::runtime(...))` -> `FormatRuntime` in the new
  `utils/format.hpp`, a std::vformat wrapper that is also safe under the
  P2905 lvalue requirement of `std::make_format_args`.
- `fmt::dynamic_format_arg_store` (Lua logging) -> a small hand-rolled
  per-field formatter over `std::variant`, returning `std::expected`.
- `fmt::format_int` -> `std::to_chars`.
- `fmt::join` -> manual joins at the two call sites.
- SDL_audiolib: new patch that rewrites aulib_log.h to use std::format
  and drops the fmt dependency from its CMakeLists.
- The `-static-libstdc++` guard now keys off
  `DEVILUTIONX_STATIC_SDL_AUDIOLIB` instead of `DEVILUTIONX_STATIC_LIBFMT`.
- libfmt removed from CMake, vcpkg, Brewfile, CI workflows,
  Dockerfiles, packaging scripts, UWP project, and docs.
- macOS bumped to 13.3+, iOS to 16.3+ (required for `<format>`)
- Amiga m68k: provide `__cmpdf2`, which is missing from the hard-float
  libgcc multilib but referenced via libstdc++'s long double paths.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-22 00:00:04 +02:00
Gleb Mazovetskiy c00b5f44da Update asio
Includes
https://github.com/diasurgical/asio/commit/112f011842f4ae713b158a0fc57009f95c761a21,
which fixes a C++23 deprecation warning
2026-07-22 00:00:04 +02:00
Gleb Mazovetskiy 94f048eb4c Fix several [[nodiscard]] warnings 2026-07-22 00:00:04 +02:00
Gleb Mazovetskiy 85882658a8 Disable PS4 and Xbox nxdk CI
These toolchains haven't updated their libcxx in years.
Disables these CI builds in order to avoid being stuck on old language level support.

Once / if the toolchains are updated, we can re-enable these platforms.

Toolchain update bugs:
* PS4: https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/issues/262
* Xbox nxdk: https://github.com/XboxDev/nxdk-libcxx/issues/3
2026-07-22 00:00:04 +02:00
Gleb Mazovetskiy a437adf371 sheen_bidi.hpp: Fix type conversion warning 2026-07-22 00:00:04 +02:00
Gleb MazovetskiyandClaude Fable 5 63e85d9b1b Replace tl::expected with std::expected
Now that the project targets C++23, use the standard library's
std::expected instead of the vendored tl::expected polyfill:

- tl::expected -> std::expected, tl::unexpected/tl::make_unexpected -> std::unexpected
- .map()/.map_error() -> .transform()/.transform_error()
- #include <expected.hpp> -> #include <expected>, grouped with std headers
- Remove 3rdParty/tl/expected.hpp (the tl target remains for function_ref.hpp)

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-22 00:00:04 +02:00
Gleb Mazovetskiy c4fed8aeb6 XBox One: Use latest C++ 2026-07-22 00:00:04 +02:00
Roman Stingler 5141d0d185 Fix speedbook tooltip showing default key instead of bound key 2026-07-19 13:10:20 +01:00
Lawrence Caldwell 4f6ad78fc3 Report missing files in HeadlessMode instead of faking success
The loaders returned success with a null/empty buffer when a file could
not be opened in HeadlessMode, breaking every caller that probes
has_value() to pick between asset sources. With Diablo-only data the
Hellfire->Diablo town fallbacks (LoadLvlGFX / LoadMinData /
LoadLevelSOLData) never triggered: entering town dereferenced a null
town.min with uninitialized tileCount in SetDungeonMicros, a null
pMegaTiles in T_FillSector, and silently kept the previous level's
SOLData.

Files that do exist were already loaded identically in headless and
graphical builds; the special case only affected the missing-file path.
Headless code paths are a subset of the graphical ones, so reporting
the error exactly like the graphical build restores the intended
fallback behaviour with no call-site changes.
2026-07-18 12:58:54 +01:00
Peter 159b023a4c Fix mods link in README.md 2026-07-16 20:41:32 +02:00
Gleb Mazovetskiy f79af12eae Unify store UI options
Unifies "Show Item Graphics" and "Visual Store" boolean options
into a single enum.

Also moves floating info box option next to the store UI option
as they are somewhat related.
2026-07-16 07:56:04 +01:00
Lawrence Caldwell a02893ca3f Skip video playback in HeadlessMode
play_movie() only early-outs for demo playback, but SVidPlayBegin
requires the SDL video subsystem that HeadlessMode intentionally never
initializes, so any real-time (non-demo) headless session crashes on
the first movie: the Lazarus in-game movie (gendata\fprst3.smk) and
the ending cinematics when Diablo dies. Mirror the existing
demo::IsRunning() early-out; the surrounding fade/redraw paths are
already headless-safe, and this one guard covers every callsite
(intro logos, Lazarus, victory/ending, credits loop).

No behavior change in graphical builds.
2026-07-16 05:13:29 +01:00
oooo-ps d56af8aaf2 add missed libpfm-devel dependency 2026-07-15 22:05:29 +02:00
Anders Jenbo 1ca75e4776 Migrate DOS to SDL3 (fixing AUDIO and stuff) 2026-07-15 21:56:02 +02:00
staphen 873c0a8105 Update Discord invite links to the new permanent URL 2026-07-14 23:14:13 +02:00
Gleb MazovetskiyandClaude Fable 5 e030d51fb3 Windows XP: Fix build
Same approach as the Win9x fix.
Also enables Windows XP build to run on pull request to ensure we catch
breakages in the future.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-13 20:13:16 +01:00
dependabot[bot] 3b7cbfba98 Bump actions/cache from 4 to 6
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-07-13 12:29:18 +01:00
Gleb Mazovetskiy 7a75c9e66a Update to C++23 2026-07-12 18:27:12 +01:00
Gleb Mazovetskiy 024b27582d Update Ubuntu to 24.04
This brings us up to C++23 on all platforms.
As a follow-up, we can replace `tl::expected` with `std::expected`.
2026-07-12 18:27:12 +01:00
Gleb MazovetskiyandClaude Fable 5 da560387ed Windows 9x: build a pinned GCC 16 cross-toolchain
MinGW GCC >= 13 (Ubuntu >= 24.04) cannot target Windows 9x: its
libgcc/libstdc++ are compiled at the default _WIN32_WINNT (Windows 10),
so the win32 thread model uses Vista-only kernel32 APIs (SRWLock,
CONDITION_VARIABLE). These end up in the import table of every
statically linked C++ binary and the Windows 9x loader refuses to start
a program with unresolved kernel32 imports. It also breaks compilation
of <mutex> at _WIN32_WINNT < 0x0600.

mingw9x-prep.sh now builds a pinned i586-w64-mingw32 toolchain
(binutils 2.46.1, GCC 16.1.0, mingw-w64 v14.0.0 with msvcrt) into
/opt/mingw9x, with the target libraries built at _WIN32_WINNT=0x0400 so
that GCC's legacy pre-Vista threading path is used. i586 rather than
i686 because Windows 98-era CPUs may lack cmov.

mingw9x-gcc.patch fixes the remaining pre-Vista issues in GCC:
- libstdc++'s <chrono> tzdb assumes Vista+ APIs whenever <windows.h>
  is available; gate its Windows code on _WIN32_WINNT >= 0x0600.
- libgcc's gthread runtime statically imports TryEnterCriticalSection
  and GetThreadId, which do not exist on Windows 9x; resolve them
  dynamically via GetProcAddress and degrade gracefully.

The prep script ends with a smoke test: a static C++ exe including
<mutex> at _WIN32_WINNT=0 must link, contain no post-9x kernel32
imports and keep PE subsystem version 4.x.

Also:
- Build zlib from source into the prefix instead of patching the
  system libz-mingw-w64-dev package.
- Drop libsodium from the 9x prep; the 9x build uses NONET=ON.
- Drop Debug-only -gstabs (STABS support was removed in GCC 13).
- Cache the toolchain in CI, keyed on the prep script and patch.

Verified: the packaged devilutionx.exe imports only
SDL.dll/KERNEL32.dll/msvcrt.dll with PE subsystem 4.0, and a per-symbol
import diff against the last known-good CI build shows only Win95-era
additions (GetCPInfo, GetTempPathA, IsDBCSLeadByte, LocalFree).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-12 18:27:12 +01:00
Gleb Mazovetskiy 44fcd5c989 Update Android NDK version to latest stable (29) 2026-07-12 18:27:12 +01:00
Gleb Mazovetskiy 8f14fe564b static_vector: Add missing #include <new> 2026-07-12 18:27:12 +01:00
Gleb Mazovetskiy c60e23a810 Update asio 2026-07-12 18:27:12 +01:00
Anders Jenbo 1bf1b9886a Mod hashing and manifest (#8608) 2026-07-12 07:37:22 -04:00
staphen 5b6a11ae8d Fix compiler warning in ProcessWeaponExplosion() 2026-07-11 17:55:38 +02:00
staphen c355728cc5 Use DirectoryExists() when looking for mod directories 2026-07-11 17:55:11 +02:00
staphen 2d79a9a8f1 Cleanup for weapon explosions 2026-07-10 23:52:37 +02:00