-
Notifications
You must be signed in to change notification settings - Fork 0
/
fdf.h
executable file
·66 lines (57 loc) · 1.64 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fdf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ckatz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/09/20 18:08:30 by ckatz #+# #+# */
/* Updated: 2017/09/20 18:10:12 by ckatz ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FDF_H
# define FDF_H
# include "libft/libft.h"
# include <mlx.h>
# include <math.h>
# define SCALE 3
# define WIDTH 800
# define HEIGHT 600
# define ESC 53
typedef struct s_line
{
int x1;
int y1;
int x2;
int y2;
double dx;
double dy;
double step;
double **points_x;
double **points_y;
} t_line;
typedef struct s_map
{
int num_rows;
int num_cols;
int **map_arr;
} t_map;
typedef struct s_points
{
int iso_x;
int iso_y;
int cart_x;
int cart_y;
} t_points;
typedef struct s_env
{
void *mlx;
void *win;
t_points tp;
t_line tl;
} t_env;
t_map store_map(char *filename);
void cart_to_iso(t_map tmap, t_env te);
void draw_horizontal(t_map tmap, t_env te);
void draw_vertical(t_map tmap, t_env te);
#endif