-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfdf.h
executable file
·81 lines (73 loc) · 1.99 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gsferopo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/06/09 16:24:36 by gsferopo #+# #+# */
/* Updated: 2017/08/28 13:37:03 by gsferopo ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FDF_H
# define FDF_H
# include "libft/libft.h"
# include <mlx.h>
# include <math.h>
# include <fcntl.h>
# define GREEN 0x0000FF00
# define RED 0x00FF0000
# define BLUE 0x000000FF
# define WHITE 0x00FFFFFF
# define AM a->m
# define AS a->s
# define AX a->x
# define AY a->y
# define AI a->i
# define AZ a->zoom
# define AMX AM[AY][AX]
# define ASX AS[AY][AX]
# define DEG_T_RAD 2 * M_PI / 180
# define DEG 45
typedef struct s_proc {
char *file_name;
void *mlx;
void *win;
void *img;
int size_x;
int size_y;
int x;
int y;
int **m;
int s[1000][1000];
int fd;
int i;
char *line;
int color[1000];
int indx;
int indy;
int zoom;
int rot;
} t_proc;
typedef struct s_draw {
int dx;
int dy;
int steps;
float xinc;
float yinc;
float x;
float y;
int x1;
int y1;
int x2;
int y2;
int i;
} t_draw;
void prep_var(t_proc *a, char *av);
int isdir(t_proc *a);
int put_pixel(t_proc *a, int x, int y);
int printchar(t_proc *a);
int draw_line(t_proc *a, t_draw *d);
int printchar_p2(t_proc *a);
int put_pixel(t_proc *a, int x, int y);
#endif