-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfdf.h
93 lines (85 loc) · 2.4 KB
/
fdf.h
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
85
86
87
88
89
90
91
92
93
/* ************************************************************************** */
/* */
/* :::::::: */
/* fdf.h :+: :+: */
/* +:+ */
/* By: asulliva <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/05/10 16:17:47 by asulliva #+# #+# */
/* Updated: 2019/05/10 17:35:35 by asulliva ######## odam.nl */
/* */
/* ************************************************************************** */
#ifndef FDF_H
# define FDF_H
# define KEY_W 13
# define KEY_A 0
# define KEY_S 1
# define KEY_D 2
# define KEY_R 15
# define KEY_ESC 53
# define KEY_MINUS 27
# define KEY_PLUS 24
# define D_ARR 125
# define U_ARR 126
# define L_ARR 123
# define R_ARR 124
# define L_SQUARE 33
# define R_SQUARE 30
# define SPACE 49
# define KEY_Q 12
# define KEY_E 14
# include "libft/includes/get_next_line.h"
# include "libft/includes/libft.h"
# include "minilibx_macos/mlx.h"
# include <math.h>
# include <stdio.h>
typedef struct s_cam
{
double alpha;
double beta;
double gamma;
double zoom;
} t_cam;
typedef struct s_var
{
int x;
int y;
int z;
int color;
} t_var;
typedef struct s_mlx
{
int fd;
void *mlx;
void *win;
char *name;
int size_x;
int size_y;
int **map;
void *img;
char *data_address;
int endian;
int size_line;
int bits_in_pixel;
int add_x;
int add_y;
double add_z;
int startx;
int starty;
int iso;
t_cam *cam;
} t_mlx;
void handle(t_mlx *map);
int get_xy(t_mlx *map, char *line);
int ft_read(t_mlx *map);
int get_input(t_mlx *map);
int win_width(t_mlx *map);
int win_height(t_mlx *map);
void draw_map(t_mlx *mlx);
int get_color(t_var cur, t_var v1, t_var v2, t_var d);
void help_display(t_mlx *mlx, unsigned c);
t_var set_delta(t_var v1, t_var v2, t_var d);
t_var set_sigma(t_var v1, t_var v2, t_var s);
t_var set_var(t_var v, t_mlx *mlx, int x, int y);
t_var rotate_xyz(t_var v, t_mlx *mlx);
#endif