42_solong/main.c

52 lines
1.6 KiB
C
Raw Normal View History

2022-12-22 11:41:31 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/12 17:20:17 by cchauvet #+# #+# */
2023-01-05 13:04:29 -05:00
/* Updated: 2023/01/05 18:18:07 by cchauvet ### ########.fr */
2022-12-22 11:41:31 -05:00
/* */
/* ************************************************************************** */
#include "solong.h"
2023-01-05 13:04:29 -05:00
int main(int ac, char **av)
{
char **map;
if (ac)
{
map = ft_readfile(av[1]);
ft_printf("%S", map);
}
return (0);
}
int maiin(void)
2022-12-22 11:41:31 -05:00
{
void *window_manager;
void *window;
2023-01-04 14:07:13 -05:00
t_shape shape;
2022-12-22 11:41:31 -05:00
window_manager = mlx_init();
window = mlx_new_window(window_manager, 500, 500, "Hello world!");
2023-01-04 14:07:13 -05:00
shape.x = 10;
shape.y = 10;
2023-01-05 13:04:29 -05:00
shape.size = 25;
shape.color = ft_strdup("yellow");
2023-01-04 14:07:13 -05:00
shape.bcolor = ft_strdup("black");
shape.shape = ft_strdup("square");
2023-01-05 13:04:29 -05:00
printf("%d", ft_strcmp(shape.shape, "square"));
2023-01-04 14:07:13 -05:00
ft_xpm_gen_file(shape);
free(shape.color);
free(shape.bcolor);
free(shape.shape);
2023-01-05 13:04:29 -05:00
// mlx_loop(window_manager);
2023-01-04 14:07:13 -05:00
mlx_destroy_window(window_manager, window);
mlx_destroy_display(window_manager);
free(window_manager);
2023-01-05 13:04:29 -05:00
return (1);
2022-12-22 11:41:31 -05:00
}