-
Notifications
You must be signed in to change notification settings - Fork 0
/
ray.h
77 lines (71 loc) · 2.43 KB
/
ray.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ray.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yaalaoui <yaalaoui@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/14 18:18:10 by yaalaoui #+# #+# */
/* Updated: 2020/12/04 11:21:14 by yaalaoui ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef RAY_H
# define RAY_H
# include <stdint.h>
typedef struct s_bmp_header
{
char bftype[3];
u_int32_t bfsize;
u_int16_t bfreserved1;
u_int16_t bfreserved2;
u_int32_t bfoffbits;
u_int32_t bisize;
int32_t biwidth;
int32_t biheight;
u_int16_t biplanes;
u_int16_t bibitcount;
u_int32_t bicompression;
u_int32_t bisizeimage;
int32_t bixpermeter;
int32_t biypermeter;
u_int32_t biclrused;
u_int32_t biclrimportant;
} t_bmp_file;
# define FCEUP it->faceup
# define FCEDOWN it->facedown
# define FCELEFT it->faceleft
# define FCERIGHT it->faceright
# define DY it->dy
# define Y it->y
# define WALLY it->wally
# define WALLVY it->wallvy
# define WALLHY it->wallhy
# define DX it->dx
# define X it->x
# define WALLVX it->wallvx
# define WALLHX it->wallhx
# define WALLX it->wallx
# define ARC it->arc
# define HH it->hith
# define HV it->hitv
# define TXTNUM it->textnum
# define SH map->s_height
# define SW map->s_width
# define DT map->ditch
# define DT1 map->ditch1
int g_count;
void init(t_horizontal *it, t_mapdata *map);
void ft_facewhere(t_horizontal *it);
void generete_wall(t_mapdata *map, t_horizontal *it,
int b, double theone);
void init_spt(t_mapdata *map);
void rayfacing(t_horizontal *it);
void ft_helpdrawasquare(t_mapdata *map);
void picktxt(t_horizontal *it);
void ft_drawaplayer(t_mapdata *map);
void save_bmp(t_mapdata *map);
void texture(t_mapdata *map);
double ft_horizontal(t_mapdata *map, t_horizontal *it);
double ft_vertical(t_mapdata *map, t_horizontal *it);
double colmdist(t_mapdata *map, t_horizontal *it);
#endif