diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -132,11 +132,6 @@ int main(int argc, char **argv) { init_ncurses(); } - int offset_x = 0, offset_y = 0; - - //draw_map(map, width, height, offset_x, offset_y, start_pos, end_pos, NULL, NULL, NULL, NULL); - //print_map_out(map, width, height); - char **visited = visited_new(width, height); Path path = NULL; path = path_func(dirs, map, width, height, start_pos, end_pos, visited, anim); @@ -148,13 +143,13 @@ int main(int argc, char **argv) { } while (1) { - draw_map(map, width, height, offset_x, offset_y, start_pos, end_pos, NULL, path, visited, NULL); + draw_map(map, width, height, start_pos, end_pos, NULL, path, visited, NULL); char c = getch(); switch (c) { - case 'h': offset_x += 2; break; - case 'l': offset_x -= 2; break; - case 'j': offset_y -= 1; break; - case 'k': offset_y += 1; break; + case 'h': map_offset_x += 2; break; + case 'l': map_offset_x -= 2; break; + case 'j': map_offset_y -= 1; break; + case 'k': map_offset_y += 1; break; case 'a': anim = !anim; break; case 'y': case 'o': @@ -184,7 +179,7 @@ int main(int argc, char **argv) { case 's': /* TODO: prompt for filename? or do a define idk */ map_to_bmp(map, width, height, start_pos, end_pos, path, visited, "out.bmp"); - mvprintw(height + offset_y + DRAW_MAP_OFFSET_Y + 1, offset_x, "Saved to out.bmp"); + mvprintw(height + map_offset_y + DRAW_MAP_OFFSET_Y + 1, map_offset_x, "Saved to out.bmp"); getch(); break; case 'n': |
