Commit Graph
252 Commits
Author SHA1 Message Date
Anders Jenbo f9b5c61f68 Extract pause translations table as a data file 2023-04-19 23:28:33 +02:00
staphen db21a9b316 Use PROJECT_SOURCE_DIR in asio_defs.cmake 2023-04-10 08:58:52 +02:00
Anders Jenbo 82d233baf9 Add widescreen version of level 16 loadscreen 2023-04-04 01:40:36 +02:00
Gleb Mazovetskiy dd3103497a aarch64-linux-gnu cross-compilation
Allows one to easily cross-compile for aarch64 on a Debian/Ubuntu host.
Also adds a GitHub Action for it.
2023-04-01 17:56:02 +01:00
Anders Jenbo 5a1f0f4280 Add widscreen load background for Hell 2023-03-27 01:33:26 +02:00
staphen 40f95006ff Add cutttw.clx to Assets.cmake 2023-03-24 23:57:14 +01:00
Anders Jenbo 4bd0148f49 Add cave widescreen 2023-03-22 05:18:33 +01:00
Gleb Mazovetskiy 6bbe9e5ce8 CMake: Cleanup no-mpq config
Introduce a `SUPPORTS_MPQ` variable and use it throughout.
Also disables fetching bzip2 when MPQ support is disabled.
2023-03-18 13:30:13 +00:00
Anders Jenbo 20eb12570f Add catacombs widescreen (#5889) 2023-03-16 18:31:31 +01:00
Anders Jenbo 28ea755e32 Add churche widescreen 2023-03-16 00:49:53 +01:00
Gleb Mazovetskiy 9df35dceb3 gcc: -fipa-pta -fdevirtualize-at-ltrans
Enable these options for all platforms that use GCC.

They do not seem to significantly affect build times on our codebase,
while resulting in a slight 2-3% performance increase on low-end devices,
such as RG-99.
2023-02-15 21:53:31 +01:00
Gleb Mazovetskiy 63577da9ee rg99: add -fdevirtualize-at-ltrans
Another option that improves performance. From GCC documentation:

> Stream extra information needed for aggressive devirtualization when running the link-time optimizer in local transformation mode. This option enables more devirtualization but significantly increases the size of streamed data. For this reason it is disabled by default.
2023-01-25 10:43:30 +01:00
staphen 7f4d74e8f8 Use PROJECT_SOURCE_DIR instead of referencing the project name 2023-01-25 00:32:55 +01:00
Gleb Mazovetskiy 068fdac7c1 Do not use PKWare with no MPQs + NONET
Reduces RG99 binary size by 12 KiB
2023-01-23 01:51:16 +00:00
Gleb Mazovetskiy 0e0cc9d1b0 Reduce to just STREAM_ALL_AUDIO_MIN_FILE_SIZE
This does result in a bit more code and RAM usage for soundsample when
`STREAM_ALL_AUDIO` is on, but not by much.
2023-01-22 15:19:50 +00:00
Gleb Mazovetskiy 0dd95adcd1 Add a minimum threshold for STREAM_ALL_AUDIO 2023-01-22 15:19:50 +00:00
c99f7cf644 Floating numbers (#5639)
Co-authored-by: qndel <[email protected]>
Co-authored-by: Stephen C. Wills <[email protected]>
2023-01-22 07:20:10 +01:00
Gleb Mazovetskiy 6d274c9547 UNPACKED_SAVES: Saves without MPQs
Reduces rg99 binary size by ~70 KiB.
2023-01-18 23:40:30 +00:00
Gleb Mazovetskiy 8fe8023542 Create save and config directories
If a config directory did not exist, the ini file was
not saved at all.

Only implemented for targets that support `std::filesystem` or `std::experimental::filesystem`.
These are all the targets except nxdk and iOS (only supported on iOS 13+).
2023-01-12 03:28:28 +00:00
Gleb Mazovetskiy 135812a353 rg99: Enable -fipa-pta
From GCC documentation:

> Perform interprocedural pointer analysis and interprocedural modification and reference analysis.
> This option can cause excessive memory and compile-time usage on large compilation units.
> It is not enabled by default at any optimization level.

Also forces the CMake generation to `make` because `ninja` gets into an
infinite loop for some reason on my laptop.
2023-01-08 16:22:50 +01:00
Gleb Mazovetskiy 96c7b154be CMake: Add options for profile guided optimization
A PGO'd binary can be built as follows:

1. Build with `-DDEVILUTIONX_PROFILE_GENERATE=ON`.
3. Run the timedemo.
4. Build with `-DDEVILUTIONX_PROFILE_USE=ON`.
By default, the profile directory is at `${HOME}/devilutionx-profile`

Example for the RG99:

```bash
# Build the OPK for profiling data collection:
TOOLCHAIN=/opt/rs90-toolchain Packaging/OpenDingux/build.sh rg99 --profile-generate

# Copy the OPK to RG99:
scp -O build-rg99/devilutionx-rg99.opk rg99:/media/sdcard/apps

# Now, run the OPK. It will run the timedemo instead of the actual game and will take a couple of hours.
# ☕☕☕

# Copy the profiling data from RG99
scp -r -O rg99:/media/data/local/home/devilutionx-profile /tmp/devilutionx-profile

# Build the OPK use the collected profiling data:
TOOLCHAIN=/opt/rs90-toolchain Packaging/OpenDingux/build.sh rg99 --profile-use --profile-dir /tmp/devilutionx-profile

# Copy the resulting binary back to RG99
scp -O build-rg99/devilutionx-rg99.opk rg99:/media/sdcard/apps
```
2022-12-17 14:15:20 +00:00
Gleb Mazovetskiy 529a1631de Findsodium.cmake: Fix pkg-config checks
Test the correct variables for `pkg_check_modules`.

Per https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
2022-12-06 12:15:41 +01:00
Gleb Mazovetskiy 652af23dd1 Findsodium.cmake: Fix line endings 2022-12-06 12:15:41 +01:00
Gleb Mazovetskiy 037b7913e9 Remove -fsigned-char 2022-12-05 07:52:13 +01:00
Artur Jarosik 28cd8edc3a Remove last -noixemul switch. 2022-12-02 21:37:16 +01:00
staphen f17ea8db98 Implement settings menu for gamepad customization 2022-11-27 18:27:21 +01:00
Gleb Mazovetskiy 1a0c1e25ce rg99: Build with -O2 and tune buffer size
`-O2` increases the binary size by 0.5 MiB which we can now afford.
Increasing buffer size to `768` improves performance (seems to be the
sweet spot).

15-20 FPS in dungeon on the max-mem OD fork.
2022-11-23 08:06:02 +00:00
Gleb Mazovetskiy c1837747ce rg99: enable audio
New goal!
2022-11-22 04:58:06 +01:00
Gleb Mazovetskiy 3cb24c15f3 Remove SDL_image dep from SDL1 build
Fixes #5504
2022-11-20 18:48:33 +01:00
Trihedraf 92e170dea8 set select correctly 2022-11-20 12:34:34 -05:00
Gleb Mazovetskiy ce41ecb323 CMake: Fixup BZip2 dependency
1. Remove `find_package(BZip2 REQUIRED)` from Dependencies.cmake
   because it is not used by devilutionx directly (it's a libmpq dependency).
2. For emscripten, use the built-in version of bzip2.
3. Reverts 0b4705cf1c, which added
   a redundant `find_package(ZLIB REQUIRED)` to `Dependencies.cmake`.
2022-11-20 10:40:25 -05:00
staphen 0b4705cf1c Add find_package(ZLIB) to Dependencies.cmake 2022-11-20 15:37:36 +01:00
Gleb Mazovetskiyandstaphen bdeb6ade0e amiga.cmake: Remove find_package(ZLIB) (#5501)
* CMake: 3rdParty/zlib fixes

1. zlib already provides a CMakeLists.txt, use it.
2. Stub find_package for source build. ZLIB is used by libpng via `find_package(ZLIB)`.
3. amiga.cmake: Remove `find_package(ZLIB)`.

* Update UWP build directory for zlibstatic.lib

Co-authored-by: staphen <[email protected]>
2022-11-20 09:05:18 -05:00
Trihedraf 89ce987ec7 Remove remap of Start button to escape 2022-11-20 10:03:38 +01:00
Artur Jarosik 8bee40dca4 Fix amiga build (#5479) 2022-11-16 13:01:02 +01:00
Gleb Mazovetskiy 0caf60cbc6 CMake: Fix FindSDL2_image.cmake with vcpkg
In case of vcpkg, pkg-config may not be available but a CMake config is.
Prefer CMake config to pkg-config when looking for SDL2_image.
2022-11-13 22:10:09 +00:00
Gleb Mazovetskiy bb18daa405 Xbox One: Package translations
Fixes #4527
2022-11-05 17:08:36 +00:00
Gleb Mazovetskiy 7071e3ae6c clang + mold: Avoid "argument unused during compilation" warning 2022-10-16 03:53:26 +01:00
obligaron 795a43dd89 Add Arena Support 2022-10-14 16:25:30 +02:00
staphen 8e71e18971 Reenable LTO for MinGW builds 2022-10-14 00:53:14 +02:00
Gleb Mazovetskiy f7335e9df7 Xbox nxdk: Set gamepad type
Set the gamepad type to Xbox for the original Xbox.
2022-10-12 02:45:38 +01:00
Gleb Mazovetskiy a052742109 rg99.cmake: UNPACKED_MPQS, reduce thread stack size 2022-10-11 18:00:57 +01:00
Gleb Mazovetskiy 41f43ea3f5 Support unpacked MPQs from devilutionx-mpq-tools
https://github.com/diasurgical/devilutionx-mpq-tools produces an unpacked MPQ
with all the graphics converted to CLX and the unused files removed.
This is primarily useful on RAM-constrained platforms, such as PS2,
because it eliminates the MPQ overhead.

Adds a build option to load from such unpacked directories instead of the MPQ.

These directories are searched for in the same locations
where the MPQs would be searched for otherwise.

Example directory layout:

* /usr/local/share/diasurgical/devilutionx/diabdat/ -- unpacked and converted diabdat.mpq
* /usr/local/share/diasurgical/devilutionx/hellfire/ -- unpacked and converted hellfire MPQs (all of them merged into 1 directory)
* /usr/local/share/diasurgical/devilutionx/fonts/ -- unpacked fonts.mpq
* /usr/local/share/diasurgical/devilutionx/pl/ -- unpacked pl.mpq

These directory structure is produced by calling `unpack_and_minify_mpq`
2022-10-11 18:00:57 +01:00
Gleb Mazovetskiy 12c7dab3f3 Define gamepad type for SDL1 handhelds 2022-10-11 02:04:58 +01:00
Nicholas Calaway eb45857422 Gamepad icons (#5357) 2022-10-10 18:30:58 +02:00
Anders Jenbo e348fa3b1e Implement town map 2022-09-12 08:09:17 +02:00
Gleb Mazovetskiy 6c5b5612c2 CMake: Fix MinGW pkgconfig
`PKG_CONFIG_EXECUTABLE` must be a cache variable, otherwise only the first call to `find_program(PkgConfig)` succeeds.

Also bumps the CI environment to Ubuntu 22.04, because Ubuntu 20.04
version of mingw pkgconfig is bugged.
2022-08-30 10:10:32 +02:00
Gleb Mazovetskiy 1334ee8b96 CMake: Always strip the Release binary 2022-08-30 10:01:37 +02:00
Gleb Mazovetskiy e53a3edc61 CMake SDL1: Set minimum version to 1.2.10 2022-08-26 03:09:24 +02:00
Gleb Mazovetskiy ac88a38377 Fix macOS build with the SDL2 2.24.0
SDL2 2.24.0 has a bug in its cmake for macOS: https://github.com/libsdl-org/SDL/issues/6119

This bug has already been fixed upstream. This is a workaround until the
next version of SDL2 is released.
2022-08-26 07:32:02 +09:00