/ src / main.c
main.c
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   main.c                                             :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: ll-hotel <ll-hotel@student.42.fr>          +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2024/07/25 15:48:10 by ll-hotel          #+#    #+#             */
 9  /*   Updated: 2024/10/15 12:40:27 by ll-hotel         ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #include "cub3D.h"
14  #include "ft_basics.h"
15  #include <unistd.h>
16  
17  int	main(int argc, const char *argv[])
18  {
19  	t_cube	cube;
20  
21  	if (argc != 2)
22  	{
23  		write(2, "cub3D: bad number of arguments\n", 32);
24  		return (1);
25  	}
26  	ft_bzero(&cube, sizeof(cube));
27  	if (!init_cube(&cube, argv[1]))
28  		return (1);
29  	cube_render(&cube);
30  	cube_loop(&cube);
31  	destroy_cube(&cube);
32  	return (0);
33  }