blob: 883e524a649000c1f365e9e03e9623c179c82bbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* ************************************************************************** */
/* LE - / */
/* / */
/* ft_set_minimap_scale.c .:: .:/ . .:: */
/* +:+:+ +: +: +:+:+ */
/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2020/02/09 14:33:30 by rbousset #+# ## ## #+# */
/* Updated: 2020/02/09 14:33:31 by rbousset ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
#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;
}
|