aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_map.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-22 20:55:23 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-22 20:55:23 +0100
commit8a4e61b81568aeff290df59e371c99724728ce4a (patch)
treeeb3528688a76c09df091bfda01f4c68a7680b36c /src/ft_draw_map.c
parentDrawing some HUD (diff)
download42-cub3d-8a4e61b81568aeff290df59e371c99724728ce4a.tar.gz
42-cub3d-8a4e61b81568aeff290df59e371c99724728ce4a.tar.bz2
42-cub3d-8a4e61b81568aeff290df59e371c99724728ce4a.tar.xz
42-cub3d-8a4e61b81568aeff290df59e371c99724728ce4a.tar.zst
42-cub3d-8a4e61b81568aeff290df59e371c99724728ce4a.zip
Perfect
Diffstat (limited to 'src/ft_draw_map.c')
-rw-r--r--src/ft_draw_map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ft_draw_map.c b/src/ft_draw_map.c
index 39299c1..db915e4 100644
--- a/src/ft_draw_map.c
+++ b/src/ft_draw_map.c
@@ -49,14 +49,14 @@ void
while (map[y][x])
{
if (map[y][x] == '1')
- ft_draw_square(scale + (x * (scale)),
- ft_y_offset(clist) + (y * (scale)), 0x0000ffaa, clist);
+ ft_draw_square(scale + 9 + (x * (scale)),
+ ft_y_offset(clist) - 9 + (y * (scale)), 0x0000ffaa, clist);
else if (map[y][x] == '2')
- ft_draw_square(scale + (x * (scale)),
- ft_y_offset(clist) + (y * (scale)), 0x0033ccff, clist);
+ ft_draw_square(scale + 9 + (x * (scale)),
+ ft_y_offset(clist) - 9 + (y * (scale)), 0x0033ccff, clist);
else
- ft_draw_square(scale + (x * (scale)), ft_y_offset(clist) +
- (y * (scale)), ft_rgb_to_hex(clist->f_rgb), clist);
+ ft_draw_square(scale + 9 + (x * (scale)), ft_y_offset(clist)
+ - 9 + (y * (scale)), ft_rgb_to_hex(clist->f_rgb), clist);
x++;
}
x = 0;