aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_set_minimap_scale.c
blob: 5a69c1842f79aef0b0f157eb25848cd67d8e1443 (plain)
1
2
3
4
5
6
7
8
9
10
#include <cub3d.h>

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;
}