aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_drawmap.c2
-rw-r--r--src/ft_get_colors.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ft_drawmap.c b/src/ft_drawmap.c
index d5c545a..0380f2d 100644
--- a/src/ft_drawmap.c
+++ b/src/ft_drawmap.c
@@ -35,7 +35,7 @@ static void
0x0033ccff, clist);
else
ft_drawsquare(40 + (x * 41), 40 + (y * 41),
- clist->f_color, clist);
+ ft_rgb_to_hex(clist->f_rgb), clist);
x++;
}
x = 0;
diff --git a/src/ft_get_colors.c b/src/ft_get_colors.c
index 7d7907a..7d9d5d2 100644
--- a/src/ft_get_colors.c
+++ b/src/ft_get_colors.c
@@ -50,6 +50,10 @@ int
clist->f_color += ft_atoi(num[1]);
clist->f_color *= 1000;
clist->f_color += ft_atoi(num[2]);
+
+ clist->f_rgb.r = ft_atoi(num[0]);
+ clist->f_rgb.g = ft_atoi(num[1]);
+ clist->f_rgb.b = ft_atoi(num[2]);
ft_free_words(num);
return (0);
}
@@ -76,6 +80,10 @@ int
clist->c_color += ft_atoi(num[1]);
clist->c_color *= 1000;
clist->c_color += ft_atoi(num[2]);
+
+ clist->c_rgb.r = ft_atoi(num[0]);
+ clist->c_rgb.g = ft_atoi(num[1]);
+ clist->c_rgb.b = ft_atoi(num[2]);
ft_free_words(num);
return (0);
}