aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_hud.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-02-23 16:15:23 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-02-23 16:15:23 +0100
commit3a21b6173a9089d0d11a8d031d7397bb1aab6a2e (patch)
tree73a30ab2e0d9f13c12da373e7ee2008e2aed7686 /src/ft_draw_hud.c
parentFixed floating point exception (diff)
download42-cub3d-3a21b6173a9089d0d11a8d031d7397bb1aab6a2e.tar.gz
42-cub3d-3a21b6173a9089d0d11a8d031d7397bb1aab6a2e.tar.bz2
42-cub3d-3a21b6173a9089d0d11a8d031d7397bb1aab6a2e.tar.xz
42-cub3d-3a21b6173a9089d0d11a8d031d7397bb1aab6a2e.tar.zst
42-cub3d-3a21b6173a9089d0d11a8d031d7397bb1aab6a2e.zip
Colors fix
Diffstat (limited to 'src/ft_draw_hud.c')
-rw-r--r--src/ft_draw_hud.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/ft_draw_hud.c b/src/ft_draw_hud.c
index d0ed81d..46662fa 100644
--- a/src/ft_draw_hud.c
+++ b/src/ft_draw_hud.c
@@ -30,9 +30,9 @@ static void
while (y < wl->y_size)
{
*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = col;
- if (y % 2)
+ if (!(y % 3))
{
- if (col < 0x00AAAAAA)
+ if (col < 0x00909090)
col += 0x00010101;
}
y++;
@@ -51,7 +51,7 @@ static void
uint32_t y;
int32_t col;
- col = 0x00353535;
+ col = 0x00373737;
x = 0;
y = wl->y_size - (map_h * scl) - 20;
while (x < (map_w * scl) + 20)
@@ -59,7 +59,7 @@ static void
while (y < wl->y_size - (map_h * scl))
{
*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = col;
- if (y % 2)
+ if (!(y % 3))
{
if (col < 0x00AAAAAA)
col += 0x00010101;
@@ -78,17 +78,24 @@ static void
const uint16_t scl = cl->mlist->scale;
uint32_t x;
uint32_t y;
+ int32_t col;
+ col = 0x00373737;
x = wl->x_size - (map_w * scl) + 20;
y = wl->y_size - (map_h * scl) - 20;
while (x < wl->x_size)
{
while (y < wl->y_size - (map_h * scl))
{
- *(int*)(cl->img.ptr + (x * 4 +
- (y * cl->img.sizeline))) = 0x00808080;
+ *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = col;
+ if (!(y % 2))
+ {
+ if (col < 0x00AAAAAA)
+ col += 0x00010101;
+ }
y++;
}
+ col = 0x00353535;
y = wl->y_size - (map_h * scl) - 20;
x++;
}