aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_drawsquare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_drawsquare.c')
-rw-r--r--src/ft_drawsquare.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ft_drawsquare.c b/src/ft_drawsquare.c
new file mode 100644
index 0000000..d720f44
--- /dev/null
+++ b/src/ft_drawsquare.c
@@ -0,0 +1,22 @@
+#include <mlx.h>
+#include <cub3d.h>
+
+void
+ft_drawsquare(t_win *wlist, int a, int b)
+{
+ int x;
+ int y;
+
+ x = a;
+ y = b;
+ while (x > a - 40)
+ {
+ while (y > b - 40)
+ {
+ mlx_pixel_put(wlist->wlx, wlist->winptr, x, y, 255);
+ y--;
+ }
+ y = b;
+ x--;
+ }
+}