12097 Commits
Author SHA1 Message Date
Gleb MazovetskiyandClaude Sonnet 5 b0a3b7babb Migrate AnimationInfo's internal fixed-point fields to FixedPoint
Add FixedPoint::divideWithoutWidening for cases where the caller can
already show the wide intermediate isn't needed, and use it in
AnimationInfo::setNewAnimation to avoid a 64-bit division that the
original int32_t arithmetic never required.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-11 21:55:08 +01:00
Gleb Mazovetskiy 7fdf19da3a FixedPoint: Implement comparison with int 2026-10-11 21:55:08 +01:00
Gleb Mazovetskiy c361e764cc FixedPoint: Follow C integer promotion rules
Also allow implicit widening conversion.
Narrowing conversion still explicit.
2026-10-11 21:55:08 +01:00
Gleb MazovetskiyandClaude Sonnet 5 92927ca913 Migrate ClassAttributes, player HP/mana, item HP/mana bonuses, and monster HP to Fixed10_6/Fixed26_6
Replaces ParseFixed6/parseFixed6/readFixed6/readDecimal's raw-int
plumbing with the new FixedPoint type, then propagates strongly-typed
fixed-point fields through everywhere that consumed them: player
_pHitPoints/_pMana (and their base/max variants), ClassAttributes'
percentage/multiplier fields, Item::_iPLHP/_iPLMana, and
Monster::hitPoints/maxHitPoints. Eliminates manual <<6/>>6 bit-shifting
at nearly every call site in favor of fromInt/fromRaw/whole() and the
new fixed-point arithmetic operators, while preserving raw() only at
genuine serialization/network wire-format boundaries.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-11 21:55:08 +01:00
Gleb MazovetskiyandClaude Sonnet 5 c2080753e6 Add FixedPoint<StorageT, FractionalBits> type
Introduces a strongly-typed wrapper for the 10.6 fixed-point values used
throughout the engine (e.g. hit points, mana), with Fixed10_6 (int16_t
storage) and Fixed26_6 (int32_t storage) aliases.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-11 21:55:08 +01:00
Gleb MazovetskiyandClaude Opus 5.5 3755190275 Cl2ToClx: End opaque runs at the end of each line
In CLX, only transparent runs can continue on the next line.
`Cl2ToClx` joined the opaque pixels that end a line with the opaque
pixels that begin the next line into a single run, and the renderer
then drew the second part past the end of the first line instead of
at the beginning of the next one.

CL2 itself has no such runs. Among the player sprites of DIABDAT.MPQ,
the converter produced them in 991 of 78,016 frames (2,236 pixels),
mostly in spell casting animations that reach both edges of the frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 19:49:10 +01:00
Gleb MazovetskiyandClaude Opus 5.5 b569d8acfd Don't repeat held actions that need walking while nothing affecting the path has changed
While a mouse button or controller action is held, the last action is
re-sent every game tick. This affects walking, melee attacks on targets
out of reach and operating objects the player isn't next to. If no path
to the target exists, each repeat runs two or three worst-case path
searches for the same result, which noticeably reduces FPS.

