From ce43b1cd1caa539af687425f58a6999a20807878 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 3 Mar 2020 16:14:26 +0100 Subject: Going full stack is bav --- src/ft_get_sprite.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/ft_get_sprite.c') diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index 27a55d6..4580681 100644 --- a/src/ft_get_sprite.c +++ b/src/ft_get_sprite.c @@ -22,14 +22,14 @@ void x = 1; y = 1; - while (clist.mlist.map[y]) + while (clist->mlist.map[y]) { - while (clist.mlist.map[y][x]) + while (clist->mlist.map[y][x]) { - if (ft_ischarset("2", clist.mlist.map[y][x])) + if (ft_ischarset("2", clist->mlist.map[y][x])) { - clist.sp_list.s_pos_x = x + 0.5; - clist.sp_list.s_pos_y = y + 0.5; + clist->sp_list.s_pos_x = x + 0.5; + clist->sp_list.s_pos_y = y + 0.5; return ; } x++; @@ -44,23 +44,23 @@ int8_t { if (!(*words) || !words[1] || words[2]) { - ft_sprintf(clist.errmsg, "%s", FT_ERR_ARGS); + ft_sprintf(clist->errmsg, "%s", FT_ERR_ARGS); return (-1); } if (ft_check_ext(*(words + 1), ".xpm") < 0) { - ft_sprintf(clist.errmsg, "%s", FT_ERR_NOT_A_XPM); + ft_sprintf(clist->errmsg, "%s", FT_ERR_NOT_A_XPM); return (-1); } - ft_memdel((void**)&clist.mlist.sprite_path); - if (!(clist.mlist.sprite_path = ft_strdup(*(words + 1)))) + ft_memdel((void**)&clist->mlist.sprite_path); + if (!(clist->mlist.sprite_path = ft_strdup(*(words + 1)))) { - ft_sprintf(clist.errmsg, "%s", FT_ERR_ALLOCATE); + ft_sprintf(clist->errmsg, "%s", FT_ERR_ALLOCATE); return (-1); } - if (ft_check_not_found(clist.mlist.sprite_path) < 0) + if (ft_check_not_found(clist->mlist.sprite_path) < 0) { - ft_sprintf(clist.errmsg, "%s", FT_ERR_RD_SP); + ft_sprintf(clist->errmsg, "%s", FT_ERR_RD_SP); return (-1); } return (0); -- cgit v1.2.3