From 20a7a10c762d2d81d3f749d08d4da3f56a045dce Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 4 Feb 2020 23:45:21 +0100 Subject: Scale --- src/ft_drawsquare.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ft_drawsquare.c') diff --git a/src/ft_drawsquare.c b/src/ft_drawsquare.c index 1488c68..9e23937 100644 --- a/src/ft_drawsquare.c +++ b/src/ft_drawsquare.c @@ -11,20 +11,22 @@ /* / */ /* ************************************************************************** */ -#include #include +#include +#include void ft_drawsquare(int a, int b, int rgb, t_cub *clist) { + const uint16_t scale = clist->scale; int x; int y; x = a; y = b; - while (x > a - 40) + while (x > a - scale) { - while (y > b - 40) + while (y > b - scale) { *(int*)(clist->img.ptr + (x * 4 + (y * clist->img.sizeline))) = rgb; y--; -- cgit v1.2.3