Commit Graph
14 Commits
Author SHA1 Message Date
Gleb Mazovetskiy f2cb9f0fa0 file_util: Implement RecursivelyCreateDir
With this, we no longer require `std::filesystem` support to create the
save file directory when it does not exist.

Note that by default the save file directory exists because it is
created by SDL, so this is mostly useful on platforms that override the
save directory or use `UNPACKED_SAVES`.
2023-03-11 17:47:29 +00: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 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
obligaron c6c929a90c Remove MpqDir and use PrefPath instead. 2022-04-10 17:06:45 +02:00
Gleb Mazovetskiy f5d8f513cb AssetsPath: Default to exe dir
Also adds `SetAssetsPath`, for use by tests.
2021-12-16 21:26:11 +01:00
Gleb Mazovetskiy d3a523fa0b paths.cpp: Remove AppPath
It was redundant.
2021-12-16 19:19:04 +00:00
Gleb Mazovetskiy a97ffd1640 Load MPQ file overrides without StormLib
Also logs the overrides in verbose mode.
2021-10-24 16:21:39 +01:00
Gleb Mazovetskiy 7d91bc461a Improve asset file opening
Avoid wrapping asset files via StormLib, open them directly via SDL
instead.
2021-10-24 16:21:39 +01:00
Anders Jenbo 3b229a8275 Check for translation in the same place as they are loaded from 2021-10-24 16:03:26 +02:00
obligaron a532d0fc21 Introduce paths::AppPath 2021-10-10 00:51:45 +02:00
Anders Jenbo 4dd8b121ec Replace TTF with PCX font 2021-09-29 18:13:48 +02:00
JmgrandGleb Mazovetskiy d4f62870b8 Remove globals from paths.h
Fix for Vita

Update to use free functions

Use std::optional to allow setting empty paths

Change header inclusion order

Co-authored-by: Gleb Mazovetskiy <[email protected]>

Use std::optional to allow setting empty paths

Apply clang-format

Temporary commit
2021-04-25 22:26:37 +02:00
John Törnblom 51e7a169a6 add initial language support using a simple MO parser 2021-04-25 03:40:45 +02:00
Anders Jenbo 8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00