-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.c
More file actions
49 lines (46 loc) · 1.69 KB
/
init.c
File metadata and controls
49 lines (46 loc) · 1.69 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* init.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bguzel <bguzel@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/22 19:10:07 by yturgut #+# #+# */
/* Updated: 2023/09/29 16:18:54 by bguzel ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
void start_init(t_data *data)
{
data->move_speed = 0.25;
data->rot_speed = 0.1;
data->floorc = create_trgb(0, data->floor.r, data->floor.g, data->floor.b);
data->skyc = create_trgb(0, data->sky.r, data->sky.g, data->sky.b);
}
void data_init(t_data *data)
{
data -> mapy_size = 0;
data -> cub_size = 0;
data -> player_size = 0;
data -> zero_size = 0;
data -> map = NULL;
data -> image_path = NULL;
data ->north.path = NULL;
data ->east.path = NULL;
data ->south.path = NULL;
data ->west.path = NULL;
data ->north.image = NULL;
data ->west.image = NULL;
data ->east.image = NULL;
data ->south.image = NULL;
data->floor.r = 0;
data->floor.g = 0;
data->floor.b = 0;
data->sky.r = 0;
data->sky.g = 0;
data->sky.b = 0;
data->arg_count = 0;
data->flager = 0;
data->so_flag = 0;
data->no_flag = 0;
}