diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-11 13:11:27 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-11 13:11:27 +0100 |
| commit | 2fdb9ad1d66e28e056f31bc6321d2c198db33290 (patch) | |
| tree | c3c32462b6a09f1a9f393cc0216c2ffe3bdaaa09 /parse/parse_check.c | |
| parent | cff05e83256a67b8cb23b16b1e1e6f761ff52f4c (diff) | |
| download | cub3d-2fdb9ad1d66e28e056f31bc6321d2c198db33290.tar.gz cub3d-2fdb9ad1d66e28e056f31bc6321d2c198db33290.tar.bz2 cub3d-2fdb9ad1d66e28e056f31bc6321d2c198db33290.zip | |
Error messages with error helper
Diffstat (limited to 'parse/parse_check.c')
| -rw-r--r-- | parse/parse_check.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/parse/parse_check.c b/parse/parse_check.c index 7bcfc8b..a65d74a 100644 --- a/parse/parse_check.c +++ b/parse/parse_check.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/11 10:59:15 by cacharle #+# #+# */ -/* Updated: 2020/01/11 11:15:04 by cacharle ### ########.fr */ +/* Updated: 2020/01/11 13:03:33 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,19 +15,21 @@ t_state *parse_check(t_state *state) { int i; - int j; - int player_count; + /* int j; */ + /* int player_count; */ i = -1; while (++i < state->map_width) if (state->map[0][i] != CELL_WALL || state->map[state->map_height - 1][i] != CELL_WALL) - return (state_destroy(state)); + return (error_put_return_state_destroy( + "validate map without borders", state)); i = -1; while (++i < state->map_height) if (state->map[i][0] != CELL_WALL || state->map[i][state->map_width - 1] != CELL_WALL) - return (state_destroy(state)); + return (error_put_return_state_destroy( + "validate map without borders", state)); // maybe not necessary /* player_count = 0; */ /* i = -1; */ |
