File tree 1 file changed +29
-13
lines changed
1 file changed +29
-13
lines changed Original file line number Diff line number Diff line change 3
3
/* ::: :::::::: */
4
4
/* fdf.h :+: :+: :+: */
5
5
/* +:+ +:+ +:+ */
6
- /* By: ebabaogl <ebabaogl @student.42kocaeli.co +#+ +:+ +#+ */
6
+ /* By: obastug <obastug @student.42.fr> +#+ +:+ +#+ */
7
7
/* +#+#+#+#+#+ +#+ */
8
8
/* Created: 2025/01/02 11:39:37 by ebabaogl #+# #+# */
9
- /* Updated: 2025/01/03 16:42:07 by ebabaogl ### ########.fr */
9
+ /* Updated: 2025/01/04 16:03:42 by obastug ### ########.fr */
10
10
/* */
11
11
/* ************************************************************************** */
12
12
16
16
#define BUFFER_SIZE 30
17
17
#define COLOR_MASK 4294967295U
18
18
#define DEFAULT_COLOR 0x00FFFFFF
19
+
19
20
#include "window.h"
20
21
#include <stddef.h>
21
- typedef struct s_vars
22
- {
23
- t_mlx * mlx ;
24
- size_t line_len ;
25
- } t_vars ;
26
22
27
- typedef struct s_point
23
+
24
+ typedef struct s_vars
28
25
{
29
- int x ;
30
- int y ;
31
- int z ;
32
- int color ;
33
- } t_point ;
26
+ t_mlx * mlx ;
27
+ unsigned long * * map ;
28
+ int height ;
29
+ int map_x ;
30
+ int map_y ;
31
+ int w_coef ;
32
+ int s_coef ;
33
+ int a_coef ;
34
+ int d_coef ;
35
+ int distance ;
36
+ int line_count ;
37
+ int line_len ;
38
+ int anchor_x ;
39
+ int anchor_y ;
40
+ } t_vars ;
34
41
35
42
char * read_file (char * file_name );
36
43
int init_win (t_mlx * mlx );
37
44
unsigned int ft_atoi_hex (char * str );
38
45
unsigned long point_to_ulong (char * point );
39
46
unsigned long * * map_string_to_arr_2d (char * whole_file );
40
47
size_t ft_ptrarrlen (unsigned long * arr );
48
+
49
+ unsigned long get_color (unsigned long );
50
+ unsigned long get_z (unsigned long point );
51
+
52
+ void render_map (t_vars * vars );
53
+
54
+ int key_handler (int keycode , void * param );
55
+ int close_win (void * param );
56
+ void reset_camera (t_vars * vars );
41
57
#endif
You can’t perform that action at this time.
0 commit comments