Repository navigation
Expand file tree
/
Copy pathmfa.h
More file actions
49 lines (43 loc) · 1.54 KB
/
Copy pathmfa.h
File metadata and controls
49 lines (43 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* mfa.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abdsalah <abdsalah@student.42amman.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/06 15:21:04 by abdsalah #+# #+# */
/* Updated: 2026/02/06 18:20:15 by abdsalah ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MFA_H
# define MFA_H
# include "minilibx-linux/mlx.h"
# include <stdio.h>
# include <stdlib.h>
# include <unistd.h>
# include <stdbool.h>
# include <string.h>
typedef struct s_graphics
{
void *mlx;
void *win;
void *img;
int *data;
int bpp;
int line_len;
int endian;
}
t_graphics;
typedef struct s_mfa
{
unsigned char *data;
size_t size;
} t_mfa;
void graphics_setup(t_graphics *graphics);
void free_graphics(t_graphics *graphics);
void free_mfa(t_mfa *mfa);
FILE *file_setup(const char *filename);
t_mfa *load_mfa(FILE *input);
bool endswith(const char *str, const char *suffix);
long getFileSize(FILE *file);
#endif