diff options
Diffstat (limited to '')
-rw-r--r-- | map/lvl_four.cub | 2 | ||||
-rw-r--r-- | map/map_five.cub | 4 | ||||
-rw-r--r-- | src/ft_check_map_line.c | 2 | ||||
-rw-r--r-- | src/ft_check_map_surrounds.c | 2 | ||||
-rw-r--r-- | src/ft_detect.c | 3 | ||||
-rw-r--r-- | src/ft_draw_map.c | 2 | ||||
-rw-r--r-- | src/ft_parse_map.c | 2 |
7 files changed, 8 insertions, 9 deletions
diff --git a/map/lvl_four.cub b/map/lvl_four.cub index 58e99a6..49e28ef 100644 --- a/map/lvl_four.cub +++ b/map/lvl_four.cub @@ -23,6 +23,6 @@ L ./map/lvl_five.cub 111110111111011 11111111111010111 1100000000000000001 - 111011111000111111011 + 111111111DDD111111011 1E000000000000000000001 1111111111111111111111111 diff --git a/map/map_five.cub b/map/map_five.cub index 904b706..9d0f34f 100644 --- a/map/map_five.cub +++ b/map/map_five.cub @@ -17,12 +17,12 @@ L ./map/map_two.cub 1011000001110000000000000000L01 1001000000000000000000000000001 111111111011000001110000000000000000001 -100000000011000001111111111111111111111 +10000000001100000111111111D111111111111 11110111111111011100000010001 11110111111111010001010000001 11000000110101010000000000001 10002000000000000000000000001 10000000000000000001010000001 -11000001110101011111011110N0111 +11000001110101011111011110N01 11110111 1110101 101111 10001 11111111 1111111 111111111111 diff --git a/src/ft_check_map_line.c b/src/ft_check_map_line.c index 7b9b545..213d75c 100644 --- a/src/ft_check_map_line.c +++ b/src/ft_check_map_line.c @@ -18,7 +18,7 @@ static int8_t ft_first_checks(char *line, size_t i, t_cub *clist) { - if (!ft_ischarset("012NSEWL ", line[i])) + if (!ft_ischarset("012NSEWLD ", line[i])) { ft_sprintf(clist->errmsg, FT_ERR_ILL_MAP); return (-1); diff --git a/src/ft_check_map_surrounds.c b/src/ft_check_map_surrounds.c index 2bf228c..07c9540 100644 --- a/src/ft_check_map_surrounds.c +++ b/src/ft_check_map_surrounds.c @@ -42,7 +42,7 @@ void { while (ml->map[y][x]) { - if (ft_ischarset("02NESWL", ml->map[y][x])) + if (ft_ischarset("02NESWLD", ml->map[y][x])) { if (ft_wall_check(y, x, ml->map) < 0) ft_map_error(FT_ERR_MAP_WALLS, cl); diff --git a/src/ft_detect.c b/src/ft_detect.c index 8ab3d57..cbd8c58 100644 --- a/src/ft_detect.c +++ b/src/ft_detect.c @@ -74,8 +74,7 @@ void cl->rlist.sqy += cl->mlist.y_step; cl->rlist.side = 1; } - if (cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy] == '1' || - cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy] == 'L') + if (ft_ischarset("1LD", cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy])) cl->rlist.hit = 1; } } diff --git a/src/ft_draw_map.c b/src/ft_draw_map.c index 2ca5f37..232891c 100644 --- a/src/ft_draw_map.c +++ b/src/ft_draw_map.c @@ -49,7 +49,7 @@ void { while (map[y][x]) { - if (map[y][x] == '1') + if (ft_ischarset("1D", map[y][x])) ft_draw_square(scale + 9 + (x * (scale)), ft_y_offset(clist) - 9 + (y * (scale)), 0x00ca5422, clist); else if (map[y][x] == '2') diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 36d1ec5..38ce686 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -65,7 +65,7 @@ static int8_t } if (ft_ischarset("1 ", line[0])) return ((ft_get_map_first_line(line, clist) < 0) ? (-1) : (12)); - if (!ft_ischarset("RNSEWFCLM", line[0]) + if (!ft_ischarset("RNSEWFCLMD", line[0]) || !(words = ft_split(line, ' '))) return (ft_error_here(FT_ERR_ILL_ENTRY, line, clist)); if ((ret = ft_select_get(words, clist)) == 12) |