Commit graph

76 commits

Author SHA1 Message Date
Andrew James
d3aedf5df1
Split loading of MPQs to handle translations and voice packs (#3922) 2022-01-08 09:15:39 +01:00
Gleb Mazovetskiy
076b0c0c05 Overhaul tests
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.

Also:

* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
2021-12-16 20:26:51 +00:00
obligaron
b3740012b0 Add init_language_archives() to reinitalize lang_mpq 2021-11-28 19:08:10 +01:00
Gleb Mazovetskiy
720d210d95 utils/mpq* -> mpq/* 2021-11-17 11:49:57 +01:00
Gleb Mazovetskiy
3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
Gleb Mazovetskiy
7e230df94a Allow forcing Hellfire with command-line flags
This is useful for systems such as batocera.linux that have dynamic
launcher items that depend on the presence of the appropriate MPQ files.
2021-10-25 13:52:14 +01:00
Anders Jenbo
508cfabcdb Load langauge specific mpq files 2021-10-21 03:56:21 +02:00
Anders Jenbo
38d7b1e3c8 🐛 Do not utilize translations till after it has been initialize 2021-05-01 19:27:55 +02:00
Anders Jenbo
3b04f67194 🔥 Remove a chunk of miniwin types 2021-04-29 23:04:56 +02:00
Anders Jenbo
cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +02:00
Anders Jenbo
f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo
5fdb9ce459 🎨 Format code 2021-04-19 00:37:33 +02:00
Anders Jenbo
8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
e7ae8ddd04 🚚 Move all enums to there respective headers 2021-04-10 16:30:00 +02:00
Anders Jenbo
433edc63ea ♻️ Consistently use pragma once to guard the headers 2021-04-06 15:21:25 +02:00
Anders Jenbo
bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo
630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Anders Jenbo
bc3dc545da 🔥 Remove unused parts of game creation logic 2021-04-06 12:41:00 +02:00
Xadhoom
12c7b715cd Add test for vanilla pfile_write_hero() 2021-03-08 18:32:25 +01:00
Anders Jenbo
36a196389b Fix remaning basic compiler errors and warnings 2021-02-22 13:51:42 +01:00
Anders Jenbo
47004ddd35 Add widescreen menus 2021-01-18 20:56:08 +01:00
Anders Jenbo
9b1568cc08 Startup issues with shareware version 2021-01-17 16:04:13 +01:00
Anders Jenbo
a2a3729491 Enable loading hellfire games form main menu 2021-01-02 07:40:05 +01:00
Anders Jenbo
d20eddf48e Unifcy a chunk of Hellfire's code pathts 2020-12-28 01:11:25 +01:00
Trond Haugland
3eeb64593a Add missing Hellfire definitions 2020-11-04 00:17:03 +01:00
Anders Jenbo
43b5dea6e5 Merge branch 'master' of github.com:diasurgical/devilution 2020-11-03 00:56:51 +01:00
Anders Jenbo
1f1e689db0 Reorder init.cpp 2020-11-02 20:21:44 +01:00
Anders Jenbo
b7ca9a812a Clean up unused return type 2020-10-29 21:39:58 +01:00
Gleb Mazovetskiy
a091a56e8e
Remove MAX_PATH restriction (#898)
Do not limit filesystem paths to 259 chars for MPQs, save files, and diablo.ini.

The MAX_PATH constant remains but now only limits path lengths within the MPQs.
2020-10-26 13:39:27 +01:00
Anders Jenbo
72e2637061 Merge branch 'master' of github.com:diasurgical/devilution 2020-10-25 17:38:06 +01:00
Gleb Mazovetskiy
ec329e645c Fix all "no-write-strings" warnings 2020-10-25 15:37:51 +01:00
Anders Jenbo
e073422ce7 Unify executable for Spawn and Retail
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.

This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
2020-10-20 19:42:01 +02:00
Anders Jenbo
2d6c1efeab Merge branch 'master' of github.com:diasurgical/devilution 2020-10-12 10:46:28 +02:00
Anders Jenbo
659dc41aa5 Merge branch 'master' of github.com:diasurgical/devilution into hellfire 2020-04-26 22:10:34 +02:00
Joel Falcou
c4223d4c29 Per file basis use of extern C 2020-04-22 13:15:29 +02:00
Joel Falcou
64d26a7934 Sanitize use of namespace
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
2020-04-22 13:15:29 +02:00
Anders Jenbo
350646fe95 Correct signatures 2020-04-11 15:22:40 +02:00
Manuel Alfayate Corchete
03662be548
Remove atexit() calls and implement a diablo_deinit() function instea… (#694)
* Remove atexit() calls and implement a diablo_deinit() function instead that cleans up every subsystem if it has been init before.
2020-04-08 13:27:02 +02:00
Anders Jenbo
b040c04a18 Merge branch 'master' of github.com:diasurgical/devilution into hellfire 2020-04-04 07:56:06 +02:00
Anders Jenbo
776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
Anders Jenbo
0383f9abcd Add documentation to more files 2020-03-02 02:29:28 +01:00
Anders Jenbo
40cea40aa4 Remove windows call types collisions 2019-12-26 05:00:02 +01:00
Anders Jenbo
ba9288c6cf Unify error dialogs, for looks and portability
- Use UiOkDialog() to display all error messages
- Add SDL simple message, and console fallbacks to UiOkDialog()
- Boot graphics early on to facilitate most error messages with build in
gui
- Some more miniwin clean ups
2019-10-06 01:27:11 +02:00
Anders Jenbo
3de9b4b1e9 Clean up MPQ loading and make it more portable 2019-09-23 05:48:27 +02:00
Anders Jenbo
55717bb429 Remove RegisterClassEx part of miniwin 2019-09-23 05:26:34 +02:00
Anders Jenbo
14f8c9368a Merge branch 'master' of github.com:diasurgical/devilution 2019-09-13 17:51:58 +02:00
Anders Jenbo
f7fda58cd2 Remove check for Office 95 2019-09-13 03:56:44 +02:00
Anders Jenbo
f6c7465e4f [hellfire] LoadPlrGFX 2019-09-01 20:11:56 +02:00
Anders Jenbo
10c33575ac Clean ups from hellfire branch 2019-08-31 07:35:04 +02:00