aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_map.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_map.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ft_draw_map.c b/src/ft_draw_map.c
index 39299c1..a334fc1 100644
--- a/src/ft_draw_map.c
+++ b/src/ft_draw_map.c
@@ -24,9 +24,9 @@ static uint16_t
static void
ft_draw_player(t_player *plist, t_cub *clist)
{
+ const uint16_t scale = clist->mlist->scale;
const float x = plist->pos_x;
const float y = plist->pos_y;
- const uint16_t scale = clist->mlist->scale;
ft_draw_circle(
(scale / 2) + (x * (scale)),
@@ -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)), 0x00ca5422, 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)), 0x006afa6a, clist);
x++;
}
x = 0;