-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm_draw_map.c
32 lines (29 loc) · 1.21 KB
/
m_draw_map.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* m_draw_map.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkawaguc <nkawaguc@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/28 12:17:39 by nkawaguc #+# #+# */
/* Updated: 2024/10/28 12:17:39 by nkawaguc ### ########.fr */
/* */
/* ************************************************************************** */
#include "m_fdf.h"
void draw_map(t_data *data, t_map *map)
{
int i;
int j;
i = -1;
while (++i < map->height)
{
j = -1;
while (++j < map->width)
{
if (j + 1 < map->width)
draw_line(data, map->points[i][j], map->points[i][j + 1]);
if (i + 1 < map->height)
draw_line(data, map->points[i][j], map->points[i + 1][j]);
}
}
}