diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_set_minimap_scale.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ft_set_minimap_scale.c b/src/ft_set_minimap_scale.c index 0f79d6e..cd3424c 100644 --- a/src/ft_set_minimap_scale.c +++ b/src/ft_set_minimap_scale.c @@ -16,9 +16,12 @@ void ft_set_minimap_scale(t_cub *clist) { - ((clist->scale = (clist->wlist->x_size / (uint16_t)clist->map_w) - 1) < 1) - ? (clist->scale = 1) : 0; - (clist->wlist->y_size < (clist->map_h * clist->scale)) ? (clist->scale = - (clist->wlist->y_size / (uint16_t)clist->map_h) - 1) : 0; - (clist->scale >= 10) ? (clist->scale /= 4) : 0; + 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; } |