aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_drawsquare.c
blob: 211f1228e0c5f2683bf30027bba5859150d869b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* ************************************************************************** */
/*                                                          LE - /            */
/*                                                              /             */
/*   ft_drawsquare.c                                  .::    .:/ .      .::   */
/*                                                 +:+:+   +:    +:  +:+:+    */
/*   By: rbousset <marvin@le-101.fr>                +:+   +:    +:    +:+     */
/*                                                 #+#   #+    #+    #+#      */
/*   Created: 2020/02/02 17:19:22 by rbousset     #+#   ##    ##    #+#       */
/*   Updated: 2020/02/02 17:19:22 by rbousset    ###    #+. /#+    ###.fr     */
/*                                                         /                  */
/*                                                        /                   */
/* ************************************************************************** */

#include <mlx.h>
#include <cub3d.h>

void
	ft_drawsquare(int a, int b, int rgb, t_cub *clist)
{
	int	x;
	int	y;

	x = a;
	y = b;
	while (x > a - 40)
	{
		while (y > b - 40)
		{
			mlx_pixel_put(clist->wlist->wlx, clist->wlist->winptr, x, y, rgb);
			y--;
		}
		y = b;
		x--;
	}
}