Gleb Mazovetskiy
39afeaf8b1
CMake: gc-sections + no-rtti/exceptions options
...
Turns out gc-sections helps significantly even with LTO (-84 KiB for the
MinSizeRel rg99 build).
Also adds options for disabling RTTI and exceptions.
4 years ago
Gleb Mazovetskiy
de3c9874c7
Migrate large bool arrays to `std::bitset`
...
E.g. `dRendered` size is reduced by 10 KiB
4 years ago
Gleb Mazovetskiy
127c6bc9e1
Fix finding SimpleIni
...
The version in Ubuntu 22.04 comes without `ConvertUTF.{h,c}`.
We actually do not need `ConvertUTF.{h,c}` and starting from
v4.19 it is possible to tell SimpleIni to not include it
by setting `SI_NO_CONVERSION`.
Sets `SI_NO_CONVERSION` and raises the minimum required SimpleIni
version to 4.19.
4 years ago
Yuvraj Tetarwal
8a3b81cd7b
Check for system version of simpleini. ( #4751 )
4 years ago
Andrew James
812d9f83dd
Remove duplicate defines
...
included in both #4757 and #4755
4 years ago
Gleb Mazovetskiy
01ad1814ea
Make path finding index-based
...
Reduces the size of the `PathNodes` array from 28 KiB to just 8 KiB.
Also reduces the size of `pnode_tblptr` from `300 * sizeof(void *)` to
`300 * 2` bytes.
4 years ago
ephphatha
96c38c7f34
Add tests for path length edge case
4 years ago
Andrew James
f846263462
Restore change to trigger position when advancing betrayer quest ( #4752 )
4 years ago
Gleb Mazovetskiy
8e9c9e0238
Reduced the size of `OwnedCelSprite*` by 8 bytes
...
`OwnedCelSpriteWithFrameHeight`: 40 -> 32
4 years ago
Gleb Mazovetskiy
c54ddbc98d
locale.cpp: Fix windows.h include
4 years ago
Gleb Mazovetskiy
112f01c960
Remove unused overload of `LoadArt`
4 years ago
Gleb Mazovetskiy
1933e237da
Remove `FallbackPalette`
...
Copies `black.pcx` into the MPQ to handle the case where we have
`devilutionx.mpq` but not `diabdat.mpq`
4 years ago
Gleb Mazovetskiy
c69173e9bd
Fix `-Wsign-compare` in `SetDungeonMicros`
4 years ago
Gleb Mazovetskiy
73f9dd45ab
Move embedded dialog assets to the MPQ
...
If we can't find `devilutionx.mpq`, we can't render a dialog either,
because the MPQ contains the fonts.
4 years ago
Gleb Mazovetskiy
ba71949ebb
Add 2 options to reduce static memory use
4 years ago
ephphatha
0fc06924fb
Restructure test conditions to avoid tautology warnings
4 years ago
Andrew James
13a3424ff0
Add helpers for creating/using Rectangles in UI contexts ( #4734 )
...
* Add MakeRectangle helper to convert from SDL_Rect
* Add Rectangle::inset method for shrinking a rectangle
Turns out some of the other use cases I though this could apply to were actually doing something based on a fixed region
* Simplify initialisation of settings menu rects
4 years ago
Gleb Mazovetskiy
ee3096d2da
Fix heap-use-after in hero selection
...
Fixes #4723
4 years ago
Andrew James
60b835214b
Address warnings in Utf8 functions ( #4748 )
...
* Use explicit typecasts to force signed char comparisons
Avoids warnings about tautological comparisons (either the >= 0 comparison for ARM/PowerPC or the <= 127 comparison for x86*)
* Remove unused function
4 years ago
Gleb Mazovetskiy
de10b96bfb
Fix PCX `LoadFrameOffsets`
4 years ago
Gleb Mazovetskiy
c1ea8d58e0
Fix wide-screen background paths
...
These files are lowercase when in a bundled filesystem.
4 years ago
obligaron
7eb8bc8832
Fix building unit tests with msvc (SOLData needs DVL_API_FOR_TEST)
4 years ago
Anders Jenbo
4cc3a5264c
Make dPiece zero-indexed
4 years ago
Anders Jenbo
615c8d1eb9
Unload mega tiles after generating town
4 years ago
Anders Jenbo
446a56d655
Reduce dPiece from int to uint16_t
4 years ago
Anders Jenbo
98e4310cad
Index Minis by tile instead of by coordinate
4 years ago
Anders Jenbo
d8c65a8c31
[diablo] Fix some floor tiles in hell being marked as solid
4 years ago
Anders Jenbo
860bd1cebf
Operate directly on SOL data
4 years ago
Vladimir Olteanu
4f1e6b76e0
Refactor MI_Apoca ( #4730 )
4 years ago
obligaron
22010f12a7
Set quest unique monsters location depending on setlevel
4 years ago
obligaron
184290a977
Support setlevel in multiplayer
4 years ago
obligaron
e151274fdf
Introduce IsValidLevel
4 years ago
obligaron
22a113d3a6
Introduce GetLevelForMultiplayer
4 years ago
obligaron
766fdf74df
Change IOwnLevel from nReqLevel to player
4 years ago
obligaron
6210f57e82
Change DeltaSyncObject and DeltaPutItem from bLevel to Player
4 years ago
obligaron
8637e05650
Remove bLevel from delta_kill_monster_ and delta_monster_hp
4 years ago
obligaron
ceb08d783f
Introduce Player::plrIsOnSetLevel
4 years ago
obligaron
783db07cbf
Replace CMD_DLEVEL_0/_1/... with generic CMD_DLEVEL
4 years ago
obligaron
303735777e
Store delta level information in unordered_map
4 years ago
obligaron
29e4ec4ef1
Move delta structs to msg.cpp
4 years ago
obligaron
316279fdd2
Reduce use of sgLevels
4 years ago
obligaron
d0c14fe92f
Introduce Player::setlevel
4 years ago
obligaron
9ac04314f4
Introduce Player::isOnLevel
4 years ago
obligaron
19749420b5
Introduce Player::isOnActiveLevel
4 years ago
Andrew James
0add7a8af6
Define sizes using Size type in control.cpp/stash.cpp ( #4737 )
...
* Use appropriate types for size constants in control.cpp
* Declare constexpr value for iterating over the cells in a stash grid
* Use appropriate type for UIRectangle dimensions
4 years ago
Gleb Mazovetskiy
b7404af9c7
Fix build with NONET and no exceptions
...
Fixes the build with `-fno-rtti` and `-fno-exceptions`.
Building with these flags reduces the binary size by more than 200 KiB.
4 years ago
ephphatha
e246ac78db
Simplify character test in UiValidPlayerName
4 years ago
ephphatha
771beeb82d
Use string_view for UiValidPlayerName
4 years ago
ephphatha
34b7d85263
Add IsLeadUtf8CodeUnit to complement trail byte detection
4 years ago
ephphatha
3c173df83b
Update comment on IsTrailUtf8CodeUnit
...
Also use char literals instead of int literals.
4 years ago