aboutsummaryrefslogtreecommitdiff
path: root/map.h
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-15 18:13:42 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-15 18:13:42 +0300
commitc6db3a75f756d790ede966c34adc3dbc793803d1 (patch)
tree57740daaa72db5ad79fb58e51c9b83aedf9d63d3 /map.h
parent6427ca899baaf564f09b4610c433de88d3520045 (diff)
downloadastar-c6db3a75f756d790ede966c34adc3dbc793803d1.tar.xz
Try to implement costs, fail
Diffstat (limited to 'map.h')
-rw-r--r--map.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/map.h b/map.h
index 978db21..93672b7 100644
--- a/map.h
+++ b/map.h
@@ -48,6 +48,14 @@ Map rbt_maze_map(size_t width, size_t height, unsigned int seed);
Map file_plaintext_map(char *filename, size_t *width, size_t *height, Position *start_pos, Position *end_pos);
/* The reverse of above */
void map_to_file_plaintext(char *filename, Map map, size_t width, size_t height, Position start, Position end);
+/* Loads integer costs from a file. Sizes have to match.
+ * File format:
+ * 5x4
+ * 10 20 30 40 5
+ * 20 49 5 3 2
+ * 1 2 4 5 2
+ * 5 1 95 2 5 */
+size_t **file_plaintext_costs(char *filename, size_t width, size_t height);
/* Draw the map. Bet you didn't expect that.
* path could be NULL to draw a map with no path. So can cursor, frontier and visited */