diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-15 17:38:50 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-15 17:38:50 +0300 |
| commit | bab2ff2090e875ec5c0465e0d39011b0382d4c9e (patch) | |
| tree | 90b4f3ac7b4f4df74c8e34c5cf7f56709739f57f /map.h | |
| parent | ae41c1ba2ff803ec2e86d97883dddfd79d800103 (diff) | |
| download | astar-bab2ff2090e875ec5c0465e0d39011b0382d4c9e.tar.xz | |
Add costs everywhere
Diffstat (limited to 'map.h')
| -rw-r--r-- | map.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,12 +19,12 @@ Map empty_map(size_t width, size_t height); /* Stores all the existing 4dir neighbours of pos in neighbour_array and returns their amount */ unsigned int neighbours_4dir(Position neighbour_array[4], size_t cost_array[4], Position pos, size_t width, size_t height, \ - char **visited); + char **visited, size_t **costs); /* Stores all the existing 8dir neighbours of pos in neighbour_array and returns their amount. * Additionaly stores costs into cost_array if it's not NULL. * The cost of goint orthogonally is 10, diagonaly is 14 (sqrt(2) * 10) */ unsigned int neighbours_8dir(Position neighbour_array[8], size_t cost_array[8], Position pos, size_t width, size_t height, \ - char **visited); + char **visited, size_t **costs); /* https://en.wikipedia.org/wiki/Maze_generation_algorithm#Randomized_depth-first_search * WARNING: width and height are not the width and height of the returned map! |
