Skip to content

Commit 4d409f5

Browse files
committed
data_bag initialized
1 parent 3a7b1d1 commit 4d409f5

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

inc/fdf.h

+29-13
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
/* ::: :::::::: */
44
/* fdf.h :+: :+: :+: */
55
/* +:+ +:+ +:+ */
6-
/* By: ebabaogl <ebabaogl@student.42kocaeli.co +#+ +:+ +#+ */
6+
/* By: obastug <obastug@student.42.fr> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* 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 */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -16,26 +16,42 @@
1616
#define BUFFER_SIZE 30
1717
#define COLOR_MASK 4294967295U
1818
#define DEFAULT_COLOR 0x00FFFFFF
19+
1920
#include "window.h"
2021
#include <stddef.h>
21-
typedef struct s_vars
22-
{
23-
t_mlx *mlx;
24-
size_t line_len;
25-
} t_vars;
2622

27-
typedef struct s_point
23+
24+
typedef struct s_vars
2825
{
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;
3441

3542
char *read_file(char *file_name);
3643
int init_win(t_mlx *mlx);
3744
unsigned int ft_atoi_hex(char *str);
3845
unsigned long point_to_ulong(char *point);
3946
unsigned long **map_string_to_arr_2d(char *whole_file);
4047
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);
4157
#endif

0 commit comments

Comments
 (0)