From e564e7c8e9cfee64a49ae600b8257b5689f83d56 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Wed, 4 May 2022 11:33:29 +0200 Subject: [PATCH] back to normal execution with map argument --- Makefile | 2 +- srcs/cube3d.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7177f94..f1efa2a 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ RM_OBJS = rm -rf $(D_OBJS) # flags CFLAGS = -Wall -Wextra -Werror $(INCLUDES) -CFLAGS += -g3 -Wno-unused +CFLAGS += -g3 LFLAGS = -L$(D_LFT) -lft LFLAGS += -L$(D_LMLX) -lm -lmlx -lXext -lX11 diff --git a/srcs/cube3d.c b/srcs/cube3d.c index c46699a..62defc2 100644 --- a/srcs/cube3d.c +++ b/srcs/cube3d.c @@ -32,18 +32,14 @@ int main(int ac, char **av) { t_game *game; - /* if ((ac != 2 || check_extension(av[1], ".cub")) && \ write(2, "Error\nPlease use a valid .cub file as single argument.\n", 53)) return (EXIT_FAILURE); - */ game = init_struct(); mb_init(destroy_mlx, game); - if (init_parsing(game, "maps/map_valid_14.cub") && write(2, "The .cub file is invalid.\n", 26)) + if (init_parsing(game, av[1]) && write(2, "The .cub file is invalid.\n", 26)) return (EXIT_FAILURE); -// if (init_parsing(game, av[1]) && write(2, "The .cub file is invalid.\n", 26)) -// return (EXIT_FAILURE); if (check_map(&(game->map)) && write(2, "The map is invalid.\n", 20)) return (EXIT_FAILURE);