-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Haliris/parser_beta
Beta version of parser
- Loading branch information
Showing
16 changed files
with
569 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,17 @@ | |
# By: jteissie <[email protected]> +#+ +:+ +#+ # | ||
# +#+#+#+#+#+ +#+ # | ||
# Created: 2024/08/15 12:02:08 by tsuchen #+# #+# # | ||
# Updated: 2024/08/15 14:40:12 by jteissie ### ########.fr # | ||
# Updated: 2024/08/16 19:28:50 by jteissie ### ########.fr # | ||
# # | ||
# **************************************************************************** # | ||
|
||
NAME = cub3d | ||
|
||
SRCS_M = main.c | ||
|
||
SRCS_PS = parser.c | ||
SRCS_PS = parser.c \ | ||
build_map.c \ | ||
parser_utils.c | ||
|
||
SRCS_MAP = map.c | ||
|
||
|
@@ -36,7 +38,7 @@ OBJS = $(SRCS:.c=.o) | |
|
||
HEAD = includes/ | ||
|
||
CFLAGS = -Wall -Wextra -Werror # -g | ||
CFLAGS = -Wall -Wextra -Werror -g3 | ||
|
||
CC = cc | ||
|
||
|
@@ -57,7 +59,11 @@ $(NAME): $(OBJS) $(H_DEPS) | |
$(CC) $(CFLAGS) $(OBJS) $(MLXFLAGS) $(LIBFT) -o $(NAME) | ||
|
||
minilibx-linux: | ||
git clone https://github.com/42Paris/minilibx-linux.git $@ | ||
@if [ ! -d "$@" ]; then \ | ||
git clone https://github.com/42Paris/minilibx-linux.git $@; \ | ||
else \ | ||
echo "mlx already present in the working directory, aborting clone."; \ | ||
fi | ||
|
||
bonus: $(NAME) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* parser.h :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: jteissie <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/15 15:00:57 by jteissie #+# #+# */ | ||
/* Updated: 2024/08/16 18:58:41 by jteissie ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#ifndef PARSER_H | ||
# define PARSER_H | ||
# include "cub3d.h" | ||
|
||
typedef enum e_bool t_bool; | ||
typedef struct s_data t_data; | ||
|
||
typedef enum e_parse_status | ||
{ | ||
MAP_OK, | ||
MAP_ERR, | ||
PANIC_ERR, | ||
} t_parse_status; | ||
|
||
int parse_map(t_data *data); | ||
char **build_map(t_data *data); | ||
t_bool is_invalid_char(char c); | ||
t_parse_status check_invalid_chars(char **map); | ||
void fill_whitespaces(char **map); | ||
t_parse_status find_start(uint32_t coordinates[], char **map); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.