Commit graph

5 commits

Author SHA1 Message Date
ephphatha
b12de6fe12 Use scoped enum for Direction
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
2021-09-12 02:27:47 +02:00
obligaron
82cea78def Apply clang-format 2021-08-11 20:52:32 +02:00
Anders Jenbo
069249f318 🚚 Move local function to anonymous namespace i-p 2021-07-19 05:44:20 +02:00
ephphatha
a8ed1998d1 Use Point in path_ functions that reference position
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.
2021-07-17 17:35:58 +02:00
ephphatha
f01d551eb0 Add tests for path_get_h_cost, IsTileWalkable, IsTile(Not)Solid, path_solid_pieces, FindPath
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.
2021-07-17 17:35:58 +02:00