diff --git a/obj/io.o b/obj/io.o new file mode 100644 index 0000000..c6099b4 Binary files /dev/null and b/obj/io.o differ diff --git a/obj/main.o b/obj/main.o new file mode 100644 index 0000000..f163bdd Binary files /dev/null and b/obj/main.o differ diff --git a/obj/map_helpers.o b/obj/map_helpers.o new file mode 100644 index 0000000..e589152 Binary files /dev/null and b/obj/map_helpers.o differ diff --git a/obj/parsing.o b/obj/parsing.o new file mode 100644 index 0000000..f6887af Binary files /dev/null and b/obj/parsing.o differ diff --git a/obj/parsing_simple.o b/obj/parsing_simple.o new file mode 100644 index 0000000..50ebe01 Binary files /dev/null and b/obj/parsing_simple.o differ diff --git a/obj/printing.o b/obj/printing.o new file mode 100644 index 0000000..1af1a17 Binary files /dev/null and b/obj/printing.o differ diff --git a/obj/solution.o b/obj/solution.o new file mode 100644 index 0000000..e62045c Binary files /dev/null and b/obj/solution.o differ diff --git a/srcs/main.c b/srcs/main.c index 2ba365c..f620d91 100644 --- a/srcs/main.c +++ b/srcs/main.c @@ -6,7 +6,7 @@ /* By: tischmid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/04 21:50:50 by tischmid #+# #+# */ -/* Updated: 2023/04/05 10:05:40 by tischmid ### ########.fr */ +/* Updated: 2023/04/05 10:18:04 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,12 +15,43 @@ #include "printing.h" #include "ft_string.h" +void debug_set_map(t_map *map) +{ + char *str; + + str = \ + "........................................" \ + "...................X...................." \ + ".........................X..........X..." \ + "..............X........................." \ + ".........X...........................X.." \ + "............X..X........................" \ + "..................................X....." \ + "....................................X..." \ + "........................................" \ + "X.X..........................X.........." \ + "....X.................................X." \ + "..........X............................." \ + ".............................X.........." \ + "....................X......X............" \ + "............................X...X......X" \ + ".......X........X....X....X..XX........." \ + "................X........X............X." \ + "................X......X................" \ + "....X................X.......X.........." \ + "........................................"; + map->data = malloc(sizeof(char) * (ft_strlen(str) + 1)); + ft_strcpy(map->data, str); +} + int main(void) { t_map map; - if (!read_fname("./assets/subject.map", &map)) + if (!read_fname("./assets/map20x40.map", &map)) return (ft_err("map error\n", 1)); + free(map.data); + debug_set_map(&map); map.copy = malloc(sizeof(char) * (ft_strlen(map.data) + 1)); ft_strcpy(map.copy, map.data); solve(&map); diff --git a/srcs/printing.c b/srcs/printing.c index 3909c30..bba54e8 100644 --- a/srcs/printing.c +++ b/srcs/printing.c @@ -6,7 +6,7 @@ /* By: tischmid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/05 04:09:39 by tischmid #+# #+# */ -/* Updated: 2023/04/05 10:00:23 by tischmid ### ########.fr */ +/* Updated: 2023/04/05 10:19:12 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -57,7 +57,6 @@ void print_map(t_map *map, int as_numbers) int i; int j; - ft_putstr("\nMap 2d:\n"); i = -1; while (++i < map->meta.height) {