-
Notifications
You must be signed in to change notification settings - Fork 0
/
fdf_bonus.h
91 lines (83 loc) · 2.61 KB
/
fdf_bonus.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fdf_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jduval <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/20 15:09:45 by jduval #+# #+# */
/* Updated: 2023/02/01 08:46:00 by jduval ### ########.fr */
/* Updated: 2023/01/26 15:49:31 by jduval ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FDF_BONUS_H
# define FDF_BONUS_H
# include "fdf.h"
typedef enum e_zoom
{
IN,
OUT
} t_zoom;
typedef enum e_side
{
A_X,
A_Y
} t_side;
typedef enum e_key
{
R = 114,
F = 102,
G = 103,
E = 101,
Q = 113,
I = 105,
O = 111,
X = 120,
Y = 121,
Z = 122,
W = 119,
A = 97,
D = 100,
S = 115,
UP = 65362,
LEFT = 65361,
RIGHT = 65363,
DOWN = 65364,
CTRL = 65507,
ESC = 65307
} t_key;
typedef struct s_shift
{
int set;
int r_x;
int r_y;
int r_z;
} t_shift;
typedef struct s_datum
{
t_vars vars;
t_shift shift;
int aitoff;
} t_datum;
//------fdf_key_bonus.c-------------------------------------//
int ft_key(int keycode, t_datum *database);
//------fdf_zoom_bonus.c-------------------------------------//
void ft_zoom(t_vars *vars, int keycode);
//------fdf_rotate_y_bonus.c-------------------------------------//
void ft_rotation_y(t_dot *dot, float angle);
float ft_calc_ry_x(float x, float z, float angle);
float ft_calc_ry_z(float x, float z, float angle);
//------fdf_clear_bonus.c-------------------------------------//
void ft_clear(t_vars *vars);
void ft_reset_map(t_vars *vars);
//------fdf_reset_bonus.c-------------------------------------//
void ft_reset_view(t_vars *vars, int *aitoff);
//------fdf_face_bonus.c-------------------------------------//
void ft_face_view(t_vars *vars, int *aitoff);
//------fdf_translate_bonus.c-------------------------------------//
void ft_translation(t_vars *vars, int keycode);
//------fdf_rotation_bonus.c-------------------------------------//
void ft_rotation(t_vars *vars, t_shift *shift, int keycode);
//------fdf_aitoff.c-------------------------------------//
void ft_aitoff(t_vars *vars, int *aitoff);
#endif