diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
commit | d4f853942aa2031c4bd85539ef9f3470967ffdc5 (patch) | |
tree | d2c5ffb0027860722185bf26b526757360ff1584 /src/ft_get_sprite.c | |
parent | tweaks (diff) | |
parent | Going full stack is bav (diff) | |
download | 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.gz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.bz2 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.xz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.zst 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.zip |
Merge branch 'bmp'
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_sprite.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index c9546fb..4580681 100644 --- a/src/ft_get_sprite.c +++ b/src/ft_get_sprite.c @@ -22,11 +22,11 @@ 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; @@ -52,13 +52,13 @@ int8_t 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); 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); return (-1); |