Commit Graph
26 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 5625a7007c Add a script to convert from devilutionx-assets 2023-04-10 17:51:58 +02:00
Gleb Mazovetskiy 2bc4aaebae Format tables in Source/objdat.cpp 2023-01-25 09:32:50 +00:00
Gleb Mazovetskiy a596c8223d Reformat sound effects table 2023-01-19 12:10:21 +00:00
Gleb Mazovetskiy d6409b4490 cpp_format_struct_table: Fix newlines on Windows 2023-01-16 08:45:18 +01:00
Gleb Mazovetskiy ae0297006e A tool to format a struct table
Does not support subobjects, i.e. it treats them as a single value.
2023-01-15 14:57:17 +01:00
Gleb Mazovetskiy ff27203d65 Add a script for building a PGO'd binary 2023-01-12 03:38:29 +00:00
Gleb Mazovetskiy 56f94c7471 Add a --lang command line argument
This allows forcing the locale without changing the settings.

The `forceLocale` option also lets us avoid changing the locale in settings if fonts.mpq is missing, fixing the following scenario:
1. System locale is ja
2. Launch the game -- fonts are missing
3. Close the game, download fonts.mpq
4. Launch the game again -- it is now in English because the settings have changed
2022-12-10 02:26:11 +00:00
Gleb Mazovetskiy b13f413fc2 Add tools/run_big_endian_tests.sh
A tool to run tests on a big-endian system.
Uses an Alpine s390x Docker container.
2022-12-09 11:09:05 +00:00
Gleb Mazovetskiy 7a5ad4792a A tool to measure performance using the time demo
Example:

```
$ tools/measure_timedemo_performance.py -n 32 --binary build-reld-sdl1-nonet-nosound-unpk/devilutionx
Run  1 of 32: 	 6.02 seconds	170.8 FPS
Run  2 of 32: 	 6.22 seconds	165.5 FPS
Run  3 of 32: 	 6.01 seconds	171.1 FPS
Run  4 of 32: 	 6.03 seconds	170.6 FPS
Run  5 of 32: 	 6.05 seconds	170.2 FPS
Run  6 of 32: 	 6.04 seconds	170.3 FPS
Run  7 of 32: 	 6.03 seconds	170.5 FPS
Run  8 of 32: 	 6.03 seconds	170.5 FPS
Run  9 of 32: 	 6.01 seconds	171.1 FPS
Run 10 of 32: 	 6.04 seconds	170.3 FPS
Run 11 of 32: 	 6.03 seconds	170.7 FPS
Run 12 of 32: 	 6.03 seconds	170.7 FPS
Run 13 of 32: 	 6.04 seconds	170.3 FPS
Run 14 of 32: 	 6.03 seconds	170.6 FPS
Run 15 of 32: 	 6.04 seconds	170.3 FPS
Run 16 of 32: 	 6.04 seconds	170.4 FPS
Run 17 of 32: 	 6.03 seconds	170.6 FPS
Run 18 of 32: 	 6.03 seconds	170.5 FPS
Run 19 of 32: 	 6.06 seconds	169.9 FPS
Run 20 of 32: 	 6.04 seconds	170.3 FPS
Run 21 of 32: 	 6.03 seconds	170.7 FPS
Run 22 of 32: 	 6.02 seconds	171.0 FPS
Run 23 of 32: 	 6.02 seconds	170.8 FPS
Run 24 of 32: 	 6.02 seconds	170.8 FPS
Run 25 of 32: 	 6.04 seconds	170.3 FPS
Run 26 of 32: 	 6.03 seconds	170.8 FPS
Run 27 of 32: 	 6.04 seconds	170.4 FPS
Run 28 of 32: 	 6.07 seconds	169.4 FPS
Run 29 of 32: 	 6.03 seconds	170.7 FPS
Run 30 of 32: 	 5.99 seconds	171.7 FPS
Run 31 of 32: 	 6.01 seconds	171.1 FPS
Run 32 of 32: 	 6.06 seconds	169.9 FPS
6.038 ± 0.037 seconds, 170.400 ± 0.988 FPS
```
2022-11-25 23:11:27 +01:00
Gleb Mazovetskiy b876fa84b0 make_src_dist.py: Vendor simpleini SDL_audiolib
Explicitly set `-DDEVILUTIONX_SYSTEM_SDL_AUDIOLIB=OFF`
and `-DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF` because we now
also support the system versions of these.
2022-07-31 15:54:55 +02:00
Gleb Mazovetskiy d2d9fcb5b5 Update SDL_audiolib
The latest version uses libfmt internally
and removes the need for exceptions.
2022-06-22 09:57:49 +02:00
Gleb Mazovetskiy 20c13b7b07 make_src_dist.py --fully_vendored: Add Discord SDK 2022-04-14 16:53:53 +01:00
Gleb Mazovetskiy 87de23555e Resegment translations
pip install --upgrade -r tools/segmenter/requirements.txt
    tools/segmenter/segment_all.py
