plr orientation at begining

This commit is contained in:
hugogogo
2022-05-04 00:55:47 +02:00
parent eb3b5c37a8
commit 3c76a8646a
13 changed files with 176 additions and 193 deletions

View File

@@ -32,13 +32,19 @@ 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, av[1]) && write(2, "The .cub file is invalid.\n", 26))
if (init_parsing(game, "maps/map_valid_14.cub") && 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);
init_game(game);