aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_drawsquare.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_drawsquare.c8
1 files changed, 5 insertions, 3 deletions
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 <mlx.h>
#include <cub3d.h>
+#include <mlx.h>
+#include <stdint.h>
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--;