aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_skybox.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_get_skybox.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/ft_get_skybox.c b/src/ft_get_skybox.c
deleted file mode 100644
index 1e55b85..0000000
--- a/src/ft_get_skybox.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ************************************************************************** */
-/* */
-/* ::: :::::::: */
-/* ft_get_skybox.c :+: :+: :+: */
-/* +:+ +:+ +:+ */
-/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
-/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/02/24 20:22:45 by rbousset #+# #+# */
-/* Updated: 2020/03/09 18:56:01 by rbousset ### ########lyon.fr */
-/* */
-/* ************************************************************************** */
-
-#include <libft.h>
-#include <cub3d.h>
-#include <stdint.h>
-
-int8_t
- ft_get_skybox(char **words, t_cub *clist)
-{
- if (!(*words) || !(*(words + 1)) || (*(words + 2)))
- {
- ft_sprintf(clist->errmsg, FT_ERR_ARGS);
- return (-1);
- }
- if (ft_check_ext(*(words + 1), ".xpm") < 0)
- {
- ft_sprintf(clist->errmsg, FT_ERR_NOT_A_XPM);
- return (-1);
- }
- ft_memdel((void*)&clist->mlist.skybox_path);
- if (!(clist->mlist.skybox_path = ft_strdup(*(words + 1))))
- {
- ft_sprintf(clist->errmsg, FT_ERR_ALLOCATE);
- return (-1);
- }
- if (ft_check_not_found(clist->mlist.skybox_path) < 0)
- {
- ft_sprintf(clist->errmsg, FT_ERR_RD_SB);
- return (-1);
- }
- clist->mlist.isskybox = 1;
- return (0);
-}