-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfdf.h
More file actions
84 lines (75 loc) · 2.47 KB
/
fdf.h
File metadata and controls
84 lines (75 loc) · 2.47 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fdf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aobshatk <aobshatk@mail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/07 17:40:17 by aobshatk #+# #+# */
/* Updated: 2025/04/09 09:23:58 by aobshatk ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FDF_H
# define FDF_H
# include "get_next_line/get_next_line.h"
# include "libft/ft_printf/libftprintf.h"
# include "libft/libft.h"
# include "minilibx/mlx.h"
# include "minilibx/mlx_int.h"
# include <linux/input-event-codes.h>
# include <linux/input.h>
# include <math.h>
# define M_PI 3.14159265358979323846
typedef struct s_coord
{
int y;
char **heights;
struct s_coord *next;
} t_coord;
typedef struct s_addr
{
void *img;
void *mlx;
void *win;
char *data;
int bpp;
int line_size;
int endian;
} t_addr;
typedef struct s_step_coord
{
int height;
int width;
int **colors;
int **z_matrix;
} t_step_coord;
typedef struct s_pix
{
int x;
int x1;
int y;
int y1;
int color;
} t_pix;
int check_file(char *file);
int is_digits(char **arr);
int is_ints(char **arr);
int arr_len(char **arr);
int trgb(int t, int r, int g, int b);
int atob(char *num);
long long int ft_atoil(const char *str);
void add_node(t_coord **lst, t_coord *new);
void clear_list(t_coord **lst);
void start_window(t_step_coord coords);
void min_xy(int *x, int *y, int **icoord);
void draw_map(t_addr *addrs, t_step_coord coords);
void draw_line(t_pix xy, t_addr *addr);
void lst_add(t_step_coord **lst, t_step_coord *new);
void lst_clear(t_step_coord **lst);
void free_c_arr(char **arr);
t_coord *create_node(int y, char **height);
t_coord *init_list(char *file);
t_coord *last_node(t_coord *lst);
t_step_coord *lst_create(int y, int x, int z, int color);
t_step_coord create_coords(t_coord *coords);
#endif