-
Notifications
You must be signed in to change notification settings - Fork 0
/
render_ceilling_floor.c
37 lines (34 loc) · 1.28 KB
/
render_ceilling_floor.c
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
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* render_ceilling_floor.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fflores <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/02 18:59:31 by fflores #+# #+# */
/* Updated: 2020/11/02 18:59:33 by fflores ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
void render_ceilling_floor(t_data *data)
{
int i;
int j;
j = 0;
while (j < data->conf.win_h)
{
i = -1;
while (++i < data->conf.win_w)
mlx_pix_put(data, 0 + i, 0 + j, data->conf.ceill_color);
j++;
}
j = 0;
while (j < data->conf.win_h / 2)
{
i = -1;
while (++i < data->conf.win_w)
mlx_pix_put(data, 0 + i, data->conf.win_h
/ 2 + j, data->conf.floor_color);
j++;
}
}