aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_drawmap.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 14:12:03 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 14:12:03 +0100
commite6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33 (patch)
tree7b5e2219785805cefc80bd209c892df42679c303 /src/ft_drawmap.c
parentBetter code (diff)
download42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.gz
42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.bz2
42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.xz
42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.zst
42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.zip
Bug fix
Diffstat (limited to 'src/ft_drawmap.c')
-rw-r--r--src/ft_drawmap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ft_drawmap.c b/src/ft_drawmap.c
index 02151a2..7d7cafe 100644
--- a/src/ft_drawmap.c
+++ b/src/ft_drawmap.c
@@ -19,7 +19,7 @@
static void
ft_draw_core_map(char **map, t_cub *clist)
{
- const uint16_t scale = clist->scale;
+ const uint8_t scale = clist->scale;
size_t x;
size_t y;
@@ -30,13 +30,14 @@ static void
while (map[y][x])
{
if (map[y][x] == '1')
- ft_drawsquare(scale + (x * (scale + 1)), scale + (y * (scale + 1)),
- 0x00aa99aa, clist);
+ ft_drawsquare(scale + (x * (scale + 1)),
+ scale + (y * (scale + 1)), 0x00aa99aa, clist);
else if (map[y][x] == '2')
- ft_drawsquare(scale + (x * (scale + 1)), scale + (y * (scale + 1)),
- 0x0033ccff, clist);
+ ft_drawsquare(scale + (x * (scale + 1)),
+ scale + (y * (scale + 1)), 0x0033ccff, clist);
else
- ft_drawsquare(scale + (x * (scale + 1)), scale + (y * (scale + 1)),
+ ft_drawsquare(scale + (x * (scale + 1)),
+ scale + (y * (scale + 1)),
ft_rgb_to_hex(clist->f_rgb), clist);
x++;
}