diff options
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -660,6 +660,8 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi * * [d] - Switch algorithms (A* or Dijsktra's) * + * [r] - Reverse path + * * [s] - Save the map to a plaintext file * * [q] - Exit the map editor @@ -721,6 +723,10 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi if (should_pathfind) path = path_func(dirs, *map, NULL, *width, *height, *start, *goal, visited, 0); break; + case 'r': + path_reverse(&path, *width, *height, start, goal); + break; + case 's': curs_set(2); /* Show the cursor */ echo(); /* Echo characters */ |
