Leslie P. Polzer
b76f906ddc
Skip tests gracefully without MPQ assets
4 months ago
Gleb Mazovetskiy
842b23803f
SDL3: Use endianness swap helpers throughout
5 months ago
Anders Jenbo
1c76897f2c
Apply simple const rules using clang-tidy
7 months ago
Anders Jenbo
7b2de562c2
Extract more Hellfire into data
8 months ago
Anders Jenbo
3b18dd35d9
Move some Hellfire differences to data files ( #7943 )
...
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
11 months ago
Anders Jenbo
96112e675b
Handle loaded MPQ files in a map instead of bespoke globals ( #7887 )
11 months ago
staphen
c798253587
Use constexpr for length of item names
1 year ago
Gleb Mazovetskiy
d7647d6c63
More dependency untangling
...
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
1 year ago
Gleb Mazovetskiy
b76feb2be3
Extract game mode out of init.cpp
...
Untangles some dependencies
1 year ago
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
1 year ago
Eric Robinson
e90855b3c4
Rename stores.cpp global variables ( #7425 )
2 years ago
Eric Robinson
d8e58b2547
Fix Elemental Arrows vs Objects ( #6507 )
2 years ago
KPhoenix
fc6f9edad3
Update pack_test.cpp
2 years ago
Gleb Mazovetskiy
dc59cdaee4
Extract objcurs widths into a file
...
Read from the widths file when using the original CEL.
When using CLX, use width in CLX.
2 years ago
Gleb Mazovetskiy
124d113b57
Extract spell data to a TSV
2 years ago
KPhoenix
b8738ab4cf
Validation: Validate Item Drop Packets
2 years ago
Gleb Mazovetskiy
f566359e4f
Migrate item data to txtdata/
2 years ago
Gleb Mazovetskiy
2eae121931
Migrate monstdat to a data file
...
We may want to migrate this to 1 file per monster but for now the
migration is as close to the hard-coded version as possible.
Sprites that are used by multiple monsters are only loaded from disk
once.
2 years ago
ephphatha
6a8f4b12da
Get base block bonus from data struct instead of storing a copy
3 years ago
staphen
a151219b9b
Don't validate creation flags on gold
3 years ago
staphen
4deae11871
Fix PlayerNetPack validation and tests
3 years ago
Anders Jenbo
bf7135dd11
Adjust tests to work with data driven levels ( #6509 )
...
Co-authored-by: staphen <staphen@gmail.com>
3 years ago
Stephen C. Wills
7b06703842
Add tests for net player validation ( #6492 )
3 years ago
Anders Jenbo
b38efb6ccf
Fix code style
3 years ago
Anders Jenbo
6e7ed13336
Add missing Hellfire healing potions to test data
3 years ago
Anders Jenbo
116bd3f626
Decompose iCreateInfo fixture table
3 years ago
obligaron
eeca953615
Introduce UpdateHellfireFlag to set missing CF_HELLFIRE flag
3 years ago
obligaron
0426908988
Introduce GetTranslatedItemName/GetTranslatedItemNameMagical
3 years ago
KPhoenix
d813f13700
`enum spell_id` -> `enum class SpellID`
3 years ago
Gleb Mazovetskiy
cea6a01de7
More item packing fix on big-endian
...
Refs #5573
3 years ago
Gleb Mazovetskiy
44c3bc4038
pack_test: Make fixtures little-endian on BE
...
Packed items are supposed to be little-endian even on big-endian
systems. Makes all test fixtures little-endian.
Refs #5573
3 years ago
obligaron
b3aa08589b
Don't use MyPlayer in UnPackItem and dependend methods
4 years ago
Gleb Mazovetskiy
188dc79f6e
Make `Players` a vector
4 years ago
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
4 years ago
DakkJaniels
dad46e1905
Item special effect enum ( #4129 )
4 years ago
Gleb Mazovetskiy
f8a72fddd3
Reduce 12px font space width from 9px to 5px
...
Fixes #4397
4 years ago
staphen
b85485b8f3
Resolve game crash when syncing Diablo items in Hellfire games
4 years ago
KPhoenix
fb8f0c3501
Update pack_test.cpp
4 years ago
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
4 years ago
Andrew James
4a940b1b07
Remove uses of Items[] as a temporary for other Item variables ( #2924 )
4 years ago
Gleb Mazovetskiy
3d308983a8
Migrate to libmpq
...
libmpq is a much simpler alternative to StormLib for reading MPQ archives.
We use our own fork of libmpq: https://github.com/diasurgical/libmpq
Impact:
* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
4 years ago
Gleb Mazovetskiy
7d91bc461a
Improve asset file opening
...
Avoid wrapping asset files via StormLib, open them directly via SDL
instead.
4 years ago
Anders Jenbo
84e73e9a53
Match correct generated names in tests
4 years ago
Anders Jenbo
116d3301f8
Load font during tests that depends on it
4 years ago
ephphatha
96451ec6ce
Update spawn tests
5 years ago
ephphatha
a985df1242
Align formatting
5 years ago
ephphatha
e261de18f0
Update hellfire unpack tests to recognise full staff name
5 years ago
ephphatha
f7e0c31d8d
Update item tests to handle staff name prefix changes
...
#3039 changed the way staff variants were named but the item tests were expecting the old logic which called them all "Staff of".
5 years ago
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
5 years ago
Anders Jenbo
b74feb01dc
🐛 Correctly check if item name will fit in the info panel
5 years ago