forked from sben-chi/cub3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcub3D.h
63 lines (53 loc) · 2.1 KB
/
cub3D.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cub3D.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: imane <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/17 21:13:44 by irhesri #+# #+# */
/* Updated: 2023/02/14 14:14:56 by imane ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CUB3D_H
# define CUB3D_H
# include <stdlib.h>
# include <stdio.h>
# include <unistd.h>
# include <fcntl.h>
# include <math.h>
# include <string.h>
# include <limits.h>
# include "stdbool.h"
# include "data.h"
# ifdef __linux__
# include "mlx_linux/mlx_linux.h"
# else
# include "mlx_mac/mlx_mac.h"
# endif
// basic fcts
void *my_calloc(size_t count, size_t size);
bool put_error(char *s, size_t len);
bool **get_map_arr(t_map *map, size_t lines, size_t max);
// update image
void get_view_info(t_data *data);
void draw_walls(t_data *data, t_image *cub, double *rays);
void new_image(t_data *data, t_window *win);
// hooks call functions
int key_press(int key, t_data *data);
int key_release(int key, t_data *data);
int mouse_hook(int x, int y, t_data *data);
int update_image(t_data *data);
int my_close(t_window *win);
// parsing
int check_files(char *s1, char *s2);
int my_strlen(char *s);
char *get_next_line(int fd, size_t *t_len);
void init_data(t_data *data);
void parse_time(t_data *data, int fd);
short add_back(t_map **map, t_map **last, t_map *nnode);
short element(t_data *data, char *element, int len);
t_map *new(char *line, int len);
// textures
void textures(t_data *dt, long long x, long long *y, double wall_h);
#endif