aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_parse_map.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 20:34:42 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 20:34:42 +0100
commiteb11f281970bfe7bbf17786089709d4e0016b8c7 (patch)
tree61e4dcb1a75c4272a71bcf0e2c49cb0968e176d6 /src/ft_parse_map.c
parentChanged return values (diff)
download42-cub3d-eb11f281970bfe7bbf17786089709d4e0016b8c7.tar.gz
42-cub3d-eb11f281970bfe7bbf17786089709d4e0016b8c7.tar.bz2
42-cub3d-eb11f281970bfe7bbf17786089709d4e0016b8c7.tar.xz
42-cub3d-eb11f281970bfe7bbf17786089709d4e0016b8c7.tar.zst
42-cub3d-eb11f281970bfe7bbf17786089709d4e0016b8c7.zip
Norme
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r--src/ft_parse_map.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index 9112b5b..85337f0 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -112,15 +112,14 @@ void
ret = 1;
while (ret != 12 && ret != -1)
ret = ft_parse_it(fd, clist);
- if (ret == -1)
- ft_map_error(clist);
+ (ret == -1) ? (ft_map_error(clist)) : 0;
if (ft_get_map_core(fd, clist) < 0)
ft_map_error(clist);
ft_check_map_last_line(clist);
ft_get_player_spawn(clist->plist, clist);
ft_check_missing(clist);
- if ((clist->scale = ((uint16_t)clist->wlist->x_size /
- (uint16_t)clist->map_w) - 1) < 1)
- clist->scale = 1;
+ ft_print_list(clist);
+ ((clist->scale = ((uint16_t)clist->wlist->x_size /
+ (uint16_t)clist->map_w) - 1) < 1) ? (clist->scale = 1) : 0;
close(fd);
}