42_solong/solong.h

39 lines
1.6 KiB
C
Raw Normal View History

2022-12-22 11:41:31 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* solong.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
2023-01-04 14:07:13 -05:00
/* Created: 2023/01/04 16:20:03 by cchauvet #+# #+# */
2023-01-05 13:04:29 -05:00
/* Updated: 2023/01/05 17:40:19 by cchauvet ### ########.fr */
2022-12-22 11:41:31 -05:00
/* */
/* ************************************************************************** */
#ifndef SOLONG_H
# define SOLONG_H
# include "libftx/libftx.h"
2023-01-04 14:07:13 -05:00
# define XPM_PATH "./textures/"
# include <stdio.h>
# include <unistd.h>
# include <fcntl.h>
# include "minilibx-linux/mlx.h"
typedef struct s_shape
{
2022-12-22 11:41:31 -05:00
char *color;
2023-01-04 14:07:13 -05:00
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);
2023-01-05 13:04:29 -05:00
char **ft_readfile(char *path);
2022-12-22 11:41:31 -05:00
#endif