2022-04-03 15:37:23 +02:00
Gleb Mazovetskiy 8ce55bab6c tools/build_and_install_smpq.sh: Bump StormLib
Includes
https://github.com/ladislav-zezula/StormLib/commit/a5ef7a850aac844abf2e3859e26617ed596d4624,
which should fix issues on some platforms. Refs #3930
2022-01-15 14:34:31 +01:00
Anders Jenbo 819fbf0722 Add script for validating translations 2022-01-05 05:43:38 +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
Gleb Mazovetskiy eb557e598b tools/segmenter/README.md: Windows instructions 2021-12-15 11:33:32 +01:00
Gleb Mazovetskiy 0d63be4be4 make_src_dist: Add a top-level directory
Addresses a request by @jpalus to place the archive contents into a top-level directory.
(https://github.com/diasurgical/devilutionX/pull/3589#issuecomment-981084124)

The directory looks like this: `devilutionx-src-1.3.0-7154522bf`.
2021-12-12 18:21:08 +00:00
Gleb Mazovetskiy 437d4ed1e5 make_src_dist: Add a --fully_vendored flag
With this flag (off by default), all of the dependencies are packaged
into the source archive (including SDL2 etc).

Useful for building on machines without an internet connection.
2021-12-11 23:07:20 +01:00
Gleb Mazovetskiy 64e29d53e8 make_src_dist.py: Update documentation 2021-11-28 14:29:46 +00:00
Gleb Mazovetskiy 94ff465c85 A script for building and installing smpq from source
Useful when developing on systems that do not have an SMPQ package.
Should be compatible with Linux, *BSD, Mac.
2021-11-27 17:46:28 +00:00
Gleb Mazovetskiy 614efb5bd5 A tool to build a self-contained source tarball
The does some pruning of the dependencies' files to avoid a 100 MiB+ tarball.
Even with that, the final tarball size is 17 MiB with xz, 25 MiB with gzip.

See the file documentation at the top of `tools/make_src_dist.py` for
more information.
2021-11-25 01:43:25 +00:00
Gleb Mazovetskiy 395dbb18f0 Segmenter: Use gettext to line-wrap po files
The line wrapping algorithm of gettext is somewhat complicated.

Rather than trying to approximate it, use `msgcat` from gettext
directly. This is also what poedit does.
2021-11-19 11:39:04 +00:00
Gleb Mazovetskiy 98abd17456 Segmenter: Do not split printf specifiers 2021-11-19 11:39:04 +00:00
Gleb Mazovetskiy a18f64ddd9 Add a Japanese segmenter 2021-11-17 09:59:53 +00:00
Gleb Mazovetskiy bc6bd228b8 A tool to segment Chinese .po files with ZWSP
This tool can insert ZWSP between words in Chinese .po files using this
model: https://tfhub.dev/google/zh_segmentation/1

We will use this tool to be able to word wrap Chinese translations at runtime
without bundling a segmenter.

Doing this offline also allows us to use a segmenter that would
otherwise be too slow for runtime.
2021-11-10 02:50:46 +01:00