/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_set_minimap_scale.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:28:59 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:28:59 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include void ft_set_minimap_scale(t_cub *clist) { t_map *ml; ml = clist->mlist; ((ml->scale = (clist->wlist->x_size / (uint16_t)ml->map_w) - 1) < 1) ? (ml->scale = 1) : 0; (clist->wlist->y_size < (ml->map_h * ml->scale)) ? (ml->scale = (clist->wlist->y_size / (uint16_t)ml->map_h) - 1) : 0; (ml->scale >= 10) ? (ml->scale /= 4) : 0; }