/* ************************************************************************** */
/*                                                                            */
/*                                                        ::::::::            */
/*   parser.h                                           :+:    :+:            */
/*                                                     +:+                    */
/*   By: whaffman <whaffman@student.codam.nl>         +#+                     */
/*                                                   +#+                      */
/*   Created: 2025/04/19 14:41:55 by whaffman      #+#    #+#                 */
/*   Updated: 2025/05/23 14:00:34 by whaffman      ########   odam.nl         */
/*                                                                            */
/* ************************************************************************** */

#ifndef PARSER_H
# define PARSER_H
# include "cub3d.h"
# include "libft.h"

size_t			count_chars(const char *str, char c);
ssize_t			get_file_size(const char *filename);
char			*read_map_file(const char *filename);
int				is_map_line(const char *line);
unsigned int	parse_color(const char *color_str);
int				parse_config_line(char *line, t_map *map);
int				map_width(char **lines);
int				parse_tile(char c);
int				parse_map(char **lines, t_game *game);
int				parse_file(char *buffer, t_game *game);
void			print_config(t_map *map);
int				parse_map_line(char **lines, t_game *game, int i);
t_tile			**copy_map(t_tile **grid, int width, int height);
char			**pointer_lines(char *buffer, char c);
int				valid_arguments(int argc, char **argv);

#endif