Commit graph

55 commits

Author SHA1 Message Date
Gleb Mazovetskiy
75222ccef8 Overhaul dependency options
Changes how dependency options are handled and moves them out of
`CMakeLists.txt`.

Major changes:

1. The static default now takes `TARGET_SUPPORTS_SHARED_LIBS` into account
2. The `DIST` setting no longer affects the static default.
3. The static option is now visible for system dependencies as well.
   (it was previously hidden by `cmake_dependent_option`).
4. The auto-detection mechanism for `libfmt` and `SDL_image` only
   applies if the setting has not been set.
5. SDL2 on Android is now also linked statically,
   resulting in a 1.1 MiB smaller APK.

When using non-system dependencies, the default should always be static,
as there are 2 main use cases for these:

1. Dependencies that we must currently vendor because our forks have
   significant changes that are not yet merged/released upstream.
2. Platforms that have no system packages, such as Android and iOS.

In both cases, static linking is the most appropriate default.
2021-12-07 18:32:25 +01:00
Gleb Mazovetskiy
868289dc17 Add missing <cstring> includes 2021-11-28 15:32:36 +00:00
Gleb Mazovetskiy
7e1fea6f76 clang-format all files in {Source,test}/
Also includes a few manual tweaks to comments and newlines for better results.

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2021-11-24 23:44:12 +01:00
Vladimir Olteanu
286eb7144a Get rid of InitHash 2021-08-19 01:44:13 +02:00
Anders Jenbo
8df8b940c4
Handle some clang-tidy issues 2021-08-07 16:30:14 +02:00
jmechnich
c1f68198fc Source/encrypt.cpp: add missing header to fix mingw compilation error 2021-07-13 01:29:49 -07:00
Anders Jenbo
35ccc8eb1c Apply clang-tidy to code 2021-07-10 17:30:15 -07:00
Anders Jenbo
74b57558c9 🚚 Move local code to anonymous namespace 2021-07-10 17:30:15 -07:00
Anders Jenbo
8a4d38dd74 Stabalize clang-tidy runs 2021-06-27 03:42:51 +02:00
Anders Jenbo
f167bd4dfb Clang-tidy: llvm-include-order 2021-06-27 01:45:49 +02:00
Anders Jenbo
ec8d7bebe2 Clang-tidy: modernize-use-auto 2021-06-27 01:18:31 +02:00
Anders Jenbo
d3098412ed Clang-tidy: readability-non-const-parameter 2021-06-27 00:59:29 +02:00
Anders Jenbo
22b632f04a ♻️Clean up implicit bool conversions 2021-06-26 08:57:59 -07:00
Kalebe Alves
0461529176 Move byte from engine.h 2021-05-27 16:04:27 +02:00
Anders Jenbo
a095bc0bf7 ♻️Migrate more code away from miniwin 2021-05-13 02:30:18 +02:00
Gleb Mazovetskiy
f33f7ae7eb 💨 Do not zero-initalize arrays we write to
`std::make_unique<T[]>(size)` always zero-initalizes the array.

C++20 has `std::make_unique_for_overwrite` to avoid that, while
older C++ versions can use the approach applied here.
2021-05-02 05:52:11 +02:00
Vladimir Olteanu
42bb50cf0f Cleanup of encrypt.{h,cpp} 2021-04-30 08:41:37 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo
c89bd9c001 🚨 Fix remaning warnings for clang and gcc 2021-04-19 02:44:39 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
f450d6a125 🚚 Move defines to there proper files 2021-04-16 01:04:54 +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
pionere
d5a0fa8e85 get rid of a few warnings 2021-02-19 22:04:11 +01:00
Anders Jenbo
61b2d0de95 Merge branch 'master' of github.com:diasurgical/devilution 2020-12-16 02:24:39 +01:00
Anders Jenbo
ede76a3b74 Clean up Decrypt and Encrypt 2020-12-05 20:47:23 +01:00
Anders Jenbo
43b5dea6e5 Merge branch 'master' of github.com:diasurgical/devilution 2020-11-03 00:56:51 +01:00
Anders Jenbo
57b6d13b55 Reorder encrypt.cpp 2020-11-02 15:56:32 +01:00
Anders Jenbo
7108145a04 Merge branch 'master' of github.com:diasurgical/devilution 2020-04-14 15:30:49 +02:00
Anders Jenbo
9e2cefa522 Fix InitHash 2020-04-09 00:13:58 +02:00
Anders Jenbo
a94c2d656f Make hashtable in to a 2d array 2020-04-08 20:34:40 +02:00
Anders Jenbo
cd18914026 Avoid void pointers 2020-04-08 20:34:38 +02:00
Anders Jenbo
6704657e71 Apply sematic codestyle 2020-04-08 20:34:29 +02:00
Anders Jenbo
776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
Anders Jenbo
3c276a3cd3 Add documentation
- Add file documentation to about 1/4 of the files in Source
- Copy over a lot of the documentation from the sanctuary/notes repo
- Standardise all the existing documentation
- Create a configuration for Doxygen
- Add more documentation (engine.cpp is now fully documented)
2020-03-01 22:18:00 +01:00
Anders Jenbo
25993b4043 Merge branch 'master' of github.com:diasurgical/devilution 2020-02-14 23:03:31 +01:00
Anders Jenbo
20621a0642
add all.h and use in place of diablo.h (#2005)
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.

Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
2020-02-14 13:12:54 +01:00
Samuel-DEVULDER
9c516819c1 Make save game code big-endian compatible 2020-01-27 00:03:02 +01:00
Anders Jenbo
40cea40aa4 Remove windows call types collisions 2019-12-26 05:00:02 +01:00
Xadhoom
6856fb74e2 Merge upstream beanch 'devilution/master' 2019-04-25 20:44:01 +00:00
Anders Jenbo
65b9fb87a8 Merge branch 'TownDead' 2019-04-24 14:08:25 +02:00
galaxyhaxz
540892ff9d Preliminary support for fixed header files 2019-04-21 17:20:38 +02:00
galaxyhaxz
4e01e03711 Cleanup default calling conventions 2019-04-09 12:04:00 +02:00
Xadhoom
5283a9ffd1 Put everything into namespace dvl 2019-03-11 20:10:23 +00:00
Anders Jenbo
9b7da61dcf Auto format src 2019-01-13 18:55:59 +01:00
Anders Jenbo
b5f69dccdc C compatability from d-p (#519) 2018-12-29 17:54:22 +01:00
Anders Jenbo
37d294acc9
Clean up encrypt.cpp (#424) 2018-10-27 17:11:45 +02:00
Anders Jenbo
b1f6d3698f Update style to use tabs 2018-10-25 22:53:04 +02:00
Anders Jenbo
264d8e0573 Fix encrypt.cpp 2018-10-23 01:02:16 +02:00
Anders Jenbo
2d38003dc8 Format encrypt.cpp 2018-10-22 20:44:11 +02:00