diff --git a/cmd b/cmd new file mode 100644 index 0000000..3fa5765 --- /dev/null +++ b/cmd @@ -0,0 +1,3 @@ +gcc -I ./mlx -I ./libft -o main.o -c main.c +gcc -o main main.o -L ./mlx -lmlx -lXext -lX11 -L ./libft -lft + diff --git a/main.c b/main.c index 8976e6c..233e006 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,6 @@ -#include +//#include +#include "./mlx/mlx.h" +#include "./mlx/mlx_int.h" #include "./libft/libft.h" #include #include @@ -25,14 +27,17 @@ void quit_game(t_data *img) i = 0; j = 0; printf("quit game\n"); - image = mlx_new_image(img->mlx, 13 * 32, 10 * 32); + //image = mlx_new_image(img->mlx, 13 * 32, 10 * 32); //mlx_put_image_to_window(img->mlx, img->mlx_win, image, 0, 0) mlx_clear_window(img->mlx, img->mlx_win); mlx_destroy_window(img->mlx, img->mlx_win); + + + mlx_destroy_display(img->mlx); if (img->mlx) free(img->mlx); //if (img->mlx_win) - //free(img->mlx_win); + // free(img->mlx_win); while (img->map_tab[i]) free(img->map_tab[i++]); //if (img->map_tab); diff --git a/mlx b/mlx new file mode 160000 index 0000000..7dc53a4 --- /dev/null +++ b/mlx @@ -0,0 +1 @@ +Subproject commit 7dc53a411a7d4ae286c60c6229bd1e395b0efb82