39 lines
1.6 KiB
C
39 lines
1.6 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* solong.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/01/04 16:20:03 by cchauvet #+# #+# */
|
|
/* Updated: 2023/01/05 17:40:19 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef SOLONG_H
|
|
# define SOLONG_H
|
|
# include "libftx/libftx.h"
|
|
# define XPM_PATH "./textures/"
|
|
# include <stdio.h>
|
|
# include <unistd.h>
|
|
# include <fcntl.h>
|
|
# include "minilibx-linux/mlx.h"
|
|
typedef struct s_shape
|
|
{
|
|
char *color;
|
|
char *bcolor;
|
|
char *shape;
|
|
size_t size;
|
|
size_t x;
|
|
size_t y;
|
|
} t_shape;
|
|
void ft_draw_xpm(void *mlx, void *window, char *file, size_t *cord);
|
|
void ft_draw_square(void *window_manager, void *window, t_shape shape);
|
|
char *xpm_square_generator(t_shape);
|
|
char *ft_gen_xpm_file(t_shape);
|
|
char *ft_square(char c, size_t x_len, size_t y_len);
|
|
char *ft_triangle(char c, char b, size_t x_len, size_t y_len);
|
|
char *ft_xpm_gen_file(t_shape shape);
|
|
char **ft_readfile(char *path);
|
|
#endif
|