204 Commits
Author SHA1 Message Date
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 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
Yuri Pourre d07a410639 First step to migrate accessibility features 2026-02-10 10:56:22 +01:00
staphen c55e7a4107 Reload sfx when reloading active mods 2025-12-05 23:30:27 +01:00
Andrettin f6b4665e94 Make Player Class Data Data-Driven (#8167) 2025-09-05 11:30:01 +02:00
Gleb Mazovetskiy fd02564a85 magic_enum: Customize enums where they're declared
This necessitates dependencies on `magic_enum` in more
places but avoids obscure hard-to-debug errors, such
as the one seen in the DOS port PR.
2025-08-31 13:07:39 +01:00
Andrettin 76feb78b4e Parse Text/Speech Data from TSV (#8138) 2025-08-25 21:32:23 +02:00
Anders Jenbo f19d341519 Do not assert SFX count as it's not fixed size 2025-08-11 00:09:28 +02:00
Anders Jenbo d797570507 Make Hellifre sounds data driven 2025-08-03 16:01:32 +02:00
Gleb Mazovetskiy d7647d6c63 More dependency untangling
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
2025-01-09 18:19:44 +00:00
Gleb Mazovetskiy a49b1f2d58 Extract Is{Any,None}Of out of engine.hpp
Untangles some of the dependencies
2025-01-08 09:54:56 +09:00
Gleb Mazovetskiy e7c58ad0ef Remove missing SfxID
Follow-up to #7310

Also removes 1 more unused sound
2024-08-03 18:31:06 +01:00
staphen ef30ea1b5d Don't access sgSFX if sound is not initialized 2023-11-24 08:43:14 +01:00
Gleb Mazovetskiy 7cb24054a3 DataFile: Add a couple of helper methods 2023-11-18 17:33:14 +00:00
Gleb Mazovetskiy 876055b272 Migrate effect.cpp data to TSV 2023-11-14 02:27:46 +00:00
Anders Jenbo bb2e189327 Convert _sfx_id in to class enum 2023-11-02 14:34:24 +01:00
ephphatha c1f3dcb705 Use safer versions of random number functions instead of GenerateRnd 2023-09-19 16:52:40 +02:00
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 5bf0b8bc96 Add more missing <cstdint> includes
https://github.com/diasurgical/devilutionX/pull/6095 only added includes
for `uint32_t`, this PR also adds the includes for the remaining
integral types.
2023-05-10 16:29:27 +01:00
KPhoenix fa889625b3 Fix wrong flip sound: Tavern Sign 2023-02-05 07:06:56 +01:00
obligaron c3a2fd07c0 Add used acids2.wav back to game 2023-01-22 10:23:38 +01:00
Gleb Mazovetskiy 55dc2315bc Completely remove unused sfx_MISC sounds 2023-01-21 14:23:36 +00:00
Gleb Mazovetskiy b48d4b2900 Remove uses of blank.wav
blank.wav is a 22 KiB 1-second silence that is not needed with
our sound engine.
2023-01-21 14:09:02 +00:00
Gleb Mazovetskiy 27348b49b8 Do not load unused sfx_MISC sound effects
There are 40 unused sfx_MISC sound effects.
All sfx_MISC sound effects are loaded into RAM by default.

Avoid loading these unused ones.
2023-01-19 12:10:21 +00:00
Gleb Mazovetskiy a596c8223d Reformat sound effects table 2023-01-19 12:10:21 +00:00
Gleb Mazovetskiy 9a1587060d Use real CalculateSoundPosition with NOSOUND
Fixes big-endian tests, which currently build with `-DNOSOUND`
to reduce build time.
2022-12-09 11:09:05 +00:00
Gleb Mazovetskiy 6327e713e0 Lowercase all file paths
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).

This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
2022-08-20 23:49:23 +01:00
Gleb Mazovetskiy 04c3d85179 Remove MAX_PATH
Rather than using the Windows-like `MAX_PATH`, what we really want is 2
things:

1. Maximum path of a file in an MPQ. This is now `MaxMpqPathSize`.
2. Max size for the known monster paths. This is now 64 for sounds and
   TRNs, which is more than enough (picked arbitrarily).
2022-07-16 11:14:16 +01:00
Gleb Mazovetskiy f9f6949af2 Clean up effects_play_sound, gfnSoundFunction 2022-07-16 10:59:40 +01:00
Gleb Mazovetskiy 643c707c55 Remove strncmp 2022-07-16 10:59:40 +01:00
Anders Jenbo 16b65120ea Clean up LevelMonsterTypes related code 2022-07-15 19:36:47 +02:00
Mikołaj Piróg 262fa9ac2d Rename MonsterData members (#5000) 2022-07-15 16:20:13 +02:00
Gleb Mazovetskiy 33ac2cca8e ♻️ Make Monster counters size_t 2022-07-12 03:04:53 +01:00
Anders Jenbo 2d21fc372e Remove more miniwin code 2022-07-10 21:13:39 +02:00
Gleb Mazovetskiy 53975d9264 monstdat: Simplify paths
1. Remove `Monsters\` from `sndfile` and `TransFile`.
2. Where `sndfile` is the same as `GraphicType`, set `sndfile` to
   `nullptr`.
2022-07-10 06:14:58 +02:00
Gleb Mazovetskiy 197e1180b2 Add StrCat and StrAppend
Adds simple string / integer concatenation functions.

Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.

`StrCat` is an easier-to-read alternative to such uses of `fmt`.
2022-07-10 06:14:58 +02:00
Mikołaj Piróg 7cab074aa5 Correct members' names in monster.h (#4850)
* Fix case in AnimStruct
* Rename CMonster members
2022-07-01 23:34:32 +02:00
Gleb Mazovetskiy 3178dd5158 Replace most uses of sprintf with fmt (#4837) 2022-07-01 17:02:56 +02:00
Mikołaj Piróg 2e7ff45fbf Monster global constants cleanup (#4827)
* Change #defines to constexpr const, add constexpr where applicable, fix typos
2022-07-01 00:43:03 +02:00
Anders Jenbo 99181fd709 Move more files to the engine folder 2022-06-24 11:08:15 +02:00
qndel 354e329644 Players[MyPlayerId] -> MyPlayer 2022-05-31 05:35:52 +02:00
Gleb Mazovetskiy 7f695c2835 Use SoundSample for music
Unifies audio handling between sound effects and music.
2022-04-14 03:11:37 +02:00
Gleb Mazovetskiy b312edee49 Fix snd_deinit called even if snd_init failed
We were previously setting `was_sound_init` to true unconditionally
after calling `snd_init`.

However, `snd_init` can fail. Use `gbSndInited` instead.
2022-04-12 00:45:02 +02:00
qndel d3995736b9 fix spawning unique monsters 2022-02-23 22:37:12 +01:00
qndel e087b109ea fix hellfire shareware monk 2021-11-06 17:20:53 +01:00
Juliano Leal Goncalves 6146b828e9 🚚 Rename 'MonsterData' global to 'MonstersData'
This avoids conflicts with the struct name as we'll be renaming that next.
2021-09-02 21:57:50 +02:00
qndel e82dc72d12 put commented out enums next to sounds 2021-08-24 12:30:18 +02:00
Anders Jenbo 77b72da276 ♻️Use monster by reference when possible 2021-07-14 20:22:35 -07:00
Anders Jenbo 74b57558c9 🚚 Move local code to anonymous namespace 2021-07-10 17:30:15 -07:00
Anders Jenbo 352a0ca510 Place local symbols in an anonymous namespace 2021-07-09 16:54:01 -07:00