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
The pre-calculated crawl table is replaced with partially unrolled loops to handle the special cases covered by the table.
Arbitrary limit of 50 placed to allow using this function for searches where vanilla logic would check up to (±49, ±49).
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
In cases like path_get_h_cost this allows simplifying logic where Point provides functions for the intended behaviour in a much simpler to understand package.
This also makes it clearer which functions are const/don't modify the node and which potentially have side effects.
Only path_solid_pieces and FindPath are used outside the file, but the other functions are exposed in the header and have behaviour I felt worth testing individually.