2023-05-16 13:12:54 -04:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* parsing_private.h :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2023/05/16 16:27:57 by cchauvet #+# #+# */
|
|
|
|
/* Updated: 2023/05/16 18:46:21 by cchauvet ### ########.fr */
|
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
2023-05-03 07:09:06 -04:00
|
|
|
#ifndef PARSING_PRIVATE_H
|
|
|
|
# define PARSING_PRIVATE_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
# include "../libftx/libftx.h"
|
|
|
|
# include "./parsing.h"
|
|
|
|
|
|
|
|
int parsing_meta(const char *path);
|
|
|
|
int get_token(const char *str);
|
|
|
|
char ***get_header(const char **file_content, size_t *header_size);
|
|
|
|
int header_is_valid(char ***header, t_map *map);
|
|
|
|
char **get_body(const char **file_content, size_t header_size);
|
2023-05-05 10:49:04 -04:00
|
|
|
int body_is_valid(t_map *map);
|
2023-05-16 13:12:54 -04:00
|
|
|
int get_spawn_position(const char **body, double *x, double *y);
|
|
|
|
int map_is_in_one_part(const char **body);
|
|
|
|
int set_texture(t_map *map, int token, const char *key, const char *value);
|
|
|
|
int set_color(long long *color, const char *key, const char *value);
|
|
|
|
int check_header_is_complete(t_map *map);
|
2023-05-03 07:09:06 -04:00
|
|
|
#endif
|