diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-03 19:55:55 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-03 19:55:55 +0100 |
commit | 907bbcf4ef754a6e784a176b1a96b5a01b65cb67 (patch) | |
tree | 3d1eaeaf82d6fcf65e6eb335e92a1c56d9fe4e17 | |
parent | commit (diff) | |
download | 42-cub3d-907bbcf4ef754a6e784a176b1a96b5a01b65cb67.tar.gz 42-cub3d-907bbcf4ef754a6e784a176b1a96b5a01b65cb67.tar.bz2 42-cub3d-907bbcf4ef754a6e784a176b1a96b5a01b65cb67.tar.xz 42-cub3d-907bbcf4ef754a6e784a176b1a96b5a01b65cb67.tar.zst 42-cub3d-907bbcf4ef754a6e784a176b1a96b5a01b65cb67.zip |
Missing texture bug fix
Diffstat (limited to '')
-rw-r--r-- | map/map_one.cub | 1 | ||||
-rw-r--r-- | src/ft_check_missing.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/map/map_one.cub b/map/map_one.cub index face56c..5e1f44e 100644 --- a/map/map_one.cub +++ b/map/map_one.cub @@ -4,6 +4,7 @@ NO ./path_to_the_north_texture SO ./path_to_the_south_texture EA ./path_to_the_east_texture WE ./path_to_the_west_texture + S ./path_to_the_sprite_texture F 220,100,0 diff --git a/src/ft_check_missing.c b/src/ft_check_missing.c index 9f3698b..32e2943 100644 --- a/src/ft_check_missing.c +++ b/src/ft_check_missing.c @@ -27,13 +27,13 @@ int int ft_check_missing(t_cub *clist) { - if (!clist->no_tex_path) + if (!clist->no_tex_path[0]) return (ft_missing_error("north side texture", clist)); - else if (!clist->so_tex_path) + else if (!clist->so_tex_path[0]) return (ft_missing_error("south side texture", clist)); - else if (!clist->ea_tex_path) + else if (!clist->ea_tex_path[0]) return (ft_missing_error("east side texture", clist)); - else if (!clist->we_tex_path) + else if (!clist->we_tex_path[0]) return (ft_missing_error("west side texture", clist)); else if (clist->wlist->x_size < 0 || clist->wlist->y_size < 0) return (ft_missing_error("resolution", clist)); |