28 lines
1.2 KiB
C
28 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* draw.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/12/13 15:49:23 by cchauvet #+# #+# */
|
|
/* Updated: 2023/01/04 19:05:04 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "solong.h"
|
|
|
|
void ft_draw_xpm(void *mlx, void *window, char *file, size_t *cord)
|
|
{
|
|
char *img_path;
|
|
void *img;
|
|
int bozo;
|
|
|
|
img_path = ft_strmerger(2, XPM_PATH, file);
|
|
if (img_path == NULL)
|
|
return ;
|
|
img = mlx_xpm_file_to_image(mlx, img_path, &bozo, &bozo);
|
|
mlx_put_image_to_window(mlx, window, img, cord[0], cord[1]);
|
|
mlx_destroy_image(mlx, img);
|
|
}
|