Add WalkabilityGeneration, bumped whenever tile solidity, objects or
the tiles occupied by monsters and players change. RepeatPlayerAction
remembers the last request that needed walking and skips an identical
one while the start tile, destination, generation and player life
states are unchanged. A request that finds a path moves the player, so
this only skips requests that failed or are still pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 18:18:29 +01:00
Developer Guilliman a461a18275 Golem monster portrait (#8729)
Added option to show summoned monster (Golem) party portrait
Fixed crash when loading .trn files for monsters with missing animations
(Golem is missing standing animation)
2026-10-10 19:20:43 +01:00
Developer Guilliman bf574c9b74 Party portrait fixes (#8725)
When calculating width of mana bars, if another player has a maximum amount of mana of zero (like a Barbarian) would cause a division by zero, crashing the rendering client. Fixed by not rendering the blue portion of the mana bar if the max mana is zero.
Not applying players palette transform, stored in a .trn file. Fixed by applying the trn to the stored portrait sprite, if available.

Created several values in the player classes sprites.tsv to store the offsets of the sprites rendered in the portrait. The new values are:
- **partyOffsetTownX** : X Offset for the portrait when the player is in town
- **partyOffsetTownY** : Y Offset for the portrait when the player is in town
- **partyOffsetDungeonX** : X Offset for the portrait when the player is in dungeon
- **partyOffsetDungeonY** : Y Offset for the portrait when the player is in dungeon
- **partyOffsetDeadX** : X Offset for the portrait when the player is dead
- **partyOffsetDeadY** : Y Offset for the portrait when the player is dead

This new values are documented in the assets/txtdata/classes/README.md file, with also the rest of the possible values for the sprites.tsv files
2026-10-08 20:30:58 +01:00
ajakilas a45c53bd59 Add Tatar translation 2026-10-08 20:29:18 +01:00
staphen dac104babf Update SDL2 for Amiga 2026-10-03 15:43:24 +01:00
SB 452eeccc74 Add metadata to CPack RPM packages 2026-09-28 07:56:26 -04:00
Christoph Gernert cbdfd03986 Miyoo Mini: Update build toolchain to GCC 13 2026-09-28 05:55:31 +01:00
Peter DowdyandClaude Opus 5.5 e318b5e44c Fix floor foliage being drawn one pixel to the left
ExtractFoliageTransparentSquare incremented `src` in the condition that
tests the current pixel, so when a transparent pixel ended a solid run,
`src` was already past it and the run was copied from one pixel too far
right. Foliage on floor tiles was drawn shifted one pixel left, ending in
a black (index 0) pixel. Runs that end at the end of the row were right.

Advance `src` with `x` instead, so it points at the pixel being tested
and both copies of a run use `src - solidRun`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015zyYqNJFojmYr8vULsJ9nh
2026-09-27 22:59:43 -04:00
staphen e5d7b8ec34 Fix arithmetic in pixel-based selection logic 2026-09-27 20:21:37 +02:00
livinskyov 81c9ab4533 Logging: use "%.*s" instead of "%s" for strings of known length 2026-09-27 16:44:36 +01:00
staphen 97c93db93b Deploy discord_game_sdk.so to /usr/lib64 in RPM package 2026-09-27 00:03:03 +02:00
staphen 130aae0e8a [Amiga] Migrate from SDL1 to SDL2 2026-09-26 14:36:46 +02:00
Developer Guilliman bd1ee963f7 Extract additional player class attributes to attributes.tsv files 2026-09-26 09:45:42 +00:00
zhangjh953166 8bef7bce51 Check devilutionx.mpq version before loading Lua assets
CheckArchivesUpToDate() ran at the end of DiabloInit(), but
LuaInitialize() loads lua\inspect.lua (optional = false) much earlier
in DiabloMain(). With an out-of-date devilutionx.mpq, the game aborted
with a confusing "Asset not found: lua\inspect.lua" error instead of
the clear "update devilutionx.mpq" message.

Move the check to right after ApplicationInit() in DiabloMain(): the
window already exists at that point (so the styled error dialog
renders as before), and the check now happens before any asset is
loaded from the core archives.

Verified on Windows x64 with the published v5 devilutionx.mpq and the
assets directory removed from the build folder: the game now shows
"Failed to load UI resources. Make sure devilutionx.mpq is in the game
folder and that it is up to date." instead of the Lua error.
2026-09-25 12:45:52 -04:00
staphen 3fc0edd8a9 Update mpqfs 2026-09-24 07:46:39 +02:00
staphen 4138a829e9 Pin PSVITA container image 2026-09-20 18:58:47 +01:00
bubio 5d8e941ad2 storm_svid: use letterbox instead of stretch for USE_SDL3 2026-09-20 03:20:07 +02:00
staphen 0af0042221 Remove Amiga cmpdf2 implementation 2026-09-17 19:16:28 +02:00
staphen 6c730b1ac4 Reenable LTO on Amiga 2026-09-17 19:16:28 +02:00
Anders Jenbo e00b7260ff Prevent inlining of blitter operations 2026-09-15 05:32:22 +02:00
Anders Jenbo c90181d54b Fix directy rect blitting 2026-09-15 05:32:22 +02:00
Anders Jenbo 3f71a5b8c0 Yield for audio thread on systems with cooperative threading 2026-09-15 05:32:22 +02:00
Anders Jenbo d198263f3c Fix performance on real DOS hardware 2026-09-15 05:32:22 +02:00
staphen 26caf76146 Adjust workaround for fseeko detection on Amiga 2026-09-15 04:12:43 +02:00
bubio ae73bd0d45 paths: fix asset path resolution for USE_SDL3 on macOS
SDL3 reverts to SDL1 behavior and no longer auto-resolves the.app bundle's Contents/Resources/ directory, but the #elif only checked USE_SDL1.
This left USE_SDL3 falling through to the generic branch and looking for a nonexistent assets/ subdirectory, causing every asset load to fail.
2026-09-13 09:30:54 +01:00
bubio 58825f5536 CMake: Re-sign macOS app bundle after fixup_bundle 2026-09-13 01:50:25 +02:00
staphen aeea1321f3 Remove workarounds for broken optimizations on Amiga 2026-09-12 01:38:53 +02:00
staphen d09406e7c0 Disable LTO for Amiga CI build 2026-09-12 01:38:53 +02:00
bubio 0ff3186238 CMake: Fix macOS build failure when following docs/building.md 2026-09-04 18:33:11 +02: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